Trader's Ruin

Status
Not open for further replies.
A trader is using a system where, after each trade, he wins W units with a probability of p (0 < p < 1) or he loses L units with a probability of q = 1 - p.

The trader has a starting bankroll of B0 units and he has in mind a surrender bankroll of X units (B0 > X). If the trader's bankroll drops to or below X, he admits defeat (i.e., he is RUINED).

The trader will trade his system indefinitely until he is ruined.

What is his risk of ruin?


The bankroll after n trades is Bn = B0 + sum[t_i]i=1...n

The expectation of each trade is E[t] = pW-q|L|

The variance of each trade is V[t] = pq(W + |L|)²

The expected value of the trader's bankroll is

E[Bn] = E[ B0 + sum[t_i]i=1...n ]

E[Bn] = B0 + nE[t] = B0 + n(pW-q|L|)

The variance of the trader's bankroll is

V[Bn] = nV[t]

V[Bn] = npq(W + |L|)²


Central Limit Theorem:

Bn ~ N(E[Bn], V[Bn])

Bn ~ N(B0 + nE[t], nV[t])


The z-score of ruin is

Zr = (X - E[Bn])/sqrt[V[Bn]]

Zr = (X - B0 - nE[t])/sqrt[nV[t]]

Zr = (-(B0-X)/sqrt[n] - sqrt[n]*E[t])/sqrt[V[t]]

If E[t] <=0, then Zr will increase as n increases, making ruin more and more likely.

BUT

If E[t] > 0, then Zr becomes more negative as n increases, making ruin less and less likely.


So the long-term risk of ruin is certain (100%) unless the trading system has positive expectation.
 
Unsurprisingly this result is fully consistent with the RoR (risk of ruin) formulae derived elsewhere via the Gambler's Ruin Theorem and summarized below:


Let W = |L| = one (1) betting unit.

Let R{T|X|C} be the probability of failure (aka risk of ruin) for a gambler with current bankroll C attempting to reach a target bankroll T before falling to a surrender bankroll X. T > X+1.

R{T|X|X} = 1

R{T|X|T} = 0


If p = q:

R{T|X|C} = (T-C)/(T-X)

If p <> q:

R{T|X|C} = ((q/p)^(C-X) - (q/p)^(T-X))/(1 - (q/p)^(T-X))

R{infinity|X|C} = 1 if q > p

R{infinity|X|C} = 1 if q = p

R{infinity|X|C} = (q/p)^(C-X) if q < p

R{infinity|X|C} < 1 if q < p AND C > X
 
Naturally the most interesting formula is

R{infinity|X|C} = (q/p)^(C-X) if q < p


Mathematics professor Peter A. Griffin wanted to use this formula to calculate the risk of ruin for his expert blackjack systems but his real-world payoffs were not all equal (just like for trading systems).

So Griffin came up with the brilliant idea of an "even-payoff equivalent" system, a fictional system which has even-money payoffs as well as first and second moments (expectation and variance) identical to the real-world system.

Let U = bet size in the even-payoff equivalent system.

Let z = win rate in the even-payoff equivalent system.

Now the expectation (E) and the variance (V) must be the same for both systems:

E = pW - q|L| = zU - (1-z)U

V + E² = pW² + qL² = zU² + (1-z)U²

Solving for z and U gives:

U = (pW² + qL²)^½

z = 0.5(1 + (pW - q|L|)/U)


So (q/p)^(C-X) becomes ((1 - z)/z)^((C-X)/U)


If we define the trader's edge as

edge = (pW - q|L|)/U

Then

RoR = ((1 - edge)/(1 + edge))^((C-X)/U)

:cool:
 
Quote from virtualmoney:

Say I am interested in q/p ratio to be profitable,
Set (q/p)^(C-X)<1,
=> q/p < InverseLog(Log1/(C-X))
Is this requirement correct?
You want a positive-expectation trading system. So get away from the Gambler's Ruin formula and use the Trader's Ruin formula:

RoR = ((1-edge)/(1+edge))^((C-X)/U)

where edge = (pW - q|L|)/U

and U = (pW² + qL²)^½


RoR < 1 if edge > 0 and C > X
 
Quote from kut2k2:

...
Let R{T|X|C} be the probability of failure (aka risk of ruin) for a gambler with current bankroll C attempting to reach a target bankroll T before falling to a surrender bankroll X. T > X+1.
...

If there was only one trade, could you rephrase T, X as:

T = target profit for the trade
X = stop loss for the trade

or is that oversimplifying too much?
Thanks for writing out the math step by step, it is very helpful.
 
Quote from zedDoubleNaught:

If there was only one trade, could you rephrase T, X as:

T = target profit for the trade
X = stop loss for the trade

or is that oversimplifying too much?
You could say

T = C + W = X + |L| + W

In that case the RoR is just q.
Quote from zedDoubleNaught:

Thanks for writing out the math step by step, it is very helpful.
You're welcome. :)
 
Quote from kut2k2:

A trader is using a system where, after each trade, he wins W units with a probability of p (0 < p < 1) or he loses L units with a probability of q = 1 - p.

Cranks don't understand that p and q for trading systems are only determined after the fact, they are not constant, they can vary significantly and that these formulas they derive from such cranky constancy assumtpions hold only in the case of coin flips and related games, where the bias does not change.

So, when you you going to stop misguiding people with your non-sense?
 
Status
Not open for further replies.
Back
Top