Site Administrator Swing Trader Data Scientist & DevOps

Manta, Ecuador

Experience: Advanced

Platform: My own custom solution

Trading: Emini Futures

Posts: 49,401 since Jun 2009

Thanks: 32,062 given,
96,677
received

I'd like to start a discussion on Risk of Ruin. The general concept of a Risk of Ruin analysis is to determine if you will go bust over a statistical number of trades. For example you may have a probability edge of 65% but after factoring commissions, slippage, and the risk of a consecutive losses, you may still blow up/ruin your account.

As most of you know, I am quite bad at math, which makes such analysis a big challenge for me. This is unfortunate, because a lot of what I want to do with my trading these days is based on math. So I could use some help.

Kaufman gives us the following formula for calculating the risk of ruin:
risk_of_ruin = ((1 - Edge)/(1 + Edge)) ^ Capital_Units
Edge is the probability of a win.

There are a few different formulas floating around, and I've seen some requests to incorporate

I would love it if one of you whiz-bang math guys could make an Excel spreadsheet or something similar to calculate and graph a risk of ruin analysis, with the output containing a schedule/list of trades and the resulting account balance. So we can see an entire list of trades and how things unfold.

BM, as always you prove your talet of raising very interesting topics!
Things like RoR are often overlooked but in my view they are absolutely crucial! It's not only about trading well, it's trading well in a way that fits your account size as well as risk tolerance. And that means some number crunching...

I incorporated the more complicated version (I chose that one as the other seems to be way ovesimplified) into the journal template oveview, getting the numbers from actual trades. I will also incorporate a simple risk of ruin calculator.
Both should be available in the next update which will be coing real soon.

vvhg

Hic Rhodos, hic salta.

The following 4 users say Thank You to vvhg for this post:

BM, have you got some more info on the complicated formula? I'm getting funny results with that one and I suspect that I interpret something wrong (putting in a wrong value) as the calculation itself sems to be right.

vvhg

Hic Rhodos, hic salta.

The following user says Thank You to vvhg for this post:

After spending quite some time trying to get that clculation to work, I finally ran out of ideas. I double and triple checked everything and think that I finally got it working as intended according to some more deailed explanations on the web...
But stillI have got two basic problems with the formula of Peter A. Griffin:
1. I found what seems to be differen versions of this formula
2. I tested the calculaions with different sets of trades and account sizes, the results are all obviously way off of rality...

Since this is a topic of extreme interest to me and my math is worse than yours BM, I am interested to see how this thread goes.

For those of you with more experience than me, I'd like to know if the RoR is removed IF a drawn down strategy is employed.

Say for instance you start with 50K and you have a max monthly stop of 8% of your capital and over the course of the month, you lose that much and so you stop until the next month begins. Month 2 has a max drawn down of 6% of remaining capital and for whatever reason, you hit this stop loss and once again you stop trading until month three begins. This month begins with a 4% max draw down of remaining capital and again, you stop trading once this level is hit, month four begins with a 2% max drawn down limit and of course, this too is hit and you stop trading until month five begins with a 1% max drawn down of remaining capital. End of month comes and the draw down is hit and you begin month 6 with a .5% draw down of remaining capital stop loss. Assuming month six is a bust and I would assume at this point if you are in a five month losing streak you will lose in month six as well, then at this point, by my calculations, about 75% of the original capital is left.

This all assumes that you stop trading at those levels of course but from a pure math standpoint, would someone be willing to put a spread sheet together that can approximate this scenario and see how it looks in black and white?

Simplicity is the ultimate sophistication, Leonardo da Vinci

Most people chose unhappiness over uncertainty, Tim Ferris

The following 4 users say Thank You to PandaWarrior for this post:

Theoretically, yes, practically not really.
What you described is (close to) a classic depreciation, always substract a fixed percentage of the current account vaue. As you only ever substract a fraction and never all of it, you will never hit zero. In practice this is a bit different as you coud very well describe bringing a $5000 account to $0.0001 as ruin.

I have attached a very simple spreadshet that calculates this and plots a graph.

vvhg

Hic Rhodos, hic salta.

The following 6 users say Thank You to vvhg for this post:

This is basically the same error that I had with my calculations (though not the only one).
So I am tempted to conclude that the formula is wrong.
Perhaps we can come up with a better formula?

vvhg

Hic Rhodos, hic salta.

The following 2 users say Thank You to vvhg for this post:

Apparently the risk of ruin increases the longer someone trades with a, let's say 60% win rate. (55%, 72%, etc.)
I don't know if anyone covered this already. The only thing that can help is to trade smaller when one is trading
badly, if I understand the conclusion at the link.
=================================================================

Conclusion In agreement with Kaufman the risk of ruin is greatest at the beginning. The risk of ruin also increases the longer your remain a trader because the risk of experiencing a series of losses increases.
The risk of ruin in our example would remain the same as the risk at the beginning if we did not scale back when we started to hit a series of losing trades. By scaling to smaller trade sizes as our portfolio is reduced we lower the risk of ruin and improve our survival rate.

there is nothing there about 'risk of ruin'. He has a great many videos about Probability, Statistics and Finance.
You could spend too too much time there however. Trying to re-invent the wheel.

Maybe you could e-mail him to do a video on the subject. He (they) seems to love to learn and teach.

Maybe we could look at this from a more practical standpoint.
If you keep track of the different trade setups you take, you might be able to eliminate the lower probability ones.
I really don't have a list in my head, but there are upward breakouts vs. double (or triple) bottoms. They are similar
in that one expects the price to move upwards.

Do you personally make more with one type or the other? If you just trade breakouts, then we'd have to modify
the question somehow.

Anyway, maybe there are some reasons why you make less in certain circumstances.

- Stephen

The following user says Thank You to stephenszpak for this post:

The more I think about the risk of ruin formulas, the more I come to the conclusion that first they seem to be more a kind of educated guess than hard fact and secondly (as also stated in the link @Silver Dragon posted) the obtained values seem to be rather relative and should not be mistaken as absolute values.
So this would lead me away from these calculations again and back to the good old monte carlo engine.... I will try to improve and pimp the one in the journal (here) so that it is ( more than ) a full substitute for the ror calculations.
I would appreciate your views on that...

I personally do that (at least in some degree of detail) and I think that it is a very good thing to do. But the risk of ruin would need to be calculated for the mix of methods you actually trade. Though it would be interesting to know it for individual setups or instruments. I think I could realize that using the monte carlo engine....

Vvhg

Hic Rhodos, hic salta.

The following 2 users say Thank You to vvhg for this post:

But the risk of ruin would need to be calculated for the mix of methods you actually trade.

Reminds me of something I read long ago. Can't remember exactly though, something like:

Traders can't win without an 'edge'. But they have a hard time defining exactly what that 'edge' is.

One very basic thing to check out is, perhaps, a monthly profits graph. This is something I'm just throwing out,
it's not scientific really. There must be a standard, but I don't know what it is. So, graph the profit (or loss) per
month. Assuming, hopefully, there are just profits, is the graph steady or increasing? If not there is a problem.

What one is doing is looking at the actual dollar results of 10's of trades.
The number that broke even, or were losers, or were winners, is not relevant here.

I'm sure there are many factors that can cause losses, and therefore increase the
risk of ruin that aren't often considered.

Some of them are:

Is the trader getting enough restful sleep?

