NexusFi: Find Your Edge


Home Menu

 





Risk of Ruin


Discussion in Psychology and Money Management

Updated
      Top Posters
    1. looks_one Fat Tails with 33 posts (301 thanks)
    2. looks_two Big Mike with 17 posts (81 thanks)
    3. looks_3 vvhg with 17 posts (43 thanks)
    4. looks_4 stephenszpak with 9 posts (10 thanks)
      Best Posters
    1. looks_one Fat Tails with 9.1 thanks per post
    2. looks_two TheTrend with 7 thanks per post
    3. looks_3 Big Mike with 4.8 thanks per post
    4. looks_4 vvhg with 2.5 thanks per post
    1. trending_up 96,762 views
    2. thumb_up 652 thanks given
    3. group 89 followers
    1. forum 147 posts
    2. attach_file 43 attachments




 
Search this Thread

Risk of Ruin

  #41 (permalink)
 
stephenszpak's Avatar
 stephenszpak 
Massachusetts (USA)
 
Experience: None
Platform: NinjaTrader
Trading: YM
Posts: 750 since Jun 2009
Thanks Given: 144
Thanks Received: 356


Fat Tails View 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.






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)




Thanks FatTails.

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

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
Exit Strategy
NinjaTrader
How to apply profiles
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #42 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


stephenszpak View Post
Thanks FatTails.

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

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.

Reply With Quote
  #43 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



Hotch View Post
Fat Tails, really good stuff.

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


@Hotch:

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.

Reply With Quote
  #44 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Big Mike View Post
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)?

Thanks so much for contributing.

Mike

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.

How many contracts should I trade?


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.

Winning trade : 20 points - 1 point - 0.8 points = 18.2 points
Losing trade: -10 points - 1 point - 0.8 points = -11.8 points

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.

Reply With Quote
  #45 (permalink)
 Hotch 
Ingatestone
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES
Posts: 133 since Feb 2012
Thanks Given: 21
Thanks Received: 54


Fat Tails View Post
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.

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.
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #46 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Hotch View 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).


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:

https://condor.depaul.edu/wchin/riskpaper.pdf

Reply With Quote
  #47 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603


Fat Tails View Post
As promised, I will give quick example how to example the optimal bet size. The approach is a reverse one.

Thank you! I was actually able to follow your entire post and understand it

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #48 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603

So building on @Fat Tails post #44, I am hoping that Excel master @vvhg can get this into a spreadsheet format for us?

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #49 (permalink)
 Hotch 
Ingatestone
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES
Posts: 133 since Feb 2012
Thanks Given: 21
Thanks Received: 54


Fat Tails View Post
@Hotch:

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.

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.
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #50 (permalink)
 TheTrend 
Paris, France
 
Experience: Advanced
Platform: Amibroker
Trading: Futures, Stocks
Posts: 95 since Jun 2011
Thanks Given: 118
Thanks Received: 105


Thanks for this very interesting discussion.

Here is a spreadsheet to implement the very good concepts described by Fat Tails.

You just need to enter the orange fields, it will compute the optimal F, the risk of ruin and the number of contracts for you !

Attached Files
Elite Membership required to download: Optimal F.xlsx
Reply With Quote




Last Updated on October 14, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts