Ruin Walker - ruin probability practice
← Stochastic ProcessesYou run the book. Do not go negative.
Surplus starts at 20 ticks and earns premium every period. Claims arrive at random (Poisson, λ = 1/period) with random sizes (mean μ = 5). Ruin is surplus below zero, and it is absorbing.
At u = 0 that is exactly 1/(1+θ) - however much you save up there is always some ruin risk unless θ is charged high enough and u grows large.
About Ruin Walker
Run an insurance book under the Cramér-Lundberg model - choose your safety loading, answer a closed-form question each period, and try to survive 12 periods without your surplus going negative.
You run an insurance book. Your surplus starts at 20 ticks and you have a $100 bankroll. Before the run you choose two things: a safety loading θ from the options 10%, 25%, 50%, or 100%, and a stake per unit of surplus from $1, $2, $5, or $10. The loading sets your premium: the book collects (1+θ)·λ·μ ticks per period, with claim rate λ = 1 per period and mean claim size μ = 5 ticks.
Each of the 12 periods works the same way. First you are asked one question drawn from a procedural bank of eight Cramér-Lundberg quantities - the ruin probability ψ(u) from the current surplus, ψ(0), the adjustment coefficient R, the premium rate c, Lundberg's bound e^(-Ru), the surplus needed to hit a target ruin probability, expected claims per period, or the net drift. The question uses the live surplus and your chosen θ, so you cannot recycle last period's answer. After checking your answer you run the period: a Poisson(λ) number of claims arrives, each claim is exponentially distributed with mean μ, premium is added, claims are subtracted, and the new surplus appears.
Ruin is absorbing: the moment surplus goes below zero the run ends, no matter how it happened. Survive all 12 periods and the book closes solvent. From period 1 onward, any period where you have not yet checked the question you can also close the book early and cash out at the current surplus.
Why quant interviews test this
The Cramér-Lundberg model is the canonical first model in actuarial exams and insurance-flavored quant interviews: expect to be asked for the net profit condition, the adjustment coefficient, and Lundberg's inequality, and to explain why ruin probability decays exponentially in initial capital.
The same mathematics shows up outside insurance as risk of ruin for a trading book or a bankroll: a positive-drift process with heavy-tailed downside still has nonzero ruin probability, and the exponential-in-capital decay is the standard answer to 'how much capital do I need for a target survival probability'. Interviewers also like the ψ(0) = 1/(1+θ) fact as a quick check of whether you understand the formula.
The Ruin Walker guide covers how scoring works, the strategy that wins, a worked example and the mistakes most players make.
More Stochastic Processes games
- Martingale Mutiny - Sail a wealth process with a flat positive edge against a proportional storm that halves your hold - and get graded on predicting the recursion's expected value when you choose to stop.
- All Stochastic Processes practice
- Every game guide