Is the trader trading worse after X hours (let's say 4) than when he/she began the trading day?
Why? fatigue? boredom?

Is there a severe and on-going distraction in the traders life? (e.g. is a family member extremely ill ?)

Is the trader thinking about buying something expensive which can only be bought with trading gains?
This is another distraction, of course. This one is directly related to trading, since it causes impatience
in the act of trading.

Ad astra

- Stephen

The following user says Thank You to stephenszpak for this post:

Very good post indeed. I have to agree with about all of it. Many things you mentioned are actually in the journal (here). Have you had a look at it? And what do you think about using a good monte carlo engine instead of ror formulas ( or even basing some ror calculation on actual monte carlo results).

vvhg

Sent from my iPad using Tapatalk HD

Hic Rhodos, hic salta.

The following 2 users say Thank You to vvhg for this post:

No I haven't seen your journal.
I know nothing about monte carlo engines or ror formulas.

I wonder if anyone anywhere has ever done a comprehensive list of things that can cause ongoing
trading losses (in other words 'likely ruin'). There are the technical things, like 'The instrument I trade
just isn't moving like it used to.' or the psychological 'I used to make money.
I guess I was just lucky then.'

Some believe that if a trade failed, it failed because of an error on the traders part.
Others believe that if a trade failed, there can be no explanation. Some will fail, period.

I can't say which is best really. I would say that if one is experiencing hard trading times
that there should be a search for the reason. Hard trading times, means the risk of ruin
for the trader has already increased.

This saying has its merits, but one has to remember why traders trade. Traders trade
to make money. If you're making some money it's great to say "I'm following my rules. That's
the main thing." It sounds good anyway.
If you're losing money consistently it's crazy to say "I'm following my rules. That's
the main thing."

If a trader is losing consistently over time 'feeling nothing' isn't going to help. If nothing
on paper, that is, all the losses, aren't getting any attention, the best thing for the trader
would be to experience fear, or at least concern.

Ignoring ongoing losses is denying the existence of a serious problem, that is, likely ruin.

- Stephen

The following user says Thank You to stephenszpak for this post:

I inserted the link to that thread, I think you will find a few things you touched upon in there.

Why don't you start a thread on that? I would very much enjoy such a thread! I think successful trading has two main elements: 1. you actually have an edge, 2. you execute that edge properly. One is nothing without the other.

vvhg

Hic Rhodos, hic salta.

The following 3 users say Thank You to vvhg for this post:

I just checked out your journal. I thought it was going to be general comments about
your trading and such. I see a lot of math which I'm not competent to comment on.

(Be advised, I'm only on-line on the weekends. That's why it's been a few days.)

- Stephen

The following user says Thank You to stephenszpak for this post:

Well, you don't have to understand why a plane flies to travel with it...
I thought you might be interested in it for tracking different setups and so on as it pulls all the statistics out of your trades automatically....

vvhg

Hic Rhodos, hic salta.

The following user says Thank You to vvhg for this post:

Maybe I should be interested. At this point it's not something I'd be getting into.
I can see the importance of it though. monpere has done this sort of thing I think. He's always
talking about seeing certain setups and the probability of success. He apparently has a
very structured system.

The following user says Thank You to stephenszpak for this post:

I have posted a new (beta) version of the Journal ( see Trading Metrics for journals/record keeping ), now featuring a real, powerful Monte Carlo engine. As the formulas don't seem to be very precise, we could perhaps use the Monte Carlo instead. I could easily convert it to a standalone version if anyone wishes so...

vvhg

Hic Rhodos, hic salta.

The following user says Thank You to vvhg for this post:

That is right, it's completely different.
But ideally the results would be similar. Personally I would rather trust a Monte Carlo simulation with many iterations than the formulas you gave me. Bottom line is, both ways are only more or less accurate estimates. You can see that if you think about the initial collection of trades. Would you always exactly repeat this string of trades, your risk of ruin would either be 0 or 100%. This means that both ways involve a concept of shuffling the trades in the collection. I can not see that any of the RoR formulas actually calculates this risk. They all calculate an estimate of that risk. A MC actually calculates strings of trades, and that is done to the penny. But still it is a simulation based on. Random shuffling of the trades. In some cases the results could be very misleading, for example if trades in the original collection are grouped in long strings with many either winning or losing trades. The problem here is that the outcome of a trade would probably have a rather strong correlation to the outcome of the last trade. And as the MC selects trades randomly it breaks that correlation and thus leads to different results(although it would be theoretically possible to include similar behaviour in a MC engine).

Vvhg

Sent from my iPad using Tapatalk HD

Hic Rhodos, hic salta.

The following user says Thank You to vvhg for this post:

I thought there were some basics concepts regarding risk of ruin.

The most basic to me is, if you're losing, then reduce position size.

Like if you look back, whatever, the past week (or 2 or 3) and you have less
money than when you started...you must trade smaller. If you trade the 6E futures
with 1 contract and you are losing money then you must go to the Forex EUR/USD and
trade a mini-lot. Don't go back to the 6E until you are profitable again.

(Hope I got the technicals correct in the above.)

Don't go back to the 6E for at least one month, even if your trading dramatically improves
in the first week.

There are also ETF's as suggested by monpere below. Still on the idea of reducing position size.

(Excerpt of his post below.)
================================================================

If you want to trade the S&P, trade the SPY etf instead of the ES, trade the IWM etf instead of TF, if you want to trade gold, trade the GLD etf instead of the GC.

What's so great about ETF's? The granularity of share sizing. You can trade very few shares, 10, 20 30 shares while you are learning, or developing your method, and keep your risk to a bare minimum so you don't reach the point of ruin, before you develop a winning method. For example, I use to trade the SPY on 8 range chart, 8 tick fixed stop, 16 tick fixed target, and I traded 125 shares on each trade. This meant, on each losing trade, I lost $10, and on each winning trade I made $20. This also means, I can take 10 trades during the day, lose all of them, and only be out $100 at the end of the day! If I win all of them, I made $200 for the day. There a plenty of people making a decent living on $200 a day. So, you can keep your risk to an absolute minimum while you are learning, and developing your method. Once you are confident, and want to make more money, just increase you share size.

I use Van Tharpe's R-Multiple share sizing formula to figure out how many shares to trade: 'shares = risk / stoploss', so in my case above my stop loss was always 8 ticks, and I only wanted to risk $10 on every trade, so: $10 / 0.08 = 125 shares.

Correct, but that (how do I react to a certain ror?) is the second step .

The first is to determin the ror, which in that case, or as a matter of fact in any case with negative expectancy (always presumed you carry on with a rather constant expectancy) is 100%, no formulas needed for that...

vvhg

Hic Rhodos, hic salta.

The following user says Thank You to vvhg for this post:

Very true but the statement is entirely qualitative. So it doesn't give me any quantitative statement what my risk of ruin is.
But as I have said before, I have no optimal solution to that problem either, so I am certainly not entitled to complain about statements that need not to be argued upon as they are obviously correct!

vvhg

Hic Rhodos, hic salta.

The following user says Thank You to vvhg for this post:

I am not an expert on risk of ruin, but I will try to formulate some basic ideas. Be aware please that I am not insisting that the following statements are entirely correct.

Calculating the Risk of Ruin Requires A Few Assumptions

(1) I assume fixed fractional betting, that is for every bet (trade) I am betting the same fixed percentage of my account.

(2) Definition of ruin: Ruin is achieved, when you cannot trade anymore. Ruin therefore depends on the initial account size and the maximum acceptable drawdown.

(3) Target: If you want to quadruple your account, the risk of ruin is higher than if you just intend to double your account, as you stay in the game for a longer time.

(4) Bet size: The bet size has the largest impact on the risk of ruin. I will express the betsize as a multiple of optimal f, which is the optiomal bet size derived from the Kelly criterion.

Example: Betting full Kelly with a target of quadrupling the account

Initial bank roll 100,000
Ruin : a = 0.25 (when the account has dropped to 25,000)
Success: b = 4 (when the account has reached 400,000)
Kelly Factor: k = 1 (known as full Kelly betting)

You can then calculate the probability that you reach the target size of the account prior to ruin. This probability only depends from a, b and k, but not from the expecation or the standard deviations of the bets.

The formula is

In the above case we would get P(0.25,4,1) = 80%.

The risk of ruin is the complementary probability and would accordingly show as 20%. This shows that betting full Kelly is quite risky.

Betting Half-Kelly

If you bet half Kelly, but leave the other parameters unchanged, you will get

P(0.25, 4, 0.5) = 98.5 %

The risk of ruin drops to 1.5 % (half Kelly) compared to 20% (full Kelly)!

This may explain why many professional gamblers rather bet half-Kelly than full-Kelly.

Tip

Provided you use a fixed fractional betting system and adjust your bet size according to the Kelly Formula, the risk of ruin does not depend on the expectancy, as the Kelly criterion already adjusts the bet size to match expectancy. The risk of ruin only depends on a, b and k, where

a: fraction of initial account size considered as ruin
b: multiple of initial account size used as target
k: Kelly factor describing the bet size in terms of optimal f

The ability to do math decreases exponentially inversely proportionally to an increase in aging .... it's gotten so bad... I don't even ask the strippers for change back... anymore....

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"

The following 2 users say Thank You to ThatManFromTexas for this post:

Site Administrator Swing Trader Data Scientist & DevOps

Manta, Ecuador

Experience: Advanced

Platform: My own custom solution

Trading: Emini Futures

Posts: 49,401 since Jun 2009

Thanks: 32,062 given,
96,677
received

Please help me understand where the bet size is determined in this example. Can you list an actual trade example (ie: entry, stop, target measured in terms of % risk or Kelly bet size)?

As @ThatManFromTexas is aging exponentially (as he stated) I quickly ran a few calculations.
I believe you missed a few brackets, so the formula should read:
P(a,b.k) = ( 1 – a (1-2/k)) / (b (1-2/k )– a (1-2/k))
Please correct me if I'm wrong!

An other strange thing i noticed is that if you bet very small like k/100 or so, the formula states a very high risk of ruin and although it would take long to reach b, I doubt that high a risk of ruin. I got P(0.25,4,0.01)=0.0653

Vvhg

Hic Rhodos, hic salta.

The following 3 users say Thank You to vvhg for this post:

@vvhg: Thank you for pointing this out. I did not omit any brackets, but had a problem with the editor of the forum software. It is not a WYSIWYG editor, everything was shown correctly until I saved it...

I have now replaced the formula with a picture file to avoid further confusion. Here it is:

The following 3 users say Thank You to Fat Tails for this post:

I will respond to this question and produce an example, which shows how to calculate the risk of ruin for a series of trades.

But before doing this, I want to come back to the definition of risk of ruin.

Let us assume that you start with a bank roll of $ 100,000.
Ruin: The account drops to less than $ 25,000 (preventing you from placing anymore intraday trades)
Target: You have quadrupled your account to $ 400,000.

Definition of Risk of Ruin

You cannot calculate the Risk of Ruin, without defining ruin and setting a target to achieve. Once this is defined, you can calculate the probability that you will experience a drawdown to ruin (account value of less than $ 25,000) prior to having achieved your target of $ 400,000. This probability is the Risk of Ruin.

Probability of Success of Your Trading Concept

This really like creating a small enterprise. You have a concept and an edge, which translates into a positive expectancy for your trades.

Step 1: Fix the size of your initial account, your pain threshold (where you stop trading), and your target.

Step 2: Calculate the Kelly bet size from your expectancy by using the concept of opimal f. Make sure to include commissions and other trading cost, when calculating the expectancy

Step 3: Adjust the Kelly bet size according to your risk appetite. Can you live with a risk of ruin of 20%? Then you are a full-Kelly trader. Do you tolerate something like a risk of ruin of 2%? Then you are a half-Kelly trader.

The theoretical probability that the endeavour succeeds is 98% for a risk of ruin of 2%. But is this realistic?

Be aware that not all risk is accounted for

Whether this approach is practical, can be debated. There is more risk involved than can be calculated via a Kelly formula. Your computer or the exchange may burn. Your edge may have prove to be a temporary edge at best, which is later annihilated by a change in the way markets operate. You may suffer from mental or physical illness, etc.

The calculated risk of ruin, should therefore be considered as minimum risk you are willing to accept. Nevertheless this approach allows to find an appropriate bet size in line with risk appetite.

Compounding returns is the single most important criterion, provided that there is an edge and that the psychological implications of being a trader have been mastered.

I will come back with a specific example for trading YM with that account of $ 100,000.

The following 16 users say Thank You to Fat Tails for this post:

Probably obvious, but think we should put it on paper. This all depends on independence of trades as Kelly does.

As I read it, the formula won't work for all possibilities. For (a stupid) example, wins 100 times losses, 90% win rate. You get an optimal f of 89.9%. Let a = 0.9, b = 1.1. Formula gives a 55% risk of ruin for optimal F, when anyone can tell you it should be 10% (as it would be for half kelly). I know this is a silly example, I just want to make sure I'm following correctly.

Secondly, I have written a small program to run account simulations. There are probably much better about, but I at least know what my code (supposedly) does. I'm really suspicious of the RNG funtion I'm using (I'm also very rusty), so don't trust it, maybe it will provide a base for someone to improve on. Plugged in some values of a system I have, namely:

p=82%
odds=0.5 (wins half the size of losses)

This gives us a Kelly of 46%.

Using a=0.25 and b=4, I got at 12.1% risk of ruin for full Kelly, and a 0.3% risk of ruin for half Kelly. This seems a bit out compared to your formula, but again, the RNG may be dodgy. It's probably my code, I'm sure I didn't have problems with RNGs before.

P.S. I know the coding is awful.
P.P.S. I have a terrible feeling I'm going to look a complete fool in a few short hours

Dovie'andi se tovya sagain.

The following 5 users say Thank You to Hotch for this post:

I am becoming more and more convinced each day, the true edge in trading is not about finding the right indicators or even the best setups but in managing probability and R/R.

The following 5 users say Thank You to jonc for this post:

I was wondering if there is some term that proceeds 'ruin'. Anyone can comment.

If initially one has $100,000 and day trades, isn't there some percentage where there
is obviously a 'problem' or some sort. Bad method, or whatever.

If one started with $100,000 and now the trading account just went shy of $50,000, I'd
say something is dreadfully wrong, yet ruin is far away, or may never occur I suppose.

(Sorry if this was already covered in some post. Can't comment on your math.)

- Stephen

The following user says Thank You to stephenszpak for this post:

There is no straightforward definition for ruin. For the purpose of calculating the risk of ruin, you need to know what fraction of your intial balance qualifies as ruin.

If you start out with a million, and you esteem that you are still rich enough with a balance of $ 100,000, to continue gambling, then it is not ruin. If you stop your game with a balance of $ 25,000 that is 2.5% of your initial balance, and the factor a required for the calculations becomes a= 0.025.

If you look at larger hedgefonds, it usually puts them out of business, if they have lost over half of their customer's funds. In that case you could use a value a = 0.5, which is 20 times higher than the value used in the first example.

It is all about the decision at what point you exit the game. "Game over" can mean that you stop playing, because you have lost too much, or that you stop playing because you have reached your target. The risk of ruin compares the likelyhood of those two scenarios and puts a probability on each of them.

The following 5 users say Thank You to Fat Tails for this post:

I absolutely agree with some of your points. The Kelly criterion cannot be applied to every betting system. First of all there is an assumption that consecutive bets are independent of each other, such as is the case with a roulette game. A counter example would be Black Jack, as the probability of winning depends on what is left in the card stack.

Secondly the Kelly formula can only be applied to outcomes that have a Bernoulli distribution. This means that it can only be used with trading strategies that have two possible outcomes, for example a win of 20 points or a loss of 10 points.

For non-Bernoulli distributions the Kelly formula cannot be applied without modifications.

The following 4 users say Thank You to Fat Tails for this post:

As promised, I will give quick example how to example the optimal bet size. The approach is a reverse one.
You start by defining the acceptable probability for the risk of ruin and then adjust the bet size accordingly.

Assumptions

(1) The initial balance of the trading account is $ 50,000.
(2) The target value for that account is $ 200,000.
(3) I consider $ 25,000 as ruin (this is an arbitrary value)
(4) I am further ready to accept a 1% probability of ruin (drawdown > 50%)

(5) I will trade YM.
(6) My trading system enters a position and then either exits with a win of 20 points or a loss of 10 points.
(Bernoulli Distribution with a Multiple is 2)
(7) The outcomes of two consecutive trades are independent from each other.
(8) The winning percentage of all trades is 45%, which means that 55% are losers.
(9) I am always betting a fixed fraction of my account to allow for geometrical compounding
(10) There is a commission of $ 4.00 per round turn (this is equal to 0.8 points for YM)
(11) The average slippage per trade is 1 point.

Calculating the Optimal Bet Size by Using the Kelly Formula

First Step : Calculating Optimal F

Following the formula from Ralph Vince (The Mathematics of Money Management, -> Kelly Formulas, page 16) the optimal fixed fraction can be determined as

f = ((B+1)*P -1)/B

where B is the R-Multiple corrected for commissions and slippage and P is the probability of winning a trade (winning percentage).

In a first step I am going to calculate B, which is the R-Multiple taking into account slippage and commissions.

I therefore get B = 1.542 and from above we remember that P = 0.45, as the winning percentage is 45%.
Solving for f we obtain

optimal f = ((1.542+1)*0.45 -1)/1.542 = 0.0933

The Kelly formula therefore suggests to bet 9.3% of my account with every single bet. However, it is likely that auch high bets would exceed my risk tolerance, as the associated risk of ruin might exceed the 1% threshold I am willing to tolerate.

Adjusting Bet Size for a Risk of Ruin < 1%

I will now determine the appropriate bet size associated with a risk of ruin < 1%, just calculating the outcomes for various Kelly multiples. From my assumptions I retain a = 0.50 (achieving ruin) and b= 4.0 (achieving target). The formula

leads to the following results

k = 1 (fully Kelly) : P ( 0.5, 4.0, 1) = 0.5 -> the risk of ruin becomes 43 %
k = 0.5 (half Kelly) : P (0.5, 4.0, 0.5) = 0.877 -> the risk of ruin becomes 12.3 %
k = 0.25 (quarter Kelly) : P(0.5, 4.0, 0.25) = 0.992 -> the risk of ruin becomes 0.8 %

With k = 0.25 I will be within the limits of my risk tolerance with a risk of ruin slighlty inferior to 1 %. I will therefore betting quarter Kelly. This allows me to risk 2.3% of my account with every bet.

Determining the Number of Contracts to Trade

Starting with an account value of $ 50.000, I know that I am allowed to post a loss of $ 1,150 with every trade.
If I trade a single contract I will suffer a loss of 11.8 points * $ 5 or $ 59. I should therefore trade 19 contracts.

Calculating with 19 contracts is somewhat impractical, so with a slightly increased risk tolerance I am willing to do 20 contracts, which would be 4 contracts for every $ 10,000 of my account equity. Following the idea of fixed fractional betting to allow for optimal compounding of returns, I should therefore bet

-> 12 contracts for an account size of $ 30,000
-> 20 contracts for an account size of $ 50,000
-> 40 contracts for an account size of $ 100,000

The last alternative would already lead to increased slippage. This shows that YM is the choice of the small trader, but probably not the best alternative for those trading accounts over $ 100,000.

The following 23 users say Thank You to Fat Tails for this post:

I KNEW IT! Somebody argued with me about this once and I conceded the point. Sniff.

Could you point to the derivation of this formula? Can't seem to find anything on it, and still getting large differences on my code (finished trading so will have a look and try and put a mersenne twister in it instead).

EDIT, this rand function is awful!

Dovie'andi se tovya sagain.

The following user says Thank You to Hotch for this post:

I took the Kelly formula from the book by Ralph Vince.

The formula for calculating the risk of ruin is discussed in the paper "Risk Formulas For Proportional Betting" by William Chin and Marc Ingenoso. You can find that paper here:

I just realised you may have misinterpreted the example I gave. I wasn't saying that Kelly was wrong, but that the RoR formula would not work in that situation.

Dovie'andi se tovya sagain.

The following user says Thank You to Hotch for this post:

I have only quickly checked the risk of ruin formula, and it does not look equivalent to my formula. In the formula (E5/E4) should stand for b and (E6/E4) for a. a and b seem to be inversed. Also the risk of ruin would be the complement 1 - P(a,b,k) of the probability of success given by the formula in post #44.

I would further suggest to format the percentages to allow two digitals after the separator.

The following 3 users say Thank You to Fat Tails for this post:

Site Administrator Swing Trader Data Scientist & DevOps

Manta, Ecuador

Experience: Advanced

Platform: My own custom solution

Trading: Emini Futures

Posts: 49,401 since Jun 2009

Thanks: 32,062 given,
96,677
received

@Fat Tails (and others), why is Kelly the best or recommended method for this type of calculation? Is that based on popularity, or is there a mathematical reason to use Kelly over something (?) else?

The Kelly formula is all about compounding returns.

If you have developed a betting (or trading) approach with a known edge (positive expectancy), then you want to know which fraction of your account you should bet to get maximum growth in the longer run.

The Kelly formula gives a mathematical answer to that question, as it calculates the optimal fraction - called optimal f - leading to maximum growth of your account. It is just mathematics. I am not interested in popularity, but in growing my account.

The Kelly formula is based on a number of assumptions, which limit its application in practice.

(1) It should only be applied if there is an edge or positive expectancy.
(2) It can only be applied to Bernoulli distributions, that is bets with two possible outcomes.
(3) It assumes that you can adjust the bet size in a continuous way

In my example I have selected a trading approach, which always leads to two possible outcomes, that is a win of 18.2 points or a loss of 11.8 points to comply with the condition (2).

The condition (3) is not respected for small accounts, but at least you get close to the optimal bet size by calculating the number of contracts, which best represent the risk adjusted optimal f.

The following 8 users say Thank You to Fat Tails for this post:

Thanks for modifying it, it now reflects the formula, which I have suggested. So at least it is something on that we can agree.

I think it is a very useful little tool. Because I like it, I would also suggest some further enhancements. I let you control your tool, so make a change request, although I could do it myself.

Actually the way the tool works is to enter all the input variables in the orange field and then play around with the Kelly factor, until the risk of ruin matches the acceptable risk. The actual risk involved is Optimal F multiplied with the Kelly factor.

Here are my suggestions:

-> Replace "risk aversion" with "Tolerated risk"
-> Replace Full/Half/ Quarter Kelly with "Kelly Factor"
-> Somehow highlite the "Kelly Factor", because that is the field that needs to be adjusted
-> Give instructions to the user somewhere: "Please adjust Kelly factor until risk of ruin matches tolerated risk"
-> Add an output line below the number of contracts to show the accepted loss per trade as the percentage of equity (Adjusted Optimal F = [Value], the value representing Optimal F * Kelly factor.

Thank you for your help. This spreadsheet is very simple. but it is a powerful tool for determining the optimum number of contracts in line with anybody's risk appetite.

The following 9 users say Thank You to Fat Tails for this post:

Stephen wrote: I was wondering if there is some term that proceeds 'ruin'.

If initially one has $100,000 and day trades, isn't there some percentage where there
is obviously a 'problem' or some sort. Bad method, or whatever.

If one started with $100,000 and now the trading account just went shy of $50,000, I'd
say something is dreadfully wrong, yet ruin is far away, or may never occur I suppose.

Sorry, there is apparently some confusion with my question. I thought there might be a term
I never heard of before that was not ruin, but indicated a trading method/system was almost
certainly...well... fatally flawed. I thought about a trading account at the instant it reached a point
of being down more than half. 50.01% down let's say. That figure is arbitrary of course.
Even being down more than 1/3 is not pretty.

You wrote that if one has $1,000,000 then is down 90% to $100,000, that is ruin if I say it is

OR

it is not ruin if I say it is not.

To me, ruin means that the trading account is too depleted to allow trading. I always thought
that anyway. There is no uncertainty about it. Otherwise what I consider ruin for my trading
account can change each day. Even each moment I guess.

What is someone started with $10,000,000 and is down 90%? I don't see how someone can
reach ruin if they're a millionaire, and have $1,000,000 in the bank.

- Stephen

The following user says Thank You to stephenszpak for this post:

If you are down 90% your trading approach may be flawed, or you have simply been unlucky. The calculation of risk of ruin supposes that your trading approach is not flawed, but that you have an edge.

Even if you have an edge, there is a small probability that you reach the drawdown equivalent to ruin. This is the risk of ruin.

The following 4 users say Thank You to Fat Tails for this post:

Looks like I am late to the party. Lots of other things going on at the moment so I didnt have too much time i could spend on futures.io (formerly BMT)...

Nice work, thanks.

As condition (2) is probably the most problematic regarding the practical usefulness of this formula for trading I thought about how it perhaps might be possible to mitigate that. If we would use the mean loss/win in order to come closer to condition (2) the formula would return bet sizes larger than the optimum due to compounding effects of variance in return not being accounted for. It should/may (theoretically) be possible to factor that in using standard deviations of the wins/losses.
But perhaps I'm only dreaming

Vvhg

Hic Rhodos, hic salta.

The following 4 users say Thank You to vvhg for this post:

Yes, this is possible. The formula supposes fixed fractional betting, which typically leads to geometrical growth. What you need to calculate is the account growth g expected from a single bet. If the target account is 400% of the initial balance, the total growth factor would be t = 4. The number of required trades would then be

N = log t / log g

It is probably easier to understand this by following an example, so let us come back to the spreadsheet:

In the first example there is a win rate of 45% and multiple R of 2, the expected gain per contract traded is therefore

With 20 contracts traded the expected gain would be 20 * $ 8.50 = $ 170 for an initial balance of $ 50,000. The growth factor g is (50,000 + 170) / 50,000 = 1.0034 and the required number of trades would be

N = log 4 / log 1.0034 = 408.4

This is quite a large number of trades that are required. However, the edge (45% win rate with an R-multiple after slippage and commissions of 1.54) is not impressive. The risk adjusted Kelly factor is therefore small and it takes some patience to achieve the target account of 400%.

@TheTrend: If you wish you can include this calculation with your Excel sheet as expected number of trades to reach the target.

The following 10 users say Thank You to Fat Tails for this post:

I hope I'll be trading full time again in a few weeks and will be able to look into this.

By the way, I mainly swing trade stocks for the moment so I've built this spreadsheet mainly for the benefit of the group and to better understand the figures behind the formulas (and I encourage you to build it yourself if you intend to use it).

You can freely update and adapt this spreadsheet to your needs, there's no copyright on it

The following 5 users say Thank You to TheTrend for this post:

As @TheTrend is busy, I have enhanced the spread sheet.

The left part of the spreadsheet is used to adjust Optimal F for the tolerated risk of ruin, when you start off with your trading strategy.

The right part of the spreadsheet allows to calculate the position size. Optimal F assumes that you follow a fixed fractional betting strategy to achieve optimal geometric growth. The number of contracts that should be traded thus depends on the risk parameter (last line of left part of spread sheet) and the current balance of your trading account. The spread sheet now also includes an estimate of the number of traders required until the target account is reached.

All orange fields are entry fields. The Kelly Factor requires manual adjustment, until the calculated risk of ruin matches the tolerated risk of ruin, as entered above.

The spreadsheet is attached below.

The following 36 users say Thank You to Fat Tails for this post:

Harking back a couple of pages, it seems to me we need to define what is meant by risk tolerance in the context of this statement. If I understand correctly, the "risk" here is now something quite specific - it's the chance that your "Edge" assumption is not correct. Otherwise there would be no long-term risk if you size correctly - assuming the short-term performance is not too wild. I guess we now need a measure of strategy volatility

cheers,

BB

The following user says Thank You to BenosBanderos for this post:

@BenosBanderos: Thank you for putting up this question, as it is really the key to the problem.

The risk here is NOT the chance that the edge assumption is not correct.

The risk of ruin as defined per the Kelly criterion is the risk that you will lose money although your assumptions have been correct.

To make that clear: In a card game there is a known probability depending on the number and values of the cards. Even if you have an edge in your card game - such as the Casino has, when distributing Black Jack cards or operating a Roulette table - there is a risk of ruin, which depends on your initial capital and the Kelly factor calculated from your bet size and your edge.

In particular these risks are NOT covered by the above approach:

The risk that you have made a false evaluation of your edge. The risk that markets have changed and your edge is reduced or no longer there. Operational risk (power failure, disrupture of data lines, failure/crash of exchange), which leads to an outcome which cannot not be described within the framework of the Bernoulli distribution.

The Bernoulli distribution, on which the model is based, is derived from two possible outcomes of your trades only. So if you have a bad fill, an overnight gap or anything which is beyond the model, it is not covered.

This means that the real risk is much higher, than the above calculated risk. Therefore a quarter Kelly approach as shown in the Excel table above, is the maximum risk that you may assume in accordance with your risk appetite. In view of the additional risk that is not covered you should further reduce your bet size and exposure below the model values suggested.

The point is that you cannot easily calculate a probability of a power failure, the evaporation of your assumed edge or technical errors committed during a backtest.

The calculation of the risk of ruin is therefore limited to the risks that can be evaluated.

It is a model risk, and its meaning is limited to the features of the model. Ask an economist what that means.

The following 13 users say Thank You to Fat Tails for this post:

I wanted to respond more in depth to this but I confess I need to go back to school and understand Kelly, Opt F from first principals before I can do so. But thanks for clarifying my guesswork there.

I guess as with any model it's important to know it's limitations, how to use it and how to interpret results. So perhaps that is the best question I can ask. How should we use this model/spreadsheet to inform our trading?

One thing that stood out to me by playing with the numbers, is that there seems to be a stronger inverse relationship than I thought between Win Loss ratio and Avg Win vs Avg Loss. For example if you are trading a 1:1 RR you need MUCH better than 60% Win ratio to be profitable - perhaps difficult to achieve. This again emphasised the importance of reducing the number of losing trades and maximising profits on winning ones.

cheers,

BB

The following 3 users say Thank You to BenosBanderos for this post:

Absolutely. The main limitation of the model in its current shape is

- that it only applies to Bernoulli distributions, that is trade setups where you either win X or you lose Y
- that some of the risks that cannot be quantified (changing markets, false evaluation of edge, operational risk, gaps)

The much better than 60% win ratio is needed to overcome slippage and commissions. The case shown above refers to a win/loss ratio of 2:1. After accounting for slippage and commissions, this win/loss ratio becomes 1.54:1, which is a significant deterioration. This suggests that with a retail account you should go for more than 10 or 20 points. However, most retail traders are undercapitalized and prefer to trade with a narrow stop loss. If you are a scalper, a small edge is easily converted into no edge by slippage and commissions.

Contrary to what most people think, I believe that the win/loss ratio is more important than the R multiple. The key to understanding this is the standard deviation of returns. A low standard deviation of returns reduces the risk of ruin and allows you to increase leverage. Now if you compare

(1) trading a system with a high R multiple, where the average winning bet is much larger than the average losing bet, but a low win/loss ratio with less than 50% of successful trades (just as the example which I had selected above)

(2) trading a system with a low R multiple, that is an average winning bet similar or equal to the average losing bet, but a high win/loss ratio with something like 75% of successful trades

you will probably find that the latter system has a lower standard deviation of returns. This implies that the drawdowns are not as large, which in turn has a favourable impact on the risk of ruin.

In the end you might be able to trade (2) with a higher leverage, if you specify the same risk of ruin. This might lead to the conclusion that systems which generate regular small returns are preferable to systems that generate an occasional home run. I am saying "might", because I have not yet shown it mathematically. Any comments would be appreciated.

The following 14 users say Thank You to Fat Tails for this post:

How Bankers define risk of capital. Funny a Swiss Bank using Swiss Chees Model to explain risk of capital. Some points might be interesting for retail traders and automated systems.

The following 6 users say Thank You to redratsal for this post:

Usually, when discussing risk of ruin, we talk about (1) and not that much about the other two points. All customer of MF Global know that (3) exists and should not be neglected. Do you know how your funds are protected, if your broker collapses? Have you splitted your funds between several brokers for risk diversification? (2) is more linked to computer failure, disruption of data feeds, bad internet connectivity. For many cases of (2) preparation is possible

- have a second PC
- have a second internet connection (fixed line + mobile)
- have a second broker
- have the phone numbers of the trade desk of your broker(s) ready to close your positions
- be prepared where to enter correlated trades in case that the exchange has an operational problem

But the items referring to (2) and (3) are not easily quantifiable. That means, if we talk about risk of ruin, we focus on market risk, more or less excluding operational and counter party risk. But it is definitely there, although it cannot be calculated from a Kelly formula or the standard deviations of the trades.

The following 9 users say Thank You to Fat Tails for this post:

Now let us play a little with the Excel application and compare three different trading systems that have exactly the same expectancy per trade!

System 1:

- Average Win : 30 points
- Average Loss : 10 points
- Winning Percentage: 40%

Expectancy per contract traded is E = 0.4 * 30 points * $ 5 - 0.6 * 10 points * $ 5 = $ 30

System 2:

- Average Win: 12 points
- Average Loss = 12 points
- Winning Percentage: 75 %

Expectancy per contract traded is E = 0.75 * 12 points * $ 5 - 0.25 * 12 points * $ 5 = $ 30

System 3:

- Average Win: 20 points
- Average Loss = 20 points
- Winning Percentage: 65 %

Expectancy per contract traded is E = 0.65 * 20 points * $ 5 - 0.35 * 20 points * $ 5 = $ 30

All expectancies are before slippage and commission. Slippage and commission is identical for all three systems and would be $ 9 per roundturn based on 1 point slippage and 0.8 points commission. This leads to a net expectancy of $ 21 per trade. The important point here is that the net expectancy for all three systems is the same. System 1 is typical for a breakout system or a trend follower, system 2 is not unusual for a scalping system. System 3 could be a system that uses retracement entries.

All three systems are traded with a Kelly factor of 0.25

This fixes our risk of ruin at 078%. Note that the risk of ruin does not directly depend on the R-Multiple or the win/loss ratio, as the Kellycrieterion already adjusts for it. The three systems now

- have the same expectancy per contract traded
- have the same risk of ruin via the 0.1 Kelly approach

The best system is that one, which allows us to trade size for the same risk appetite. Now we just need to put the figures into that Excel table, and here are the results:

System 1: The optimal position size would be 3.72% of the initial balance, the system would start trading 32 contracts and the target would be reached after 104 trades.

System 2: The optimal position size would be 10.29% of the initial balance, the system would start trading 75 contracts and the target would be reached after 45 trades.

System 3: The optimal position size would be 5.77% of the initial balance, the system would start trading 26 contracts and the target would be reached after 128 trades.

Conclusions

We have compared three different trading systems with the same expectancy per contract traded, that is $ 30 before commission and slippage, and $ 21 after commission and slippage.

We have then adjusted position size to our predefined risk appetite in order to maintain a level of 0.78% for the risk of ruin. The results are interesting.

System 1 allows us to trade 32 contracts, system 2 allows us to trade 75 contracts and system 3 allows us to trade 26 contracts for the same risk. Clearly system 2 is my favourite, as it allows to trade larger position size and I may reach the target account after only 45 trades.

Have written all this to show that my assumption as per last sentence of post #69 was correct, and because @Hotch has encouraged me to do so.

The following 22 users say Thank You to Fat Tails for this post:

Site Administrator Swing Trader Data Scientist & DevOps

Manta, Ecuador

Experience: Advanced

Platform: My own custom solution

Trading: Emini Futures

Posts: 49,401 since Jun 2009

Thanks: 32,062 given,
96,677
received

OK.

Let me ask you this --

Which is preferred:

- System with 2,000 trades, and net expectancy after commission and slippage of $5 per trade.
- System with 200 trades, and net expectancy after commission and slippage of $50 per trade.

I tend to always lean towards the system with the greater number of trades, as I like to imagine such a system is less curve fitted and has provided me more samples.

What are your thoughts? I suppose in terms of risk alone, trading 200 times is less risk than trading 2,000 times.

Lots of good information in this thread and thank you for the spreadsheet as well.

Makes me wish I had a Bernoulli distribution in my trading; could leverage a lot higher. Though it did confirm that the size have been trading is likely a bit low.

For those that don't have a hard profit target and stop loss, I am wondering if there would be a way to consider the standard deviation of wins and losses in order to make the same risk of ruin and size calculations. I could probably come up with something, but it would likely be using bad statistics.

Luger

The following user says Thank You to Luger for this post:

The question is not obvious to answer, I need to make a lot of assumptions first.

(1) First of all the model relies on fixed-fractional betting. If you say I have a system doing 2,000 trades with an expectancy of $5, you assume that all those trades are the same size. Otherwise your expectancy would rise with your account size, as you take advantage of trading more contracts. If you don't increase the bet size, you don't need any models.

So the question, correctly put would be that you trade a system with an initial expectancy of $5, which will do 2,000 trades.

(2) The model which is based on the Kelly criterion above was used to find the optimal position size compatible with a predefined risk appetite. It compares risk adjusted returns. Your question fixes the position size before you start trading and you ask about the risk for a given number of trades with identical returns before adjusting position sizing. If you do not adjust position size, when the bet starts, then you forego the opportunity to adjust the position size to risk allowance. Of course you can ask the question backward: If I am trading this, what would have been the Kelly factor that would have produced the same initial position size and what would have been the corresponding risk of ruin.

(3) The expectancy and the number of trades does not tell me anything about the dispersion of those trades around the mean return, the information you have given is therefore not sufficient to evaluate the risk of ruin.
Information is needed on the characteristics of the two systems regarding the R-Multiple and winning percentage.

(4) I also need to assume that the 200 and the 2,000 trades are approximately taken over the same period, so that both systems are in the market for about the same time.

Answer to your question:

Even without calculating, it is obvious that the drawdowns produced by the system with 200 trades are typically larger than the drawdowns produced by the system with 2,000 trades. Statistically this is described by the variance of the logarithmic returns, which is smaller for the 2,000 trade system. The smaller variance allows to increase position size and the system performing 2,000 trades can be leveraged higher for the same risk allowance.

I will now try to reverse-select a Kelly factor to allow to compare the two systems for their risk of ruin. As I said above, the information given is not sufficient, so I will make some additional assumptions before applying the Excel model.

System 1:

average win : 10 points
average loss : 10 points
winning percentage: 65%
slippage and commision : 2 points

Expectancy after slippage and commission: 0.65 * (10-2) * 5 $ - 0.35 (10+2) * 5 $ = 5 $
The Kelly factor is now adjusted in a way that the system produces approximately 2,000 trades.

Result: The system can be traded with a Kelly factor of 0.07, which represents a risk of ruin of 0.000005 %.
It would require 1981 trades to attain the target account of $ 200.000.

System 2:

average win : 40 points
average loss : 40 points
winning percentage: 65%
slippage and commision : 2 points

Expectancy after slippage and commission: 0.65 * (40-2) * 5 $ - 0.35 (40+2) * 5 $ = 50 $
The Kelly factor is now adjusted in a way that the system produces approximately 200 trades.

Result: The system can be traded with a Kelly factor of 0.11, which represents a risk of ruin of 0.000673 %.
It would require 199 trades to attain the target account of $ 200.000.

Comparing the results:

Both systems start trading with 7 contracts. However, the 200 trade system represents a risk of ruin which is about 1,350 times higher than the 2,000 trade system. This is essentially due to the larger variance of returns.

The 2,000 trade system uses a Kelly factor of 0.07, the 200 trade system uses a Kelly factor of 0.11.

But now comes what is really important. If you apply the same Kelly factor to the 2,000 trade system, you may increase the number of contracts traded from 7 to 11. By increasing leverage, you will achieve your target after 1,261 trades.

However the 2,000 trade system only comes out winner, if the 2,000 trades are taken over the same period as the 200 trades of the other system. Actually it wins, if the 1,261 trades that result from adjusting the position size for risk appetite are completed prior to the 200 trades of the other system.

The following 20 users say Thank You to Fat Tails for this post:

I am not yet satisfied with the result of this thread. We have shown, that it is possible to build a model for the most basic case of a Bernoulli distribution , that is when you enter a bet

-> you either win the amount A or lose the amount B
-> the winning probability does not change
-> the winning probability is known

Finally, these three assumptions have little to do with real live. The edge or winning probability are never known in trading and you can only make a best guess, based on some statistical data. Therfore the outcome of our model is of limited value. However, it gives us some information on position sizing and the parameters it depends on.

Position Sizing Depends on the Acceptable Risk Level

There were two input parameters

-> definition of ruin, or otherwise put, the maximum acceptable drawdown as a percentage of the account balance
-> the probability of ruin, which is the likelihood that such drawdown actually occurs

which were needed for determining the position size. There is no way around the point, that these two parameters need to be individually chosen. Nobody can tell you, whether 0.1% or 10% is an acceptable risk of ruin, and whether you stop trading after a 30% or 75% drawdown.

Experiment Versus Model

For the more complex outcomes that are the result of real trading activity, it is difficult to develop a mathematical formula, which allows us to calculate the position size, which is in line with our risk appetite.
Instead of running a complex model, I would rather like to repeat my trading experiment 100 times and then study the outcome.

Let us assume that it was possible to trade the same strategy a hundred times. If I accept a risk of ruin of 5 %, I would then look at the worst 5 outcomes, and adjust my position size in a way that the worst 5 outcomes would exceed the maximum allowable drawdown. But how do I get those 100 different series with trade data.

The Monte Carlo Method

A Monte Carlo Simulation allows me to obtain the 100 different series of trade data by taking a backtest

-> and create 100 series of trades by rearranging the order of the trades with a random generator
-> or picking a large number of trades allowing for double picks in a random fashion

The two types of Monte Carlo Simulation can be combined wiht trades of a constant trade size, but can also be combined with a fixed fractional betting approach.

A weakness of the Monte Carlo Simulation is that it assumes that there is no correlation between two consecutive trades, assumption which is not always true. The advantage is that the Monte Carlo Simulation can produce statistical information for any betting system - not limited to our Bernoulli distribution - which in turn allows to optimize the position sizing based on our risk appetite.

Interesting enough, no optimal F calculations are required for this approach. You only need to believe that rearranging the trades in a different order is a useful tool for evaluation the maximum drawdown of a system.

Replacing a Single Backtest With a Monte Carlo Simulation is Crucial

A single backtest will usually not give you any useful information on the likelyhood of a large drawdown. To get that information, several thousand trades would be required, an unless you are a HFT maniac trading for years, this will not be available. Without that drawdown information optimal position sizing is not possible, and two trading systems cannot be compared, if their risk of a drawdown is not known.

Monte Carlo lets you increase the statistical data available, which in turn allows you to make an estimate - even if this is not perfect - of the downside risk. There was a link to a Monte Carlo Simulation in the opening of this thread by @Big Mike, and I just want to refer to it. We should further explore that road.

The following 12 users say Thank You to Fat Tails for this post:

That monte carlo simulator linked in the first post is rather robust it seems, thought it does not bootstrap an actual list of trades. I need to look at the guts of it to see how some of the calculations are done, but initially it seems like a good starting point for discussion. It might be nice to have the variability of trades taken into account, instead of just the average trade. I will have to give it some thought.

Luger

The following 6 users say Thank You to Luger for this post:

This thread has some great stuff in it, but if I could just add a bit for the less technical.
A new trader here asked me about my trading style and my answer if anyone wants to hear it is, trade small, and diversify. New traders only want to hear trading systems and how much they can make, while if you talk to traders in the big leagues all they care about is money management and risk. This week JP Morgan relearned the same old lesson most rookie traders need to learn -- control your risk first: News Headlines

If a trader can master the two ideas below, they will make more money than they can with any indicator or clever strategy:

I am new on the forum so hello to everyone.
I am looking for the formula of the Risk of ruin for Kelly for a fixed number of events.
If I have a trade system and I apply to it the formula of Kelly (f) n-times how much is the probability to reach X fraction on the bankroll?
If I have a different trade system not correlated with first and I apply Kelly (g) m-times with the same bankroll how much is the probability to reach X fraction on the bankroll with the 2 system applied together?
Thanks for the help
Rosario from Italy

Reply With Quote

The following 2 users say Thank You to rosariod for this post:

@rosariod: Please read #44, #46, #53, #65 and all other posts of this thread first. You will find the Kelly formula and its limitation to Bernoulli distributions explained. You will also find a spreadsheet allowing you to compare two different systems and adjust the risk of ruin to your risk appetite.

Nobody can answer the question that you have asked, as it is not specific enough. The Kelly formula does only apply to limited cases and cannot be used in a general way. Please work your way through this thread and then come back.

The following 6 users say Thank You to Fat Tails for this post:

I’ve got a trading system with the following information:
p is the probability of winning a trade
q =1-p is the probability of losing a trade
b is the average amount of winning trade
a is the average amount of losing trade
of course m=p*b-q*a>0 and for Kelly f=(((b/a)+1)*p)/(b/a).
With this information I can calculate the risk of ruin absolute and the risk of reduce the capital to a fraction before reaching a target but I would like to calculate the probability of reaching a fraction of the bankroll after a fixed number of iterations.
Any idea?
Thanks

The following user says Thank You to rosariod for this post:

As far as I know, you cannot use the average amount of a winning and a losing trade and apply the Kelly formula. The Kelly formula only applies to Bernoulli distributions, which means to a set of trades that only have two possible outcomes, either a win of b or a loss of a. If the outcome of your winning and losing trades is distributed around averages b and a, the optimal f would depend on the variance of the winning and losing trades.

Let us assume that you have a sample of 200 trades and that you want to answer your question. Then a better approach to determine the probability of reaching a fraction/multiple of your initial bankroll is a Monte Carlo Analysis. Let your fixed number of trades be k. Then you could randomly select k trades from your 200 trade sample (if k > 200, you can use an urn model with replacement, allowing to select any trade several times) and repeat that process N times (for example 1000 times).

NinjaTrader would for example allow you to define a strategy, backtest it, and then use the backtested trades for a Monte Carlo Simulation. You can select the number of trades per simulation (that is your number k) and then directly read the percentage from the chart.

Attached is a sample chart, which does 1,000 simulations of 200 trades from a sample of 372 trades (SuperTrend Strategy on Gold futures). You can read the probability from the chart. The likelyhood that your capital exceeds 110% of the initial bankroll after 200 trades is about 45%.

The following 7 users say Thank You to Fat Tails for this post:

First of all thanks for your help and for your time.

For sure a Monte Carlo Analysis is a good approach to determine the probability of reaching a fraction/multiple of your initial bankroll and I’ve already done it but I would like to find a formula and then, generalizing, apply it to different trading system on the same bankroll.
If I trade k different trading system on the same bankroll with k different f(i)I would like to have a function P(X,n) that give the probability that the bankroll is X fraction after n iterations.
Is it possible to have such function or I have to use Monte Carlo Analysis.

The following user says Thank You to rosariod for this post:

The problems of any model / closed formula are the model assumptions. The great economists have always failed, because they have applied their models without taking into account model limitations.

I have much more confidence in an empirical approach such as the Monte Carlo Analysis, compared to a theoretical approach such as the Kelly formula. If you are interested in applying the Kelly formula to your problems, I suggest that you work through the papers and books below.....

Site Administrator Swing Trader Data Scientist & DevOps

Manta, Ecuador

Experience: Advanced

Platform: My own custom solution

Trading: Emini Futures

Posts: 49,401 since Jun 2009

Thanks: 32,062 given,
96,677
received

A few months off, but Ernie Chan will be doing a webinar on futures.io (formerly BMT) in January that focuses on Capital Allocation and Risk management using Kelly:

It is my pleasure to announce that Ernest Chan from QTS Capital Management LLC will be here on Wednesday, January 23rd @ 4:30 PM Eastern US. Yes, yes, I know the date is far off - scheduling is sometimes difficult.

I would not consider Kaufman as a reference for the risk of ruin. Ralph Vince certainly is.

The formula that you have attached looks nice, but I believe that it is incorrect. Here are the reasons. If you have a winning percentage, an average winning and average losing trade, this tells you nothing about the dispersion of the trades.

Example: Let us assume that your winning percentage is 60% and that both your average winning and losing trades are 2% of your initial capital.

Scenario 1: all winning trades yield +2.0%, all losing trades yield -2.0%
Scenario 2: 50% of winning trades yield +0.50%, the other 50% of winning trades yield +3.52%, 50% of losing trades yield -0.50%, the other 50% yield - 3.48%

For both scenarios you would have identical input variables for the model put forward by Ralph Vince, so they will both show the same risk of ruin. However, the second scenario produces a higher risk of ruin than the first one. The reason is that the dispersion of the trades around the mean is larger than for the first scenario. The model by Ralph Vince does not take into account the variance of the average winning and losing trade, but only uses the arithmetic mean. I therefore believe that both the models of Perry Kaufman and Ralph Vince are inherently flawed. Unfortunately I am not capable to come up with something better, but for further research I would rather rely on Edward O. Thorpe than Ralph Vincent.

The following 7 users say Thank You to Fat Tails for this post:

Agreed. Introducing the influence of the variances is conceptually not difficult. I suppose there are several ways do do it.

If I take the PDF document above, and substitute the equations, I get a nice formula for the risk of ruin (RR) as a function of probability of a winning trade, average loss, and average gain. This gives the RR as a function of the mean inputs. We are interested in this, as well as the deviation from the mean due to variance of the inputs. Let's call this the sensitivity of the risk of ruin, or delta-RR.

The value of delta-RR is the sum of the sensitivities of RR due to the variances of each input. The sensitivity of RR due to one input is the standard deviation of that input times the change in RR with respect to that input. As you may know, the "the change in RR with respect to that input" is jsut another way of saying "the derivative of RR with respect to that input" [the vector containing each of the derivatives with respect to each input is a Jacobian, of sorts].

Unfortunately, doing all the math yields fairly lengthy equations. Let me summarize:

Reproducing the first figure for a profit factor of 2, and assuming a standard deviation of 5% for pWin, Lavg%, and profit factor, I get a much different picture. Without taking the 5% standard deviations into account, I calculate a RR of 16% for a Lavg% of 5%. However, assuming the standard deviations, I get a worst-case RR of 68%.

In the figure below, the red line is the same line as the Wavg%/Lavg% = 2.00 line in t he first figure of the pdf. The Blue line is based on the red line calculation, but including 5% standard deviation for pWin, Lavg%, and Wavg%. Note that is with with pWin, Lavg%, and Wavg% all hitting their low mark at the same time. This analysis does not account for the probability that you are unlucky with three statistics simultaneously.

The following 5 users say Thank You to serac for this post:

Great thread.
I think there are two way to get an approximate estimates of risk of ruin, starting from history of past trades: i) using bootstrap, if you think future return/variance space shall be sample of past, ii) using a known PDF, closest to past trades PDF.
I remember an old paper about kelly criterion applied to t-student PDF (R. Osorio, 2008): stock returns PDF seem (?!) close to a 4.5 df t-student.
I have made some attempts using Johnson PDF (it accepts first four stat moments as inputs) but my preference is about bootstrap.
happy new year

So here is one of my strategies and i removed the number of contracts performing scale in and scale out to see what percentage i receive from a base state (of 1 contract). As you can see the numbers are high enough (trend following). It suggests to put 37% of capital at full force however ed thorp suggests when he was doing trend following he would perform at around 1/10 | 1/20 of kelly. If we suggest that the figures are right this would mean 37% / 20 = 1.85% risk per trade at 1/20 .

I'm wondering would it be interesting to segregate an account and throw 10K at it and see what happens.

Anyone using it explicitly in there trading ?

Its more difficult to use in futures due to the leveraged nature but i wonder using spread options maybe a lot better.