{"id":15534,"date":"2022-02-26T23:40:48","date_gmt":"2022-02-26T22:40:48","guid":{"rendered":"https:\/\/quantpedia.com\/?p=15534"},"modified":"2025-06-04T14:24:36","modified_gmt":"2025-06-04T12:24:36","slug":"beware-of-excessive-leverage-introduction-to-kelly-and-optimal-f","status":"publish","type":"post","link":"https:\/\/vvv.quantpedia.com\/es\/beware-of-excessive-leverage-introduction-to-kelly-and-optimal-f\/","title":{"rendered":"Beware of Excessive Leverage &#8211; Introduction to Kelly and Optimal F"},"content":{"rendered":"<p class=\"wp-block-paragraph\"><strong>Most investors focus solely on the profitability of their investment strategy. And, even though having a profitable strategy is important, it is not everything. There are still numerous other things to consider. One of them is the size of the investment. The investment size can increase or decrease the profitability of a strategy, so it is essential to choose it right. The following article is our introduction to Kelly and Optimal F methodologies, that underlies our upcoming <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing-pro\/\">Quantpedia Pro<\/a> report.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are various methods that focus on choosing the \u201ccorrect\u201d size of an investment. We already covered multiple position-sizing methods like <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/an-introduction-to-volatility-targeting\/\">Volatility Targeting<\/a> or <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/introduction-to-cppi-constant-proportion-portfolio-insurance\/\">CPPI<\/a>. In this article, we introduce another position sizing method \u2013 this time originally from trading and gambling environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, we focus on a simple Kelly Criterion, which comes from theory of gambling. Later, we analyze a more advanced version called an Optimal f. And finally, as always, in the last section of this article, we demonstrate the theory on a specific investment strategy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"font-size: 18pt;\">Kelly Criterion<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/John_Larry_Kelly_Jr.\">John Larry Kelly Jr.<\/a>&nbsp;is the author of the Kelly criterion formula from 1956. It was found that the formula, which has&nbsp;a <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/does-gambling-influence-stock-markets-around-the-world\/\">gambling<\/a> background&nbsp;and helps to determine the optimal bet size, can also help with finding the ideal investment size. The Kelly bet size is found by maximizing the expected geometric growth rate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The simple version of the formula, which we use in the later section, is:<\/p>\n\n\n\n<p><img decoding=\"async\" class=\"aligncenter wp-image-15554 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly01-Kelly.f.formula.basic_.png\" alt=\"Kelly01-Kelly.f.formula.basic\" width=\"324\" height=\"81\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly01-Kelly.f.formula.basic_.png 324w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly01-Kelly.f.formula.basic_-300x75.png 300w\" sizes=\"(max-width: 324px) 100vw, 324px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">where <em>f*<\/em> is the optimal fraction, or in other words, the percentage of the total wealth that should be put at risk. On the left-hand side of the equation is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>p<\/em> &#8211; the probability of a win<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>q<\/em> &#8211; the probability of a loss (<em>q=1-p<\/em>), and<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>b<\/em> &#8211; the amount gained with a win. So, for example, if we are betting on a 2-to-1 odds bet, then <em>b=2<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The formula was originally designed for binary outcomes, such as coin flip, where you either win or lose. However, there is also a general form of the Kelly formula, which allows for partial losses. The partial losses are relevant for investments. This formula is:<\/p>\n\n\n\n<p><img decoding=\"async\" class=\"aligncenter wp-image-15555 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly02-Kelly.f.formula2.png\" alt=\"\" width=\"324\" height=\"81\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly02-Kelly.f.formula2.png 324w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly02-Kelly.f.formula2-300x75.png 300w\" sizes=\"(max-width: 324px) 100vw, 324px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">here&nbsp;<em>f*<\/em>&nbsp;is the optimal fraction, or in other words, the percentage of the total wealth that should be put at risk. Next:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>p<\/em>&nbsp;is the probability that the investment increases in value<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>q<\/em>&nbsp;is the probability that the investment decreases in value (<em>q=1-p<\/em>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>a<\/em>&nbsp;is the fraction lost in a negative outcome and<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>b<\/em>&nbsp;is the fraction gained in a positive outcome<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, if the security price falls 10%, then&nbsp;<em>a=0.1<\/em>. On the other hand, if the security price rises 10%, then&nbsp;<em>b=0.1<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In both of the abovementioned cases the&nbsp;<em>f*<\/em>&nbsp;falls between 0 and 1 by definition (if you have a profitable investment strategy, otherwise it may become negative).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, the common practice is to divide the fraction&nbsp;<em>f*<\/em>&nbsp;by the maximum expected loss of your strategy. This should result into your final position size. For example, if f*=0.2 and you expect a maximum loss of 10% on your strategy, then you should size your position as 0.2\/10%=2 (leverage, i.e. 200% position size). If you expect a maximum loss of 100% is possible, then your optimal position size would be 0.2\/100% = 20%.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Final \u201cwager\u201d scaling:<\/p>\n\n\n\n<p><img decoding=\"async\" class=\"aligncenter wp-image-15556 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly03-aj-medzi-4-5-Formula.png\" alt=\"Kelly03 - formula\" width=\"324\" height=\"81\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly03-aj-medzi-4-5-Formula.png 324w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly03-aj-medzi-4-5-Formula-300x75.png 300w\" sizes=\"(max-width: 324px) 100vw, 324px\" \/><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"font-size: 18pt;\">Optimal F<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As we mentioned in the previous section, the basic Kelly formula was primarily designed for binary outcomes. In other words, you either win or lose, and the size of the win\/loss is the same. However, in trading, we should expect our wins and losses to be of varying sizes. That\u2019s when Optimal f comes into play. According to&nbsp;<a href=\"https:\/\/www.amazon.com\/gp\/product\/B001GAOYHS\/\">\u201cOptimal f\u201d by Ralph Vince<\/a>&nbsp;the Optimal f calculates with the size of a trade and with the biggest loss from a set period. The formula for Optimal f is:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15558 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly04-Optimal-f-formula.png\" alt=\"Kelly04-Optimal f formula\" width=\"469\" height=\"90\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly04-Optimal-f-formula.png 469w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly04-Optimal-f-formula-300x58.png 300w\" sizes=\"(max-width: 469px) 100vw, 469px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">where we want to maximize the TWR, which stands for the Terminal Wealth Relative. So, we are looking for the <em>f* <\/em>that produces the highest TWR. Lastly, the Trade stands for the profit or loss on a trade, and the Biggest Loss is the Biggest Loss during a set period. In other words \u2013 the Optimal f formula stands for the maximization of the geometric average of your investment (relative to the biggest loss).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This method is much closer to the real-life optimal position sizing. However, it still tends to over-bet and use the leverage that is way too big. It is caused by the fact that the reality is usually worse than the backtest.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similar to the Kelly formula, your final position size is then determined as <em>f<\/em>* divided by the biggest loss (or biggest expected loss). Once again, <em>f<\/em>* is bounded between 0 and 1 (if you have a profitable investment strategy, otherwise it may become negative). The final position size is then unbounded, because the leverage can be greater than one because it is measured against the maximal loss:<\/p>\n\n\n\n<p><img decoding=\"async\" class=\"aligncenter wp-image-15556 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly03-aj-medzi-4-5-Formula.png\" alt=\"Kelly03 - formula\" width=\"324\" height=\"81\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly03-aj-medzi-4-5-Formula.png 324w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly03-aj-medzi-4-5-Formula-300x75.png 300w\" sizes=\"(max-width: 324px) 100vw, 324px\" \/><\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Backtest vs. Reality<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As we probably all know from experience, the reality is oftentimes much worse than what we see in the backtests. That\u2019s why we need to be cautious when deciding on the size of leverage. Research suggests that rather than thinking about Kelly as a goal, think about it as a boundary. So it is better to make the leverage smaller than what the Optimal f suggests.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15539 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly05-howtochoosetheleverage.png\" alt=\"Kelly05-how to choose the leverage\" width=\"658\" height=\"547\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly05-howtochoosetheleverage.png 658w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly05-howtochoosetheleverage-300x249.png 300w\" sizes=\"(max-width: 658px) 100vw, 658px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Looking at the figure above and the following table from an&nbsp;<a href=\"https:\/\/nickyoder.com\/kelly-criterion\/\">article by Yonder<\/a>, 2021, we can see how the Kelly fraction affects the drawdown. For example, if we choose the Kelly Fraction&nbsp;=&nbsp;1.0, then with the probability of 80%, we get a 20% drawdown; with the probability of 50%, we get a 50% drawdown; and with the probability of 20%, we get an 80% drawdown. Do you want to lose that much? No. That\u2019s why it\u2019s better to be a bit conservative and use just a fraction of the Kelly (or Optimal f).<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15540 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly06-DDtable.png\" alt=\"Kelly06-DD table\" width=\"629\" height=\"332\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly06-DDtable.png 629w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly06-DDtable-300x158.png 300w\" sizes=\"(max-width: 629px) 100vw, 629px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are various ways to pick this fraction (btw, here is a useful <a href=\"https:\/\/www.symbolab.com\/solver\/fractions-calculator\" title=\"\">fraction calculator<\/a>) and make sure we stay on the more conservative side, which is usually safer. The easiest way is to divide the Kelly f (\/Optimal f) by maximal expected loss, which can either be estimated from the maximal loss from the previous period, or it can be fixed on a set level. Then it\u2019s advised to downscale this number further \u2013 and bet\/invest only a half or a third of it. These are rules of thumb. There are also several more sophisticated ways to deal with this problem.<\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Downscaling the optimal f* by bootstrap<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The one of the more sophisticated ways of downscaling Optimal f we will demonstrate here is bootstrapping (sampling with replacement). To get a conservative assessment of the optimal position size\/leverage we:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">-perform 100 bootstraps from the strategy\u2019s historical daily returns and then&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">-calculate the Kelly f (\/Optimal f) from the 5th worst percentile (based on strategy performance) and finally we&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">-divide the Kelly f (\/Optimal f) obtained this way by the maximum expected loss, as usually&nbsp;<\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Period returns or P&amp;L of trades?<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One technical, yet important question when talking about position sizing is \u2013 what kind of returns to use as inputs for further calculations? Should we use period returns (e.g. daily returns if the strategy trades daily) or trade returns? Daily returns mean roughly 250 data points each year, while trade returns will get you much less data points (given that you trade only on some days, not intraday).&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s say we have a strategy on a daily frequency which trades only once a month and holds the position for 5 days. Utilizing daily returns of the strategy, we will get a lot of \u201czeros\u201d i.e. days when the strategy stays out of the market. On the other hand, utilizing trade returns, we will get 12 data points \u2013 each representing a P&amp;L of a single trade.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15541 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly07-Table.png\" alt=\"\" width=\"790\" height=\"90\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly07-Table.png 790w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly07-Table-300x34.png 300w\" sizes=\"(max-width: 790px) 100vw, 790px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Which option is better or more correct? That depends. There\u2019s no correct answer. It\u2019s just important to understand well what these numbers mean and interpret them correctly. We will demonstrate both options \u2013 \u201cdaily returns\u201d as well as \u201ctrades\u201d.<\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Investment Strategy<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The strategy that we picked for this analysis is the&nbsp;<a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/calendar-seasonal-trading-and-momentum-factor\/\">Calendar \/ Seasonal Trading and Momentum Factor<\/a>. This strategy is a combination of a simple profitable calendar strategies consisting of smaller blocks. The article above shows that momentum strategies combined with calendar anomaly rebalancing may result into a profitable strategy with attractive return to risk ratio. This strategy uses a diversified set of equity ETFs and is easy to replicate. It trades on a daily frequency and opens the trades only on given days. For more details about the strategy, please read the full blog post.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The equity curve of the strategy is depicted below:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15542 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly08-SourceStrategy.jpg\" alt=\"Kelly08-Source Strategy\" width=\"915\" height=\"376\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly08-SourceStrategy.jpg 915w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly08-SourceStrategy-300x123.jpg 300w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/p>\n\n\n\n<table style=\"height: 10px; width: 99.99999999999999%; border-collapse: collapse; background-color: #bdced5; border-color: #bdced5; border-style: solid;\" border=\"10\">\n<tbody>\n<tr style=\"height: 43px;\">\n<td style=\"width: 570px; text-align: center; height: 10px;\"><span data-preserver-spaces=\"true\">Would you like to test similar ideas yourself? Then, check exclusive discount offers for our readers for&nbsp;<\/span><a class=\"editor-rtfLink\" href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/links-tools\/?category=algo-trading-discounts\" target=\"_blank\" rel=\"noopener noreferrer\"><strong><span data-preserver-spaces=\"true\">Historical Trading Data and Backtesting Platforms<\/span><\/strong><\/a><span data-preserver-spaces=\"true\">.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Optimal position sizing \u2013 today, using entire history<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We explore several approaches of calculating the optimal position sizing (leverages) for this strategy. We analyze a) the daily returns and b) the trade returns separately. Additionally, we calculate the Kelly f (\/Optimal f) from a) the raw data, as well as b) the bootstrapped data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By the bootstrapped data we mean 100 bootstraps as described above, and their 5<sup>th<\/sup>&nbsp;worst percentile. Here we calculated Kelly f (\/Optimal f) from the bootstrapped data and divided it by the maximal expected loss, set to 10%. Additionally, we repeated this process with trades instead of daily returns. The maximal expected loss is set to 20% in this case.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we wanted to start trading the strategy today, we could take the entire historical data of the strategy, calculate Kelly\/Optimal f and then simply trade this amount of the strategy from now on. These are the optimal position sizing fractions of the 4 combinations described above:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15543 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly09-Maximalizacia.Optimalf.png\" alt=\"Kelly09-Maximalizacia.Optimalf\" width=\"780\" height=\"600\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly09-Maximalizacia.Optimalf.png 780w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly09-Maximalizacia.Optimalf-300x231.png 300w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To arrive at the final position size, one must divide these numbers by their maximum expected loss (we chose 10% for daily returns and 20% for trades).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we then apply this optimal position sizing to the historical returns of the strategy, it would look like the chart below<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15544 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly10-CR.png\" alt=\"Kelly10-CR\" width=\"780\" height=\"400\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly10-CR.png 780w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly10-CR-300x154.png 300w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This, however, contains lookahead bias. We use the data from the past to calculate optimal position size which we then again apply to the same past data. To be entirely precise, we need to use only data available at the particular point in time. See next section.<\/p>\n\n\n\n<h2><span style=\"font-size: 18pt;\">Optimal Position sizing \u2013 historically, in time<\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For daily returns &#8211; we started with the first five years of historical daily returns of the strategy and calculated the Kelly f and Optimal f from them. Then, we divided the Kelly f (\/Optimal f) by the maximal expected loss to get the leverage. We set the maximal expected daily loss to 10%. Then, every year, we recalculate the new leverage from the whole data history available at that point in time (expanding window).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For trade returns &#8211; we repeated the same process with trades instead of daily returns. In this case, we set the maximum expected loss to 20%. The following figure shows the evolution of the 4 different optimal leverages we got from all four abovementioned methods.&nbsp;<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15545 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly11-leverages.for_.NOT_.bootstrapped.data_.png\" alt=\"Kelly11-leverages.for.NOT.bootstrapped.data\" width=\"780\" height=\"400\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly11-leverages.for_.NOT_.bootstrapped.data_.png 780w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly11-leverages.for_.NOT_.bootstrapped.data_-300x154.png 300w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Secondly, we applied our bootstrapping as described above. We started by calculating 100 bootstraps from the first five years of daily returns. Then we calculated the average return of each bootstrap and found the 5<sup>th<\/sup>worst percentile. After that, we calculated Kelly f (\/Optimal f) from the bootstrapped data and divided it by the maximal expected loss, set to 10%. We then moved forward a year and followed with an additional year of data, etc. up to 2021. Additionally, we repeated this process with trades instead of daily returns. The maximal expected loss is 20% in this case. The following chart shows the obtained optimal leverages we got from all four methods using bootstrapping.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15546 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly12-leverages.for_.bootstrapped.data_.png\" alt=\"Kelly12-leverages.for.bootstrapped.data\" width=\"780\" height=\"400\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly12-leverages.for_.bootstrapped.data_.png 780w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly12-leverages.for_.bootstrapped.data_-300x154.png 300w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As we can see, the methods which calculate the Kelly f (\/Optimal f) from bootstrapped data are more conservative and give us smaller leverages. Finally, we applied all of the calculated leverages to the daily returns at each point in time.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Leverage is not for free. Thus, we needed to take into consideration also leverage costs. We set the cost of leverage historically as 3M USD Libor + 2%.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following charts show the cumulative performance of such strategies. The first chart shows the cumulative returns of strategies calculated with leverages without bootstrap.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15547 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly13-cumulative.returns.based_.on_.NOT_.bootstrapped.data_.png\" alt=\"Kelly13-cumulative.returns.based.on.NOT.bootstrapped.data\" width=\"780\" height=\"400\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly13-cumulative.returns.based_.on_.NOT_.bootstrapped.data_.png 780w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly13-cumulative.returns.based_.on_.NOT_.bootstrapped.data_-300x154.png 300w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The second chart shows strategies, which are calculated using leverages from the bootstrapped data.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15548 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly14-cumulative.returns.based_.on_.bootstrapped.data_.png\" alt=\"Kelly14-cumulative.returns.based.on.bootstrapped.data\" width=\"780\" height=\"400\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly14-cumulative.returns.based_.on_.bootstrapped.data_.png 780w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly14-cumulative.returns.based_.on_.bootstrapped.data_-300x154.png 300w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lastly let\u2019s take a look at the table of risk and return characteristics.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15551 size-full\" src=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/wp-content\/uploads\/2021\/10\/Kelly15-Tabulka.png\" alt=\"Kelly15-Table\" width=\"890\" height=\"437\" srcset=\"https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly15-Tabulka.png 890w, https:\/\/vvv.quantpedia.com\/wp-content\/uploads\/2021\/10\/Kelly15-Tabulka-300x147.png 300w\" sizes=\"(max-width: 890px) 100vw, 890px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There\u2019s no precise answer to the question which method is best to use. Rather than answering this question, this article aims for illustrating their differences. We may, however, observe several obvious tendencies among the data above.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using 5<sup>th<\/sup>&nbsp;percentile of the bootstrap simulation results into considerably more conservative position sizing \u2013 roughly a half of that without bootstrapping. This is a desired property, though. The bootstrap was supposed to make our position sizing more conservative.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There\u2019s no clear pattern on what works the best \u2013 whether Kelly or Optimal f, daily returns or trade returns. From the table above, it may seem as if using the trade returns resulted into more conservative position sizing. However, bear in mind that this is highly influenced by the maximum loss we expect (10% per day for daily returns, 20% per trade for trade returns) which is used in the denominator of the optimal size.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another pattern which can be observed is that almost all of the position sizing methods achieved worse Sharpe ratio and Calmar ratio compared to the original strategy. However, if you think about it a bit more, this is to be expected \u2013 because of the leverage. Since the position sizing methods are using leverage (which is not for free), which harms return to risk ratios.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In our opinion, the position sizing which seems to be the most reasonable in this case out of the ones above is the Bootstrapped version of Optimal f (regardless of whether we calculate it for daily returns or trade returns). Mostly, due to its plausible logic, rather than superior results.&nbsp;<\/p>\n\n\n\n<p><strong>Author:<br>Daniela Hanicova, Quant Analyst, Quantpedia<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-854363cc-8450-4dc0-a06a-c737766e9431\"><strong>Are you looking for more strategies to read about? <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/sign-up-for-our-newsletter\/\">Sign up for our newsletter<\/a> or visit our <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/blog\/\">Blog<\/a> or <a href=\"http:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/Screener\">Screener<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-65925002-6290-4d3b-b5cd-f3a277851ec8\"><strong>Do you want to learn more about Quantpedia Premium service? Check <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/\">how Quantpedia works<\/a>, <a href=\"http:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/Home\/About\">our mission<\/a> and <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing\/\">Premium pricing offer<\/a>.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-34bf63ae-5a22-40a3-aeb4-769374e833d8\"><strong>Do you want to learn more about Quantpedia Pro service? Check its <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/quantpedia-pro\/\">description<\/a>, watch <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/quantpedia-explains\/\">videos<\/a>, review <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/how-it-works\/quantpedia-pro-reports\/\">reporting capabilities<\/a> and visit our <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing-pro\/\">pricing offer<\/a>.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-21942b3a-14d9-4c0f-b8ef-04d64675e253\"><strong>Are you looking for historical data or backtesting platforms? Check our list of&nbsp;<a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/links-tools\/?category=algo-trading-discounts\">Algo Trading Discounts<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Would you like free access to <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing\/\" title=\"\">our services<\/a>? Then, <a href=\"https:\/\/lightspeed.com\/lp\/quantpedia-lightspeed-financial-services-group-one-free-year-promotion\" title=\"\">open an account with Lightspeed<\/a> and enjoy one year of Quantpedia Premium at no cost.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-4c45d6c9-c8dd-4283-8743-bf573cfa4d45\"><strong>Or follow us on:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"block-476e95ed-31a5-4c4d-b701-5203f9fb2e24\"><strong>Facebook <a href=\"https:\/\/www.facebook.com\/groups\/quantstrategies\">Group<\/a>, Facebook <a href=\"https:\/\/www.facebook.com\/quantpedia\/\">Page<\/a>, <a href=\"https:\/\/twitter.com\/quantpedia\">Twitter<\/a>, <a href=\"https:\/\/www.linkedin.com\/company\/quantpedia\">Linkedin<\/a>, <a href=\"https:\/\/quantpedia.medium.com\/\">Medium<\/a> or <a href=\"https:\/\/www.youtube.com\/channel\/UC_YubnldxzNjLkIkEoL-FXg\">Youtube<\/a><\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p><strong>Most investors focus solely on the profitability of their investment strategy. And, even though having a profitable strategy is important, it is not everything. There are still numerous other things to consider. One of them is the size of the investment. The investment size can increase or decrease the profitability of a strategy, so it is essential to choose it right. The following article is our introduction to Kelly and Optimal F methodologies, that underlies our upcoming <a href=\"https:\/\/\\\/\\\/new-fmhwbzh6ghd9hede.swedencentral-01.azurewebsites.net\/pricing-pro\/\"><strong>Quantpedia Pro<\/strong><\/a> report. <\/strong><\/p>","protected":false},"author":24306,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[178,182],"class_list":["post-15534","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-asset-allocation","tag-theory-of-portfolio-management"],"_links":{"self":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/posts\/15534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/users\/24306"}],"replies":[{"embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/comments?post=15534"}],"version-history":[{"count":0,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/posts\/15534\/revisions"}],"wp:attachment":[{"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/media?parent=15534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/categories?post=15534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vvv.quantpedia.com\/es\/wp-json\/wp\/v2\/tags?post=15534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}