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 95,443 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

  #111 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,769

Hi (and especially @Fat Tails ),

First, thanks a lot for this very interesting thread.

Even if I agree that Monte Carlo is a better approach, I wanted to play with the first formula:

where:
a is the level of ruin compared to the initial capital (for instance: a = 0.25)
b is the target compared to the initial capital (for instance: b = 4.0)
k is the fraction of Kelly which is implemented (between 0 and 1)
P(a, b, k) is the probability that target be reached before ruin

I have fixed a = 0.25.
Let’s suppose that we want P >= 0.99.
The above equation gives a relation between b and k.
I wanted to visualize this relations in order to see if we could maximize b (for a given a and P), and see what would be the corresponding value of k.

I have obtained the following chart (with R):


My understanding is the following:
If we choose the Kelly fraction below a certain level, there is at least 99% chance to obtain any target before being ruined.
If I have made no mistake in the calculation, this level for Kelly fraction is:


What puzzles me is this “any target”. Once more, if we use a Kelly fraction below this level, whatever the target we give ourselves, we are guaranteed at 99% to obtain it before being ruined.

This seems confirmed by the Excel sheet (in the last version as modified by Fat Tails).

I guess that the differences lie in the time before reaching the said targets.

In the context of the above model (which is only a model), does it make sense to choose k(max) as an "optimal" Kelly fraction?

Nicolas

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Are there any eval firms that allow you to sink to your …
Traders Hideout
Futures True Range Report
The Elite Circle
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #112 (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


Nicolas11 View Post
My understanding is the following:
If we choose the Kelly fraction below a certain level, there is at least 99% chance to obtain any target before being ruined.
If I have made no mistake in the calculation, this level for Kelly fraction is:

What puzzles me is this “any target”. Once more, if we use a Kelly fraction below this level, whatever the target we give ourselves, we are guaranteed at 99% to obtain it before being ruined.

The risk of ruin is not independent from the target chosen. If your starting balance is $ 100.000, if you consider that you are ruined if less than 25% of your initial capital is left (at that stage you abandon the game) and if your target capital is $ 200.000 then

Risk of ruin = the probability that your equity drops below $ 25.000 before you achieve your target of $ 200.000

Now, if you double your target equity to $ 400.000, it is obvious that this increases your risk of ruin. Just consider a tree of all possible outcomes of subsequent trades. All paths that have hit the $ 200.000 equity line and then drop back to an equity below $ 25.000 increase the risk of ruin. You can add their cumulated probability and it to your risk.

Therefore the 99% level you talk about always depends on a target equity. The risk of ruin is a function of 4 input parameters: ruin defined as a percentage of intial equity, target equity defined as a percentage of initial equity, win rate and win-to-loss ratio. The acceptable risk of ruin can be used to determine the Kelly factor, that is the multiplier (< 1) applied to optimal F. The adjustment to the risk of ruin reduces the expected outcome of the series of bets.

Reply With Quote
Thanked by:
  #113 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,507 since Aug 2011
Thanks Given: 2,046
Thanks Received: 9,491


I missed this thread for so long. Very interesting information shared and talked about here. I'm wondering how many participants actually trade in a way that lends itself to these various risk models. I had worked with a brilliant programmer from Sweden and he was so adamant about his risk models and the various analysis being discussed here. He would rebel when I told him that is not how it works.

Someone taught me that a target limits your winners and a stop loss guarantees your losers. He asked if I liked the idea of limited wins and guaranteed losers. The process of being "taught" took a long time and was painful at times. Granted equity options are not limited to directional speculation so part of or "risk" was off set by numerous crafty hedges that could be put on and off to change any element of our exposure.

So when I described this to a ES guy years later he taught me how to press my winners. So when most guys are at a target level taking profit some guys are adding aggressively to press the winner and scale out with huge, and I mean huge, gains...the vast majority of which occur after the position has a big lead. I think the only way to test that or do analysis of the outcome is to look at the account statement.

So sometimes in 6E I cut a loser at just 3 or 4 ticks. That depends largely on what has changed since I put the position on...usually killing one that small happens after time has passed and the expected move did not occur. Total discretion. Other times I'll take a position home twenty or thirty ticks against me...only to be "stopped" when I win or by a margin call or visit from risk. That has happened only a few times in 15 years....the margin call or risk mgr call/visit...and always well past 80-100 ticks. Most of the time you can scale that in by trading in and out realizing loss but you still have position enough when it does go the other way. That is NOT advised, and maybe not a "good" practice.

What happens most of the time is I take an initial profit then I press by adding to the position trying to keep my cost basis on the profitable side of the inside market. Sometimes you get a relatively big position and only get 4-5 ticks net, but other times when the move extends you have as a 10 or 12 lot with bags of ticks hanging off of it. It is okay to set a modest profit lock stop and bring that girl home to mom.

I wonder how that jibes with the regular crew way brighter than I?

So my personal problem now is that I am taking money from the trading account to make up for lost income from another business. Doing that really messes up my psychology and turns me into quite a risk wussy because the 8-10 I'm taking out feels like losing because I am viewing the draw as an expense. Wldman out of balance.

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #114 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,769

Hi @Fat Tails ,

I obviously agree that, for a given ruin level (a) and a given Kelly factor (k < 1), the probability (p) to reach the target (b) before being ruined decreases when the target (b) increases.

This is visualized by the negative slope on the below 3D surface, when we go from the right (low b) to the left (high b).


However, I have noticed that, for "low" levels of the Kelly factor, this probability does not decrease significantly when the target increases. This is the yellow strip on the chart.

Let's illustrate it with the Excel sheet that you have reviewed. We choose a = 0.25. Let's suppose that we aim at a risk of ruin <= 1%.

With a "high" Kelly factor as 0.6:
- for a target b = 2.0, the risk of ruin is 3.18%
- for a target b = 4.0, the risk of ruin is 3.79 %
The risk of ruin increases with the target. Fine. However, we are above our desired level of risk of ruin (1%).

Now, let's take a "low" Kelly factor as 0.45:
- for a target b = 2.0, the risk of ruin is 0.77%
- for a target b = 4.0, the risk of ruin is 0.84%
The risk of ruin increases with the target. Fine. And we are below our desired level of risk of ruin (1%). Fine again.

And, for this "low" Kelly factor of 0.45, you can input any value you want in the target cell, the risk of ruin will always be less than 1%.

My claim is: for a given ruin level (a), if you choose a Kelly factor k <= kmax (well chosen), then your probability of ruin will always be less than a given threshold, whatever your target.

The reason is that, even if, for given “a” and “k”, the probability (p) to reach the target (b) before being ruined decreases when b increases, it does not decrease to whatever level but tends towards a limit.


It can be calculated that:

(correction thanks to Fat Tails)

So, if you choose

you are guaranteed, in the above model, that the probability of success is above p*.

For a = 0.25 and a desired level of p* = 99% chances of reaching the target before being ruined, if you choose a Kelly factor less than kmax = 0.463, you are guaranteed that your risk of ruin is below 1% whatever your target.

If you are not convinced, you can play with the Excel sheet, and, if I have made no mistake, observe the same phenomenon.



Nicolas

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #115 (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


Nicolas11 View Post
It can be calculated that:


So, if you choose

you are guaranteed, in the above model, that the probability of success is above p*.

For a = 0.25 and a desired level of p* = 99% chances of reaching the target before being ruined, if you choose a Kelly factor less than kmax = 0.463, you are guaranteed that your risk of ruin is below 1% whatever your target.

If you are not convinced, you can play with the Excel sheet, and, if I have made no mistake, observe the same phenomenon.



Nicolas

@Nicolas11: You are right, I did not follow you in depth. I have checked your calculations and came to a slightly different conclusion. The main challenge was not to do perform the calculations but to write that stuff with my old version of MS Word. Here is my reasoning:




In the end I find convergence for a Kelly factor < 2 with a slightly different value for the limes. If there is a mistake in my calculations, please let me know.

Reply With Quote
  #116 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,769

@Fat Tails ,

I agree with your calculation, and have modified my above message:


I think that it was a kind of transcription error in my message, since my initial formula with kmax is consistent with your correction, which shows that I have found the right expression at a moment, then wrote something else.

Just a note. Since you keep "a" when q --> +oo, it means that you consider that a is constant when the limit is calculated. So your q --> +oo is actually equivalent to my b --> +oo.

Thanks for having noticed the message in my message!

Nicolas

Visit my NexusFi Trade Journal Reply With Quote
  #117 (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,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,536

Ernie Chan had a good blog on this recently

Quantitative Trading: Kelly vs. Markowitz Portfolio Optimization

He will be back on futures.io (formerly BMT) for another webinar soon.

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
  #118 (permalink)
NoiseTrader716
Buffalo, NY
 
Posts: 64 since Jul 2014
Thanks Given: 4
Thanks Received: 38

sharpe ratio = (MeanAnnualReturn-RiskFreeRate)/StandardDeviationOfReturns

continuous Kelly = (MeanAnnualReturn-RiskFreeRate)/StandardDeviationOfReturns^2

discrete Kelly just gives meaningless numbers for trading systems IMO.

Reply With Quote
Thanked by:
  #119 (permalink)
kernel
Tashkent+Tashkent/Uzbekistan
 
Posts: 11 since Apr 2014
Thanks Given: 0
Thanks Received: 5

I believe any moment you enter the market is different. I mean it can favor or unfavor you. Thus it also differ from playing a coin for example, or doing something that is mathematically driven. I saw some raw uneducated guys trading forex, using some simple ploys that don't require any calculations and make decent profit.. consistently.. seeing that I want to throw my math book to the garbage

Reply With Quote
Thanked by:
  #120 (permalink)
bancor
euroland
 
Posts: 5 since May 2012
Thanks Given: 1
Thanks Received: 3


 
Code
# +------------------------------------------------------
# |         Portfolio:  Kelly vs Markowitz 
# |           ( epchan.blogspot.com )
# +------------------------------------------------------

library(quantmod)
library(PerformanceAnalytics)

# Download Monthly Data
syms = c(
  "SPY",     # US SP500
  "TLT",     # US bonds
  "GLD"      # US Gold 
)

Rf <- 0.002  # Risk-free 2.4%  year

getSymbols(syms, from="1970-01-01")
p <- do.call(merge, lapply(syms, function(x) {
               Cl(to.monthly(Ad(get(x)), drop.time = TRUE,
               indexAt='endof'))
               }))
colnames(p) = paste(syms, ".Ad",sep="")
r <- na.omit(ROC(p,type="discrete")) # monthly return

M <- apply(r,2,mean)-Rf # excess return vector
C <- cov(r)             # covariance matrix
KW <- (solve(C)%*%M)/2  # (Half)Kelly-weigths vector
KW                      # H-Kelly Portfolio W's 

MW <- KW/sum(KW)          
MW                      # Markowitz Tangency Portfolio W's

# Results *IN-SAMPLE* :

# Markowitz Portfolio Ret
xx <- t(apply(r,1,function(x) x*MW))
my <- as.xts(apply(xx,1,sum))

# H-Kelly Portfolio Ret
xx <- t(apply(r,1,function(x) x*KW))
ky <- as.xts(apply(xx,1,sum))
z <- merge(my,ky) 
colnames(z) <- c("Markowitz","H-Kelly")

table.AnnualizedReturns(z, Rf=Rf, scale=12)
charts.PerformanceSummary(z,ylog=T,lwd=1,
       main="Markowitz vs H-Kelly")
maxDrawdown(z)
# +---------------------End----------------------------------

Reply With Quote
Thanked by:




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