tag:blogger.com,1999:blog-2611399238181449712024-03-18T14:17:52.132+00:00This Blog is SystematicAlso hydromatic, automatic:
"It's Geeks Enlightening"
Rob Carvers blog about quant trading, investing, and economics.
Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.comBlogger152125tag:blogger.com,1999:blog-261139923818144971.post-86488190251863630142024-03-06T19:18:00.000+00:002024-03-06T19:18:30.806+00:00Fitting with: exponential weighting, alpha and the kitchen sink<p> I've talked at some length before about the question of fitting <b>forecast weights</b>, the weights you use to allocate risk amongst different signals used to trade a particular instrument. Generally I've concluded that there isn't much point wasting time on this, for example consider my previous post on the subject <a href="https://qoppac.blogspot.com/2021/05/fit-forecast-weights-by-instrument-by.html">here</a>.</p><p>However it's an itch I keep wanting to scratch, and in particular there are three things I'd like to look at which I haven't considered before:</p><p></p><ul style="text-align: left;"><li>I've generally used ALL my data history, weighted equally. But there are known examples of trading rules which just stop working during the backtested period, for example faster momentum pre-cost (see my last book for a discussion). </li><li>I've generally used Sharpe ratio as my indicator of performance of choice. But one big disadvantage of it is that will tend to favour rules with more positive Beta exposure on markets that have historically gone up </li><li>I've always used a two step process where I first fit forecast weights, and then instrument weights. This seperation makes things easier. But we can imagine many examples where it would produce a suboptimal performance.</li></ul><div>In this post I discuss some ideas to deal with these problems:</div><div><br /></div><div></div><p></p><ul><li>Exponential weighting, with more recent performance getting a higher weight.</li><li>Using alpha rather than Sharpe ratio to fit.</li><li>A kitchen sink approach where both instrument and forecast weights are fitted together.<br /><br /></li></ul><p>Note I have a longer term project in mind where I re-consider the entire structure of my trading system, but that is a big job, and I want to put in place these changes before the end of the UK tax year, when I will also be introducing another 50 or so instruments into my traded universe, something that would require some fitting of some kind to be done anyway.</p><p><br /></p><h2 style="text-align: left;">Exponential weighting</h2><p>Here is the 2nd most famous '<a href="https://en.wikipedia.org/wiki/Hockey_stick_graph_(global_temperature)">hockey stick</a>' graph in existence:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1X0dtFPXWLanvOfNDOwdvoMCp7v3-D2C8FxfuNAEGElpcMVRRZVxHnbDVOQIT9c4UZcs_k13OQ1ICnxTJuhVpCCebhckSANPWjNJmCMYDN3S34PDi03ZAJGdpAzzQQ0JXpIvlSZ_5DJIFPKmCi6V7pAiZsLfI8ODXp-YoK6VUwTYY_TX3xwiAbwP9TIYt/s5550/Figure35.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3150" data-original-width="5550" height="364" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1X0dtFPXWLanvOfNDOwdvoMCp7v3-D2C8FxfuNAEGElpcMVRRZVxHnbDVOQIT9c4UZcs_k13OQ1ICnxTJuhVpCCebhckSANPWjNJmCMYDN3S34PDi03ZAJGdpAzzQQ0JXpIvlSZ_5DJIFPKmCi6V7pAiZsLfI8ODXp-YoK6VUwTYY_TX3xwiAbwP9TIYt/w640-h364/Figure35.jpg" width="640" /></a></div>(From my latest book, Advanced Futures Trading Strategies <a href="https://www.systematicmoney.org/advanced-futures">AFTS</a>)<br /><p>Focusing on the black lines, which show the net performance of the two fastest EWMAC trading rules across a portfolio of 102 futures contracts, there's a clear pattern. Prior to 1990 these rules do pretty well, then afterwards they flatline (EWMAC4 in a very clear hockey stick pattern) and do badly (EWMAC2). </p><p>I discuss some reasons <i>why</i> this might have happened in the book, but that isn't what concerns us now. What bothers me is this; if I allocate my portfolio across these trading strategies using all the data since 1970 then I'm going to give some allocation to EWMAC4 and even a little bit to EWMAC2. But does that really make sense, to put money in something that's been flat / money losing for over 30 years?</p><p>Fitting by use of historic data is a constant balance between using more history, to get more robust statistically significant results, and using more recent data that is more likely to be relevant and also accounts for alpha decay. The right balance depends on both the holding period of our strategies (HFT traders use months of data, I should certainly be using decades), and also the context (to predict instrument standard deviation, I use something equvalent to using about a month of returns, whereas for this problem a much longer history would be appropriate). </p><p>Now I am not talking about crazy and doing something daft like allocating everything to the strategy that did best last week, but it does seem reasonable to use something like a 15 year halflife when estimating means and Sharpe Ratios of trading strategy returns.</p><p>That would mean I'd currently be giving about 86% of any weighting to the period after 1990, compared to about 62% now with equal weighting. So it's not a pure rolling window; the distant past still has some value, but the recent past is more important. </p><p><br /></p><h2 style="text-align: left;">Using alpha rather than Sharpe Ratio to fit</h2><p>One big difference between Quant equity people and Quant futures traders is that the former are obsessed with alpha. They get mugs from their significant others with 'worlds best alpha generator' on them for christmas. They wear jumpers with the alpha symbol on. You get the idea. Beta is something to be hedged out. Much of the logic is that we're probably getting our daily diet of Beta exposure elsewhere, so the holistic optimal portfolio will consist of our existing Beta plus some pure alpha.</p><p>Quant futures traders are, broadly speaking, more concerned with outright return. I'm guilty of this myself. Look at the Sharpe Ratio in the backtest. Isn't it great? And you know what, that's probably fine. The correlation of a typical managed futures strategy with equity/bond 60:40 is pretty low. So most of our performance will be alpha anyway. </p><p>However evaluating different trading strategies on outright performance is somewhat problematic. Certain rules are more likely to have a high correlation with underlying markets. Typically this will include carry in assets where carry is usually positive (eg bonds), and slower momentum on anything that has most usually gone up in the past (eg equities)*. To an extent some of this is fine since we want to collect some risk premia, but if we're already collecting those premia elsewhere in long only portfolios**, why bother? </p><p><i>* This also means that any weighting of instrument performance will be biased towards things that have gone up in the past - not a problem for me right now as I generally ignore it, but could be a problem if we adopt a 'kitchen sink' approach as I will discuss later.</i></p><p><i>** Naturally 'Trend following plus nothing' people will prefer to collect their risk premia inside their trend following portfolios, but they are an exception. I note in passing that for a retail investor who has to pay capital gains when their futures roll, it is likely that holding futures positions is an inferior way of collecting alpha.</i></p><p>I'm reminded of a comment by an old colleague of mine* on investigating different trading rules in the bond sector (naturally evalutin. After several depressing weeks he concluded that 'Nothing I try is any better than long only'.</p><p><i>*Hi Tom!</i></p><p>So in my latest book AFTS (sorry for the repeated plugs, but you're reading this for free so there has to be <i>some </i>advertising and at least it's more relevant than whatever clickbait nonsense the evil algo would serve up to you otherwise) I did redress this slightly by looking at alpha and not just outright returns. For example my slowest momentum rule (EWMAC64,256) has a slightly higher SR than one of my fastest (EWMAC8,32), but an inferior alpha even after costs.</p><p><br /></p><h3 style="text-align: left;">Which benchmark?</h3><p>Well this idea of using alpha is all very well, but what benchmark are we regressing on to get it? This isn't US equities now mate, you can't just use the S&P 500 without thinking. Some plausible candidates are:</p><p></p><ol style="text-align: left;"><li>The S&P 500,.</li><li>The 60:40 portfolio that some mythical investor might own as well as this, or a more tailored version to my own requirementsThis would be roughly equivalent to long everything on a subset of markets, with sector risk weights of about 80% in equities and 20% in bonds. Frankly this wouldn't be much different to the S&P 500.</li><li>The 'long everything' portfolio I used in AFTS, which consists of all my futures with a constant positive fixed forecast (the system from chapter 4, as readers will know).</li><li>A long only portfolio just for the sector a given instrument is trading in.</li><li>A long only position just on the given instrument we are trading.</li></ol><p></p><p>There are a number of things to consider here. What is the other portfolio that we hold? It might well be the S&P 500 or just the magnificent 7; it's more likely to consist of a globally diversified bunch of bonds and stocks; it's less likely to have a long only cash position in some obscure commodities contract. </p><p>Also not all things deliver risk premia in their naked Beta outfits. Looking at median long only constant forecast SR in chapter 3 of AFTS, they appear lower in the non financial assets (0.07 in ags, 0.27 in metals and 0.32 in energy; versus 0.40 in short vol, 0.46 in equity and 0.59 in bonds; incidentally FX is also close to zero at 0.09, but EM apart there's no reason why we should earn a risk premium here). This implies we should be veering towards loading up on Beta in financials and Alpha in non financials). </p><p>But it's hard to disaggregate what is the natural risk premium from holding financial assets, versus what we've earned just from a secular downtrend in rates and inflation that lasted for much of the 50 odd years of the backtest. Much of the logic for doing this exercise is because I'm assuming that these long only returns will be lower in the future because that secular trend has now finished.</p><p>Looking at the alpha just on one instrument will make it a bit weird when comparing alphas across different instruments. It might sort of make more sense to do the regression on a sector Beta. This would be more analogus to what the equity people do.</p><p>On balance I think the 'long everything' benchmark I used in AFTS is the best compromise. Because trends have been stronger in equities and bonds it will be reasonably correlated to 60:40 anyway. Regressing against this will thus give a lower Beta and potentially better Alpha for instruments outside of those two sectors.</p><p>One nice exercise to do is to then see what a blend of long everything and the alpha optimised portfolio looks like. This would allow us to include a certain amount of general Beta into the strategy. We probably shouldn't optimise for this.</p><p><br /></p><h3>Optimising with alpha</h3><p>We want to allocate more to strategies with higher alpha. We also want that alpha to be statistically significant. We'll get more statistical significance with more observations, and/or a better fit to the regression. </p><p>Unlike with means and Sharpe Ratios, I don't personally have any well developed methodologies, theories, or heuristics, for allocating weights according to alpha or significance of alpha. I did consider developing a new heuristic, and wasted a bit of time with toy formula involving the product of (1- p_value) and alpha.</p><p>But I quickly realised that it's fairly easy to adapt work I have done on this <a href="https://qoppac.blogspot.com/2019/12/new-and-improved-sharpe-ratio.html">before</a>. Instead of using naked return streams, we use residual return streams; basically the return left over after subtracting Beta*benchmark return. We can then divide this by the target return to get a Sharpe Ratio, which is then plugged in as normal.</p><p>How does this fit into an exponential framework? There are a number of ways of doing this, but I decided against the complexity of writing code (which would be slow) to do my regression in a full exponential way. Instead I estimate my Betas on first a rolling, then an expanding, 30 year window (which trivially has a 15 year half life). I don't expect Betas to vary that much over time. I estimate my alphas (and hence Sharpe ratios) with a 15 year half life on the residuals. Betas are re-estimated every year, and the most up to date estimate is then used to correct returns in the past year (otherwise the residual returns would change over time which is a bit weird and also computationally more expensive).</p><p><br /></p><h2 style="text-align: left;">Kitchen sink</h2><p>I've always done my optimisation in a two step process. First, what is the best way to forecast the price of this market (what is the best allocation across trading rules, i.e. what are my forecast weights)? Second, how should I put together a portfolio of these forecasters (what is the best allocation across instruments, i.e. what are my instrument weights)? </p><p>Partly that reflects the way my trading strategy is constructed, but this seperation also makes things easier. But it does reflect a forecasting mindset, rather than a 'diversified set of risk premia' mindset. Under the latter mindset, it would make sense to do a joint optimisation where the individual 'lego bricks' are ONE trading rule and ONE instrument. </p><p>It strikes me that this is also a much more logical approach once we move to maximising alpha rather than maximising Sharpe Ratio. </p><p>Of course there are potential pain points here. Even for a toy portfolio of 10 trading rules and 50 instruments we are optimising 500 assets. But the handcrafting approach of top down optimisation ought to be able to handle this fairly easily (we shall see!).</p><p><br /></p><p><br /></p><h2>Testing</h2><h3 style="text-align: left;">Setup</h3><p>Let's think about how to setup some tests for these ideas. For speed and interpretation I want to keep things reasonably small. I'm going to use my usual five outright momentum EWMAC trading rules, plus 1 carry (correlations are pretty high here, I will use carry60), plus one of my skew rules (skewabs180 for those who care), asset class mean reversion - a value type rule (<span style="background-color: white; color: #0033b3; font-family: "JetBrains Mono", monospace; font-size: 11.3pt;">mrinasset1000</span>), and both asset class momentum (<span style="background-color: white; color: #0033b3; font-family: "JetBrains Mono", monospace; font-size: 11.3pt;">assettrend64</span>) and relative momentum (<span style="background-color: white; color: #0033b3; font-family: "JetBrains Mono", monospace; font-size: 11.3pt;">relmomentum80</span>). My expectation is that the more RV type rules - relative momentum, skew, value - will get a higher weight than when we are just considering outright performance. I'm also expecting that the very fastest momentum will have a lower weight when exponential weighting is used.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV6bs7Twlhrr4SGV3edKVt0DWI4mbz3O-iajB-MwXAOFkui3n8pPqrkWaNOMY78N8k3aHWxNkH_gcEqUbFMBRlsGCupUzfQCKIKxShbg1O_UHZZAtgeomYO3qkaaVUDocfmPNq_rfY8R22481rSeB3EcfzMSfIFtGaS8563774CdJvelHHeDixUlROa_Io/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1086" data-original-width="1920" height="362" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV6bs7Twlhrr4SGV3edKVt0DWI4mbz3O-iajB-MwXAOFkui3n8pPqrkWaNOMY78N8k3aHWxNkH_gcEqUbFMBRlsGCupUzfQCKIKxShbg1O_UHZZAtgeomYO3qkaaVUDocfmPNq_rfY8R22481rSeB3EcfzMSfIFtGaS8563774CdJvelHHeDixUlROa_Io/w640-h362/Figure_1.png" width="640" /></a></div>The rules profitability is shown above. You can see that we're probably going to want to have less MR (mean reversion), as it's rubbish; and also if we update our estimates for profitability we'd probably want less faster momentum and relative momentum. There is another hockey stick from 2009 onwards when many rules seem to flatten off somewhat.<div><br /></div><div>(Frankly we could do with more rules that made more money recently; but I don't want to be accused of overegging the pudding on overfitting here)<p>For instruments, to avoid breaking my laptop with repeated optimisation of 200+ instruments I kept it simple and restricted myself to only those with at least 20 years of trading history. There are 39 of these old timers:</p><p><span style="font-family: courier;">'BRE', 'CAD', 'CHF', 'CORN', 'DAX', 'DOW', 'EURCHF', 'EUR_micro', 'FEEDCOW', 'GASOILINE', 'GAS_US_mini', 'GBP', 'GBPEUR', 'GOLD_micro', 'HEATOIL', 'JPY', 'LEANHOG', 'LIVECOW', 'MILK', 'MSCISING', 'MXP', 'NASDAQ_micro', 'NZD', 'PALLAD', 'PLAT', 'REDWHEAT', 'RICE', 'SILVER', 'SOYBEAN_mini', 'SOYMEAL', 'SOYOIL', 'SP400', 'SP500_micro', 'US10', 'US20', 'US5', 'WHEAT', 'YENEUR', 'ZAR'</span></p><p>On the downside there is a bit of a sector bias here (12 FX, 11 Ags, 6 equity, 4 metals, and only 3 bonds amd 3 energy), but that also gives more work for the optimiser (FWIW my full set of instruments has biased towards equities, so you can't really win).</p><p>For my long only benchmark used for regressions I'm going to use a fixed forecast of +10, which in laymans terms means it's a risk parity type portfolio. I will set the instrument weights using my handcrafting method, but without any information about Sharpe Ratio, just correlations. IDM is estimated on backward looking data of course.</p><p>I will then have something that roughly resembles my current system (although clearly with fewer markets and trading rules, and without using dynamic optimisation of positions). I also use handcrafting, but I fit forecast weights and instrument weights seperately, again without using any information on performance just correlations. </p><p>I then check the effect of introducing the following features:</p><p></p><ul style="text-align: left;"><li>'SR' Allowing Sharpe Ratio information to influence forecast and instrument weights</li><li>'Alpha' Using alpha rather than Sharpe Ratio</li><li>'Short' Using a 15 year halflife rather than all the data to estimate Sharpe Ratios and correlations</li><li>'Sink' Estimating the weights for forecast and instrument weights at the same time</li></ul><p></p><p>Apart from SR and alpha which are mutually exclusive, this gives me the following possible permutations:</p><p></p><ul style="text-align: left;"><li>Baseline: Using no peformance information </li><li>'SR' </li><li>'SR+Short' </li><li>'Sink' </li><li>'SR+Sink' </li><li>'SR+Short+Sink' </li><li>'Alpha' </li><li>'Alpha+Short'</li><li>'Alpha+Sink'</li><li>'Alpha+Short+Sink'</li></ul><div>In terms of performance I'm going to check both the outright performance, but also the overall portfolio alpha. I will also look seperately at the post 2008 period and the pre 2008 period. Naturally everything is done out of sample, with robust optimisation, and after costs.</div><div><div><br /></div><div>Finally, as usual in all cases I discard trading rules which don't meet my 'speed limit'. This also means that I don't trade the Milk future at all.</div><div><br /></div></div><div><br /></div><p></p><h3>Long only benchmark</h3><div>Some fun facts, here are the final instrument weights by asset class:</div><div><br /></div><div><span style="font-family: courier;">{'Ags': 0.248, 'Bond': 0.286, 'Equity': 0.117, 'FX': 0.259, 'Metals': 0.0332, 'OilGas': 0.0554}</span></div><div><br /></div><div>The final diversification multiplier is 2.13. It has a SR of around 0.6, and costs of around 0.4% a year.</div><div><br /></div><div><br /></div><h3 style="text-align: left;">Baseline</h3><div>Here is a representative set of forecast weights (S&P 500):</div><div><div><br /></div><div><div><span style="font-family: courier;">relmomentum80 0.105</span></div><div><br /></div><div><span style="font-family: courier;">momentum4 0.094</span></div><div><span style="font-family: courier;">momentum8 0.048</span></div></div></div><div><div><span style="font-family: courier;">momentum16 0.048</span></div><div><span style="font-family: courier;">momentum32 0.054</span></div><div><span style="font-family: courier;">momentum64 0.054</span></div><div><div><span style="font-family: courier;">assettrend64 0.102</span></div></div><div><br /></div><div><span style="font-family: courier;">carry60 0.155</span></div></div><div><div><span style="font-family: courier;">mrinasset1000 0.238</span></div></div><div><div><span style="font-family: courier;">skewabs180 0.102</span></div></div><div><span style="font-family: courier;"><br /></span></div><p>The massive weight to mrinasset is due to the fact it is <i>very</i> diversifying, and we are only using correlations here. But mrinasset isn't very good, so smuggling in outright performance would probably be a good thing to do.</p><p>SR of this thing is 0.98 and costs are a bit higher as we'd expect at 0.75% annualised. Always amazing how well just a simple diversified system can do. The Beta to our long only model is just 0.09 (again probably due to that big dollop of mean reversion which is slightly negative Beta if anything), so perhaps unsurprising the net alpha is 18.8% a year (dividing by the vol gets to a SR of 0.98 again just on the alpha). BUT...</p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB-p3v1QzGbUMxZIZ05_JeQ57Ev1G7jK_GhzcklOTZc9kxOPeP7p_H1zPFcLb5YlYnI1zU4-zTt1titTUAbZPf1kMu5q_D6Lbm00TThbRWWb3RhazfZoSZWh9zyQlTjUlqjElf6FeCafEBT13xg2pAcXPmsxuqDV4MPq-dr490v1PSz9QAQRyxrVxlB-d4/s640/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB-p3v1QzGbUMxZIZ05_JeQ57Ev1G7jK_GhzcklOTZc9kxOPeP7p_H1zPFcLb5YlYnI1zU4-zTt1titTUAbZPf1kMu5q_D6Lbm00TThbRWWb3RhazfZoSZWh9zyQlTjUlqjElf6FeCafEBT13xg2pAcXPmsxuqDV4MPq-dr490v1PSz9QAQRyxrVxlB-d4/w640-h480/Figure_1.png" width="640" /></a></div><div><br /></div>Performance has declined over time. <br /><p><br /></p><h3>'SR'</h3><p>I'm now going to allow the fitting process for both forecast and instrument weighs to use Sharpe ratio. Naturally I'm doing this in a sensible way so the weights won't go completely nuts.</p><p>Let's have a look at the forecast weights for comparison:</p><p><span style="font-family: courier;">momentum4 0.112</span></p><p><span style="font-family: courier;">momentum8 0.065</span></p><p><span style="font-family: courier;">momentum16 0.068</span></p><p><span style="font-family: courier;">momentum32 0.075</span></p><p><span style="font-family: courier;">momentum64 0.072</span></p><div><p><span style="font-family: courier;">assettrend64 0.122</span></p></div><div><p><span style="font-family: courier;">relmomentum80 0.097</span></p><div></div></div><p><span style="font-family: courier;"><br /></span></p><p><span style="font-family: courier;">mrinasset1000 0.135</span></p><p><span style="font-family: courier;">skewabs180 0.105</span></p><p><span style="font-family: courier;">carry60 0.149</span></p><div><p><br /></p></div><p>We can see that money losing MR has a lower weight, and in general the non trendy part of the portfolio has dropped from about half to under 40%. But we still have <b>lots</b> of faster momentum as we're using the whole period to fit.</p><p>Instrument weights by asset class meanwhile look like this:</p><p><span style="font-family: courier;">{'Ags': 0.202, 'Bond': 0.317, 'Equity': 0.191, 'FX': 0.138 'Metals': 0.0700, 'OilGas': 0.0820}</span></p><p>Not dramatic changes, but we do get a bit more of the winning asset classes. </p><div><span style="font-weight: 400;"><br /></span></div><h3>'SR+Short'</h3><div>Now what happens if we change our mean and correlation estimates so they have a 15 year halflife, rather than using all the data?</div><div><br /></div><p>Forecast weights:</p><p><span style="font-family: courier;"></span></p><p><span style="font-family: courier;">momentum4 0.095</span></p><p><span style="font-family: courier;"></span></p><p><span style="font-family: courier;">momentum8 0.055</span></p><p><span style="font-family: courier;">momentum16 0.059</span></p><p><span style="font-family: courier;">momentum32 0.067</span></p><p><span style="font-family: courier;">momentum64 0.066</span></p><p><span style="font-family: courier;">relmomentum80 0.095</span></p><div><span style="font-family: courier;">assettrend64 0.122</span></div><div><span style="font-family: courier;"><br /></span></div><p><span style="font-family: courier;">skewabs180 0.117</span></p><p><span style="font-family: courier;">carry60 0.142</span></p><p><span style="font-family: courier;">mrinasset1000 0.183</span></p><p><br /></p><p><br /></p><p>There's definitely been a shift out of faster momentum, and into things that have done better recently such as skew. We are also seeing more MR which seems counterintuitive, my initial theory is that it's because MR becomes more diversifying over time and this is indeed the case.</p><p><br /></p><h3>'Sink+SR+Short'</h3></div><div>So far we've just been twiddling around a little at the edges really, but this next change is potentially quite different - jointly optimising the forecast and instrument weights. Let's look at the results with the SR using the 15 year halflife.</div><div><br /></div><div>Here are the S&P 500 forecast weights - note that unlike for other methods, these could be wildly different across instruments:</div><div><br /></div><div><div><span style="font-family: courier;">momentum4 0.136</span></div><div><span style="font-family: courier;">momentum8 0.188</span></div><div><span style="font-family: courier;">momentum16 0.147</span></div><div><div><span style="font-family: courier;">momentum32 0.046</span></div></div><div><div><span style="font-family: courier;">momentum64 0.048</span></div><div><div><span style="font-family: courier;">assettrend64 0.098</span></div><div><span style="font-family: courier;">relmomentum80 0.012</span></div></div></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">carry60 0.035</span></div><div><span style="font-family: courier;">mrinasset1000 0.000</span></div><div><span style="font-family: courier;">skewabs180 0.290</span></div><div><br /></div></div><div>Here we see decent amounts of faster momentum - maybe because it's a cheaper instrument or just happens to work better - but no mean reversion which apparently is shocking here. A better way of doing this is seeing the forecast weights added up across all instruments:</div><div><br /></div><div><div><span style="font-family: courier;">momentum4 0.181185</span></div><div><span style="font-family: courier;">momentum8 0.138984</span></div><div><span style="font-family: courier;">momentum16 0.088705</span></div><div><span style="font-family: courier;">momentum32 0.079942</span></div><div><span style="font-family: courier;">momentum64 0.098399</span></div><div><div><span style="font-family: courier;">assettrend64 0.107174</span></div></div><div><div><span style="font-family: courier;">relmomentum80 0.052196</span></div></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">skewabs180 0.086572</span></div></div><div><div><span style="font-family: courier;">mrinasset1000 0.063426</span></div><div><span style="font-family: courier;">carry60 0.103418</span></div><div><br /></div></div><div><br /></div><div>Perhaps surprisingly now we're seeing brutally large amounts of fast momentum, and less of the more diversifying rules. </div><div> </div><div><br /></div><div><br /></div><h3 style="text-align: left;">Interlude - clustering when everything is optimised together</h3><div><br /></div><div>To understand a little better what's going on, it might be helpful to do a <a href="https://qoppac.blogspot.com/2016/08/trend-following-and-correlation.html">cluster analysis </a>to see how things are grouping together when we do our top down optimisation across the 10 rules and 37 instruments: 370 things altogether. Using the final correlation matrix to do the clustering, here are the results for 2 clusters:</div><div><br /></div><div><div><span style="font-family: courier; font-size: x-small;">Instruments {'CAD': 10, 'FEEDCOW': 10, 'GAS_US_mini': 10, 'GBPEUR': 10, 'LEANHOG': 10, 'LIVECOW': 10, 'MILK': 10, 'RICE': 10, 'SP400': 10, 'YENEUR': 10, 'ZAR': 10, 'DAX': 9, 'DOW': 9, 'MSCISING': 9, 'NASDAQ_micro': 9, 'SP500_micro': 9, 'GASOILINE': 4, 'GOLD_micro': 4, 'HEATOIL': 4, 'JPY': 4, 'PALLAD': 4, 'PLAT': 4, 'SILVER': 4, 'CHF': 3, 'CORN': 3, 'EURCHF': 3, 'EUR_micro': 3, 'NZD': 3, 'REDWHEAT': 3, 'SOYBEAN_mini': 3, 'SOYMEAL': 3, 'SOYOIL': 3, 'US10': 3, 'US5': 3, 'WHEAT': 3, 'BRE': 2, 'GBP': 2, 'US20': 2, 'MXP': 1}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'skewabs180': 37, 'mrinasset1000': 35, 'carry60': 33, 'relmomentum80': 25, 'assettrend64': 16, 'momentum4': 16, 'momentum8': 16, 'momentum16': 16, 'momentum32': 16, 'momentum64': 16}</span></div><div><br /></div><div><span style="font-family: courier; font-size: x-small;">Instruments {'MXP': 9, 'BRE': 8, 'GBP': 8, 'US20': 8, 'CHF': 7, 'CORN': 7, 'EURCHF': 7, 'EUR_micro': 7, 'NZD': 7, 'REDWHEAT': 7, 'SOYBEAN_mini': 7, 'SOYMEAL': 7, 'SOYOIL': 7, 'US10': 7, 'US5': 7, 'WHEAT': 7, 'GASOILINE': 6, 'GOLD_micro': 6, 'HEATOIL': 6, 'JPY': 6, 'PALLAD': 6, 'PLAT': 6, 'SILVER': 6, 'DAX': 1, 'DOW': 1, 'MSCISING': 1, 'NASDAQ_micro': 1, 'SP500_micro': 1}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'assettrend64': 23, 'momentum4': 23, 'momentum8': 23, 'momentum16': 23, 'momentum32': 23, 'momentum64': 23, 'relmomentum80': 14, 'carry60': 6, 'mrinasset1000': 4, 'skewabs180': 2}</span></div></div><div><br /></div><div><br /></div><div>Interepration here is that for each cluster I count the number of instruments present, and then trading rules. So for example the first cluster has 10 examples of CAD - since there are 10 trading rules that means all the CAD is in this cluster. It also has 37 examples of the skewabs180 rules, again this means that all the skew rules have been collected here.</div><div><br /></div><div>This first cluster split clearly shows a split between divergent rules in cluster 1, and trendy type rules in cluster 2. The instrument split is less helpful.</div><div><br /></div><div>Jumping ahead, here are N=10 clusters with my own labels in bold:</div><div><br /></div><div><div><span style="font-family: courier; font-size: x-small;">Cluster 1 <b>EQUITY TREND</b></span></div><div><span style="font-family: courier; font-size: x-small;">Instruments {'DAX': 6, 'DOW': 5, 'NASDAQ_micro': 5, 'SP400': 5, 'SP500_micro': 5}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'assettrend64': 5, 'momentum16': 5, 'momentum32': 5, 'momentum64': 5, 'momentum8': 4, 'mrinasset1000': 1, 'skewabs180': 1}</span></div><div><span style="font-family: courier; font-size: x-small;"><br /></span></div><div><span style="font-family: courier; font-size: x-small;">Cluster 2 <b>???</b></span></div><div><span style="font-family: courier; font-size: x-small;">Instruments {'GAS_US_mini': 9, 'EURCHF': 2, 'GOLD_micro': 2, 'MSCISING': 2, 'NASDAQ_micro': 2, 'PALLAD': 2, 'PLAT': 2, 'RICE': 2, 'SILVER': 2, 'SP500_micro': 2, 'BRE': 1, 'CAD': 1, 'DAX': 1, 'DOW': 1, 'EUR_micro': 1, 'GASOILINE': 1, 'REDWHEAT': 1, 'SOYBEAN_mini': 1, 'SOYMEAL': 1, 'SOYOIL': 1, 'SP400': 1, 'US5': 1, 'WHEAT': 1}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'mrinasset1000': 15, 'carry60': 8, 'skewabs180': 6, 'relmomentum80': 5, 'assettrend64': 1, 'momentum4': 1, 'momentum8': 1, 'momentum16': 1, 'momentum32': 1, 'momentum64': 1}</span></div><div><span style="font-family: courier; font-size: x-small;"><br /></span></div><div><span style="font-family: courier; font-size: x-small;">Cluster 3 <b>???</b></span></div><div><span style="font-family: courier; font-size: x-small;">Instruments {'FEEDCOW': 10, 'GBPEUR': 10, 'LEANHOG': 10, 'LIVECOW': 10, 'MILK': 10, 'YENEUR': 10, 'ZAR': 10, 'CAD': 9, 'RICE': 8, 'MSCISING': 7, 'HEATOIL': 4, 'JPY': 4, 'SP400': 4, 'CHF': 3, 'CORN': 3, 'DOW': 3, 'GASOILINE': 3, 'NZD': 3, 'US10': 3, 'DAX': 2, 'EUR_micro': 2, 'GBP': 2, 'GOLD_micro': 2, 'NASDAQ_micro': 2, 'PALLAD': 2, 'PLAT': 2, 'REDWHEAT': 2, 'SILVER': 2, 'SOYBEAN_mini': 2, 'SOYMEAL': 2, 'SOYOIL': 2, 'SP500_micro': 2, 'US20': 2, 'US5': 2, 'WHEAT': 2, 'BRE': 1, 'EURCHF': 1, 'GAS_US_mini': 1, 'MXP': 1}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'skewabs180': 30, 'carry60': 25, 'relmomentum80': 20, 'mrinasset1000': 19, 'momentum4': 15, 'momentum8': 11, 'assettrend64': 10, 'momentum16': 10, 'momentum32': 10, 'momentum64': 10}</span></div><div><span style="font-family: courier; font-size: x-small;"><br /></span></div><div><span style="font-family: courier; font-size: x-small;">Cluster 4 <b>US RATES TREND+CARRY</b></span></div><div><span style="font-family: courier; font-size: x-small;">Instruments {'US20': 8, 'US10': 7, 'US5': 7}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'carry60': 3, 'assettrend64': 3, 'momentum4': 3, 'momentum8': 3, 'momentum16': 3, 'momentum32': 3, 'momentum64': 3, 'mrinasset1000': 1}</span></div><div><span style="font-family: courier; font-size: x-small;"><br /></span></div><div><span style="font-family: courier; font-size: x-small;">Cluster 5 <b>EURCHF</b></span></div><div><span style="font-family: courier; font-size: x-small;">Instruments {'EURCHF': 7}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'assettrend64': 1, 'momentum4': 1, 'momentum8': 1, 'momentum16': 1, 'momentum32': 1, 'momentum64': 1, 'skewabs180': 1}</span></div><div><span style="font-family: courier; font-size: x-small;"><br /></span></div><div><span style="font-family: courier; font-size: x-small;">Cluster 6 <b>EQUITY MR+REL MOMENTUM</b></span></div><div><span style="font-family: courier; font-size: x-small;">Instruments {'DAX': 1, 'DOW': 1, 'MSCISING': 1, 'NASDAQ_micro': 1, 'SP500_micro': 1}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'mrinasset1000': 3, 'relmomentum80': 2}</span></div><div><span style="font-family: courier; font-size: x-small;"><br /></span></div><div><span style="font-family: courier; font-size: x-small;">Cluster 7 <b>G10 FX TREND</b></span></div><div><span style="font-family: courier; font-size: x-small;">Instruments {'GBP': 8, 'CHF': 7, 'EUR_micro': 7, 'NZD': 7, 'JPY': 6}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'assettrend64': 5, 'momentum4': 5, 'momentum8': 5, 'momentum16': 5, 'momentum32': 5, 'momentum64': 5, 'relmomentum80': 4, 'carry60': 1}</span></div><div><span style="font-family: courier; font-size: x-small;"><br /></span></div><div><span style="font-family: courier; font-size: x-small;">Cluster 8 <b>EM FX</b></span></div><div><span style="font-family: courier; font-size: x-small;">Instruments {'MXP': 9, 'BRE': 8}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'relmomentum80': 2, 'carry60': 2, 'assettrend64': 2, 'momentum4': 2, 'momentum8': 2, 'momentum16': 2, 'momentum32': 2, 'momentum64': 2, 'skewabs180': 1}</span></div><div><span style="font-family: courier; font-size: x-small;"><br /></span></div><div><span style="font-family: courier; font-size: x-small;">Cluster 9 <b>AGS TREND</b></span></div><div><span style="font-family: courier; font-size: x-small;">Instruments {'CORN': 7, 'REDWHEAT': 7, 'SOYBEAN_mini': 7, 'SOYMEAL': 7, 'SOYOIL': 7, 'WHEAT': 7}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'relmomentum80': 6, 'assettrend64': 6, 'momentum4': 6, 'momentum8': 6, 'momentum16': 6, 'momentum32': 6, 'momentum64': 6}</span></div><div><span style="font-family: courier; font-size: x-small;"><br /></span></div><div><span style="font-family: courier; font-size: x-small;">Cluster 10 <b>ENERGY/METAL TREND</b></span></div><div><span style="font-family: courier; font-size: x-small;">Instruments {'GASOILINE': 6, 'GOLD_micro': 6, 'HEATOIL': 6, 'PALLAD': 6, 'PLAT': 6, 'SILVER': 6}</span></div><div><span style="font-family: courier; font-size: x-small;">Rules {'assettrend64': 6, 'momentum4': 6, 'momentum8': 6, 'momentum16': 6, 'momentum32': 6, 'momentum64': 6}</span></div><div><br /></div><div>We can see that there are some richer things going on here than we could capture in the simple 2-dimensional fit of first forecast weights, then instrument weights. </div></div><div><br /></div><div><br /></div><div><div><h3>'Alpha'</h3></div></div><div>Let's now see what happens if we replace the use of Sharpe Ratio on raw returns to measure performance with optimisation with the use of a Sharpe Ratio on residual returns after adjusting for Beta exposure; alpha basically.</div><div><br /></div><div>Here are our usual forecast weights for S&P 500:</div><div><br /></div><div><div><span style="font-family: courier;">momentum4 0.061399</span></div><div><div><span style="font-family: courier;">momentum8 0.067279</span></div><div><span style="font-family: courier;">momentum16 0.037172</span></div></div><div><span style="font-family: courier;">momentum32 0.037112</span></div><div><span style="font-family: courier;">momentum64 0.069207</span></div><div><span style="font-family: courier;">relmomentum80 0.170218</span></div><div><div><span style="font-family: courier;">assettrend64 0.176815</span></div></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">skewabs180 0.105298</span></div><div><span style="font-family: courier;">carry60 0.102799</span></div><div><span style="font-family: courier;">mrinasset1000 0.172700</span></div></div><div><br /></div><div>Very interesting; we're steering very much away from all speeds of 'vanilla' momentum here, and once again we have a lump of money in the very much diversifying but money losing mean reversion in assets.</div><div><br /></div><div><br /></div><h2 style="text-align: left;">Results</h2><div><br /></div><div>Right so you have waded through all this crap, and here is your reward, what are the results like?</div><div><span style="font-size: x-small;"><br /></span></div><div><div style="background-color: white;"><pre style="font-family: "JetBrains Mono", monospace;"><div><pre style="font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #080808;"> SR beta r_SR H1_SR H1_beta H1_r_SR H2_SR H2_beta H2_r_SR<br />LONG_ONLY </span><span style="color: #1750eb;">0.601 1.000 0.000 0.740 1.000 0.000 0.191 1.000 0.000<br /></span><span style="color: #080808;">BASELINE </span><span style="color: #1750eb;">0.983 0.094 </span><span style="color: #274e13;">0.940</span><span style="color: #1750eb;"> 1.246 0.094 </span><span style="color: #274e13;">1.192</span><span style="color: #1750eb;"> 0.197 0.058 </span><span style="color: red;">0.188</span><span style="color: #1750eb;"><br /></span><span style="color: #080808;">SR </span><span style="color: #274e13;">1.087</span><span style="color: #1750eb;"> 0.308 </span><span style="color: #274e13;">0.932</span><span style="color: #1750eb;"> </span><span style="color: #274e13;">1.298</span><span style="color: #1750eb;"> 0.338 1.084 </span><span style="color: #274e13;">0.458</span><span style="color: #1750eb;"> 0.151 </span><span style="color: #274e13;">0.438</span><span style="color: #1750eb;"><br /></span><span style="color: #080808;">SR_short </span><span style="color: #274e13;">1.089</span><span style="color: #1750eb;"> 0.324 0.927 </span><span style="color: #274e13;">1.318</span><span style="color: #1750eb;"> 0.353 1.100 0.375 0.166 0.350<br /></span><span style="color: #080808;">sink </span><span style="color: #1750eb;">1.025 0.323 0.871 1.252 0.330 1.055 0.356 0.260 0.319<br /></span><span style="color: #080808;">SR_sink </span><span style="color: #1750eb;">0.975 0.362 0.804 1.167 0.378 0.947 0.388 0.265 0.349<br /></span><span style="color: #080808;">SR_short_sink </span><span style="color: #1750eb;">0.929 0.384 0.753 1.121 0.395 0.899 0.323 0.305 0.277<br /></span><span style="color: #080808;">alpha </span><span style="color: #1750eb;">0.993 0.199 0.891 1.212 0.220 1.069 0.345 0.081 0.336<br /></span><span style="color: #080808;">alpha_short </span><span style="color: #1750eb;">1.023 0.238 0.904 1.237 0.249 1.082 0.367 0.160 0.343<br /></span><span style="color: #080808;">alpha_sink_short </span><span style="color: red;">0.888</span><span style="color: #1750eb;"> 0.336 </span><span style="color: red;">0.735</span><span style="color: #1750eb;"> </span><span style="color: red;">1.090</span><span style="color: #1750eb;"> 0.336 </span><span style="color: red;">0.903</span><span style="color: #1750eb;"> </span><span style="color: red;">0.257</span><span style="color: #1750eb;"> 0.299 </span><span style="color: red;">0.210</span><span style="color: #1750eb;"><br /></span></span></pre></div></pre></div></div><div>The columns are the SR, beta, and 'residual SR' (alpha divided by standard deviation) for the whole period, then for H1 (not really the first half, but pre 2009), then for H2 (after 2009). Green values are the best or very close to it, red is the worst (excluding long only, natch).</div><div><br /></div><div>Top line is everything looks worse after 2009 for both outright and residual performance. Looking at the entire period, there are some fitting methods that do better than the baseline on SR, but on residual SR they fail to improve. Focusing on the second half of the data, there is a better improvement on SR over the baseline for all the fitting methods, but one which also survives the use of a residual SR. </div><div><br /></div><div>But the best model of all in that second half was <b>almost much the simplest</b>, just using the SR alone to robustly fit weights - but for the entire period, and sticking to the two stage process of fitting forecast weights and then instrument weights. </div><div><br /></div><div>I checked, and the improvement over the baseline from just using SR was statistically significant with a p-value of about 0.02. The p-value versus the competing 'apha' fit wasn't so good - just 0.2; but <strike>Occams</strike> Rob's razor says we should use the simplest possible model unless there is a more complex model that is significantly better. SR is significantly better than the simpler baseline model at least in the more critical second half of the data, so we should use it and only use a more complex model if they are better. We don't need a decent p-value to justify using SR over alpha, since the latter is more complex.</div><div><br /></div><div><br /></div><h2 style="text-align: left;">Coda: Forecast or instrument weights?</h2><div>One thing I was curious about was whether the improvements from using SR are down to fitting forecast weights or instrument weights. I'm a bit more bullish on the former, as I feel there is more data and thus more likelihood of getting robust statistics. Every time I have looked at instrument performance, I've not seen any stastistically significant differences.</div><div><br /></div><div>(If you have say 30 years of data history, then for each instrument you have 30 years worth of information, but for each trading rule you have evidence from each instrument so you end up with 30*30 years which means you have root(30) = 5.5 times more information).</div><div><br /></div><div>My hope / expectation is that all the work is being done by forecast weight fitting, so I checked to see what happened if I ran a SR fit just on instruments, and just on forecasts:</div><div><br /></div><div><div style="background-color: white; color: #080808;"><pre style="font-family: "JetBrains Mono", monospace;"><span style="font-size: 11.3pt;"> </span><span style="font-size: x-small;"> SR beta r_SR H1_SR H1_beta H1_r_SR H2_SR H2_beta H2_r_SR</span><span style="font-size: 11.3pt;"><br /></span><span style="font-size: x-small;">LONG_ONLY <span style="color: #1750eb;">0.601 1.000 0.000 0.740 1.000 0.000 0.191 1.000 0.000<br /></span>BASELINE <span style="color: #1750eb;">0.983 0.094 0.940 1.246 0.094 1.192 0.197 0.058 0.188<br /></span>SR <span style="color: #1750eb;">1.087 0.308 0.932 1.298 0.338 1.084 0.458 0.151 0.438<br /></span>SR_forecasts <span style="color: #1750eb;">1.173 0.330 1.002 1.416 0.364 1.179 0.441 0.154 0.420<br /></span>SR_instruments <span style="color: #1750eb;">0.948 0.118 0.892 1.179 0.121 1.106 0.259 0.076 0.248<br /></span></span><span style="color: #1750eb; font-size: 11.3pt;"><br /></span></pre></div></div><div><br /></div><div>Sure enough we can see that the benefit is pretty much entirely coming from the forecast weight fitting.</div><div><br /></div><div><br /></div><div><h2>Conclusions</h2><div>I've shyed away from using performance rather than just correlations for fitting, but as I said earlier it is an itch I wanted to scratch. It does seem that none of the fancy alternatives I've considered in this post add value; so I will keep searching for the elusive bullet of quick wins through portfolio optimisation. </div></div><div><br /></div><div>Meanwhile for the exercise of updating my trading strategy with new instruments, I will <i>probably</i> be using Sharpe Ratio information to robustly fit forecast weights but <b>not </b>instrument weighs (I still need to hold my nose a bit!).</div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com12tag:blogger.com,1999:blog-261139923818144971.post-36974643141343004322024-02-05T16:47:00.000+00:002024-02-05T16:47:03.088+00:00Introducing max-GM (median@p), a new(?) performance statistic<p>Do you remember this post? <a href="https://qoppac.blogspot.com/2022/06/vol-targeting-cagr-race.html">https://qoppac.blogspot.com/2022/06/vol-targeting-cagr-race.html</a></p><p>Here I introduced a performance metric, <b>the best annualised compounding return at the optimal leverage level for that strategy. </b>This is equivalent to finding the highest geometric return once a strategy is run at it's Kelly optimal leverage.</p><p>I've since played with that idea a bit, for example in <a href="https://qoppac.blogspot.com/2023/12/portfolio-optimisation-uncertainty.html">this more recent post</a> amongst others I considered the implications of that if we have different tolerances for uncertainty and used bootstrapping of returns when optimising a stock and bond portfolio with leverage, whilst<a href="https://qoppac.blogspot.com/2024/01/skew-preferences-for-crypto-degens.html"> this post </a>from last month does the same exercise in a bitcoin/equity portfolio without leverage.</p><p>In this post I return to the idea of focusing on this performance metric - <b>the maximised geometric mean at optimal leverage</b>, but now I'm going to take a more abstract view to try and get a feel for in general what sort of strategies are likely to be favoured when we use this performance metric. In particular I'd like to return to the theme of the original post, which is the effect that <b>skew and other return moments have on the maximum achievable geometric mean. </b></p><p>Obvious implications here are in comparing different types of strategies, such as trend following versus convergent strategies like relative value or option selling; or even 'classic' trend following versus other kinds.</p><p><br /></p><p><br /></p><h2 style="text-align: left;">Some high school maths</h2><p>(Note I use 'high school' in honor of my US readers, and 'maths' for my British fans)</p><p>To kick off let's make the very heroric assumption of Gaussian returns, and assume we're working at the 'maximum Kelly' point which means we want to maximise the median of our final wealth distribution - same as aiming for maximum geometric return - and are indifferent to how much risk such a portfolio might generate.</p><p>Let's start with the easy case where we assume the risk free rate is zero; which also implies we pay no interest for borrowing (apologies I've just copied and pasted in great gobs of LaTeX output since it's easier than inserting each formula manually):</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjRYM_tGW1tlhBzdjfe3y5qDCcTO6XnuPYRSGOxbeA2QdQoDFgd2MJP7ZX6VS2nynuw7FZIJaSndE34T3MNzf_DEcf3NqMao33NCMibTEe0HRUgki8w2gVz_2FZCWlwaLdPnIUKqWaHer8ikyv0uLGkYBJUEuljrSo6gQwflxEQcTNa6hB6RBcfJhrhiAMl" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="409" data-original-width="586" height="446" src="https://blogger.googleusercontent.com/img/a/AVvXsEjRYM_tGW1tlhBzdjfe3y5qDCcTO6XnuPYRSGOxbeA2QdQoDFgd2MJP7ZX6VS2nynuw7FZIJaSndE34T3MNzf_DEcf3NqMao33NCMibTEe0HRUgki8w2gVz_2FZCWlwaLdPnIUKqWaHer8ikyv0uLGkYBJUEuljrSo6gQwflxEQcTNa6hB6RBcfJhrhiAMl=w640-h446" width="640" /></a></div><p>Now that is a very nice intuitive result!</p><p>Trivially then if we can use as much leverage as we like, and we are happy to run at full Kelly, and our returns are Gaussian, then <b>we should choose the strategy with the highest Sharpe Ratio</b>. What's more if we can double our Sharpe Ratio, we will quadruple our Geometric mean!</p><p></p><p>Truely the Sharpe Ratio is the one ratio to rule them all!</p><p>Now let's throw in the risk free rate:</p><p></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjY8s37FRURsYZI6WOwWjiNF49Lt3JxBP_6dp1u5dGgYotI5AWbvQjDGZxePqfc5fbZQ_WgssgCDUVYU7k03V5eDbygsfxm-Nb2tmm67v10rhU1p2qqqTbn44lzCMmhgAZbDUMwhFu_SoDx6wbpFLkKHZ1X8VEBQOqrQ6flMWurVq0FFAPSukMVz2Z12eCT" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="242" data-original-width="558" height="278" src="https://blogger.googleusercontent.com/img/a/AVvXsEjY8s37FRURsYZI6WOwWjiNF49Lt3JxBP_6dp1u5dGgYotI5AWbvQjDGZxePqfc5fbZQ_WgssgCDUVYU7k03V5eDbygsfxm-Nb2tmm67v10rhU1p2qqqTbn44lzCMmhgAZbDUMwhFu_SoDx6wbpFLkKHZ1X8VEBQOqrQ6flMWurVq0FFAPSukMVz2Z12eCT=w640-h278" width="640" /></a></div><br /></div></div>We have the original term from before (although the SR now deducts the risk free rate), and we add on the risk free rate reflecting the fact that the SR deducts it, so we add it back on again to get our total return. Note that the<i> higher SR = higher geometric mean at optimal leverage </i>relationship is still true. Even with a positive risk free rate <b>we still want to choose the strategy with the highest Sharpe Ratio!</b><p></p><p>Consider for example a classic CTA type strategy with 10% annualised return and 20% standard deviation, a miserly SR of 0.5 with no risk free rate; and contrast with a relative value fixed income strategy that earns 6.5% annualised return with 6% standard deviation, a SR of 1.0833</p><p>Now if the risk free rate is zero we would prefer the second strategy as it has a higher SR, and indeed should return a much higher geometric mean (since the SR is more than double, it should be over four times higher). Let's check. The optimal leverages are 2.5 times and 18.1 (!) times respectively. At those leverages the arithmetic means are 25% and 117% respectively, and the geometric means using the approximation are 12.5% for the CTA and 58.7% for the RV strategy.</p><p>But what if the risk free rate was 5%? Our Sharpe ratios are now equal: both are 0.25. The optimal leverages are also lower, 1.25 and 4.17. The arithmetic means come in at 12.5% and 27.1%, with geometric means of 9.4% and 24%. However we have to include the cost of interest; which is just 1.25% for the CTA strategy (borrowing just a quarter of it's capital at a cost of 5% remember) but a massive 15.8% for the RV. Factoring those in the net geometric means drop to 8.125% for both strategies - we should be indifferent between them, which makes sense as they have equal SR.</p><p><br /></p><p><br /></p><h2 style="text-align: left;">The horror of higher moments</h2><p>Now there is a <b><i>lot</i></b> wrong with this analysis. We'll put aside the uncertainty around being able to measure exactly what the Sharpe Ratio of a strategy is likely to be (which I can deal with by drawing off more conservative points of the return distribution, as I have done in several previous posts), and the assumption that returns will be the same in the future. But that still leaves us with the big problem that returns are not Gaussian! In particular a CTA strategy is likely to have positive skew, whilst an RV variant is more likely to be a negatively skewed beast, both with fat tails in excess of what a Gaussian model would deliver. In truth in the stylised example above I'd much prefer to run the CTA strategy rather than a quadruple leveraged RV strategy with horrible left tail properties.</p><p>Big negative skewed strategies tend to have worse one day losses; or crap VAR if you prefer that particular measure. The downside of using high leverage is that we will be saddled with a large loss on a day when we have high leverage, which will significantly reduce our geometric mean.</p><p>There are known ways to deal with modifying the geometric mean calculation to deal with higher moments like <a href="https://www.jstor.org/stable/2329839">skew and kurtosis</a>. But my aim in this post is to keep things simple; and I'd also rather not use the actual estimate of kurtosis from historic data since it has large sampling error and may underestimate the true horror of a bad day that can happen in the future (the so called <a href="https://en.wikipedia.org/wiki/Peso_problem">'peso problem</a>'); I also don't find the figures for kurtosis particuarly intuitive. </p><div>(Note that I did consider briefly using maximum drawdown as my idiots tail effect here. However maximum drawdown is only relevant if we can't reduce our leverage into the drawdown. And perhaps counter intuitively, negative skewed strategies actually have lower and shorter drawdown)</div><p>Instead let's turn to the tail ratio, which I defined in my latest book AFTS. A lower tail ratio of 1.0 means that that the left tail is Gaussian in size, whilst a higher ratio implies a fatter left tail.</p><p>I'm going to struggle to rewrite the relatively simple 0.5SR^2 formulae to include a skew and left tail term, which in case will require me to make some distributional assumptions. Instead I'm going to use some bootstrapping to generate some distributions, measure the tail properties, find the optimal leverage, and then work out the geometric return at the optimal leverage point. We can then plot maximal geometric means against empirical tail ratios to get a feel for what sort of effect these have.</p><p><br /></p><p><br /></p><h2>Setup</h2><div><p>To generate distributions with different tail properties I will use a mixture of two Gaussian distributions; including one tail distribution with a different mean and standard deviation* which we draw from with some probability<0.5. It will then be straightforward to adjust the first two moments of the sample distribution of returns to equalise Sharpe Ratio so we are comparing like with like.</p><p><i>* you will recognise this as the 'normal/bliss' regime approach used in the paper I discussed in my prior post around optimal crypto allocation, although of course it will only be bliss if the tail is nicer which won't be the case half the time.</i></p><p>As a starting point then my main return distribution will have daily standard deviation 1% and mean 0.04% which gives me an annualised SR of 0.64, and will be 2500 observations (about 10 years) in length - running with different numbers won't affect things very much. For each sample I will draw the probability of a tail distribution from a uniform distribution between 1% and 20%, and the tail distribution daily mean from uniform [-5%, 5%], and for the tail standard deviation I will use 3% (three times the normal). </p><p>All this is just to give me a series of different return distributions with varying skew and tail properties. I can then ex-post adjust the first two moments so I'm hitting them dead on, so the mean, standard deviation and SR are identical for all my sample runs. The target standard deviation is 16% a year, and the target SR is 0.64, all of which means that if the returns are Gaussian we'd get a maximum leverage of 4.0 times.</p><p>As always with these things it's probably easier to look at code, which is <a href="https://gist.github.com/robcarver17/34433a2be3d0b34f8fcbde57b74e1017">here</a> (just vanilla python only requirements are pandas/numpy).</p><p><br /></p><p><br /></p><h2 style="text-align: left;">Results</h2><p>Let's start with looking at optimal leverage. Firstly, how does this vary with skew?</p></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFXa189JDls4aJt4HBFFIzm9EAYZKYr7zIxh_wIJD1_w3d8K1Lj67flbR1-YSdvR_95240RWJEzLT93MO9b0cO0cmsibnCKG6vyZ8FYexiA5LQg4198p_qRIeRahgWfAgsoQ1rEtUZ1LzdKsRIu5B7Db4M7W9g6cu3KMTuW7cW4ppvP-P6D0SmkJzyiAgk/s640/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFXa189JDls4aJt4HBFFIzm9EAYZKYr7zIxh_wIJD1_w3d8K1Lj67flbR1-YSdvR_95240RWJEzLT93MO9b0cO0cmsibnCKG6vyZ8FYexiA5LQg4198p_qRIeRahgWfAgsoQ1rEtUZ1LzdKsRIu5B7Db4M7W9g6cu3KMTuW7cW4ppvP-P6D0SmkJzyiAgk/w640-h480/Figure_1.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Ignore the 'smearing' effect this is just because each of the dots in a given x-plane will have the same skew and first two moments, but slightly different distribution otherwise. As we'd expect given the setup of the problem the optimal leverage with zero skew is 4.0</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">For a pretty nasty skew of -3 the leverage should be about 10% lower - 3.6; whilst for seriously positive skew of +3 you could go up to 4.5. These aren't big changes! Especially when you consider that few real world trading strategies have absolute skew values over 1 with the possible exception of some naked option buying/selling madness. The most extreme skew value I could find in my <a href="https://www.systematicmoney.org/advanced-futures">latest book</a> was just over 2.0, and that was for single instruments trading carry in just one asset class (metals).</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">What about the lower tail? I've truncated the plot on the x-axis for reasons I will explain in a second.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB6T4SqI3Ozu6eo6K1qHvnYQbOfPoYuNE2DnsrGug3o5jC3nECWdxi5dUxRD8ETrCyWyk49P_EbaunW9Z_dz-Q42TweOFkpkFf11Olr8l00751srj14Gr6yc4_U1tsJQGqo2NTZqksAGxdm5_mOpAY_-c3J269eIGw1QRS6VGirJnwlN17HD72QMmj4sr_/s640/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB6T4SqI3Ozu6eo6K1qHvnYQbOfPoYuNE2DnsrGug3o5jC3nECWdxi5dUxRD8ETrCyWyk49P_EbaunW9Z_dz-Q42TweOFkpkFf11Olr8l00751srj14Gr6yc4_U1tsJQGqo2NTZqksAGxdm5_mOpAY_-c3J269eIGw1QRS6VGirJnwlN17HD72QMmj4sr_/w640-h480/Figure_1.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Again for the base case with a tail ratio of 1.0 (Gaussian) the optimal leverage is 4.0; for very thin lower tails again it goes up to 4.4, but for very fat lower tails it doesn't really get below about 3.6. Once again, tail ratios of over 4.0 are pretty rare in real strategies (though not individual instruments), although my sampling does sometimes generate very high tail ratios the optimal leverages never go below 3.6 even for a ratio of nearly 100.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Upper tail, again truncated:</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHOgXVJnEt_DpMgLQEC5RTHdJ9e2pSr75UsJOz6LPiQlEeXyoVVe9-1yBnHyEb2ZUh-PQ2VLH0VpBWatpykarwoyF0kYMd0Eqd9sBQFGQI0SwHGg8yEBxPxQYMuZv7pXu5YXMv7JR22VMfZ_oDOqldXnZZnOBpODmbCp7HX_ILep4BNguVQ14XFK7Wjmjm/s640/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHOgXVJnEt_DpMgLQEC5RTHdJ9e2pSr75UsJOz6LPiQlEeXyoVVe9-1yBnHyEb2ZUh-PQ2VLH0VpBWatpykarwoyF0kYMd0Eqd9sBQFGQI0SwHGg8yEBxPxQYMuZv7pXu5YXMv7JR22VMfZ_oDOqldXnZZnOBpODmbCp7HX_ILep4BNguVQ14XFK7Wjmjm/w640-h480/Figure_1.png" width="640" /></a></div><div><br /></div>Again a tail ratio of 1.0 corresponds to optimal leverage of roughly 4.0; and once again even for very fat upper tail ratios (of the sort that 'classical' trend followers like to boast about, the optimal leverage really isn't very much higher.<br /><div class="separator" style="clear: both; text-align: center;"><br /></div>Now let's turn to Geometric mean, first as affected by skew:<div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp-7ECd3yxOqdVLvlEF4u91_nHaP7oroLBxuDIuvPEWMucIrp9lUXVZUn58fIYUeHlp7ThDfbd95Vf6raXSZXJ7sIETH0nsGtYARpr4a-fPtlFTiHNdYxpzmqDtl_a3XazfiK92HZdTwimzmNeEGPcYkr9qvKshsVDkfy1nYLkhUIknjQNalWKyDxlNTh-/s640/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp-7ECd3yxOqdVLvlEF4u91_nHaP7oroLBxuDIuvPEWMucIrp9lUXVZUn58fIYUeHlp7ThDfbd95Vf6raXSZXJ7sIETH0nsGtYARpr4a-fPtlFTiHNdYxpzmqDtl_a3XazfiK92HZdTwimzmNeEGPcYkr9qvKshsVDkfy1nYLkhUIknjQNalWKyDxlNTh-/w640-h480/Figure_1.png" width="640" /></a></div><br /><div><div class="separator" style="clear: both; text-align: left;">As we'd expect we can generate more geometric mean with more skew... but not a lot! Even a 3 unit improvement in skew barely moves the return needle from 22.5% to 24.5%. To repeat myself it's rare to find trading strategies above or below 1.0, never mind 3.0. For example the much vaunted Mulvaney capital has a return skew on monthly returns of about 0.45. The graph above shows that will only add about 0.25% to expected geometric return at optimal leverage versus a Gaussian normal return distribution (this particular fund has extremely large standard deviation as they are one of the few funds in the world that actually runs at optimal leverage levels).</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">For completeness, here are the tail ratios. First the lower tail ratio:</div><div class="separator" style="clear: both; text-align: left;"><br /></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkahINQW-jIWTE_-IbO42v_0Qfu1PkYgOCKAOVishcQle8gAuC3lxIjgHJR6aZqtAfIFBJz-7oyNRZ_rJ9OSWcHZxvBWs-U60LSmxkz-tWaEcMif9OGMjl4JbU625klgyGHheJFu4fhRLiDiYMpRnUwgoA29bLlm4A5cdnH9w40hU2d9mcUGg0qK3NuF1q/s640/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkahINQW-jIWTE_-IbO42v_0Qfu1PkYgOCKAOVishcQle8gAuC3lxIjgHJR6aZqtAfIFBJz-7oyNRZ_rJ9OSWcHZxvBWs-U60LSmxkz-tWaEcMif9OGMjl4JbU625klgyGHheJFu4fhRLiDiYMpRnUwgoA29bLlm4A5cdnH9w40hU2d9mcUGg0qK3NuF1q/w640-h480/Figure_1.png" width="640" /></a></div>Fat left tails do indeed reduce maximum optinmal geometric means, but not a lot.<br /><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Now for the upper tail:</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLCJdTd4Mk9Se7B0uoXBJS5n-kGJ2W0YBMxgVMreoenzB04ZuOjsXQFE7cU56z74FFPwUsI8wMaEXuCyC8yEZsNucDstuz8RbG-8Ymd1XnfRp-5BTb9JVskElyEUtrDjiD1vHgX1wT8X2M-npKFk2jlepbal83wOFU9GoWl0sfzDBUhsOQeQquZqoSK9Qx/s640/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLCJdTd4Mk9Se7B0uoXBJS5n-kGJ2W0YBMxgVMreoenzB04ZuOjsXQFE7cU56z74FFPwUsI8wMaEXuCyC8yEZsNucDstuz8RbG-8Ymd1XnfRp-5BTb9JVskElyEUtrDjiD1vHgX1wT8X2M-npKFk2jlepbal83wOFU9GoWl0sfzDBUhsOQeQquZqoSK9Qx/w640-h480/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;"><br /></div><h2 style="clear: both; text-align: left;">Summary</h2><div class="separator" style="clear: both; text-align: left;">I do like neat formulae, and the results for Gaussian normal distributions do have the property of being nice. Of course they are based on unreal expectations, and anyway who runs full Kelly on a real strategy expecting the returns to be normal and the SR to be equal to the backtested SR is an idiot. A very optimistic idiot, no doubt with a sunny disposition, but an idiot nonetheless.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">For the results later in the post it does seem surprising that even if you have something with a very ugly distribution that you'd not really adjust your optimal leverage much, and hence see barely on impact on geometric mean. But remember here that I'm fixing the first two moments of the distribution; which means I'm effectively assuming that I can measure these with certainty and also that the future will be exactly like the past. These are not realistic expectations! </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">And that is why in the past rather than choose the leverage that maximised geometric mean, I've chosen to maximise some more conservative point on the distribution of terminal wealth (where geometric mean would be the median of that distribution). Doing that would cause some damage to the negative skewed, fat left tail distributions resulting in lower optimal leverage and thus lower geometric means.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">I have thought of a way of doing this analysis with distributional points, but it's quite computationally intensive and this post is already on the long side, so let's stop here. </div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com0tag:blogger.com,1999:blog-261139923818144971.post-53278105964262466312024-01-09T15:44:00.008+00:002024-01-09T16:07:44.286+00:00Skew preferences for crypto degens <blockquote class="twitter-tweet"><p dir="ltr" lang="en"><a href="https://twitter.com/investingidiocy?ref_src=twsrc%5Etfw">@investingidiocy</a> looking for my favorite statistics wonk to critique this. <a href="https://t.co/xWQMEl5LUU">https://t.co/xWQMEl5LUU</a></p>— bengraham (@bengraham) <a href="https://twitter.com/bengraham/status/1743243630326730966?ref_src=twsrc%5Etfw">January 5, 2024</a></blockquote> <script async="" charset="utf-8" src="https://platform.twitter.com/widgets.js"></script><br /><p></p><p>An old friend asking for help... how can I resist? Here is the perplexing paper:</p><p><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4042239">https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4042239</a><br /></p><p>And here is the (not that senstional) abstract:</p><h3 style="background-color: white; box-sizing: border-box; color: #222222; font-size: 20px; line-height: 30px; margin-bottom: 5px; margin-top: 20px;"><br /></h3><div style="background-color: white; box-sizing: border-box; color: #505050; line-height: 22px; margin: 0px 0px 10px; text-align: left;"><span style="font-family: helvetica;">Bitcoin (BTC) returns exhibit pronounced positive skewness with a third central moment of approximately 150% per year. They are well characterized by a mixture of Normals distribution with one “normal” regime and a small probability of a “bliss” regime where the price appreciation is more than 100 times at the annual horizon. The large right-tail skew induces investors with preferences for positive skewness to add significant BTC holdings to equity-bond portfolios. Even when BTC is forecast to lose half of its value in the normal regime, investors with power utility optimally add 3% allocations to BTC when the probability of the bliss regime is around 1%. Cumulative Prospect Theory investors are even more sensitive to positive skewness and hold BTC allocations of around 3% when the probability of the bliss regime is 0.0006 and the mean of BTC in the normal regime corresponds to a loss of 90%.</span></div><p><br /></p><p>3% in BTC doesn't sound too crazy to me, but what has been really setting the internet on fire is this out of context quote from later in the paper:</p><p><br /></p><p><span style="font-family: helvetica;">Starting with a 60-40 equity-bond portfolio, which is produced with
a risk aversion of 𝛾 = 1.50, the optimal BTC allocation <b>is a large 84.9%!</b> The remainder of the portfolio,
15.1% is split 60-40 between equities and bonds. Although BTC has an extremely large volatility of 1.322
(see Exhibit 1), the pronounced positive skewness leads to large allocations and dominates in the utility
function (see equation (9)). The certainty equivalent compensation required to not invest in BTC is close
to 200%. [my emphasis]</span></p><p><br /></p><p>Here's my English translation of this:</p><p>- Bitcoin has pronounced positive skew </p><p>- Some people <i>really</i> like positive skew (people with 'power utility' and 'cumulative prospect theory' preferences)</p><p>- This justifies a higher allocation to Bitcoin than they would otherwise have, since it has lots of positive skew (both on an outright basis, and as part of a 60:40 portfolio).</p><p>- There is a 'Bliss' regime when Bitcoin does really well ('goes to the moon') but which isn't very likely</p><p>- Even if there is a tiny probaility of this happening, and if things are generally terrible in the non bliss regime, then people who like positive skew should have more Bitcoin. Some of them should have a lot!</p><p>Now, I could just as easily write this:</p><p>- Lottery tickets have (very!) pronounced positive skew </p><p>- Some people <i>really</i> like positive skew </p><p>- This justifies a higher allocation to lottery tickets than they would otherwise have</p><p>- There is a 'Bliss' regime when lottery tickets do very well ('winning the jackpot') but which isn't very likely</p><p>- Even if there is a tiny probaility of this happening, and if things are generally terrible in the non bliss regime, then people who like positive skew should have more lottery tickets. Some of them should have a lot!</p><p>I see nothing here that I can argue with (sorry Ben)! And it certainly doesn't require an academic to make the argument that people who like lottery ticket type payoffs, and think that there is a chance that Bitcoin will go up a lot, should buy more Bitcoin. But I think there is a blogpost to be written about the interaction of skew prefences and allocations; and hopefully one that is perhaps easier to interpret. Two key questions for me are:</p><p>- to what extent does the expectation of return distributions affect allocations?</p><p>- just how far from 'skew neutral' does ones prefence have to be before we allocate significant amounts to Bitcoin</p><p>Luckily, I already have an intuitive framework for analysing these problems, which I used in a fairly complete way in my <a href="https://qoppac.blogspot.com/2023/12/portfolio-optimisation-uncertainty.html">previous post</a> - bootstrapping the return distribution. </p><p><br /></p><h2 style="text-align: left;">Setup</h2><p>The goal then, is to understand the asset allocation that comes out of (a) a set of return distributions and (b) a preference for skew.</p><p>For the return distributions we have two broad approaches we can use. Firstly, we can use actual data. Secondly, we can use made up return distributions fitted to the actual data. This is what the paper does, mostly <i>"We use monthly frequency data at the
annual horizon from July 2010 to December 2021 for BTC and from January 1973 to December 2021 for
stocks and bonds. The univariate moments for each asset are computed using the longest available sample,
and the correlation estimates are computed with the common sample across the assets."</i></p><p>The paper also uses a third approach, which is to see what happens if they mess with the return distributions once fitted by changing the probability of 'Bliss'.</p><p>I'm going to use the first approach, which is to use real return data at least initially. Other slight differences, I will use returns from July 2010 to November 2023 for all three assets, I will use excess rather than total returns (which given the low interest rates in the period makes almost no difference) with futures prices for S&P 500 (equity proxy) and US 10 year bonds (bond proxy), with Bitcoin total return deflated by US 3 month treasury yields, and I'm going to use daily rather than monthly data to improve my sample size.</p><p>The next consideration is the utility preference of the investor.<b> I am going to assume that the investor wants to maximise the <i>N</i>th percentile point of the distribution of geometric returns.</b> This is the approach I have used before which requires no assumptions about utility function and allows an intuitive measure of risk preference to be used by modifying N. </p><p>As I have noted at length, someone with N=50 is a Kelly optimiser. That is the absolute maximum you should bet, irrespective of your appetite for skew or risk. Thus the Kelly bettor <b>must have the maximum possible appetite for skew</b>. Someone with N<50 would be very nervous about the downside and much more worried about small losses than the potential for large gains; and hence they would have less of a preference for positive skewed assets.</p><p>I <i>personally</i> think this is a much more intuitive way to proceed than randomly choosing utility functions and risk aversion parameters, and choosing from a menu of theoretical distributions. The downside is that isn't possible to decompose skew and risk preferences, since both have been replaced with a different measure - the 'appetite for uncertainty'.</p><p><span style="color: red;"><b>An important point is that maximising CAGR will naturally lead to a higher allocation to crypto than you would get from the more classical method of maximising mean subject to some standard deviation constraint or risk aversion penalty. </b></span></p><p>The method I will use then is:</p><p>- sample the returns data repeatedly to create multiple new sets of data.The new set of data would be the same length as the original, and we'd be sampling with replacement (or we'd just get the new data in a different order). </p><p>- from this new set of data and a given set of possible portfolio allocations, estimate the geometric return</p><p>- for a given set of allocations, take the Nth percentile of the distribution of geometric means</p><p>- plot the Nth percentile for each allocation to work out roughly where the optimal might be</p><p>I say 'roughly', because as readers of previous posts on this subject are aware, we never know exactly where the optimal is when bootstrapping, which is a much better reflection of reality than the precise analytical calculations done by the original authors. Still, we can get a feel for how the optimal changes as we vary N (skew preference).</p><p><i>Note: As a <a href="https://reddwarf.fandom.com/wiki/Bliss#:~:text=Bliss%20is%20also%20the%20name,of%20the%20revived%20Doctor%20Who.">fan of Red Dwarf</a>, the use of the term 'Bliss' in this context is very confusing!</i></p><p><br /></p><h2>The data</h2><div><br /></div><div>Since we're pretending to be proper academics, here are the summary statistics of the real data:</div><div><br /></div><div><div style="background-color: white; color: #080808;"><pre style="font-family: "JetBrains Mono", monospace; font-size: 9.8pt;">Annualised mean:<br />equity <span style="color: #1750eb;">0.256<br /></span>bonds <span style="color: #1750eb;">0.000<br /></span>bitcoin <span style="color: #1750eb;"><b>1.280</b><br /></span><span style="color: #1750eb;"><br /></span>Annualised standard deviation:<br />equity <span style="color: #1750eb;">0.160<br /></span>bonds <span style="color: #1750eb;">0.064<br /></span>bitcoin <span style="color: #1750eb;">0.816<br /></span><span style="color: #1750eb;"><br /></span>Correlation:<br /> equity bonds bitcoin<br />equity <span style="color: #1750eb;">1.000 </span>-<span style="color: #1750eb;">0.245 0.069<br /></span>bonds -<span style="color: #1750eb;">0.245 1.000 </span>-<span style="color: #1750eb;">0.014<br /></span>bitcoin <span style="color: #1750eb;">0.069 </span>-<span style="color: #1750eb;">0.014 1.000<br /></span></pre></div></div><div><div style="background-color: white; color: #080808;"><pre style="font-family: "JetBrains Mono", monospace; font-size: 9.8pt;">Sharpe ratio:<br />equity <span style="color: #1750eb;">0.783<br /></span>bonds <span style="color: #1750eb;">0.166<br /></span>bitcoin <span style="color: #1750eb;">1.612<br /></span><span style="color: #1750eb;"><br /></span>Skew:<br />equity -<span style="color: #1750eb;">0.431<br /></span>bonds <span style="color: #1750eb;">0.294<br /></span>bitcoin <span style="color: #1750eb;">0.970<br /></span></pre></div></div><div><br /></div><div>Note that if anything the statistics here are more favourable to Bitcoin than in the original paper. Importantly, we are assuming that as in the past <b>Bitcoin will more than double every year on average</b> (the figure in bold), and that it will have a <b>Sharpe Ratio well north of 1.0</b>. Given these raw statistics, it isn't then very suprising regardless of skew preferences that we would potentially dump a large part of our portfolio into Bitcoin. And indeed, if I run these numbers through my optimisation the optimal position is 100% in Bitcoin for a Kelly maximiser.</div><div><br /></div><div>To add another line to my 'dumb' bullet point translation of the paper earlier:</div><div><br /></div><div>- if you think Bitcoin will go up a lot like it did in the past, you should only own Bitcoin</div><div><br /></div><div>To make things more realistic and interesting, I'm doing to massage the data to reflect what I think is a fairly conservative forward looking position: <b>All assets will have the same Sharpe Ratio</b> (which I will set arbitrarily at an annualised 0.5). I achieve this by shifting the mean returns up or down respectively, which means all the other return characteristics remain the same - only Sharpe Ratio and means are affected. Note that this also means that bonds will look better relative to equities.</div><div><br /></div><div>This still implies that Bitcoin will, on average, go up by 40% a year, which means it will double every two years. Personally I still think this is extremely optimistic, but I'm going to put my own views to one side for this exercise.</div><div><br /></div><div><div><i>Note: even if you are not a Bitcoin skeptic, it seems unlikely that Bitcoin will behave in the same way going forward as it did when it was worth less than $1,000 and had the market cap of a penny stock rather than a decent sized country; both the mean, skewness, and the standard deviation have reduced in the last few years since Bitcoin has become a bigger market.</i></div></div><div><br /></div><div><br /></div><div><h2>Results</h2></div><div>Right, let's see some pictures. </div><div><br /></div><div>The following heatmap shows what happens to the median of the distribution of bootstrapped geometric returns (Kelly maximiser, with maximum appetite for skew) as we allocate to equities (y-axis) and Bitcoin (x-axis). The allocation to bonds will be whatever is leftover. The white area is where we can't allocate, since we are putting more than 100% into the portfolio, and my working assumption is here is that leverage isn't allowed (if it was, we'd have much more bonds, much less equities and Bitcoin, and use leverage to maximse CAGR).</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzopuJHAaXobMj5fgedPOGSsaGkvMFgbBlo9YGizChq5KEroNgqIqU1RLwzh-JzG1SXM1mn7GNsaOHrDKyMVY7Nrjs75IpW5-Bzw5OJue3j_SQOrvlZf-PWxBnmMOvG4T5sbGbAx7qlRskOb-jNBwu4yIkbINJGh0dIQkbLxXxIvASuPPEJ5-hZrjT3TWK/s640/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzopuJHAaXobMj5fgedPOGSsaGkvMFgbBlo9YGizChq5KEroNgqIqU1RLwzh-JzG1SXM1mn7GNsaOHrDKyMVY7Nrjs75IpW5-Bzw5OJue3j_SQOrvlZf-PWxBnmMOvG4T5sbGbAx7qlRskOb-jNBwu4yIkbINJGh0dIQkbLxXxIvASuPPEJ5-hZrjT3TWK/w640-h480/Figure_1.png" width="640" /></a></div><div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>The optimal allocation to Bitcoin is somewhere around 50% with equities taking most of the rest. So even the most gung-ho optimistic skew loving nutjob shouldn't put more than half their wealth in BTC. For context, a 50% equity and BTC portfolio would have a standard deviation of around 42%, nearly 3 times the risk of equities. To be Kelly optimal, that implies the Sharpe Ratio would need to be at least 0.42. This is a much higher risk target than pretty much every hedge fund uses.</div><div><br /></div><div>Now let's see what happens if we reduce our N to the 25% percentile point. Importantly: this is roughly the N that produces a 60:40 portfolio considering a portfolio with only equities and bonds. So we can think of this as the 'base case' for risk and skew preference. Again with CAGR below 4% washed out to produce a more granular z axis:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiobNF-PrA9TN7nCklN9UPz2J3Ei4N8AXWtNLZSnaUB4wDMB6xsg26YpX0QaO9PZdWNKMFxKCYdzYqGzq_k0MKQMRnEyfF9648Fq_S5Uu0BZ6OJ3uIuEcO88XhPtY9jmuwAuncULbVEq2GQPp6Alv8nUNSaHFZ35smfrBHAdgXQqtE4W_6mVI9pzcJSy7Yb/s640/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiobNF-PrA9TN7nCklN9UPz2J3Ei4N8AXWtNLZSnaUB4wDMB6xsg26YpX0QaO9PZdWNKMFxKCYdzYqGzq_k0MKQMRnEyfF9648Fq_S5Uu0BZ6OJ3uIuEcO88XhPtY9jmuwAuncULbVEq2GQPp6Alv8nUNSaHFZ35smfrBHAdgXQqtE4W_6mVI9pzcJSy7Yb/w640-h480/Figure_1.png" width="640" /></a></div><br /><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><br /></div>You can see the optimal allocation to Bitcoin is lower here, around 30%, with perhaps 50% in equities and the rest in bonds.<br /><div><br /></div></div><div><br /></div><div>What about N=10%?</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOkg4Zta2LPmduu4lfGb4aGhx4TUD9_nGxYNuEAYSrUEnQ04VgaQTaDGXmfSjFdEeRZypURG_fNQfXp5scb6SKOL-S7g9vBdajQnXlOPDYLQejm-X_CTQPnXiwYTqx0vRoHhj1BFwaDmkZ3Mjdao32YR9s6obRMt0NJnku0dFtXBzigOhmCzgSUGBChDLt/s640/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOkg4Zta2LPmduu4lfGb4aGhx4TUD9_nGxYNuEAYSrUEnQ04VgaQTaDGXmfSjFdEeRZypURG_fNQfXp5scb6SKOL-S7g9vBdajQnXlOPDYLQejm-X_CTQPnXiwYTqx0vRoHhj1BFwaDmkZ3Mjdao32YR9s6obRMt0NJnku0dFtXBzigOhmCzgSUGBChDLt/w640-h480/Figure_1.png" width="640" /></a></div>Again, we are looking at a bit less again in Bitcoin; with something around 20% with perhaps 70% in equities and the rest in bonds. This would give you something with a standard deviation not much higher than equities, at least in theory.<br /><div><br /></div><div><br /></div><div><div><h2>Summary- ignore everything I have said</h2></div></div><div>The original paper has been toted around the internet to say that you should have 85% of your portfolio in Bitcoin ('this is optimal'). <b>But:</b></div><div><br /></div><div>- this is a single figure taken out of context from a much more nuanced paper; note again that the abstract does not include such an extreme figure</div><div>- it assumes that historic Bitcoin performance is matched going forward, including performance from 2010 back when BTC cost less than $1 and the total 'market cap' was less than $200,000. </div><div>- it assumes particular risk aversion, preferences for skew and utility functions; such that you would hold quite a lot of Bitcoin even if you thought it's performance would generally be bad except in rare 'Bliss' regimes. Basically it says 'if you like lottery tickets, you are going to love Bitcoin!'.</div><div><br /></div><div>In this post I take a different approach which hopefully is more intuitive for the non economist, and gives a bit more insight into the interplay between return skew and skew preference, which is also useful beyond the narrow problem of allocating to crypto currency. But what you couldn't or shouldn't do is take anything I or anyone else has written, and claim it 'proves' that the 'optimal' allocation to Bitcoin is x%. All it can do is say <b>based on these assumptions</b> and assuming <b>this set of preferences</b> what your allocation should be. That can quite easily come out to 85%, or 100%. It can also quite easily come out to less than 1%, or even zero. <b> </b></div><div><br /></div><div>What's my own personal allocation to Bitcoin, I hear you ask? On a long only basis it is <b>zero</b>, and nothing I have written here will change that. Partly this is because of my <a href="https://qoppac.blogspot.com/2014/05/bitcoin-money-gold-and-my-great.html">long standing</a> and well known aversion to this 'asset class', both in principle* and in practice**.</div><div><br /></div><div><i>* to summarize it's a ponzi that wastes energy with the ownership structure of a pyramid scheme, and which will never be useful for anything except the current use cases: 1% illegal money transfer, 99% gambling</i></div><div><i>** it's<a href="https://twitter.com/investingidiocy/status/1298229927544786944"> a real pain</a> and very expensive to buy Bitcoin 'properly' i.e. owning your own coins and putting them into cold wallet storage </i></div><div><br /></div><div>But it's also because unlike in this example, there are more than three assets in the world! Concretely, I trade well over 100 futures; of which just a couple are crypto coins. Accordingly it also makes no sense to me to put more than a few % of my trading account into crypto - an account where I can go long and short and hence my personal biases are irrelevant.</div><div><br /></div><div><div>My allocation to Bitcoin and Ether in my futures trading strategy is a touch under 5%. And those are risk weights; the equivalent cash weight would be lower: as I write this my position in Bitcoin is long 3 micro futures with a notional value of perhaps £12K or around 3% of my trading capital. Of course it could just as easily be zero, or a short position...</div><div><br /></div></div></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com0tag:blogger.com,1999:blog-261139923818144971.post-19663120298178830242023-12-12T16:42:00.000+00:002023-12-12T16:42:02.836+00:00Portfolio optimisation, uncertainty, bootstrapping, and some pretty plots. Ho, ho, ho.<h4 style="text-align: left;">Optional Christmas themed introduction</h4><p><i>Twas the night before Christmas, and all through the house....</i> OK I can't be bothered. It was quiet, ok? <i>Not a creature was stirring... </i>literally nothing was moving basically. And then a fat guy in a red suit squeezed through the chimney, which is basically breaking and entering, and found a small child waiting for him (I know it sounds dodgy, but let's assume that Santa has been DBS checked*, you would hope so given that he spends the rest of December in close proximity to kids in shopping centres)</p><p><i>* Non british people reading this blog, I could explain this joke to you, but if you care that much you'd probably care enough to google it.</i></p><p>"Ho ho" said the fat dude "Have you been a good boy / girl?"</p><p>"Indeed I have" said the child, somewhat precociously if you ask me.</p><p>"And what do you want for Christmas? A new bike? A doll? I haven't got any Barbies left, but I do have a Robert Oppenheimer action figure; look if you pull this string in his stomach he says 'Now I am become Death destroyer of worlds', and I'll even throw in a Richard Feynman lego mini-figure complete with his own bongo drums if you want."</p><p>"Not for me, thank you. But it has been quite a long time since Rob Carver posted something on his blog. I was hoping you could persuade him to write a new post."</p><p>"Er... I've got a copy of his latest book if that helps" said Santa, rummaging around in his sack "Quite a few copies actually. Clearly the publisher was slightly optimistic with the first print run."</p><p>"Already got it for my birthday when it came out in April" said the child, rolling their eyes.</p><p>"Right OK. Well I will see what I can do. Any particular topic you want him to write about in this blog post?"</p><p>"Maybe something about portfolio optimisation and uncertainty? Perhaps some more of that bootstrapping stuff he was big on a while ago. And the Kelly criterion, that would be nice too."</p><p>"You don't ask for much, do you" sighed Santa ironically as he wrote down the list of demands.</p><p>"There need to be really pretty plots as well." added the child. </p><p>"Pretty... plots. Got it. Right I'll be off then. Er.... I don't suppose your parents told you to leave out some nice whisky and a mince pie?"</p><p>"No they didn't. But you can have this carrot for Rudolf and a protein shake for yourself. Frankly you're overweight and you shouldn't be drunk if you're piloting a flying sled."</p><p><i>He spoke not a word, but went straight to his work,And filled all the stockings, then turned with a jerk. And laying his finger aside of his nose, And giving a nod, up the chimney he rose! He sprang to his sleigh, to his team gave a whistle, And away they all flew like the down of a thistle. But I heard him exclaim, ‘ere he drove out of sight,</i></p><p>"Not another flipping protein shake..."</p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh60JdcHh7pjQkod-99qH1kXUMU_OOzPOf_2nCTkjlDPfQjJJWbIgdesPg3ad1fKChUHHD7wkwbS75ofyh-pqvP2Evm-CpqzLfwn8pk-3PHL1zfSa-p7_OMlVg3okFc7IX5sC-BybbIw_kzwSPN9bvWaqtw-Y4LpBtq7150ECz6tUkifXVP5R6ijLDRgGwp/s1024/pixlr-image-generator-960fe395-9efc-4ef4-a299-91a48070a21f.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1024" data-original-width="1024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh60JdcHh7pjQkod-99qH1kXUMU_OOzPOf_2nCTkjlDPfQjJJWbIgdesPg3ad1fKChUHHD7wkwbS75ofyh-pqvP2Evm-CpqzLfwn8pk-3PHL1zfSa-p7_OMlVg3okFc7IX5sC-BybbIw_kzwSPN9bvWaqtw-Y4LpBtq7150ECz6tUkifXVP5R6ijLDRgGwp/s320/pixlr-image-generator-960fe395-9efc-4ef4-a299-91a48070a21f.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>https://pixlr.com/image-generator/ prompt: "Father Christmas as a quant trader"</i></td></tr></tbody></table><br /><h2>Brief note on whether it is worth reading this</h2><div>I've talked about these topics before, but there are some new insights, and I feel it's useful to combine the question of portfolio weights and optimal leverage into a single post / methodology. Basically there is some familar stuff here but now in a coherent story, plus some new stuff.</div><div><br /></div><div>And there are some very nice plots.</div><p>Somewhat messy python code is available <a href="https://gist.github.com/robcarver17/8227c5c88ad17acd6a84b9762ea79d67">here</a> (with some data <a href="https://gist.github.com/robcarver17/ed58f9dcaca1d6cf697d0e6579f2e997">here</a> or use your own), and it has no dependency on my open source trading system <a href="https://github.com/robcarver17/pysystemtrade">pysystemtrade</a> so everyone can enjoy it.</p><p><br /></p><h2 style="text-align: left;">Bootstrapping</h2><p>I am a big fan of <i>bootstrapping</i>. Some definitional stuff before I explain why. Let's consider a couple of different ways to estimate something given some data. Firstly we can use a <i>closed form</i>. If for example we want the average monthly arithmetic return for a portfolio, we can use the very simple formula of adding up the returns and dividing by the number of periods. We get a single number. Although the arithmetic mean doesn't need any assumptions, closed form formula often require some assumptions to be correct - like a Gaussian distribution. And the use of a single point estimate ignores the fact that any statistical estimate is uncertain. </p><p>Secondly, we can <i>bootstrap</i>. To do this we <i>sample</i> the data repeatedly to create multiple new sets of data. Assuming we are interested in replicating the original data series, the new set of data would be the same length as the original, and we'd be sampling with replacement (or we'd just get the new data in a different order). So for example, with ten years of daily data (about 2500 observations), we'd choose some random day and get the returns data from that. Then we'd keep doing that, not being bothered about choosing the same day (sampling with replacement), until we had done this 2500 times. </p><p>Then from this new set of data we estimate our mean, or do whatever it is we need to do. We then repeat this process, many times. Now instead of a single point estimate of the mean, we have a <i>distribution </i>of possible means, each drawn from a slightly different data series. This requires no assumptions to be made, and automatically tells us what the uncertainty of the parameter estimate is. We can also get a feel for how sensitive our estimate is to different variations on the same history. As we will see, this will also lead us to produce estimates that are more robust to the future being not exactly like the past.</p><p><i>Note: daily sampling destroys any autocorrelation properties in the data, so it wouldn't be appropriate for example for creating new price series when testing momentum strategies. To do this, we'd have to sample larger chunks of time period to retain the autocorrelation properties. For example we might restrict ourselves to sampling entire years of data. For the purposes of this post we don't mind about autocorrelation, so we can sample daily data.</i></p><p>Bootstrapping is particularly potent in the field of financial data because we only have one set of data: history. We can't run experiments to get more data. Bootstrapping allows us to create 'alternative histories' that have the same basic character as our actual history, but aren't quite the same. Apart from generating completely random data (which itself will still require some assumptions - see the following note), there isn't really much else we can do.</p><p>Bootstrapping helps us with the quant finance dilemma: we want the future to be like the past so that we can use models calibrated on the past in the future, but the future will never be <i>exactly </i>like the past. </p><p>Note: that bootstrapping isn't quite the same as <i>monte carlo</i>. With that we estimate some parameters for the data, making an assumption about it's distribution. Then we randomly sample from that distribution. I'm not a fan of this. We have all the problems of making assumptions about distribution, and of uncertainty about the parameter estimates we use for that distribution. </p><div><div style="background-color: white; color: #080808;"><pre style="font-family: "JetBrains Mono", monospace; font-size: 9.8pt;"><br /></pre></div></div><div><h2>Portfolio optimisation</h2></div><div>With all that in mind, let's turn to the problem of <i>portfolio opimisation</i>. We can think as this as making two decisions:</div><div><br /></div><div><ul style="text-align: left;"><li>Allocating weights to each asset, where the weights sum to one</li><li>Deciding on the total leverage for the portfolio</li></ul><div>Under certain assumptions we can <i>seperate </i>out these two decisions, and indeed this is the insight of the standard mean variance framework and the 'security market line'. The assumption is that enough leverage is available that we can get to the risk target for the investor. If the investor has a very low risk tolerance, we might not even need leverage, as the optimal portfolio will consist of cash + securities.</div></div><div><br /></div><div>So basically we choose the combination of asset weights that maximises our Sharpe Ratio, and then we apply leverage to hit the optimal risk target (since SR is invariant to leverage, that will remain optimal). </div><div><br /></div><div>To begin with I will assume we can proceed in this two phase approach; but later in the post I will relax this and look at the effect of <i>jointly </i>allocating weights and leverage.</div><div><br /></div><div>I'm going to use data for S&P 500 and 10 year Bond futures from 1982 onwards, but which I've tweaked slightly to produce more realistic forward looking estimates for means and standard deviations (in fact I've used figures from this <a href="https://www.robeco.com/en-uk/insights/2023/09/5-year-expected-returns-triple-power-play?z=%5B%2asearchterm%2a%5D&cmp=se_3_12968&gad_source=1&gclid=CjwKCAiAmsurBhBvEiwA6e-WPPzSlOvQ2pqheTab0vIfiuwcZ4RpJ53wZ_pw3Vh-9wt-i_BbPE0uQxoC4OoQAvD_BwE">report</a>- their figures are actually for global equities and bonds, but this is all just an illustration). </div><div><br /></div><div>My assumptions are:</div><div><ul style="text-align: left;"><li>Zero correlation (about what it has been in practice since 1982)</li><li>2.5% risk free rate (which as in standard finance I assume I can borrow at)</li><li>3.5% bond returns @ 5% vol</li><li>5.75% equity returns @ 17% vol</li></ul></div><div>This is quite a nice technique, since it basically allows us to use forward looking estimates for the first two moments (and first co-moment - correlation) of the distribution, whilst using actual data for the higher moments (skew, kurtosis and so on) and co-moments (co-skew, co-kurtosis etc). In a sense it's sort of a blend of a parameterised monte-carlo and a non parameterised bootstrap.</div><div><br /></div><div><br /></div><div><h2>Optimal leverage and Kelly</h2></div><div>I'm going to start with the question of optimal leverage. This may seem backwards, but optimal leverage is the simpler of the two questions. Just for illustrative purposes, I'm going to assume that the allocation in this section is fixed at the classic 60% (equity), 40% (bonds). This gives us vol of around 10.4% a year, a mean of 4.85%, and a Sharpe Ratio of 0.226</div><div><br /></div><div>The closed form solution for optimal leverage which I've written about at some length, is the Kelly Criterion. Kelly will maximise E(log(final wealth)) or median(final wealth), or importantly here it will maximise the <b>geometric mean</b> of your returns.</div><div><br /></div><div>Under the assumption of i.i.d. Gaussian returns optimal Kelly leverage is achieved by <b>setting your risk target as an annual standard deviation equal to your Sharpe Ratio</b>. With a SR of 0.226 we want to get risk of 22.6% a year, which implies running at leverage of 22.6 / 10.4 = 2.173</div><div><br /></div><div>That of course is a closed form solution, and it assumes that:</div><div><ul style="text-align: left;"><li>Return parameters are Guassian i.i.d. (which financial data famously is not!)</li><li>The return parameters are fixed</li><li>That we have no sampling uncertainty of the return parameters</li><li>We are fine running at fully Kelly, which is a notoriously aggressive amount of leverage</li></ul></div><div>Basically that single figure - 2.173 - tells us nothing about how sensitive we would be to the future being similar to, but not exactly like, the past. For that we need - yes - bootstrapping. </div><div><br /></div><div><br /></div><div><h2>Bootstrapping optimal leverage </h2></div><div>Here is the bootstrap of my underlying 60/40 portfolio with leverage of 1.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL7B0mA6t7xCx1rX3OTW1CuhPRtpvD1Ufnjq5kR-FFYbj9b0GB5mfk_C-BT9IvDrdPvT54sAfEgrXQ0dd7chib8Dq5XS_l9m8Edrkn6Y4SDsT6Z7e7OnVLnXnB9QbQEpyJcxtSuP8PxBmqS-ZZPVEr5bP7RyrhfKGQywk9NIQkA2SM6Ng6RiQIV1Pn_SqU/s640/fig1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgL7B0mA6t7xCx1rX3OTW1CuhPRtpvD1Ufnjq5kR-FFYbj9b0GB5mfk_C-BT9IvDrdPvT54sAfEgrXQ0dd7chib8Dq5XS_l9m8Edrkn6Y4SDsT6Z7e7OnVLnXnB9QbQEpyJcxtSuP8PxBmqS-ZZPVEr5bP7RyrhfKGQywk9NIQkA2SM6Ng6RiQIV1Pn_SqU/w400-h300/fig1.png" width="400" /></a></div><br /><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><br /></div><div style="text-align: left;">Each point on this histogram represents a single bootstrapped set of data, the same length as the original. The x-axis shows the geometric mean, which is what we are trying to maximise. You can see that the mean of this distribution is about 4.1%. Remember the arithmetic mean of the original data was 4.85%, and if we use an approximation for geometric mean that assumes Gaussian returns then we'd get 4.31%. The difference between 4.1% and 4.31% is because this isn't Guassian. In fact, mainly thanks to the contribution of equities, it's left tailed and also has fat tails. Left fat tails result in lower Geometric returns - and hence also a lower optimal leverage, but we'll get to that in a second.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Notice also that there is a fair bit of distributional range here of the geometric mean. 10% of the returns are below 2%, and 1% are below 0.4%.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Now of course I can do this for any leverage level, here it is for leverage 2:</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgohtH4Z280qyfJVzV9wLw7Q6buOITb62E-qN1O9Xd3PPboynmurAiiFJYeAvgDLEjle6bL0MGRcdjI5LiCCBYn9tJi8NFBRGpCZRcdEcxCV9hHKBgVnSLtttabWyPf8WuZlgHwo6FyQ-nh6zlHjIetRLxoLOZ3emDq8jsFRGOsXQdQ-uA-M_5fESJfjOIE/s640/fig1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgohtH4Z280qyfJVzV9wLw7Q6buOITb62E-qN1O9Xd3PPboynmurAiiFJYeAvgDLEjle6bL0MGRcdjI5LiCCBYn9tJi8NFBRGpCZRcdEcxCV9hHKBgVnSLtttabWyPf8WuZlgHwo6FyQ-nh6zlHjIetRLxoLOZ3emDq8jsFRGOsXQdQ-uA-M_5fESJfjOIE/w400-h300/fig1.png" width="400" /></a></div><br /><div style="text-align: left;"><br /></div><div style="text-align: left;">The mean here is higher, as we'd probably expect since we know the optimal leverage would be just over 2.0 if this was Gaussian. It comes in at 4.8%; versus the 7.2% we'd expect if this was the arithmetic mean, or the 5.04% that we would have for Gaussian returns.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Now we can do something fun. Repeating this exercise for many different levels of leverage, we can take each of the histograms that are producing and pull various distributional points off them. We can take the median of each distribution (50% percentile, which in fact is usually very close to the mean), but also more optimistic points such as the 75% and 90% percentile which would apply if you were a very optimistic person (like SBF, as I discussed in <a href="https://qoppac.blogspot.com/2022/11/if-youre-so-smart-how-come-youre-not.html">a post about a year ago</a>), and perhaps more usefully the 25% and 10% points. We can then plot these:</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTsRKE8f95lDzTUdqny7jGaq-ej9JHxGRMp70McSWy15x3wiu3SduuMkgC6y_t3_vUOgn_fiiRxqomp7vRSMDNXVPCL6xYlSwxYLXrNCAaG3mO71er6PWQHp-4U9qZb1g6ECNGIZAcJ0VGyLCYrWIreuZS-PNWsU-1nFX8D_T42CAT_2z-BNAY29lV9Wkg/s640/fig1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTsRKE8f95lDzTUdqny7jGaq-ej9JHxGRMp70McSWy15x3wiu3SduuMkgC6y_t3_vUOgn_fiiRxqomp7vRSMDNXVPCL6xYlSwxYLXrNCAaG3mO71er6PWQHp-4U9qZb1g6ECNGIZAcJ0VGyLCYrWIreuZS-PNWsU-1nFX8D_T42CAT_2z-BNAY29lV9Wkg/w640-h480/fig1.png" width="640" /></a></div><br /><div style="text-align: left;">How can we use this? Well, first of all we need to decide what our <b>tolerance for uncertainty is</b>. What point on the distribution are you optimising for? Are you the sort of person who worries about the bad thing that will happen 1 in 10 times, or would you instead be happy to go with the outcome that happens half the time (the median)?</div><div style="text-align: left;"><br /></div><div style="text-align: left;">This is not the same as your risk tolerance! In fact, I'm assuming that your tolerance for risk is sufficient to take on the optimal amount of leverage implied by this figure. Of course it's likely that someone with a low tolerance for risk in the form of high expected standard deviation would also have a low tolerance for uncertainty. And as we shall see, the lower your tolerance for uncertainty, the lower the standard deviation will be on your portfolio.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">(One of the reasons I like this framing of tolerance is that most people cannot articulate what they would consider to be an appropriate standard deviation, but most people can probably articulate what their tolerance for uncertainty is, once you have explained to them what it means)</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Next you should focus on the relevant coloured line, and mentally remove the odd bumps that are due to the random nature of bootstrapping (we could smooth them out by using really large bootstrap runs - note they will be worse with higher leverage since we get more dispersion of outcomes based on one or two bad days eithier being absent or repeated in the sample), and then find the optimium leverage.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">For the median this is indeed at roughly the 2.1 level that theory predicts (in fact we'd expect it to be a little lower because of the negative skew), but this is not true of all the lines. For inveterate gamblers at 90% it looks like the optimum is over 3, whilst for those who are more averse to bad outcomes at 10% and 25% it's less than 2; in fact at 10% it looks like the optimium could easily be 1 - no leverage. These translate to standard deviations targets of somewhere around 10% for the person with a 10% risk tolerance . </div><div style="text-align: left;"><br /></div><div style="text-align: left;"><i>Technical note: I can of course use corrections to the closed form Kelly criterion for non Gaussian returns, but this doesn't solve the problem of parameter estimation uncertainty - if anything it makes it worse.</i></div><div style="text-align: left;"><br /></div><div style="text-align: left;">The final step, and this is something you cannot do with a closed form solution, is to see how sensitive the shape of the line is to different levels of leverage, thus encouraging us to go for a more <i>robust </i>solution that is less likely to be problematic if the future isn't exactly like the past. Take a slightly conservative 25% quantile person on the red line in the figure. Their optimium could plausibly be at around 1.75 leverage if we had a smoother plot, but you can see that there is almost no loss in geometric mean from using less leverage than this. On the other hand there is a steep fall off in geometric mean once we get above 1.75 (this assymetry is a property of the geometric mean and leverage). This implies that the most robust and conservative solution would be to choose an optimal leverage which is a bit below 1.75. You don't get this kind of intuition with closed form solutions.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><h2>Optimal allocation - mean variance</h2></div><div style="text-align: left;">Let's now take a step backwards to the first phase of solving this problem - coming up with the optimal set of weights summing to one. Because we assume we can use any amount of leverage, we want to optimise the Sharpe Ratio. This can be done in the vanilla mean-variance framework. The closed form solution for the data set we have, which assumes Gaussian returns and linear correlation, is a 22% weight in equities and 78% in bonds. That might seem imbalanced, but remember the different levels of risk. Accounting for this, the resulting risk weights are pretty much bang on 50% in each asset. </div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">As well as the problems we had with Kelly, we know that mean variance has a tendency to produce extreme and not robust outcomes, especially when correlations are high. If for example the correlation between bonds and equities was 0.65 rather than zero, then the optimal allocation would be 100% in bonds and nothing in equities.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">(I actually use an optimiser rather than a single equation to calculate the result here, but in principal I could use an equation which would be trivial for two assets - see for example my ex colleague Tom's paper <a href="https://riskyfinance.com/2019/07/01/the-sharpe-ratio-ratio/">here</a> - and not that hard for multiple assets eg <a href="https://quant.stackexchange.com/questions/43999/maximum-sharpe-portfolio-no-short-selling-restrictions">see here</a>).</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">So let's do the following; boostrap a set of return series with different <i style="font-weight: bold;">allocations </i>to equities (bond allocation just 100% - equity allocation), then measure the Sharpe Ratio of each allocation/bootstrapped return series, and then measure the distribution of those Sharpe Ratios for different distributional points.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeBQCJbyZD4WBSjnAEBuHSo9OyiXlj8bs4_JTAKHcRCCKMSHsoWp629lYIORuceb2u7EV84vcKsqyv0E5zh3aS-N1CO6dvT7Xboz0LoVmBe_3RVQ5RNqNZk_LDz8tYMUEO3QPDqxjBLBTsXXy7rJizLilBNpebuzwUrKry7Q47dj1vshLYLOBL06r2oNb3/s1920/fig1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1086" data-original-width="1920" height="362" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeBQCJbyZD4WBSjnAEBuHSo9OyiXlj8bs4_JTAKHcRCCKMSHsoWp629lYIORuceb2u7EV84vcKsqyv0E5zh3aS-N1CO6dvT7Xboz0LoVmBe_3RVQ5RNqNZk_LDz8tYMUEO3QPDqxjBLBTsXXy7rJizLilBNpebuzwUrKry7Q47dj1vshLYLOBL06r2oNb3/w640-h362/fig1.png" width="640" /></a></div><br /><p style="clear: both; text-align: left;">Again, each of these coloured lines represents a different point on the distribution of Sharpe Ratios. The y-axis is the Sharpe Ratio, and the x-axis is the allocation to equities; zero in equities on the far left, and 100% on the far right. <br />Same procedures as before: first work out your tolerance for uncertainty and hence which line you should be on. Secondly, find the allocation point which maximises Sharpe Ratio. Thirdly, examine the consequences of having a lower or higher allocation - basically how robust is your solution.<br />For example, for the median tolerance (green line) the best allocation comes in somewhere around 18%. That's a little less than the closed form solution; again this is because we haven't got normally distributed assets here. And there is a reasonably symettric shape to the gradient around this point, although that isn't true for lower risk tolerances.<br />You may be surprised to see that the maximum allocation is fairly invarient to uncertainty tolerance; if anything there seems to be a slightly lower allocation to equities the more optimistic one becomes (although we'd have to run a much more granular backtest plot to confirm this). Of course this wouldn't be the case if we were measuring arithmetic or even geometric return. But on the assumption of a seperable portfolio weighting problem, the most appropriate statistic is the Sharpe Ratio. <br />This is good news for Old Skool CAPM enthusiasts! It really doesn't matter what your tolerance for uncertainty is, you should put about 18% of your cash weight - about 43% of your risk weight in equities; at least with the assumption that future returns have the forward looking expectations for means, standard deviations, and correlations I've specified above; and the historic higher moments and co-moments that we've seen for the last 40 years.</p><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"> </div><h2 style="text-align: left;">Joint allocation</h2></div><p style="text-align: left;">Let's abandon the assumption that we can seperate our the problem, and instead <b>jointly </b>optimise the allocation and leverage. Once again the appropriate statistic will be the geometric return. We can't plot these on a single line graph, since we're optimising over two parameters (allocation to equities, and overall leverage), but what we can do is draw heatmaps; one for each point on the return distribution.<br />Here is the median:</p></div><div style="text-align: left;"><br /></div><div><h2><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgdUuRioLVxwCn-UY4-iZnN1HUJL0DG__lzxdAuzscIO-2l-iyb973CLmVQsfimArTvYfACLcbQQA_QQPxzynPbgu2zWiicLJqQoqYo62XPkH6hcngaX8Q58RumYd-CWkqB4xLKLz3T6eaYoZEBxqv-kd7Lx6eStTys20vfj0ufk23dgIzVCKs8JLNkhpud" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="499" data-original-width="1077" height="296" src="https://blogger.googleusercontent.com/img/a/AVvXsEgdUuRioLVxwCn-UY4-iZnN1HUJL0DG__lzxdAuzscIO-2l-iyb973CLmVQsfimArTvYfACLcbQQA_QQPxzynPbgu2zWiicLJqQoqYo62XPkH6hcngaX8Q58RumYd-CWkqB4xLKLz3T6eaYoZEBxqv-kd7Lx6eStTys20vfj0ufk23dgIzVCKs8JLNkhpud=w640-h296" width="640" /></a></div><br /><p style="text-align: left;"><span style="font-weight: normal;"><span style="font-size: small;">The x-axis is the leverage; lowest on the left, highest on the right. The y-axis is the allocation to equities; 0% on the top, 100% on the bottom. And the heat colour on the z-axis shows the geometric return. Dark blue is very good. Dark red is very bad. The red circle shows the highest dark blue optimum point. It's 30% in equities with 4.5 times leverage: 5.8% geometric return.</span></span><span style="font-weight: normal;"><span style="font-size: small;"><br /></span></span><span style="font-weight: normal;"><span style="font-size: small;">But the next question we should be asking is about robustness. An awful lot of this plot is dark blue, so let's start by removing everything below 3% so we can see the optimal region more clearly:</span></span></p><div style="text-align: left;"><span style="font-weight: normal;"><span style="font-size: small;"><br /></span></span></div><div style="text-align: left;"><span style="font-weight: normal;"><span style="font-size: small;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi8u12EE1L8GPQrwGRipT05XqGqiQ66TNRvGrnlJHQFlRBwN4puZYoqWEctOjzsh8XBoIx-Y0nIh8FAZjnyeQwJbtrgC-3RoqJksK5KwY0hzc-LY3xCcGbD0EtYnJsm8xN2Rr-LjxO4NSeDTQHfFp9VdYS1_sGTXRf-7gKs_2-PbUZQwe7GDRKsfzp5MpOO" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="526" data-original-width="1085" height="310" src="https://blogger.googleusercontent.com/img/a/AVvXsEi8u12EE1L8GPQrwGRipT05XqGqiQ66TNRvGrnlJHQFlRBwN4puZYoqWEctOjzsh8XBoIx-Y0nIh8FAZjnyeQwJbtrgC-3RoqJksK5KwY0hzc-LY3xCcGbD0EtYnJsm8xN2Rr-LjxO4NSeDTQHfFp9VdYS1_sGTXRf-7gKs_2-PbUZQwe7GDRKsfzp5MpOO=w640-h310" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"></td></tr></tbody></table><br /></span></span><p style="text-align: left;"><span style="font-weight: normal;"><span style="font-size: small;">You can now see that there is still quite a big area with a geometric return over 5%. It's also clear from the fact there is variation of colour within adjacent points that the bootstrapped samples are still producing enough randomness to make it unclear exactly where the optimium is; and this also means if we were to do some statistical testing we'd be unable to distinguish between the points that are whiteish or dark blue. </span></span><span style="font-weight: normal;"><span style="font-size: small;"><br /></span></span><span style="font-size: small;"><span style="font-weight: normal;">In any case when we are unsure of the exact set of parameters to use, we should use </span>a blend of them<span style="font-weight: normal;">. There is a nice visual way of doing this. First of all, select the region you think the optimal parameters come from. In this case it would be the banana shaped region, with the bottom left tip of the banana somewhere around 2.5x leverage, 50% allocation to equities; and the top right tip around 6.5x leverage, 15% allocation. And then you want to choose a point which is safely within this shape, but further from steep 'drops' to much lower geometric returns which means in this case you'd be drawn to the top edge of the banana. This is analogous to avoiding the steep drop when you apply too much leverage in the 'optimal leverage' problem. </span></span><span style="font-size: small;"><span style="font-weight: normal;"><br /></span></span><span style="font-size: small;"><span style="font-weight: normal;">I would argue that something around the 20% point in equities, leverage 3.0 is probably pretty good. This is pretty close to a 50% risk weight in equities, and the resulting expected standard deviation of 15.75% is a little under equities. In practice if you're going to use leverage you really should adjust your position size according to current risk, or you'd get badly burned if (when) bond vol or equity vol rises.</span></span><span style="font-size: small;"><span style="font-weight: normal;"><br /></span></span><span style="font-size: small;"><span style="font-weight: 400;">Let's look at another point on the distribution, just to get some intuition. Here is the 25% percentile point, again with lower returns taken out to better intuition:</span></span></p></div><div style="text-align: left;"><span style="font-size: small;"><span style="font-weight: 400;"><br /></span></span></div><div style="text-align: left;"><span style="font-size: small;"><span style="font-weight: 400;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhR_N7qU8Rq76ARVP-OLSO_3gOXZcBZg81IbljrQWPHm59inajKuNVrnLfxTTbYfBgLd40K7b0yYeN0kOyp5FWtOyCoXUjKZd_-JF0deL5DyVsSpLJtChxcLxbrIsRKoBGLISOOOOcA2_3JvwPnDxTTX-eNOav_Qsr-Srco3w1IigMq3bQmLB5ThBd8MPBN" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="484" data-original-width="1061" height="292" src="https://blogger.googleusercontent.com/img/a/AVvXsEhR_N7qU8Rq76ARVP-OLSO_3gOXZcBZg81IbljrQWPHm59inajKuNVrnLfxTTbYfBgLd40K7b0yYeN0kOyp5FWtOyCoXUjKZd_-JF0deL5DyVsSpLJtChxcLxbrIsRKoBGLISOOOOcA2_3JvwPnDxTTX-eNOav_Qsr-Srco3w1IigMq3bQmLB5ThBd8MPBN=w640-h292" width="640" /></a></div><br /><br /></span></span></div><div style="text-align: left;"><span style="font-size: small;"><span style="font-weight: normal;">The optimal here stands out quite clearly, and in fact it's the point I just chose as the one I'd use with the median! But clearly you can see that the centre of gravity of the 'banana' has moved up and left towards lower leverage and lower equity allocations, as you would expect. Following the process above we'd probably use something like a 20% equity allocation again, but probably with a lower leverage limit - perhaps 2.</span></span></div><div style="text-align: left;"><span style="font-size: small;"><span style="font-weight: normal;"><br /></span></span></div><div style="text-align: left;"><span style="font-size: small;"><span style="font-weight: normal;"><br /></span></span></div><div style="text-align: left;"><span style="font-size: small;"><span style="font-weight: normal;"><br /></span></span></div></h2><h2>Conclusion</h2><h2 style="text-align: left;"><div style="text-align: left;"><span style="font-weight: normal;"><p style="text-align: justify;"><span style="font-size: medium; text-align: left;">Of course the point here isn't to advocate a specific blend of bonds and equities; the results here depend to some extent on the forward looking assumptions that I've made. But I do hope it has given you some insight into how bootstrapping can give us much more robust outcomes plus some great intuition about how uncertainty tolerance can be used as a replacement for the more abstract risk tolerance. </span><span style="font-size: medium; text-align: left;"><br /></span><span style="font-size: medium;">Now go back to bed before your parents wake up!</span></p></span></div></h2></div><div style="text-align: justify;"><br /></div><div><br /></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com6tag:blogger.com,1999:blog-261139923818144971.post-37798336753381555472023-10-03T14:47:00.004+01:002023-10-03T14:56:28.564+01:00The State Of Vol<p> I'm sometimes asked where I get my ideas for new trading strategies from. The boring truth is I rarely test new trading strategies, and I mostly steal ideas when I feel in the mood. Today for example I saw this <strike>tweet</strike> post on <strike>twitter</strike> X:</p><p>
</p><blockquote class="twitter-tweet"><p dir="ltr" lang="en">Think high market volatility leads to high returns? No. Periods with high market volatility are followed by high volatility, but not necessarily better returns. A volatility effect through time. Check out the graph below, based on the US equity market from 1927 to 2023. The… <a href="https://t.co/23rrTwIf9O">pic.twitter.com/23rrTwIf9O</a></p>— Pim van Vliet (@paradoxinvestor) <a href="https://twitter.com/paradoxinvestor/status/1708739266052825514?ref_src=twsrc%5Etfw">October 2, 2023</a></blockquote> <script async="" charset="utf-8" src="https://platform.twitter.com/widgets.js"></script>The original paper is<a href="https://onlinelibrary.wiley.com/doi/abs/10.1111/jofi.12513"> here </a> (requires subscription or academic institution membership)<br /><p></p><p>Now I've written in the past about how <i>volatility levels affect the profits of trading strategies, </i>in particular momentum where there is a pretty striking effect (see my new book <a href="https://www.systematicmoney.org/advanced-futures">Advanced Futures Trading Strategies</a> [AFTS] for more info), and I've also written about how the <i>level of past vol affects future vol </i>(and indeed, this incredible predictability of vol is a cornerstone of the inverse volatility sizing formula that lies at the heart of my trading strategies), but I don't think I've ever written about the<i> level of volatility's effect on future price movements</i>. </p><p>There is quite a simple story here which if you can see the paper is in figure 1: <i>absolute</i> returns are pretty flat across different vol regimes, and because vol is pretty autocorrelated from month to month, we'd expect return/vol to be higher if recent vol was lower. To put it another way, there is a link here with <a href="https://qoppac.blogspot.com/2023/09/does-capm-work-across-and-within-asset.html">my previous post about CAPM</a>; this story is sort of about the time series version of CAPM in which higher vol should be rewarded with higher returns (and hence Sharpe Ratios should not show any pattern conditional on relatively volatility levels), and the opposite happens in single stocks in an analogy to the fact that CAPM doesn't work in <i>cross section</i> for single stocks, in fact we should 'bet against beta' and buy low beta stocks.</p><p>But the paper is written for single stocks; a risky asset, and one with some idiosyncratic distributional features. Will the results hold for the wider universe of futures markets? </p><p><br /></p><h2 style="text-align: left;"><b>Data and definitions</b></h2><p>I am not interested in reproducing the results in the paper since I'm more concerned with whether this is a profitable trading strategy sitting within my usual framework, so I will do things a bit differently.</p><p>I use my usual set of futures markets, after removing duplicates (eg micro and mini versions, or cross listings) it comes in at 211 instruments. Data goes back to 1970, and I use my standard vol estimate calculated in % terms, which I divide by an exponential moving average of the same with a 10 year vol halflife to get a relative vol measure. If this is 1, then the vol we're seeing is going to be typical of the level over the last couple of decades or so, if it's higher than 1 then the vol is higher, and so on. Again readers of AFTS will recognise this measure. The paper doesn't quite do this; it just looks at the level of vol versus the in sample historic distribution. This means we can't use that forecast as a trading signal.</p><p>For the y-axis of response, I will use the returns in the following month normalised by the volatility estimate (in price differences this time) at the beginning of the month for reasons I have discussed before. As I'm trading futures, this is also the Sharpe Ratio. The original paper uses a straight one month moving window of returns for vol estimation, and the pure ex-post Sharpe Ratio using the realised vol in the following month, so some small difference there. However because of the autocorrelation of vol, it shouldn't affect things too much; if anything my results probably should be a bit better because I'm dividing an unknown future estimate of mean by a known current estimate of standard deviation to get Sharpe Ratio, rather than having unknown mean/unknown sigma.</p><p>The original papers uses single stocks, I use a massive variety of futures allowing me to see if this effect persists at the stock index level and for other asset classes. </p><p><br /></p><h2 style="text-align: left;">Some comparable graphs</h2><p>Let's start with producing the same kind of graphs as in the paper. So each month I look at the current level of vol versus it's historic average, and then rank it on an in sample basis (yes I know, but for the time being...), and then bucket the ranking into quintiles. I measure the risk adjusted return in the following month and take a median of those Sharpe Ratios; medians being somewhat more robust than mean.</p><p>Here is the result for the S&P 500:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLDo3FmvmBN7bSpXBcDIf6UOFwjk_i2PVVgl1Lm-7BU5dXnI3xMkFBFgNDbIqML8fp66xVUKWnc1CG9ZplRaiIjqU6pWZ6yUrjJllbPNAJWe2d7UctXg_4VfjDAplD_O6B5I25OhleUY00w2Og6Y1lqnf7gwejbjdlG0tVibO0sVFhDkpfOXr0Gk5R-mYi/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLDo3FmvmBN7bSpXBcDIf6UOFwjk_i2PVVgl1Lm-7BU5dXnI3xMkFBFgNDbIqML8fp66xVUKWnc1CG9ZplRaiIjqU6pWZ6yUrjJllbPNAJWe2d7UctXg_4VfjDAplD_O6B5I25OhleUY00w2Og6Y1lqnf7gwejbjdlG0tVibO0sVFhDkpfOXr0Gk5R-mYi/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><div class="separator" style="clear: both; text-align: justify;"><span style="text-align: left;">I use the same ordering; 1 on the left is the lowest quantile of vol, 5 on the right is the highest. That picture is not quite as compelling as the original paper; but ignoring the 2nd bar it has the right pattern: higher recent vol means lower risk adjusted returns in the following month. Nevertheless we are only using 492 data points compared to the thousands we can get with single stocks; plus I am suspicous of anyone that uses a single instrument to prove anything, so let's expand out to all equity futures (with months stacked, which will give a higher weight to instruments with more history):</span></div></blockquote><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAWJWoKkxqp7OeyVjXnci09RQpu681BzYojyJZ4iXRXRS1bE9iJN9pwkqxuknLcRvzy660M5tuDb2rRQ8G22lOhfM8LD0YPvBwrVTqn4UrCf9r6rR4VTwGRVYZcnIOIrG7qMl3sIckKGVVq1fvnV7CzsM2UK5fhH2Mc1J4mhkqU5O_gvIse2J1PcZMe_lG/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAWJWoKkxqp7OeyVjXnci09RQpu681BzYojyJZ4iXRXRS1bE9iJN9pwkqxuknLcRvzy660M5tuDb2rRQ8G22lOhfM8LD0YPvBwrVTqn4UrCf9r6rR4VTwGRVYZcnIOIrG7qMl3sIckKGVVq1fvnV7CzsM2UK5fhH2Mc1J4mhkqU5O_gvIse2J1PcZMe_lG/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p>That is .... not what we'd hoped for.</p><p>The name is Bond:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnr_JHnETdcaot-JKk747o1btLbu1sn8tZtTAL1IR7g84XNWiFIZ3Ww2nqc1vfnP3KIgonkFmwVvxy2ytb1UuOQG22tII6Cpa5-8q0-verZnY6pANda7zDbOIrUoHCtxHGoKIRNLGTvjsrzv_yLnF5O-9ZxZdFiEFGC2VozOKeV0fi1LMMUiqpI_Y9g_ZD/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnr_JHnETdcaot-JKk747o1btLbu1sn8tZtTAL1IR7g84XNWiFIZ3Ww2nqc1vfnP3KIgonkFmwVvxy2ytb1UuOQG22tII6Cpa5-8q0-verZnY6pANda7zDbOIrUoHCtxHGoKIRNLGTvjsrzv_yLnF5O-9ZxZdFiEFGC2VozOKeV0fi1LMMUiqpI_Y9g_ZD/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><span style="text-align: left;">Not great. What about Vol (VSTOXX, VIX)?</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0qvDwdJ_3t51zL60xnm9bE89Qk4n-YwPtZR_wpIgUjwfS5lOvFVg2XQj5YSU0GCv_7vnCppZJEQdoYT_cpyiEQyIf3xQ6HMGGDzreGK3KWU6G212vH4VoDh7V5CZ5is8nnl-COkYAuzWvqh98qmV024EEv6gP3_DMUexxCLOyZp69kXIHB5joeABLLIpM/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0qvDwdJ_3t51zL60xnm9bE89Qk4n-YwPtZR_wpIgUjwfS5lOvFVg2XQj5YSU0GCv_7vnCppZJEQdoYT_cpyiEQyIf3xQ6HMGGDzreGK3KWU6G212vH4VoDh7V5CZ5is8nnl-COkYAuzWvqh98qmV024EEv6gP3_DMUexxCLOyZp69kXIHB5joeABLLIpM/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><p>OK only two markets, but there is an apparent <i>reverse</i> effect here. You don't want to be long vol on average, but perhaps the worst time to be is when vol of vol is very low.</p><p>FX:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJme3Cip8buAx3_bSynn1uqCc24FYCOexqVHUDXzQGYL6chWXwL4at2F5DWj3is3lL7e2ruV5sq9Qhb8fovJ8qxkcIzmYPEM7vtwC-_6_cLQmoKLCZotEBwkpyZ_txWMTRRLeQZczSLYKwgnQbw3sq2wI45By09lezU3rnglY2vfWVO3TpG5pWlG7Hhyphenhyphen9C/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJme3Cip8buAx3_bSynn1uqCc24FYCOexqVHUDXzQGYL6chWXwL4at2F5DWj3is3lL7e2ruV5sq9Qhb8fovJ8qxkcIzmYPEM7vtwC-_6_cLQmoKLCZotEBwkpyZ_txWMTRRLeQZczSLYKwgnQbw3sq2wI45By09lezU3rnglY2vfWVO3TpG5pWlG7Hhyphenhyphen9C/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>At best noise, at worst the reverse of what we expect.<div><br /><div>Metals</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit_dcMS7tT2-gvQbO0cuUuCSwCREwSf0xrkrN5HbMUAs8kz_HWqWyHKj6KvAZHRB0-ZsXk2CMAwqFCwQuuSawO805zD4V8TdE3iBOcXVI7xIAR7auzaliz0iP_CRAqHbabDBZsoYcGbeRbiTwLLBC3FdJRMNfzHGpnfMWa3l6FlkTbrHMkPzE0pRgT6OQp/s1920/Figure_2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit_dcMS7tT2-gvQbO0cuUuCSwCREwSf0xrkrN5HbMUAs8kz_HWqWyHKj6KvAZHRB0-ZsXk2CMAwqFCwQuuSawO805zD4V8TdE3iBOcXVI7xIAR7auzaliz0iP_CRAqHbabDBZsoYcGbeRbiTwLLBC3FdJRMNfzHGpnfMWa3l6FlkTbrHMkPzE0pRgT6OQp/w640-h322/Figure_2.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>That is the strongest, wrong way round, effect we have seen. Agricultural:<div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9oQzwh0SSg6q-knBtWPrtmRMj3P6IOC8FND6GaOcQfmI6q2VkZjiSAkbNIeXUUZo48__z33MaoNAq6kaJFinRuIjuui3dErsDtBRXcgDtbR6vcjvGrYIA9O1t-Qu3AJVU3nS8h1QsZ4CMK_oPtJPNWBKFUBYZk-T4MyLRcN5HnM_DetIEj9lf_7O8NaW4/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9oQzwh0SSg6q-knBtWPrtmRMj3P6IOC8FND6GaOcQfmI6q2VkZjiSAkbNIeXUUZo48__z33MaoNAq6kaJFinRuIjuui3dErsDtBRXcgDtbR6vcjvGrYIA9O1t-Qu3AJVU3nS8h1QsZ4CMK_oPtJPNWBKFUBYZk-T4MyLRcN5HnM_DetIEj9lf_7O8NaW4/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><span style="text-align: left;">Just noise really. And finally energies:</span></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPSWfec9tx6NCX8EQ4uPlBK9bv2UXxSgXGp5xXjcTiDog-BoC77vPEAv4TBYHq41dW2GA6Jz856EZNsse0h2NbZT1CAQv5-nGXx-vZcEhyphenhyphenHqn5Gs_9dcmGH1UctbA0qtQHU9mZh5Vz3GPqr4C9xxbHBmQ6N5OfMs739gHc0wwfE2IPf8I_gklub9TtYARM/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPSWfec9tx6NCX8EQ4uPlBK9bv2UXxSgXGp5xXjcTiDog-BoC77vPEAv4TBYHq41dW2GA6Jz856EZNsse0h2NbZT1CAQv5-nGXx-vZcEhyphenhyphenHqn5Gs_9dcmGH1UctbA0qtQHU9mZh5Vz3GPqr4C9xxbHBmQ6N5OfMs739gHc0wwfE2IPf8I_gklub9TtYARM/w640-h322/Figure_1.png" width="640" /></a></div><div><br /></div><div>The wrong way round, and inconsistent.</div><div><br /></div><div>It's probably futile, but what happens if we pool our results across all markets?</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil395edTIyW-hVD_OHlr1RbiUUb99TGs6XZZYQgD-JQ9a2Efws2hcfF3IUZ7OKhwJM-BI3FBB3ddrj6s5GL3ddagowg2MzQLMKXVaMQ3NqcHTGoZwgK4jCdwhnxNkr1I4E12bVXBwsE9aQIonAJG0BkOCc3sJ69U3FmG21GOGiizpJm6CSGQzQ6WcEzRq0/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil395edTIyW-hVD_OHlr1RbiUUb99TGs6XZZYQgD-JQ9a2Efws2hcfF3IUZ7OKhwJM-BI3FBB3ddrj6s5GL3ddagowg2MzQLMKXVaMQ3NqcHTGoZwgK4jCdwhnxNkr1I4E12bVXBwsE9aQIonAJG0BkOCc3sJ69U3FmG21GOGiizpJm6CSGQzQ6WcEzRq0/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div>There could be a story there- higher vol means higher risk adjusted returns, unless vol is very high; or we could be looking at the aggregated result of jamming together instruments that behave very differently*, plus a bunch of instruments that are just noise. </div><div><br /></div><div>[* it looks like markets fall into two camps, one where the effect is the 'right way' round (high vol, lower returns; perhaps the S&P 500 is here), others where it is the wrong way (most strikingly, vol), and the third of the two camps doesn't really have a strong effect]<br /><p>Just to give a point of comparison, here's the bucket plot if I replace the ratio of vol with the level of the 32/128 day momentum forecast level (something we know is very successful as a forecast at a portfolio level, although it is weak in say equities):</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh914qp56_vPlIvlr9T7EWTjlGfDh-M61sxCcNGBEgDoSbS67l9m_JkLUUjrqQ8KkrnlMMPOb2yozJwH0647RaTZgcklFIDe5LOHCK5NQ-GZs-LWjG4AC2J46Y_xAQlEuvr3lBi_ZsqEdUiIk42QyAY3DfjGGtRnnnnhPwJy50q-FCYPunjA0jSuGMmnSxf/s640/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh914qp56_vPlIvlr9T7EWTjlGfDh-M61sxCcNGBEgDoSbS67l9m_JkLUUjrqQ8KkrnlMMPOb2yozJwH0647RaTZgcklFIDe5LOHCK5NQ-GZs-LWjG4AC2J46Y_xAQlEuvr3lBi_ZsqEdUiIk42QyAY3DfjGGtRnnnnhPwJy50q-FCYPunjA0jSuGMmnSxf/w640-h480/Figure_1.png" width="640" /></a></div><div><br /></div>Clearly this vol effect is not as strong as momentum.</div><div><br /><h2 style="text-align: left;">A trading rule</h2><p>Although the results aren't what we expect, this could be profitable as a 'wrong way round' rule, which buys when vol is higher, and sells when vol is lower. This won't work for very high vol (since quintile 5 shows a worse return for quintiles 2,3 and 4, but then we would hit forecast capping up there anyway. That isn't much different to what happens with faster momentum rules anyway; if you plot response versus forecast level it's not as good for extreme forecasts (see AFTS for more).</p><p>In my first book, <a href="https://www.systematicmoney.org/systematic-trading">Systematic Trading</a>, I said that implementing a rule as a wrong way rule after discovering it is a form of data mining so bear in mind that the backtest results here will effectively be overstated [in reality, you couldn't have implemented this rule until enough historical evidence that the effect was the 'wrong' way round existed; until that moment of statistically significant realisation we would eithier be trading the money losing 'right way round' rule, or a combination of the two, eithier of which is inferior to being all in on 'wrong way round' from the start of the backtest].</p><p>I'd add a couple of tweaks as well; firstly rather than quantile buckets which are too coarse and in sample; I will use the percentile of the ratio versus historic levels as the forecast (the same approach I use for the volatility overlay rule in AFTS) , and also chuck in my standard ewm(span=10) smooth to reduce noise on what should be a monthly holding forecast (this reduces turnover from 25 times a year to 10 times without affecting profitability).</p><p>Before continuing, it might be worth thinking about how this interacts with the volatility overlay on a trend following rule (which cuts exposure long or short when vol is high).</p><p></p><ul style="text-align: left;"><li>If vol is low, we'd be SHORT from a vol rule</li><ul><li>... and we'd have a stronger trend following signal</li><ul><li><i>if markets are trending up we'd be net flat</i></li><li><b>If markets are trending down we'd have a strong sell</b></li></ul></ul><li>If vol sits in the middle, we'd be FLAT from a vol rule</li><ul><li>.... and we've have an unadulterated trend signal</li><ul><li>If markets are trending up we'd be long</li><li>If markets are trending down we'd be short</li></ul></ul><li>If vol is high, we'd be LONG from a vol rule</li><ul><li>.... and have a weaker trend following signal</li><ul><li><b>If markets are trending up we'd be modestly long</b></li><li><i>If markets are trending down we'd be flat</i></li></ul></ul></ul><div>Clearly this will work differently for risk on/risk off markets; risky markets like equities will most probably go up with low vol and down with high vol, thus occupying the two lines shown with italics. In these situations we'd have no position on (assuming these are the only two trading rules we're using). Since trend following doesn't work super well in equity indices, this might improve our lives somewhat.</div><div><br /></div><div>Risk off markets, the most extreme of which is VIX/VSTOXX, will occupy the lines in bold as they have high vol when they are going up, and low vol vol the way down. Notice that this will introduce a short bias (modest long on the way up, strong short on the way down); since these markets tend to lose money on the long side again we might expect a benefit here.</div><p></p><p>Other markets - which form the majority of futures instruments - will be less clear, so let's see how it goes.</p><p>Here's the code for the purely backward looking vol quantile calculation, and the actual trading rule:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">get_vol_quantile_points</span>(<span style="color: #94558d;">self</span>, instrument_code):<br /><span style="color: #8c8c8c; font-style: italic;"> </span><span style="color: #94558d;">self</span>.log.debug(<span style="color: teal; font-weight: bold;">"Calculating vol quantile for %s" </span>% instrument_code)<br /> daily_vol = <span style="color: #94558d;">self</span>.parent.rawdata.get_daily_percentage_volatility(instrument_code)<br /> ten_year_vol = daily_vol.rolling(<span style="color: #1750eb;">2500</span>, <span style="color: #660099;">min_periods</span>=<span style="color: #1750eb;">10</span>).mean()<br /> normalised_vol = daily_vol / ten_year_vol<br /><br /> normalised_vol_q = quantile_of_points_in_data_series(normalised_vol)<br /><br /> <span style="color: #0033b3;">return </span>normalised_vol_q</span><span style="font-size: 13.8pt;"><br /></span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><pre style="font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">quantile_of_points_in_data_series</span>(data_series: <span style="color: black;">pd.Series</span>) -> <span style="color: black;">pd.Series</span>:<br /> <span style="color: #8c8c8c; font-style: italic;">## With thanks to https://github.com/PurpleHazeIan for this implementation<br /></span><span style="color: #8c8c8c; font-style: italic;"> </span>numpy_series = np.array(data_series)<br /> results = []<br /><br /> <span style="color: #0033b3;">for </span>irow <span style="color: #0033b3;">in </span><span style="color: navy;">range</span>(<span style="color: navy;">len</span>(data_series)):<br /> current_value = numpy_series[irow]<br /> count_less_than = (numpy_series < current_value)[:irow].sum()<br /> results.append(count_less_than / (irow + <span style="color: #1750eb;">1</span>))<br /><br /> results_series = pd.Series(results, <span style="color: #660099;">index</span>=data_series.index)<br /> <span style="color: #0033b3;">return </span>results_series<br /></span></pre></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">vol_rule</span>(vol_quantile_points: <span style="color: black;">pd.Series</span>, smooth: <span style="color: navy;">int </span>= <span style="color: #1750eb;">10</span>):<br /> <span style="color: #8c8c8c; font-style: italic;"># vol quantile points sits in space 0 to 1.0<br /></span><span style="color: #8c8c8c; font-style: italic;"> </span>raw_forecast = (vol_quantile_points - <span style="color: #1750eb;">0.5</span>) * <span style="color: #1750eb;">40 </span><span style="color: #8c8c8c; font-style: italic;">## sits in space -20 to +20<br /></span><span style="color: #8c8c8c; font-style: italic;"> </span>smoothed_forecast = raw_forecast.ewm(<span style="color: #660099;">span</span>=smooth).mean()<br /> <span style="color: #0033b3;">return </span>smoothed_forecast<br /></span></pre><p><br /></p><h2>System test</h2><div>I'm testing this using my current trading system with 147 instruments and relevant instrument weights. I'll be using the 'static' rather than 'dynamically optimised' flavour of the system, to get a feel for pure performance before the noise added by optimisation. This also means I'm going to put in an unrealistically large slug of capital, and remove a few markets that are too expensive to trade, bringing me down to 138 markets. I estimate instrument weights and the IDM (which peaks at 2.15) using my usual optimisation defaults.</div><div><br /></div><div>To begin with, let's look at the performance of the vol strategy by itself. You're all dying to see it, so here is the money shot with the full account curve before and after costs:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2RhTamo0ukUJUUPywMG1yEQQabZ-LAwhAX54zHu9aZ8cJxREZ75CbSHNE8ekqHOOQV-YV4g5kTk69CJoK5xcXiRy_I1LUWx3xoqO1Tg1yH74Bt664KfZYepcE8dJMhiCI1e5Kbirkd_FFhDbNSAj9JHRfrnxm8P_fX7K9ZIX0iuFH26u2E8DUFr5WyXqB/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2RhTamo0ukUJUUPywMG1yEQQabZ-LAwhAX54zHu9aZ8cJxREZ75CbSHNE8ekqHOOQV-YV4g5kTk69CJoK5xcXiRy_I1LUWx3xoqO1Tg1yH74Bt664KfZYepcE8dJMhiCI1e5Kbirkd_FFhDbNSAj9JHRfrnxm8P_fX7K9ZIX0iuFH26u2E8DUFr5WyXqB/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>Well it's not <i>terrible</i> but it's not amazing eithier. The Sharpe is a mere 0.10, which is not exactly knocking it out of the park... at best we've tapped the ball and it's dribbled a few feet away. </div><div><br /></div><div>Can this thing add value when combined with momentum (particularly given the discussion above)? Let's keep it simple and just use a single ewmac rule, 16/64. Correlation between the rules is actually a little negative, so let's do some god-awful in sample fitting and allocate 10% of our portfolio to the new vol rule.</div><div><br /></div><div>It's not really worth plotting as these two systems will both look pretty similar, but this relatively small allocation to our new putative signal does indeed <b>push up the Sharpe Ratio from 1.10 to 1.15</b>, with the Sortino rising by a similar amount. Costs are slightly reduced, skew falls slightly (from 0.55 to 0.48), but the more robust lower tail ratio is unchanged (see AFTS for a definition). </div><div><br /></div><div><br /></div><h2 style="text-align: left;">Summary</h2><div><br /></div><div>It does seem like the predictive effect of vol in single equities isn't replicated across the futures universe; if anything the effect is reversed although it is not as strong as in the original paper. Rather than buying instruments with lower vol to get higher risk adjusted returns, we should do the opposite. Rather than 'time series CAPM' failing, and a 'bet against time series standard deviation levels', we in fact see an even stronger 'time series CAPM' where risk adjusted returns aren't constant with relative vol levels, but actually improve when volatility is relatively high.</div><div><br /></div><div>If we use this idea to construct a simple trading rule the result is not the world's greatest standalone signal. But there does seem to be some promise in adding it to a trend following strategy due to it's negative correlation.</div><p><br /></p><p><br /></p></div></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br />Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com0tag:blogger.com,1999:blog-261139923818144971.post-62674982019728782852023-09-26T11:34:00.011+01:002023-09-26T11:45:29.766+01:00Does CAPM work across and within asset classes - done correctly<p> I haven't posted much recently because I've been busy with other stuff, and I only post when I feel like I have something to say (the advantages of not having a paid for subscription service!). But I was compelled to post by this tweet:</p><p><br /></p>
<blockquote class="twitter-tweet"><p dir="ltr" lang="en">CAPM doesn't work within asset classes, but it does do a decent job of explaining cross-asset class returns.<a href="https://t.co/y5beyDIh0j">https://t.co/y5beyDIh0j</a>? <a href="https://t.co/T7SDBkgoor">pic.twitter.com/T7SDBkgoor</a></p>— Dan Rasmussen (@verdadcap) <a href="https://twitter.com/verdadcap/status/1706332776285294660?ref_src=twsrc%5Etfw">September 25, 2023</a></blockquote><p>Which links to this article: <a href="https://mailchi.mp/verdadcap/asset-class-capm">https://mailchi.mp/verdadcap/asset-class-capm</a></p><p>... which in turn generated a fair amount of heat and light, since there are two key mistakes in the article and tweet. In truth these are a manifestation of a single mistake, which is a mis-definition of CAPM. CAPM remember says that there is only one risk factor, market risk, and excess security returns are equal to the covariance of security/market returns (Beta) multiplied by market returns. And excess returns are equal to the risk free rate. </p><p>But in the article they plot standard deviation versus mean, minus inflation. So they are confusing both inflation and the risk free rate, but also getting covariance and standard deviation mixed up. The latter error pointed out by several posters on twitter, although there is a mini argument suggesting that in the uber CAPM model with freely available leverage all securities should lie on the capital markets line, and hence have the same Sharpe Ratio, and hence all you need to do is plot excess return vs standard deviation (although again, excess return is versus the risk free rate NOT inflation!). </p><p>Anyway I thought it would be interesting to redo this plot, but correctly. After all it's an interesting topic that speaks to the benefits of diversification. TLDR: the original authors conclusion is correct (CAPM works across asset classes, but not within) even if their methods are badly flawed.</p><p><br /></p><h2 style="text-align: left;">Data</h2><p>I use monthly returns data pulled from my dataset of over 200 futures instruments, from which I annualise mean, standard deviation and Sharpe Ratios. As futures markets these are automatically excess returns. I have history back to 1970 for some markets, and the original plot only goes back to 1973, but for reasons that I will explain in a minute I will start my analysis in 1983. To define an asset class 'market' I start with a simple equal weighted index of all the futures that had returns in that month. Arguably I should use market cap weightings, but I don't have these to hand and in any case the results probably won't change much (since there are, eg, more US futures equity indices and the US is a big part of the global equity market). Note that this means due to diversification in theory the standard deviation of each market index will fall over time. I could correct for this, but it is not significant.</p><p>Another slightly weird thing about the original plot is that it actually splits out certain asset classes; which seems to rather undermine the argument; for example small and big equity markets, short and long term bonds (ST, LT), and different credit quality bonds.I don't have enough futures with enough history to do a split between small and big equity, nor do I have enough HY/IG bond futures to be confident the results would be meaningful, but I able to include a lot more markets and asset classes. So I have:</p><p></p><ul style="text-align: left;"><li>Bonds (and at this stage I won't seperate these into ST/LT) - these are mostly government bonds (39 markets)</li><li>Equities of all types (58)</li><li>Metals (rather than just Gold in the original piece, 21)</li><li>Energies (rather than just Oil, 20)</li><li>Agricultural (38)</li></ul><p></p><p>I don't include FX, since you can argue if it's really an asset class, and because it includes a mishmash of things that are bets for and against the dollar, emerging markets, and so on. And I don't include volatility, since this usually only has two markets in it (VIX and VSTOXX). </p><p>Equity indices are late to the futures trading party, and my data for these doesn't start until late 1982. So for strict comparability I remove everything before January 1983. Again, this doesn't affect the final results all that much.</p><p><br /></p><h2 style="text-align: left;">Plotting Sharpe Ratio</h2><p>Let's first drop the incorrect definition of excess return, and plot excess mean versus standard deviation plots (to reiterate, as these are future the returns are automatically excess of the risk free rate). Note that means that everything on a straight line will have the same Sharpe Ratio.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimUENn4lg4Iur9d4NE-aNo4awDOF_um6B8BKNEt_x8WDt1yz9NzpWCQzg26VdZxFoPiF8ulQAVk9TOg5BC4j08-uCCf9w7SKbCYVqCYjbeN4JZ-2KF2Ibsg_0afwKtGz_72dO1XI_fDr23CnN3SFzkJ0rexdY7kn7JGDk93PmuDHb_APu6CDMicARaJ2lM/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimUENn4lg4Iur9d4NE-aNo4awDOF_um6B8BKNEt_x8WDt1yz9NzpWCQzg26VdZxFoPiF8ulQAVk9TOg5BC4j08-uCCf9w7SKbCYVqCYjbeN4JZ-2KF2Ibsg_0afwKtGz_72dO1XI_fDr23CnN3SFzkJ0rexdY7kn7JGDk93PmuDHb_APu6CDMicARaJ2lM/w640-h322/Figure_1.png" width="640" /></a></div><br /><p><br /></p><div class="separator" style="clear: both; text-align: center;"><span style="text-align: left;">Looks pretty good! And indeed if we look at the statistics including the Sharpe Ratios, we can see there is not that much difference between the SR, certainly nothing statistically significant:</span></div><div class="separator" style="clear: both; text-align: center;"><span style="text-align: left;"><br /></span></div><pre style="background-color: white;"><span style="color: #080808; font-family: JetBrains Mono, monospace;"><span style="font-size: 18.4px;"> mean std sr
Ags 0.02 0.12 0.20
Bond 0.02 0.04 0.55
Equity 0.08 0.16 0.48
Metals 0.04 0.18 0.21
OilGas 0.09 0.28 0.34</span></span><span style="color: #080808; font-family: "JetBrains Mono", monospace;">
</span></pre><div>Although we only have five data points, it does seem that there is a roughly positive relationship between excess mean over risk free and standard deviation.</div><div><br /></div><h2 style="text-align: left;">Bringing in Beta</h2><p>Having verified the original results after substituting the risk free rate for inflation, let's now bring in Beta. Under CAPM we'd expect that if we plotted excess mean against <i>covariance</i> rather than standard deviation, we'd again find a positive relationship. That should make assets with lower correlations look more attractive; that reminds me here's the correlation matrix:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"> Ags Bond Equity Metals OilGas<br />Ags <span style="color: #1750eb;">1.00 </span>-<span style="color: #1750eb;">0.11 0.21 0.37 0.27<br /></span>Bond -<span style="color: #1750eb;">0.11 1.00 0.09 </span>-<span style="color: #1750eb;">0.06 </span>-<span style="color: #1750eb;">0.14<br /></span>Equity <span style="color: #1750eb;">0.21 0.09 1.00 0.26 0.12<br /></span>Metals <span style="color: #1750eb;">0.37 </span>-<span style="color: #1750eb;">0.06 0.26 1.00 0.28<br /></span>OilGas <span style="color: #1750eb;">0.27 </span>-<span style="color: #1750eb;">0.14 0.12 0.28 1.00</span></pre><p>The problem of course is how to measure Beta, i.e. what is the 'market' that we are regressing our returns on. That's a hard enough problem when considering equities, but here we should really include every investable asset in the world, weighted by market cap back to 1983. I don't have those figures to hand!!</p><p>Instead I'm going to opt for another quick and dirty solution, namely to create a market index in the following proportions:</p><p></p><ul style="text-align: left;"><li>Ags 10%</li><li>Bonds 40%</li><li>Equities 30%</li><li>Metals 10%</li><li>Oil and Gas 10%</li></ul><p></p><p>This is based on some roughly true things; bonds and equities form most of the investable universe and there are more bonds issued than equities. And since most people are probably starting with a bonds/equities based portfolio, considering the diversification available versus something that is mostly that is probably a reasonable thing to do.</p><p>If you prefer you can do something else like risk parity (which would be about 50% bonds, with the other asset classes roughly splitting the rest), but it probably won't make <i>that</i> much difference. </p><p>This market index has a standard deviation of 7.4% a year, and a mean of 4.8%; it's SR of 0.64 as you would expect is superior to it's constituents.</p><p>Let's have a look at the betas and alphas, also correlation with the market (corr), standard deviations and Sharpe Ratios:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><pre style="font-family: "JetBrains Mono", monospace;"> std corr beta sr alpha<br />Ags <span style="color: #1750eb;">0.119 0.471 0.765 0.199 </span>-<span style="color: #1750eb;">0.011<br /></span>Bond <span style="color: #1750eb;">0.039 0.183 0.098 0.553 0.017<br /></span>Equity <span style="color: #1750eb;">0.162 0.826 1.822 0.484 </span>-<span style="color: #1750eb;">0.008<br /></span>Metals <span style="color: #1750eb;">0.176 0.566 1.353 0.215 </span>-<span style="color: #1750eb;">0.026<br /></span>OilGas <span style="color: #1750eb;">0.277 0.541 2.027 0.338 </span>-<span style="color: #1750eb;">0.006<br /></span></pre></pre><p>We can see that to an extent higher standard deviation also means higher beta, but not always; equities and metals have virtually the same standard deviation but equities have a higher beta because they are more correlated. There is also a weak relationship between alpha and SR.</p><p>Let's now redo the scatter plot but this time with Beta on the x-axis and adding the market portfolio:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Xx1GpLZBY5-KWTM6NfVa9GTeWm2sStJJF_GHlomskHeI7bC-HZlmqVTXiDKgU2WuU5gkyCeUXCWWQTwmIsaJEt8iqW7JIKi-uSBHT1jw6Znp3CvD0tiLdoH30CeZbaijLRhSu_SMZZAEp-YB6AP90TSVjDThICm2KrW0vPTAPanPgZeoi3w9nVpYdLKJ/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Xx1GpLZBY5-KWTM6NfVa9GTeWm2sStJJF_GHlomskHeI7bC-HZlmqVTXiDKgU2WuU5gkyCeUXCWWQTwmIsaJEt8iqW7JIKi-uSBHT1jw6Znp3CvD0tiLdoH30CeZbaijLRhSu_SMZZAEp-YB6AP90TSVjDThICm2KrW0vPTAPanPgZeoi3w9nVpYdLKJ/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><span style="text-align: left;"><br /><div style="text-align: left;">The obvious outperformance of Bonds aside, this again does like a clear case of supporting the CAPM for the case of across asset classes; if anything it's clearer than before.</div></span></div><p style="text-align: left;"><br /></p><h2 style="text-align: left;">Intra market</h2><p>Now let us address the point in the post which is mentioned but briefly; the fact that CAPM doesn't work within asset classes. This is not a new finding. Indeed there is the mysterious result of Beta making an excellent counter signal (<a href="https://www.sciencedirect.com/science/article/pii/S0304405X13002675">'Betting against Beta' Pedersen and Frazzini JFE 2014</a>) at least in individual equities. It seems that lower Beta stocks have excess Alpha compared to higher Beta stocks; one story that explains that is that if Beta is synomonous with standard deviation (which as discussed, it ain't exactly), then we'd need higher leverage to hold low Beta stocks and not everyone can or wants to leverage to the hilt.</p><p>This is perhaps a more interesting study to do, since we could potentially use any positive result here as a trading signal; buying instruments within an asset class that have low Beta (or low standard deviation), and shorting those that are high Beta. Once again we run up against the definition of 'the market' in each asset class, but I will stick with the simple equal weighted across time version I have been using so far.</p><p>Here follows a blizzard (correct collective noun?) of plots. Firstly, here's excess mean against standard deviation (the original Sharpe Ratio plot):</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi__LBqQl9A-WTfvS_HL91DM3y1n2wc2uZxCLTneR7Og3NZGgvl0bn5JV46QpMjsirXedv9NPWgqI2v2BTlafR-cI8UAW_v8xJ5tSCYfBW52uDSPMTIYccHSk0V-9TxJwkkWv9lvG8IbIST0CK9qLy5pW5WOutqDpfL556CVsajRf0KwkclDIKR_LREmVp8/s1920/Figure_2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi__LBqQl9A-WTfvS_HL91DM3y1n2wc2uZxCLTneR7Og3NZGgvl0bn5JV46QpMjsirXedv9NPWgqI2v2BTlafR-cI8UAW_v8xJ5tSCYfBW52uDSPMTIYccHSk0V-9TxJwkkWv9lvG8IbIST0CK9qLy5pW5WOutqDpfL556CVsajRf0KwkclDIKR_LREmVp8/w640-h322/Figure_2.png" width="640" /></a></div><br /><p><br /></p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh43_FMzrV0NYrF5ksdXx-CijHBFmKhDudZTiq7Y8bGR_siC1BWbUrQIIK5mIwDCbnwkzN5JVxgnZM6Ev5Loi4i8JoymGvbxQJA60-U61M7Pblv6EIPArrgz6GHgWdDn1IupkOpN-u_LyRR_9mJZYpDDKEVao0FgTp2DFp5V728x-6FHxgAQBIYn7Y-8vmJ/s1920/Figure_5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh43_FMzrV0NYrF5ksdXx-CijHBFmKhDudZTiq7Y8bGR_siC1BWbUrQIIK5mIwDCbnwkzN5JVxgnZM6Ev5Loi4i8JoymGvbxQJA60-U61M7Pblv6EIPArrgz6GHgWdDn1IupkOpN-u_LyRR_9mJZYpDDKEVao0FgTp2DFp5V728x-6FHxgAQBIYn7Y-8vmJ/w640-h322/Figure_5.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjolGizEomS9G-pbHIvgHk5wF-LsEppFW6_WvcYFykQV4anqGT3Bvla8WTbMZlAKR5jWzfgzvaBaD1-MkbpRcZ3XjUJOskMpvfAPpEjWu-y4Sz0zsXjSSxY4t51pknEXTFYT7I96KQpVkcKrb7DreIdCiGKIibnB-gs9mnaAfKUoe5aVxE0NXJZ2M9KxVqo/s1920/Figure_8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjolGizEomS9G-pbHIvgHk5wF-LsEppFW6_WvcYFykQV4anqGT3Bvla8WTbMZlAKR5jWzfgzvaBaD1-MkbpRcZ3XjUJOskMpvfAPpEjWu-y4Sz0zsXjSSxY4t51pknEXTFYT7I96KQpVkcKrb7DreIdCiGKIibnB-gs9mnaAfKUoe5aVxE0NXJZ2M9KxVqo/w640-h322/Figure_8.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWqhAsIU1HHXbo-FIbpQ0NbCh0iOjTnR7MVA90wpO6zKpxkXRSHRGgz4Tk7sBmS6fqRjVK-AKyhNjo4BR4BdxWKM49dFy1bsCrYV4APMLEThJoSaFBVTKFUJ3k9dOd1ODKrQZhim6YtoaGIKVvG7TV6Jb2IpKFwY6P-GCMp8cQwaSFcyuhwRYsKmh5bD9K/s1920/Figure_11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWqhAsIU1HHXbo-FIbpQ0NbCh0iOjTnR7MVA90wpO6zKpxkXRSHRGgz4Tk7sBmS6fqRjVK-AKyhNjo4BR4BdxWKM49dFy1bsCrYV4APMLEThJoSaFBVTKFUJ3k9dOd1ODKrQZhim6YtoaGIKVvG7TV6Jb2IpKFwY6P-GCMp8cQwaSFcyuhwRYsKmh5bD9K/w640-h322/Figure_11.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj17awj5PamKtCdiVIECvZyRs0ik-CP_HgoehzH4rAAd9QParUw0YSlqMdF3K9WvfmxcmsKFpphAt_f5glxQgN9Dp3LrGcVssBHhNHs-qhF3YdbKYQs7oyApbAFcWHly6oe7jbCgmpPnHgzaOajOu4PQBmH1x4PZrNA3Tvtz6H3IKFT5iqSvgzbABfWOGG9/s1920/Figure_14.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj17awj5PamKtCdiVIECvZyRs0ik-CP_HgoehzH4rAAd9QParUw0YSlqMdF3K9WvfmxcmsKFpphAt_f5glxQgN9Dp3LrGcVssBHhNHs-qhF3YdbKYQs7oyApbAFcWHly6oe7jbCgmpPnHgzaOajOu4PQBmH1x4PZrNA3Tvtz6H3IKFT5iqSvgzbABfWOGG9/w640-h322/Figure_14.png" width="640" /></a></div><br /><div>A big caveat here is that different instruments may have wildly different data histories. With that said, there is mostly no evidence here of a similar Sharpe Ratio. The exception is bonds. There does seem to be a relationship between duration (which is highly correlated to standard deviation) and excess return; and we also see that High Yield which is riskier than most of the goverment bonds has a higher return. In other worse, the bastardised version of the CAPM using vol rather than Beta does work within one asset class, which is perhaps why the authors of the original post decided to treat bonds as several different asset classes :-)</div><div><br /></div><div><div>Now let's do things 'properly' and look at excess mean versus Beta:</div><div><br /></div></div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmLdOLBUU7U1fwKwIFptRqPzvzuh_e5CUGGtnaC7ozy-kO8A5AC0SaFIiqvwOiEVro75JzLGs5k0TW2Wpx8Zza7r_pOEFvQzd0pQh_3b4SnVlObTGdv7z3kKd95WKupTBVR28JzadNFQ8JB9mllUhncJ40DyWOPK_1oURJ5UBgXIM1AHUiBKhFk-YgqrC0/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmLdOLBUU7U1fwKwIFptRqPzvzuh_e5CUGGtnaC7ozy-kO8A5AC0SaFIiqvwOiEVro75JzLGs5k0TW2Wpx8Zza7r_pOEFvQzd0pQh_3b4SnVlObTGdv7z3kKd95WKupTBVR28JzadNFQ8JB9mllUhncJ40DyWOPK_1oURJ5UBgXIM1AHUiBKhFk-YgqrC0/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvR1z8sEwPXuhLvhzMQoKq8q8oUBk_32V18yXVS2KifY0CMxO0vWkSX6VLMZsyv_XsfQjUM7sT_C5XyYaNCL9NTknh57ny4Gs-DxtfPz7Ee_zBg4n8-bejtM6xwHDWdgDqGPx_BnMwPMUELXctsUuUKGBW10y2S96XnB9lxsA0O0M_GXlAZfiiYj9cLET3/s1920/Figure_4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvR1z8sEwPXuhLvhzMQoKq8q8oUBk_32V18yXVS2KifY0CMxO0vWkSX6VLMZsyv_XsfQjUM7sT_C5XyYaNCL9NTknh57ny4Gs-DxtfPz7Ee_zBg4n8-bejtM6xwHDWdgDqGPx_BnMwPMUELXctsUuUKGBW10y2S96XnB9lxsA0O0M_GXlAZfiiYj9cLET3/w640-h322/Figure_4.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGNPrYszgbAY93KuOIaZLU1asDMONbxgCLkkt3ZX4VG8AjlhLVA_WCIBbC64lniy-lMrJw9NYxU7J8DlZFYxyt06tU89u-8q770f5OZCq7jQZYFB0Bw4_619ZZOTaZTXLeJHLSNkvrUjPQkpzYMYaxYuWxLzTAg26G3wjvxtmCsEx8YZLLghbZ_yqC7CI3/s1920/Figure_7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGNPrYszgbAY93KuOIaZLU1asDMONbxgCLkkt3ZX4VG8AjlhLVA_WCIBbC64lniy-lMrJw9NYxU7J8DlZFYxyt06tU89u-8q770f5OZCq7jQZYFB0Bw4_619ZZOTaZTXLeJHLSNkvrUjPQkpzYMYaxYuWxLzTAg26G3wjvxtmCsEx8YZLLghbZ_yqC7CI3/w640-h322/Figure_7.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgkleBycT9WV1mEEiEO04noiEHA3Uf1_9laqjKNQQQoL3TjYgmN_rKU_K7t4sQu8BLOLaLQVjXH49e6CGyf58pwqShjFS42d5jNThPihPZ6MQMK2qftWoNcWdcGo_3kIhAUxM_WZUui-AOuuNpCVnE79J-sL-huezZ5DsA653Tgd3Cfh0WrHVlzg1OBsp5/s1920/Figure_10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgkleBycT9WV1mEEiEO04noiEHA3Uf1_9laqjKNQQQoL3TjYgmN_rKU_K7t4sQu8BLOLaLQVjXH49e6CGyf58pwqShjFS42d5jNThPihPZ6MQMK2qftWoNcWdcGo_3kIhAUxM_WZUui-AOuuNpCVnE79J-sL-huezZ5DsA653Tgd3Cfh0WrHVlzg1OBsp5/w640-h322/Figure_10.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihNHPjnCXgCmuuLDueQ7vXr7YL30kaDs42hoB48b3J1xkzKfxHuNHRbGKVIvX4Rhl05FrrU6RBV5d_caD7sM6DIZqOP48BLErBXy1gWsCH2Bs9U3H5k1OxRgwFsELh6y1bzFftw-gSLujwKQpcPim7-f2jAOQbrpTuV7fffh9Urj5qQAnpSAGHVQsF6337/s1920/Figure_13.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihNHPjnCXgCmuuLDueQ7vXr7YL30kaDs42hoB48b3J1xkzKfxHuNHRbGKVIvX4Rhl05FrrU6RBV5d_caD7sM6DIZqOP48BLErBXy1gWsCH2Bs9U3H5k1OxRgwFsELh6y1bzFftw-gSLujwKQpcPim7-f2jAOQbrpTuV7fffh9Urj5qQAnpSAGHVQsF6337/w640-h322/Figure_13.png" width="640" /></a></div><br /></div><div>Interestingly the positive result in Bonds is slightly different here; it mostly holds true that we get higher excess return for more Beta with the exception of high yield bonds. These are negatively correlated to the rest of the universe, and as a result have negative Beta. My returns for the high yield bond future go back to 2000, so this isn't a fluke down to a limited number of returns. However for government bonds, again it seems that CAPM holds true.</div><div><br /></div><div>For a giggle let's reproduce the plots from the 'Betting Against Beta' paper, and plot Alpha vs Beta. CAPM predicts a horizontal line, whilst the original paper found a downward sloping line.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiym8-LJKBPbHhI3f3ctbYDp2uq76x27V5Dlw1LdnziCTFjQnZ2NkTDQthEUWyO_tOfLk8fsIXcmxBvZdo8M9Dr9LUyttzI3tNLQ0VMXpV1VVldE1eA34Rct0_ToK8aCMiKf74tTDuYT_hEEOKFQAos3GFBjf1cLbC2f33tsxRRK51WJOkAEeBqF2loKOO/s1920/Figure_5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiym8-LJKBPbHhI3f3ctbYDp2uq76x27V5Dlw1LdnziCTFjQnZ2NkTDQthEUWyO_tOfLk8fsIXcmxBvZdo8M9Dr9LUyttzI3tNLQ0VMXpV1VVldE1eA34Rct0_ToK8aCMiKf74tTDuYT_hEEOKFQAos3GFBjf1cLbC2f33tsxRRK51WJOkAEeBqF2loKOO/w640-h322/Figure_5.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFjkJ52O4YJQKWj6UT9LtuCReQn-6iaROLKUa_jPeRDgthLpe8QwQwHO-KCkoJWeXyQGVSlY9_wP0H5Ibz4Ss009Cf_KqeZvGX2w2HrQtXl4fCF7iI1nhLb4E84Et8y1ZW5VNVf9oBqZXffd-lq6UZVPPKZxF7bddU-lCCXOyzu5GbMgeM3UftDyQoyCT8/s1920/Figure_4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFjkJ52O4YJQKWj6UT9LtuCReQn-6iaROLKUa_jPeRDgthLpe8QwQwHO-KCkoJWeXyQGVSlY9_wP0H5Ibz4Ss009Cf_KqeZvGX2w2HrQtXl4fCF7iI1nhLb4E84Et8y1ZW5VNVf9oBqZXffd-lq6UZVPPKZxF7bddU-lCCXOyzu5GbMgeM3UftDyQoyCT8/w640-h322/Figure_4.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5qxjdaOCV2AJiVT3QEhxVamER6ZTbHqTH0iKbNxQGKUk9rgACm1W6Opb32lVCkHElLZW4l4lzkAEBMRXPC_vjT73tTCUkP9bNltLsx-F10gZaAxPBuweNHoxrfbUwzBPRpkFd4vx6KXE6AN27wrkwXEk_vPnqRe1c3WbEk7EASGtYIDpuyv4uU5pV5aZI/s1920/Figure_3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5qxjdaOCV2AJiVT3QEhxVamER6ZTbHqTH0iKbNxQGKUk9rgACm1W6Opb32lVCkHElLZW4l4lzkAEBMRXPC_vjT73tTCUkP9bNltLsx-F10gZaAxPBuweNHoxrfbUwzBPRpkFd4vx6KXE6AN27wrkwXEk_vPnqRe1c3WbEk7EASGtYIDpuyv4uU5pV5aZI/w640-h322/Figure_3.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX8UacFL-TD9lMSEi0UUDT7CTGLgb3O7wGE9nkoywW3JtHDQEtrxG--L_sPfch2gB4IUZo9UiSjvIbi-nhpjQOp0olcOInU9gg4YgSvW1fT9tpjnA6J0zWJwPxv-r3TcRtgyxMYExdChABYqluVbSmXRlGqtOWpFwNsvtsYOk9WyZRwvOb9vn7WbucheP0/s1920/Figure_2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX8UacFL-TD9lMSEi0UUDT7CTGLgb3O7wGE9nkoywW3JtHDQEtrxG--L_sPfch2gB4IUZo9UiSjvIbi-nhpjQOp0olcOInU9gg4YgSvW1fT9tpjnA6J0zWJwPxv-r3TcRtgyxMYExdChABYqluVbSmXRlGqtOWpFwNsvtsYOk9WyZRwvOb9vn7WbucheP0/w640-h322/Figure_2.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKsjit4msFgegF20EGifbQvFYvmunzRUbq2D5PpnYE_rBojr_6EDTLty_XyZ-HmriuxmB3Dyud5AV6JBUvLVxXFLb-lg5SQmcWJwqhI-Mh855IGnwO4_pP0_53UhpBdtjNmOrKvoRm3yrZbqTziLfB7X-u7UurEr1gvkEP5JZOtwUH56BSjBH8J25btruD/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKsjit4msFgegF20EGifbQvFYvmunzRUbq2D5PpnYE_rBojr_6EDTLty_XyZ-HmriuxmB3Dyud5AV6JBUvLVxXFLb-lg5SQmcWJwqhI-Mh855IGnwO4_pP0_53UhpBdtjNmOrKvoRm3yrZbqTziLfB7X-u7UurEr1gvkEP5JZOtwUH56BSjBH8J25btruD/w640-h322/Figure_1.png" width="640" /></a></div><br />With the possible exception of oil and gas, there isn't much to write home about here. It doesn't look like CAPM or Betting against Beta is particularly compelling within asset classes that contain futures. </div><div><br /></div><div>(Note that in any case this isn't a proper test of Betting against Beta as a trading signal, since everything is in sample and not time varying)</div><div><br /></div><h2 style="text-align: left;">Summary</h2><div>Sloppy execution aside, the key findings of the original paper are correct; CAPM doesn't really work within asset classes, unless you lump all bonds into a single asset class in which case it works just fine, but it does work across asset classes. </div><div><br /></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com0tag:blogger.com,1999:blog-261139923818144971.post-33994600869706541332023-05-12T14:01:00.003+01:002023-05-12T14:05:42.463+01:00Clustering trading rule p&l<p> I recently upgraded my live production system to include all the extra instruments I've added on recently. I also did a little consolidation of trading rules, simplifying things slightly by removing some rules that didn't really have much allocation, and adding a couple from my new book. As usual I set the instrument weights and forecast weights using my <i>handcrafting</i> methodology, which is basically a top down method that involves clustering things into groups in a hierarchical fasion.</p><p>In my backtests I do this clustering using the correlation matrix as a guide, but for production weights I use heurestics. So for instruments I say things like 'bonds are probably more correlated with each other than with other assets' and form the clusters initially as asset classes. And for forecast weights, which allocate across trading rules, I say things like 'momentum type trading rules are probably more correlated with each other', so I end up using a hierarchy like this:</p><p></p><ul style="text-align: left;"><li>Convergent (eg carry and mean reversion), Divergent (eg momentum)</li><li>Generic trading rule (eg EWMAC)</li><li>Specific trading rule variation (eg EWMAC2,8)</li></ul><p></p><p>Now I recently tested this clustering method for instruments in this <a href="https://qoppac.blogspot.com/2016/08/trend-following-and-correlation.html">blog post</a>. OK it was 17 months ago, but it felt recent to me. Basically I used a clustering methodology and threw in the actual correlation matrix to see how the grouping turned out. It was quite interesting. So I thought it would be quite interesting to do a similar thing with forecast weights. Effectively I am sense checking my heuristic guidelines to see if they are completely nuts, or vaguely okay.</p><p><a href="https://gist.github.com/robcarver17/0433df8be55ab76a2597569dc7d6447c">Some code</a>.</p><p><br /></p><h2 style="text-align: left;">Getting the correlation matrix</h2><p>Well you might think this is easy, but it's not. The correlation matrix here is the correlation of returns for a given set of trading rules and variations. But returns of what? A single instrument, like the S&P 500? That obviously may be unrepresentative of the sample generally, and we're not going to do this exercise for the 200+ instruments I have in my dataset now. What about the correlation of average returns taken across a bunch of instruments, or perhaps the average of the correlations taken across the same bunch - note these aren't quite the same thing. For example an average of correlations will give every instrument the same weight, wheras an average of returns will give a higher weighting to instruments with more data history.</p><p>And if we are doing averaging, do we just do a simple average - which will be biased since 37% of my futures are equities? Or do we use the instrument weights?</p><p>The good news is it probably won't make <i>too</i> much difference. Given enough history, the correlation of trading rule forecast returns is pretty similar across instruments. But we probably want to avoid overweighting certain asset classes, or equally weighting instruments without much history. So I'm going to go for taking the return correlation of portfolios for each trading rule. Each portfolio consists of the same trading rule being traded in all the instruments I trade, weighted by my actual instrument weights. </p><p>Now I don't actually trade all rules in all instruments, because of trading costs, and sometimes because the instrument has certain flaws, but what we are trying to get here is as much information as possible to build a robust correlation matrix. I will also use pre-cost returns; not that it will make any difference, but the point here is to discover how similar rules are to each other, which doesn't depend on costs.</p><p>Finally note that I have 135 instruments with instrument weights, because some of my 208 are duplicates (eg micro and mini S&P 500), or I can't legally trade them, or for some other reason.</p><p><br /></p><h2>Results: N=2</h2><p>Let's kick things off then:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster <span style="color: #1750eb;">1 'convergent'<br /></span>[<span style="color: teal; font-weight: bold;">'mrinasset160'</span>, <span style="color: teal; font-weight: bold;">'carry10'</span>, <span style="color: teal; font-weight: bold;">'carry30'</span>, <span style="color: teal; font-weight: bold;">'carry60'</span>, <span style="color: teal; font-weight: bold;">'carry125'</span>, <span style="color: teal; font-weight: bold;">'relcarry'</span>, </span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'skewabs365'</span>, <span style="color: teal; font-weight: bold;">'skewabs180'</span>, <span style="color: teal; font-weight: bold;">'skewrv365'</span>, <span style="color: teal; font-weight: bold;">'skewrv180'</span>]<br />Cluster <span style="color: #1750eb;">2 'divergent'<br /></span>[<span style="color: teal; font-weight: bold;">'breakout10'</span>, <span style="color: teal; font-weight: bold;">'breakout20'</span>, <span style="color: teal; font-weight: bold;">'breakout40'</span>, <span style="color: teal; font-weight: bold;">'breakout80'</span>, <span style="color: teal; font-weight: bold;">'breakout160'</span>, <span style="color: teal; font-weight: bold;">'breakout320'</span>, </span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'relmomentum10'</span>, <span style="color: teal; font-weight: bold;">'relmomentum20'</span>, <span style="color: teal; font-weight: bold;">'relmomentum40'</span>, <span style="color: teal; font-weight: bold;">'relmomentum80'</span>, </span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'assettrend2'</span>, <span style="color: teal; font-weight: bold;">'assettrend4'</span>, <span style="color: teal; font-weight: bold;">'assettrend8'</span>, <span style="color: teal; font-weight: bold;">'assettrend16'</span>, </span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'assettrend32'</span>, <span style="color: teal; font-weight: bold;">'assettrend64'</span>, </span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'normmom2'</span>, <span style="color: teal; font-weight: bold;">'normmom4'</span>, <span style="color: teal; font-weight: bold;">'normmom8'</span>, <span style="color: teal; font-weight: bold;">'normmom16'</span>, <span style="color: teal; font-weight: bold;">'normmom32'</span>, <span style="color: teal; font-weight: bold;">'normmom64'</span>, </span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'momentum4'</span>, <span style="color: teal; font-weight: bold;">'momentum8'</span>, <span style="color: teal; font-weight: bold;">'momentum16'</span>, <span style="color: teal; font-weight: bold;">'momentum32'</span>, <span style="color: teal; font-weight: bold;">'momentum64'</span>, </span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'accel16'</span>, <span style="color: teal; font-weight: bold;">'accel32'</span>, <span style="color: teal; font-weight: bold;">'accel64'</span>]<br /></span></pre><p><br /></p><p>An absolutely perfect convergent vs divergent split. The labels by the way are added by me, not the code.</p><p><br /></p><h2>Results: N=3</h2><div><br /></div><div><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #080808;">Cluster </span><span style="color: #1750eb;">1 'convergent' (Unchanged)<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'mrinasset160'</span><span style="color: #080808;">, </span><span style="color: teal;"><b>....</b></span><span style="color: #080808;"> </span><span style="color: #080808;">]<br /><br /></span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #080808;">Cluster </span><span style="color: #1750eb;">2 'fast divergent'<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'breakout10'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'breakout20'</span><span style="color: #080808;">, </span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'relmomentum10'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'relmomentum20'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'relmomentum40'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'relmomentum80'</span><span style="color: #080808;">, </span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'assettrend2'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'assettrend4'</span><span style="color: #080808;">, </span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'normmom2'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'normmom4'</span><span style="color: #080808;">, </span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'momentum4'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'accel16'</span><span style="color: #080808;">]<br /><br /></span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #080808;">Cluster </span><span style="color: #1750eb;">3 'medium and slow divergent'<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'breakout40'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'breakout80'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'breakout160'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'breakout320'</span><span style="color: #080808;">, </span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'assettrend8'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'assettrend16'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'assettrend32'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'assettrend64'</span><span style="color: #080808;">, </span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'normmom8'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'normmom16'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'normmom32'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'normmom64'</span><span style="color: #080808;">, </span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'momentum8'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'momentum16'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'momentum32'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'momentum64'</span><span style="color: #080808;">, </span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'accel32'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'accel64'</span><span style="color: #080808;">]<br /></span></span></pre></div><div>This is why we are doing this exercise - we've just discovered something interesting: <b>fast momentum like trading rules have more in common with other fast momentum trading rules, than they do with slow variations of themselves.</b></div><div><b><br /></b></div><div><h2>Results: N=4</h2><div><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #080808;">Cluster </span><span style="color: #1750eb;">1 'convergent mean reversion'<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'mrinasset160'</span><span style="color: #080808;">]<br />Cluster </span><span style="color: #1750eb;">2 'convergent skew and carry'<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'carry10'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'carry30'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'carry60'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'carry125'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'relcarry'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'skewabs365'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'skewabs180'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'skewrv365'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'skewrv180'</span><span style="color: #080808;">]<br />Cluster </span><span style="color: #1750eb;">3 'fast divergent - unchanged'<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'breakout10'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'breakout20'</span><span style="color: #080808;">, </span><span style="color: teal;"><b>....</b></span><span style="color: #080808;">]<br />Cluster </span><span style="color: #1750eb;">4 'medium and slow divergent - unchanged'<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'breakout40'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'breakout80'</span><span style="color: #080808;">, </span><span style="color: teal;"><b>....</b></span><span style="color: #080808;">]<br /></span></span></pre></div><div></div></div><p><br /></p><p></p><div style="-webkit-text-stroke-width: 0px; color: black; font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></div><p></p><h2 style="-webkit-text-stroke-width: 0px; color: black; font-family: "Times New Roman"; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Results: N=5</h2><div>Now it's the turn of the (relatively) slow divergent to be split up:</div><div><br /></div><div><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #080808;">Cluster </span><span style="color: #1750eb;">1 'convergent mean reversion (unchanged)'<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'mrinasset160'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'mrwrings4'</span><span style="color: #080808;">]<br />Cluster </span><span style="color: #1750eb;">2 'convergent skew and carry (unchanged)'<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'carry10'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'carry30'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'carry60'</span><span style="color: #080808;">, </span><span style="color: teal;"><b>....</b></span><span style="color: #080808;">]<br />Cluster </span><span style="color: #1750eb;">3 'fast divergent - unchanged'<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'breakout10'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'breakout20'</span><span style="color: #080808;">, </span><span style="color: teal;"><b>....</b></span><span style="color: #080808;">]<br /></span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster <span style="color: #1750eb;">4 'slow divergent'<br /></span>[<span style="color: teal; font-weight: bold;">'breakout160'</span>, <span style="color: teal; font-weight: bold;">'breakout320'</span>, </span></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'assettrend32'</span>, <span style="color: teal; font-weight: bold;">'assettrend64'</span>, </span></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'normmom32'</span>, <span style="color: teal; font-weight: bold;">'normmom64'</span>, </span></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'momentum32'</span>, <span style="color: teal; font-weight: bold;">'momentum64'</span>]<br />Cluster <span style="color: #1750eb;">5 'medium speed divergent'<br /></span>[<span style="color: teal; font-weight: bold;">'breakout40'</span>, <span style="color: teal; font-weight: bold;">'breakout80'</span>, </span></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'assettrend8'</span>, <span style="color: teal; font-weight: bold;">'assettrend16'</span>, </span></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'normmom8'</span>, <span style="color: teal; font-weight: bold;">'normmom16'</span>, </span></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'momentum8'</span>, <span style="color: teal; font-weight: bold;">'momentum16'</span>, </span></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'accel32'</span>, <span style="color: teal; font-weight: bold;">'accel64'</span>]<br /></span></pre></pre></div><div>Again it's the speed of trading that is the differentiator here, not the trading rule.</div><div><br /></div><div><br /></div><div><h2>Results: N=6</h2><div>We break relative momentum off from it's counterparts in what was previously cluster 3:</div><div><br /></div></div><div><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #080808;">Cluster </span><span style="color: #1750eb;">1 'convergent mean reversion (unchanged)<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'mrinasset160'</span><span style="color: #080808;">]<br />Cluster </span><span style="color: #1750eb;">2 'convergent skew and carry' (unchanged)<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'carry10'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'carry30'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'carry60'</span><span style="color: #080808;">, </span><span style="color: teal;"><b>...</b></span><span style="color: #080808;">]<br />Cluster </span><span style="color: #1750eb;">3 'fast divergent - unchanged'<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'breakout10'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'breakout20'</span><span style="color: #080808;">, </span><span style="color: teal;"><b>....</b></span><span style="color: #080808;">]<br /></span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster <span style="color: #1750eb;">3<br /></span>[<span style="color: teal; font-weight: bold;">'relmomentum10'</span>, <span style="color: teal; font-weight: bold;">'relmomentum20'</span>, <span style="color: teal; font-weight: bold;">'relmomentum40'</span>, <span style="color: teal; font-weight: bold;">'relmomentum80'</span>]<br />Cluster <span style="color: #1750eb;">4<br /></span>[<span style="color: teal; font-weight: bold;">'breakout10'</span>, <span style="color: teal; font-weight: bold;">'breakout20'</span>, </span></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'assettrend2'</span>, <span style="color: teal; font-weight: bold;">'assettrend4'</span>, </span></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'normmom2'</span>, <span style="color: teal; font-weight: bold;">'normmom4'</span>, </span></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: teal; font-weight: bold;">'momentum4'</span>, <span style="color: teal; font-weight: bold;">'accel16'</span>]<br /></span></pre></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster 5<span style="color: #1750eb;"> 'slow divergent' (unchanged - was cluster 4)<br /></span>[<span style="color: teal; font-weight: bold;">'breakout160'</span>, <span style="color: teal; font-weight: bold;">'breakout320'</span>,...</span>]</pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster 6<span style="color: #1750eb;"> 'medium speed divergent' (unchanged - was cluster 5)<br /></span>[<span style="color: teal; font-weight: bold;">'breakout40'</span>, <span style="color: teal; font-weight: bold;">'breakout80'</span>,...</span>]</pre></pre></div><div><br /></div><div><h2>Results: N=7</h2><div>And now acceleration comes away from the other slow rules:</div><div><br /></div><div><div><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #080808;">Cluster </span><span style="color: #1750eb;">1 'convergent mean reversion (unchanged)<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'mrinasset160'</span><span style="color: #080808;">]<br />Cluster </span><span style="color: #1750eb;">2 'convergent skew and carry' (unchanged)<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'carry10'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'carry30'</span><span style="color: #080808;">, </span><span style="color: teal; font-weight: bold;">'carry60'</span><span style="color: #080808;">, </span><span style="color: teal;"><b>...</b></span><span style="color: #080808;">]</span><span style="color: #080808;"><br /></span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster <span style="color: #1750eb;">3 'relative momentum' (unchanged)<br /></span>[<span style="color: teal; font-weight: bold;">'relmomentum10'</span>, <span style="color: teal; font-weight: bold;">'relmomentum20'</span>, <span style="color: teal; font-weight: bold;">'relmomentum40'</span>, <span style="color: teal; font-weight: bold;">'relmomentum80'</span>]<br />Cluster <span style="color: #1750eb;">4 'fast divergent' (unchanged)<br /></span>[<span style="color: teal; font-weight: bold;">'breakout10'</span>, <span style="color: teal; font-weight: bold;">'breakout20'...</span></span>]</pre></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><pre style="font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster <span style="color: #1750eb;">5 'slow divergent ex. accel'<br /></span>[<span style="color: teal; font-weight: bold;">'breakout160'</span>, <span style="color: teal; font-weight: bold;">'breakout320'</span>, <span style="color: teal; font-weight: bold;">'assettrend32'</span>, <span style="color: teal; font-weight: bold;">'assettrend64'</span>, <span style="color: teal; font-weight: bold;">'normmom32'</span>, <span style="color: teal; font-weight: bold;">'normmom64'</span>, <span style="color: teal; font-weight: bold;">'momentum32'</span>, <span style="color: teal; font-weight: bold;">'momentum64'</span>]<br />Cluster <span style="color: #1750eb;">6 'slow acceleration'<br /></span>[<span style="color: teal; font-weight: bold;">'accel32'</span>, <span style="color: teal; font-weight: bold;">'accel64'</span>]<br /></span></pre></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster 7<span style="color: #1750eb;"> 'medium speed divergent' (unchanged - was cluster 6)<br /></span>[<span style="color: teal; font-weight: bold;">'breakout40'</span>, <span style="color: teal; font-weight: bold;">'breakout80'</span>,...</span>]</pre></pre></div><div><br /></div></div><div><h2>Results: N=8</h2><div>Skew and carry seperate:</div><div><br /></div><div><br /></div><div><div><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #080808;">Cluster </span><span style="color: #1750eb;">1 'convergent mean reversion (unchanged)<br /></span><span style="color: #080808;">[</span><span style="color: teal; font-weight: bold;">'mrinasset160'</span><span style="color: #080808;">]<br /></span></span><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster <span style="color: #1750eb;">2 ('skew)<br /></span>[<span style="color: teal; font-weight: bold;">'skewabs365'</span>, <span style="color: teal; font-weight: bold;">'skewabs180'</span>, <span style="color: teal; font-weight: bold;">'skewrv365'</span>, <span style="color: teal; font-weight: bold;">'skewrv180'</span>]<br />Cluster <span style="color: #1750eb;">3 ('carry')<br /></span>[<span style="color: teal; font-weight: bold;">'carry10'</span>, <span style="color: teal; font-weight: bold;">'carry30'</span>, <span style="color: teal; font-weight: bold;">'carry60'</span>, <span style="color: teal; font-weight: bold;">'carry125'</span>, <span style="color: teal; font-weight: bold;">'relcarry'</span>]</span></pre></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster 4<span style="color: #1750eb;"> 'relative momentum' (unchanged)<br /></span>[<span style="color: teal; font-weight: bold;">'relmomentum10'</span>, <span style="color: teal; font-weight: bold;">'relmomentum20'</span>, <span style="color: teal; font-weight: bold;">'relmomentum40'</span>, <span style="color: teal; font-weight: bold;">'relmomentum80'</span>]<br />Cluster 5<span style="color: #1750eb;"> 'fast divergent' (unchanged)<br /></span>[<span style="color: teal; font-weight: bold;">'breakout10'</span>, <span style="color: teal; font-weight: bold;">'breakout20'...</span></span>]</pre></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><pre style="font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster 6<span style="color: #1750eb;"> 'slow divergent ex. accel'<br /></span>[<span style="color: teal; font-weight: bold;">'breakout160'</span>, <span style="color: teal; font-weight: bold;">'breakout320'</span>,...]<br />Cluster 7<span style="color: #1750eb;"> 'slow acceleration' (unchanged)<br /></span>[<span style="color: teal; font-weight: bold;">'accel32'</span>, <span style="color: teal; font-weight: bold;">'accel64'</span>]<br /></span></pre></pre><pre style="color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster 8<span style="color: #1750eb;"> 'medium speed divergent' (unchanged)<br /></span>[<span style="color: teal; font-weight: bold;">'breakout40'</span>, <span style="color: teal; font-weight: bold;">'breakout80'</span>,...</span>]</pre></pre></div><div><br /></div></div></div></div><div><h2>Results: N=11</h2></div><div>Let's skip ahead a bit, and also show all the instruments in each group for this final iteration:</div><div><br /></div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">Cluster <span style="color: #1750eb;">1 'slow asset mean reversion'<br /></span>[<span style="color: teal; font-weight: bold;">'mrinasset160'</span>]<br />Cluster 2<span style="color: #1750eb;"> 'skew'<br /></span>[<span style="color: teal; font-weight: bold;">'skewabs365'</span>, <span style="color: teal; font-weight: bold;">'skewabs180'</span>, <span style="color: teal; font-weight: bold;">'skewrv365'</span>, <span style="color: teal; font-weight: bold;">'skewrv180'</span>]<br />Cluster 3<span style="color: #1750eb;"> 'carry'<br /></span>[<span style="color: teal; font-weight: bold;">'carry10'</span>, <span style="color: teal; font-weight: bold;">'carry30'</span>, <span style="color: teal; font-weight: bold;">'carry60'</span>, <span style="color: teal; font-weight: bold;">'carry125'</span>, <span style="color: teal; font-weight: bold;">'relcarry'</span>]<br />Cluster 4<span style="color: #1750eb;"> 'slow relative momentum'<br /></span>[<span style="color: teal; font-weight: bold;">'relmomentum10'</span>, <span style="color: teal; font-weight: bold;">'relmomentum20'</span>]<br />Cluster 5<span style="color: #1750eb;"> 'fast relative momentum'<br /></span>[<span style="color: teal; font-weight: bold;">'relmomentum40'</span>, <span style="color: teal; font-weight: bold;">'relmomentum80'</span>]<br />Cluster 6<span style="color: #1750eb;"> 'divergent speed 2'<br /></span>[<span style="color: teal; font-weight: bold;">'breakout20'</span>, <span style="color: teal; font-weight: bold;">'assettrend4'</span>, <span style="color: teal; font-weight: bold;">'normmom4'</span>, <span style="color: teal; font-weight: bold;">'momentum4'</span>]<br />Cluster 7<span style="color: #1750eb;"> 'divergent speed 1 (fastest)'<br /></span>[<span style="color: teal; font-weight: bold;">'breakout10'</span>, <span style="color: teal; font-weight: bold;">'assettrend2'</span>, <span style="color: teal; font-weight: bold;">'normmom2'</span>, <span style="color: teal; font-weight: bold;">'accel16'</span>]<br />Cluster 8<span style="color: #1750eb;"> 'divergent speed 5 (slowest)'<br /></span>[<span style="color: teal; font-weight: bold;">'breakout160'</span>, <span style="color: teal; font-weight: bold;">'breakout320'</span>, <span style="color: teal; font-weight: bold;">'assettrend32'</span>, <span style="color: teal; font-weight: bold;">'assettrend64'</span>, <span style="color: teal; font-weight: bold;">'normmom32'</span>, <span style="color: teal; font-weight: bold;">'normmom64'</span>, <span style="color: teal; font-weight: bold;">'momentum32'</span>, <span style="color: teal; font-weight: bold;">'momentum64'</span>]<br />Cluster 9<span style="color: #1750eb;"> 'slow acceleration'<br /></span>[<span style="color: teal; font-weight: bold;">'accel32'</span>, <span style="color: teal; font-weight: bold;">'accel64'</span>]<br />Cluster <span style="color: #1750eb;">10 'divergent speed 4'<br /></span>[<span style="color: teal; font-weight: bold;">'breakout80'</span>, <span style="color: teal; font-weight: bold;">'assettrend16'</span>, <span style="color: teal; font-weight: bold;">'normmom16'</span>, <span style="color: teal; font-weight: bold;">'momentum16'</span>]<br />Cluster <span style="color: #1750eb;">11 'divergent speed 3'<br /></span>[<span style="color: teal; font-weight: bold;">'breakout40'</span>, <span style="color: teal; font-weight: bold;">'assettrend8'</span>, <span style="color: teal; font-weight: bold;">'normmom8'</span>, <span style="color: teal; font-weight: bold;">'momentum8'</span>]</span></pre></div><div><br /></div><div><div><h2>A new heirarchy for handcrafting trading rules</h2></div></div><div>With that all in mind, a better heirarchy would be something a bit like this:</div><div><br /></div><div><ul style="text-align: left;"><li>Convergent</li><ul><li>Mean reversion</li><li>Skew</li><ul><li>Equal split between 4 skew rules</li></ul><li>Carry</li><ul><li>Outright carry</li><li>Relative carry</li></ul></ul><li>Divergent</li><ul><li>Speed 1 (fastest: turnover > 45)</li><ul><li>acceleration - nothing fast enough</li><li>relmomentum10</li><li>other trend</li><ul><li>breakout10</li><li>assettrend2</li><li>normmom2</li><li>momentum4</li></ul></ul><li>Speed 2 (22 < turnover <45)</li><ul><li>acceleration16</li><li>relmomentum20</li><li>other trend</li><ul><li>breakout20</li><li>assettrend4</li><li>normmom4</li><li>momentum8</li></ul></ul><li>Speed 3 (12 < turnover < 22)</li><ul><li>acceleration32</li><li>relmomentum40</li><li>other trend</li><ul><li>breakout40</li><li>assettrend8</li><li>normmom8</li><li>momentum16</li></ul></ul><li>Speed 4 (7 < turnover < 12)</li><ul><li>acceleration64</li><li>relmomentum80</li><li>other trend</li><ul><li>breakout80</li><li>assettrend16</li><li>normmom16</li><li>momentum32</li></ul></ul><li>Speed 5 (4 < turnover < 7)</li><ul><li>other trend</li><ul><li>breakout160</li><li>assettrend32</li><li>normmom32</li><li>momentum64</li></ul></ul><li>Speed 6 (turnover > 4)</li><ul><li>other trend</li><ul><li>breakout320</li><li>assettrend64</li><li>normmom64</li></ul></ul></ul></ul><div>As you can see I (roughly) used turnovers to group the divergent rules, although these groupings aren't quite right I thought it better to go for some nice neat sequences. And this also doesn't exactly follow how the clustering above works eithier. But this would certainly be a better way of doing things than the grouping entirely by trading rule, which as we've seen doesn't make sense for divergent rules where speed is more important.</div></div><div><br /></div><div>Now of course there are a lot of caveats with this; first of all it's entirely in sample, but given how stable and persistent correlation of trading rules returns are over time, we'd probably get very similar results with a purely backward looking approach. Secondly we're ignoring things like costs, and the possibility that some rules may do better than others, but we can deal with that when we actually use the above structure to set instrument weights.</div><div><br /></div><div><br /></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com7tag:blogger.com,1999:blog-261139923818144971.post-14323806657706962602023-05-05T12:45:00.001+01:002023-05-05T12:45:30.346+01:00Trading and investing performance year nine - part 2: Futures trading<div class="separator"><br /></div><p> Here is part two of my annual review. <a href="https://qoppac.blogspot.com/2023/04/trading-and-investing-performance-year.html">Part one</a> looked at my overall portfolio, including long only, but there was only a cursory look at my futures. Here in this second part I will be looking a my futures trading account in a lot more detail.</p><p>It's important to say why I'm doing this. I'm certainly not doing it so I can upweight good strategies, and delete badly performing ones. A year of data on top of a 50 year backtest is meaningless. But it's interesting to know what did well or badly, whether my trading costs were higher than expected, how closely my live performance matches simulation, and whether my new dynamic optimisation is adding value compared to the simpler static system I was trading until late 2021 (as requested by <a href="https://twitter.com/christinaqi">Christina</a>). </p><p><br /></p><p><br /></p><h2 style="text-align: left;">A reminder of my overall futures performance</h2><div style="background-color: white; color: #222222;"><span style="font-family: inherit;">As I noted at the start of the post, I'll just put a very cursory look at my futures trading in here, with a subsequent follow up post to look at more details. All figures are as a % of my notional capital, which will usually be more than I have in my account. </span></div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><div><span style="font-family: courier;">MTM: -9.7%</span></div><div><div><span style="font-family: courier;">Interest: 1.3%</span></div><div><span style="font-family: courier;">Fees: -0.06%</span></div><div><span style="font-family: courier;">Commissions: -0.21%</span></div><div><br /></div><div><span style="font-family: courier;">Net futures trading: -8.7%</span></div></div></div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></div><div style="background-color: white; color: #222222;"><span style="font-family: inherit;">'Interest' includes dividends on 'cash like' short bond ETFs I hold to make a slightly more efficient use of my cash; I've recently (in this financial year) added a bit more to this sub portfolio. It's quite interesting how interest has gone from being irrelevant to actually adding something to performance.</span></div><div style="background-color: white; color: #222222;"><span style="font-family: inherit;"><br /></span></div><div style="background-color: white; color: #222222;"><span style="font-family: inherit;">As I've done in previous years I compare this to two benchmarks, 'Bench2' the SGA CTA index, and a 'Bench1' a fund run by AHL, my ex employers. My loss was worse than both; on a vol corrected basis bench1 made 5% (admittedly on the back of a loss last year), and bench2 only dropped 1.3%</span></div><p>It might be interesting to look at the performance of me versus those benchmarks since I started trading my own money:</p><p><span style="font-family: courier;"><span style="white-space: pre;"> </span> Me<span style="white-space: pre;"> </span>Bench1<span style="white-space: pre;"> </span>Bench2</span></p><p><span style="font-family: courier;">2014 – 2015<span style="white-space: pre;"> </span>58.2%<span style="white-space: pre;"> </span>70.2%<span style="white-space: pre;"> </span>50.7%</span></p><p><span style="font-family: courier;">2015 – 2016<span style="white-space: pre;"> </span>23.2%<span style="white-space: pre;"> </span>-8.7%<span style="white-space: pre;"> </span>-1.6%</span></p><p><span style="font-family: courier;">2016 – 2017<span style="white-space: pre;"> </span>-14.0%<span style="white-space: pre;"> </span>-6.2%<span style="white-space: pre;"> </span>-25.5%</span></p><p><span style="font-family: courier;">2017 – 2018<span style="white-space: pre;"> </span>-3.7%<span style="white-space: pre;"> </span>7.5%<span style="white-space: pre;"> </span>-4.4%</span></p><p><span style="font-family: courier;">2018 – 2019<span style="white-space: pre;"> </span>5.2%<span style="white-space: pre;"> </span>8.1%<span style="white-space: pre;"> </span>0.8%</span></p><p><span style="font-family: courier;">2019 – 2020<span style="white-space: pre;"> </span>39.7%<span style="white-space: pre;"> </span>22.6%<span style="white-space: pre;"> </span>9.3%</span></p><p><span style="font-family: courier;">2020 – 2021<span style="white-space: pre;"> </span>0.4%<span style="white-space: pre;"> </span>0.8%<span style="white-space: pre;"> </span>12.7%</span></p><p><span style="font-family: courier;">2021 – 2022<span style="white-space: pre;"> </span>27.0%<span style="white-space: pre;"> </span>-5.2%<span style="white-space: pre;"> </span>38.3%</span></p><p><span style="font-family: courier;">2022 - 2023<span style="white-space: pre;"> </span>-8.71%<span style="white-space: pre;"> </span>5.0%<span style="white-space: pre;"> </span>-1.30%</span></p><p><span style="font-family: courier;">Mean<span style="white-space: pre;"> </span> 14.1%<span style="white-space: pre;"> </span>10.4%<span style="white-space: pre;"> </span>8.8%</span></p><p><span style="font-family: courier;">Std dev<span style="white-space: pre;"> </span> 24.3%<span style="white-space: pre;"> </span>24.3%<span style="white-space: pre;"> </span>23.1%</span></p><p><span style="font-family: courier;">SR<span style="white-space: pre;"> </span> 0.58<span style="white-space: pre;"> </span>0.43<span style="white-space: pre;"> </span>0.38</span></p><p><span style="font-family: courier;">Geom mean<span style="white-space: pre;"> </span>11.9%<span style="white-space: pre;"> </span>8.5%<span style="white-space: pre;"> </span>6.7%</span></p><p><span style="white-space: pre;"><span style="font-family: courier;"> </span></span></p><p><span style="font-family: courier;">Correlation<span style="white-space: pre;"> </span>0.71<span style="white-space: pre;"> </span>0.80</span></p><p><span style="white-space: pre;"><span style="font-family: courier;"> </span></span></p><p><span style="font-family: courier;">alpha<span style="white-space: pre;"> </span> 6.7%<span style="white-space: pre;"> </span>6.8%</span></p><p><span style="font-family: courier;"></span></p><p><span style="font-family: courier;">beta<span style="white-space: pre;"> </span> 0.71<span style="white-space: pre;"> </span>0.84</span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjHLZUd5trrXwTq2JO7_1yb2Mu25YU15oHXdAptHwmQUMPpXxgTi03TwQOvIFnH8sP7BhMSxpPNKS4dlUfzAWcJ6jYPB37nS-6m7EGg4ihaiGCY0yIFismAqQ88joSiuNJWVoj1E6hK95SYI3WmoPNWb-WBlIQF_ZfTin0TiLUbaYLTMc2YpNs2YORG3g" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="425" data-original-width="756" height="360" src="https://blogger.googleusercontent.com/img/a/AVvXsEjHLZUd5trrXwTq2JO7_1yb2Mu25YU15oHXdAptHwmQUMPpXxgTi03TwQOvIFnH8sP7BhMSxpPNKS4dlUfzAWcJ6jYPB37nS-6m7EGg4ihaiGCY0yIFismAqQ88joSiuNJWVoj1E6hK95SYI3WmoPNWb-WBlIQF_ZfTin0TiLUbaYLTMc2YpNs2YORG3g=w640-h360" width="640" /></a></div><br /><div style="text-align: center;"><i>Monthly performance, returns vol normalised to 'me' in sample</i></div><p></p><p>Still looks pretty healthy. I seem to have been hurt less badly by the sell off that occured in March, possibly due to a lower trend following component (more discussion of that later).</p><p><br /></p><h2 style="text-align: left;">Market by market</h2><p>Here are the numbers by asset class</p><p> <span style="font-family: courier;">OilGas -3.19</span></p><p><span style="font-family: courier;"> Ags -2.78</span></p><p><span style="font-family: courier;"> FX -2.00</span></p><p><span style="font-family: courier;"> Equity -2.14</span></p><p><span style="font-family: courier;"> Sector -1.64</span></p><p><span style="font-family: courier;"> Metals -0.94</span></p><p><span style="font-family: courier;"> Vol 1.52</span></p><p><span style="font-family: courier;"> Bond 1.56</span></p><p>A big turnaround for energy and ags markets, the darlings of the 2021/22 accounting period. And here are some worst and best:</p><p><span style="font-family: courier; font-size: x-small;">0 GAS_US_mini -2.0</span></p><p><span style="font-family: courier; font-size: x-small;">1 SMI -1.7</span></p><p><span style="font-family: courier; font-size: x-small;">2 WHEAT -1.5</span></p><p><span style="font-family: courier; font-size: x-small;">3 AUD -1.4</span></p><p><span style="font-family: courier; font-size: x-small;">4 US10U -1.4</span></p><p><span style="font-family: courier; font-size: x-small;">5 EU-BASIC -1.2</span></p><p><span style="font-family: courier; font-size: x-small;">6 IRON -1.2</span></p><p><span style="font-family: courier; font-size: x-small;">7 CRUDE_W_mini -1.2</span></p><p><span style="font-family: courier; font-size: x-small;">8 SOYOIL -1.0</span></p><p><span style="font-family: courier; font-size: x-small;">9 GBPEUR -1.0</span></p><p><span style="font-family: courier; font-size: x-small;">....</span></p><p><span style="font-family: courier; font-size: x-small;">47 US20 1.0</span></p><p><span style="font-family: courier; font-size: x-small;">48 SOYMEAL 1.1</span></p><p><span style="font-family: courier; font-size: x-small;">49 VIX 1.4</span></p><p><span style="font-family: courier; font-size: x-small;">50 EUR 1.7</span></p><p><span style="font-family: courier; font-size: x-small;">51 JPY 2.0</span></p><p><span style="font-family: courier; font-size: x-small;">52 BUND 2.0</span></p><div><br /></div><div>Interesting that I had profits in 53 instruments last year; about half the number I was actually trading. Again this is the work of the dynamic optimiser; before that I was trading only ~30 markets and it's unlikely I would have positions in all of them during the year.</div><div><br /></div><h2 style="text-align: left;">Trading rules</h2><p>Presented initially without comment, a bunch of plots showing p&l for each trading rule group:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVTkvfbmNMHToAWZpknIQBRG6H8H_lAEwXHi98MNRslcNvBkUBqtOwdeYWj0YPRxrDniY6HMiC-EwwMH4P3n8YpmZCu1cN5JqA1SBiFm96Pcvmk4RFQ83a-Tj5HCJKT5bNZ5cKamhY-jlL-ifI1vM243heQKB0I5FFi8ryCnV_FjPj6C8KeVzTKNBU0Q/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVTkvfbmNMHToAWZpknIQBRG6H8H_lAEwXHi98MNRslcNvBkUBqtOwdeYWj0YPRxrDniY6HMiC-EwwMH4P3n8YpmZCu1cN5JqA1SBiFm96Pcvmk4RFQ83a-Tj5HCJKT5bNZ5cKamhY-jlL-ifI1vM243heQKB0I5FFi8ryCnV_FjPj6C8KeVzTKNBU0Q/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBVhCMUo6xcwtJv3wsJn9RF65ozGXBeyr7QMkiertKbwUE_9slSiI_AkS7lm73_BaHWjDp7ZivAV_aLwJOK9fJt_m-AkcwUi3g8pt1ClI9b4KI4h51MBYlvS1jvM8_ZoPwBp7bkctGkhYuk6p7ti_QnutUt_cw6K3u3VVEHh74YG_W7xvYgC-txUM_sA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBVhCMUo6xcwtJv3wsJn9RF65ozGXBeyr7QMkiertKbwUE_9slSiI_AkS7lm73_BaHWjDp7ZivAV_aLwJOK9fJt_m-AkcwUi3g8pt1ClI9b4KI4h51MBYlvS1jvM8_ZoPwBp7bkctGkhYuk6p7ti_QnutUt_cw6K3u3VVEHh74YG_W7xvYgC-txUM_sA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV0K2fpdzDXLCNzfaLKTfEttfsD_m4ivwM_1euopq3QTuTSMmn_AIIeBRjkUPj6Z9ShDeUp_kIHsye4T-8BajkCx91j73c7TWLZmvpva2uMnIYIAAPe48emMSmxWJSRiTtX1u24CkeHzJ7-qBwv95LVbPq8zhpHh8G5kFI5nK9uARBU94wCaL2j133Sg/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV0K2fpdzDXLCNzfaLKTfEttfsD_m4ivwM_1euopq3QTuTSMmn_AIIeBRjkUPj6Z9ShDeUp_kIHsye4T-8BajkCx91j73c7TWLZmvpva2uMnIYIAAPe48emMSmxWJSRiTtX1u24CkeHzJ7-qBwv95LVbPq8zhpHh8G5kFI5nK9uARBU94wCaL2j133Sg/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-bFwzCWwDSVkffB5XuKf8n05rzJOjgFdNWY5GJ7Tac_KBiZojjZxsspA96vhrwaiAl_r3iVKqbyHiZkfF_y8vonXAWRccdKVJxD5A4Gq8GYbipEYV72h1-i0FG3Dfkpwj5UkjBHJbbU42u1-wAuL7uZ_8ldtMvkdS4LWMZpsJaWPDI-kmqA3KvQnATg/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-bFwzCWwDSVkffB5XuKf8n05rzJOjgFdNWY5GJ7Tac_KBiZojjZxsspA96vhrwaiAl_r3iVKqbyHiZkfF_y8vonXAWRccdKVJxD5A4Gq8GYbipEYV72h1-i0FG3Dfkpwj5UkjBHJbbU42u1-wAuL7uZ_8ldtMvkdS4LWMZpsJaWPDI-kmqA3KvQnATg/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCl-nNlszSlsjBfrfpN9N90em9m9mAFz6oF2urZBKfSL5IBF2MD6mOjuUOFIOFcYnYZqZJWJ42EL7-GSdcWgriCqScfkdiQvjJRZS26sJL0ZGwhhd0Yaoyn6lEpXEDJ2VGqtAei_8LYw2CU2Pt6eSmYiO6VRnjVpa79OZf6_7bRQ3JjuQM564Pdf2MxQ/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCl-nNlszSlsjBfrfpN9N90em9m9mAFz6oF2urZBKfSL5IBF2MD6mOjuUOFIOFcYnYZqZJWJ42EL7-GSdcWgriCqScfkdiQvjJRZS26sJL0ZGwhhd0Yaoyn6lEpXEDJ2VGqtAei_8LYw2CU2Pt6eSmYiO6VRnjVpa79OZf6_7bRQ3JjuQM564Pdf2MxQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWEQR7mzSW1vft_wCEdv_rt21YzBPYOokb9eYx_Kwuj0sB-GqzCfpQaMIPx995WZ6EHBm97ee8ZtPlbkfNcAt3jGus5hMQ-DlBJ-WYhl7noi2s54ET1UZUtPDMk2XmjKoGQf5ynrJe6ki5Y2N61M9ejn4ZbM7fnm9_BPFIk9_Ja8-pHp2AYkogCzWEoA/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWEQR7mzSW1vft_wCEdv_rt21YzBPYOokb9eYx_Kwuj0sB-GqzCfpQaMIPx995WZ6EHBm97ee8ZtPlbkfNcAt3jGus5hMQ-DlBJ-WYhl7noi2s54ET1UZUtPDMk2XmjKoGQf5ynrJe6ki5Y2N61M9ejn4ZbM7fnm9_BPFIk9_Ja8-pHp2AYkogCzWEoA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKJWD5IwZCArU9-1ZoaEB4zv57bvDdGref_WVXi_5s9AVUp8RzuMX7o1p5_sRx76H-FLBD7avUfABv8XnhycAgbDxs7AaX71UZz0Tv2XhOv7YO-yu2c25K_Eq9X0QOUti0EIIobDRLLMHT9Grt4nvQQfUDNEdeVpUkjMV2wJ87xn_JlC8cmgspmMQKpA/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKJWD5IwZCArU9-1ZoaEB4zv57bvDdGref_WVXi_5s9AVUp8RzuMX7o1p5_sRx76H-FLBD7avUfABv8XnhycAgbDxs7AaX71UZz0Tv2XhOv7YO-yu2c25K_Eq9X0QOUti0EIIobDRLLMHT9Grt4nvQQfUDNEdeVpUkjMV2wJ87xn_JlC8cmgspmMQKpA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3rYRmSsSuokHNf_iucsVJ1riTCNv2wt0EeOJSl3bZaOsSxlFixcUafgXANBmN4C3_A1yZmKE4d1XzONB2G3_78bIBNhSP1d_d6mmJMa46q8boRRaXuIY80Oa0_zZQ3gVa9oa_fOfItB5OGIpYEx58lMuoxK1CTKtv8se9q54XwotL-Zk_7u5uozfz1g/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3rYRmSsSuokHNf_iucsVJ1riTCNv2wt0EeOJSl3bZaOsSxlFixcUafgXANBmN4C3_A1yZmKE4d1XzONB2G3_78bIBNhSP1d_d6mmJMa46q8boRRaXuIY80Oa0_zZQ3gVa9oa_fOfItB5OGIpYEx58lMuoxK1CTKtv8se9q54XwotL-Zk_7u5uozfz1g/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8G017VNiO6C8gD5S1fNCwDpozXyLyJExRkN92z1Ys5Z-3v3Slo0FXH2WVpHvwbZa6edCi55wvbd4Ij6IUiHwd02YKxG3EytTBPNHQFj_I0HRmBTTsGMIltP9GEv3i0_hpA1EPp_TUJ4B2YXairNiQND7xckM7TAa8Lxo8QXtENVQlwgetDbP0PrjJcQ/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8G017VNiO6C8gD5S1fNCwDpozXyLyJExRkN92z1Ys5Z-3v3Slo0FXH2WVpHvwbZa6edCi55wvbd4Ij6IUiHwd02YKxG3EytTBPNHQFj_I0HRmBTTsGMIltP9GEv3i0_hpA1EPp_TUJ4B2YXairNiQND7xckM7TAa8Lxo8QXtENVQlwgetDbP0PrjJcQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><p>The most obvious thing is how depressingly bad all of these graphs are. Pretty much every group of trading rules had a small net loss over the year. Even the diversifying carry and skew strategies weren't much help, although they did make money back in the sell off that caught out all the trend following style rules, narrowing my underperformance against the benchmark for the year. Only mean reversion (within asset classes - basically a value strategy), and relative carry were decently profitable. </p><p>It's this lack of signal diversification that brought me to my second worst loss when I started trading: -8.7%. Of course, most equity long only managers would murder half their family for that to be their second worst annual loss, so let's get some perspective here.</p><p><br /></p><h2 style="text-align: left;"><br /></h2><h2 style="text-align: left;">Live vs sim</h2><p>Now let's turn to see how well my live performance matches what my backtest thinks I got. The dynamic optimisation introduces some new jeopardy here, since it results in some path dependence; if the starting positions are different at the start of the time period it's more likely that things will diverge thereafter (I could deal with this by populating my actual starting positions into the backtest on the first of April, but that's a lot of hassle).</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMZT8dLpW3zQdtwBs6aVw1ni9rca8sUMGGiTsJUsqzUkolT_HaN3d5TGbAhRR2ddcGno7s-s2RU23tfm0EjbA9LXbWvlCvMAcNI29slKKh8PZAgS9dj9_R4f1pNnDXl3tWyBap5frF5vV2xdR-Uk5C2VhK1kc24eDs35mBGahJMnRZaNBOk2nGgjx0EQ/s1920/Figure_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMZT8dLpW3zQdtwBs6aVw1ni9rca8sUMGGiTsJUsqzUkolT_HaN3d5TGbAhRR2ddcGno7s-s2RU23tfm0EjbA9LXbWvlCvMAcNI29slKKh8PZAgS9dj9_R4f1pNnDXl3tWyBap5frF5vV2xdR-Uk5C2VhK1kc24eDs35mBGahJMnRZaNBOk2nGgjx0EQ/w640-h322/Figure_2.png" width="640" /></a></div><br /><p><br /></p><div class="separator" style="clear: both; text-align: center;"><br /></div>'dynamic' here is the backtest, 'live' is live.<div><br /></div><div>Well there are certiainly some differences here; you can see when I went on holiday, but interestingly we end up in exactly the same place. There are so many reasons why these will end up different, none of which I am that bothered about exploring.<br /><div><br /><p><br /></p><h2>Costs and slippage</h2><p>I already noted above that my commission came in at 21bp (basis points = 0.21%) of account value, but how about slippage?</p><p>The cost I would have paid had I crossed the spread every time I traded (market orders) would have been 91bp. However my execution algo by sometimes executing passively saved me 22bp, i.e. around a quarter of the total. So my net slippage was 69bp, for total costs of 90bp.</p><p>This is a lot less than last years 3% (due to a one off strategy change), and a little less than my backtest which comes in at around 1% a year. It looks like my new dynamic optimisation algo is doing it's thing.</p><p><br /></p><h2 style="text-align: left;">Dynamic vs static optimisation</h2><p>Finally let's compare the performance of what I currently trade (dynamic optimisation with over 100 instruments) versus what I was trading before (static optimisation with less than 30). I'm going to compare backtest vs backtest here - I no longer trade static optimisation with real money so there is no other way of doing it; and it seems fairest to compare like with like. Plus we've already seen the difference between the dynamic optimisation backtest and it's live production returns.</p><p>Naturally one year doesn't prove anything, and it's also true that the results of a static backtest can be unusually flattered by getting lucky with your choice of instruments (something I discuss at length in my <a href="https://www.systematicmoney.org/advanced-futures">new book</a>). </p><p><i>An important point here is that it's generally a good thing to store the code and config you use for past trading systems so you can do this exercise. It might also be worth noting down the hash number of the repo version you used with the code; firstly in case you fix bugs in the backtest that change the results (or introduce new bugs!) - although arguably if you run the same code with both backtests that is fairer; secondly in case you make changes that are backwardly incompatible and the old code just doesn't run.</i></p><p>First the long view (well since 2000, which is when my stored backtest begins):</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEN58sU61rOU-22jn9fRlAcd4WopGpxVzX8AoRB2EBnFyk7jbG7AhXoCSyP7ZHxZdDtRfrpVOCEddoK_Y5-yhl-snUtMbhzd_ESB1ie4pMjNb5Y_W1F2LC-MAvKWctx8E8KMI1WyWfivszb2ByX0uzG7PXwUkjhuI_mwfKJDJVZOZmUsrLLzosgTmPuQ/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEN58sU61rOU-22jn9fRlAcd4WopGpxVzX8AoRB2EBnFyk7jbG7AhXoCSyP7ZHxZdDtRfrpVOCEddoK_Y5-yhl-snUtMbhzd_ESB1ie4pMjNb5Y_W1F2LC-MAvKWctx8E8KMI1WyWfivszb2ByX0uzG7PXwUkjhuI_mwfKJDJVZOZmUsrLLzosgTmPuQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>Again this is a case of the static backtest getting lucky. What about last year:<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtPlOXLTDxgHcmL_nyn-b3nNaDdY0ilLwLqXO9tbK8kZKbesMq8jYDPp1JbTY098VjplYDcYB4Y5jQlBgNydDKh7BLvtBPNOT1hng2slEHp1zXmOqdbFG2zH5y01M8i8N5qfx6IdNeiAp8dAfkHYpcZIdyY11G1G82KbuzH-x5cOj2boaMHJD_BWGphg/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtPlOXLTDxgHcmL_nyn-b3nNaDdY0ilLwLqXO9tbK8kZKbesMq8jYDPp1JbTY098VjplYDcYB4Y5jQlBgNydDKh7BLvtBPNOT1hng2slEHp1zXmOqdbFG2zH5y01M8i8N5qfx6IdNeiAp8dAfkHYpcZIdyY11G1G82KbuzH-x5cOj2boaMHJD_BWGphg/w640-h322/Figure_1.png" width="640" /></a></div>There is a bit of dynamic outperformance, and it's certainly a smoother ride. <p><br /></p><h2 style="text-align: left;">What next</h2><p>I'm not as interested in some of these statistics as other people are; with the exception of costs, and as long as my live p&l is in the same ball park as my backtest. But hopefully your curiosity has been sated.</p><p>My short term plan is to add another bunch of instruments to my strategy, since I've added a bunch more to my database. Then I'm going to have a look at implementing <a href="https://www.systematicmoney.org/advanced-futures">some of the novel strategies in my book</a>, albeit with some fun twists.</p><p><br /></p><p> </p><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com2tag:blogger.com,1999:blog-261139923818144971.post-46438351327853807122023-04-28T13:14:00.000+01:002023-04-28T13:14:15.365+01:00Trading and investing performance: year nine, part one<p> A bit late this year, due to a confluence of holidays, <a href="https://www.systematicmoney.org/advanced-futures">book launches</a>, university exam writing and various other things. Here lies within my performance for the UK tax year 2022-23. Previous years can be found <a href="https://qoppac.blogspot.com/p/systematic-trading-start-here.html">here</a>. </p><p>TLDR: Not great, absolute or relative. It was indeed a complete <a href="https://en.wikipedia.org/wiki/Annus_horribilis">anus - horrible</a>!.</p><p>This will be a two parter this year. In this post I will look at my overall performance, with only a cursory look at my futures trading. In the second post I will focus on my futures trading.</p><p><br /></p><h2 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;">Overview </h2><p style="background-color: white; color: #222222;"><span style="font-family: inherit;">Investing:</span></p><p style="background-color: white; color: #222222;"></p><p style="background-color: white; color: #222222;"></p><ul style="background-color: white; color: #222222; line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">1 UK stocks</span></li><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">2 Various stock ETFs</span></li><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">3 Various bond ETFs</span></li><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">4 A small amount of uninvested cash</span></li></ul><div style="background-color: white; color: #222222;"><span style="font-family: inherit;">Trading:</span></div><div style="background-color: white; color: #222222;"><ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">5 Futures contracts traded by my fully automated trading strategy</span></li><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">6 Cash as trading capital for the above, of which usually around a third is required for initial margin</span></li></ul></div><p><span style="background-color: white; color: #222222;"><span style="font-family: inherit;">Excluded from this analysis is:</span></span></p><p style="background-color: white; color: #222222;"></p><p style="background-color: white; color: #222222;"></p><ul style="background-color: white; color: #222222; line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">My house</span></li><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">A cash buffer I keep to cover living expenses</span></li></ul><div style="background-color: white; color: #222222;"><span style="font-family: inherit;"><br /></span></div><div style="background-color: white; color: #222222;"><span style="font-family: inherit;">I benchmark my investments in the following way:</span></div><div style="background-color: white; color: #222222;"><span style="font-family: inherit;"><br /></span></div><p style="background-color: white; color: #222222;"></p><div style="background-color: white; color: #222222;"><ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">A: UK single stocks </span></li><ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">Benchmarked against ISF, a cheap FTSE 100 ETF (FTSE 350 is probably a better benchmark but these ETFs tend to be more expensive).</span></li></ul><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">B: Long only stocks investments: All stock ETFs and UK stocks</span></li><ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">Benchmarked against a cheap global equity fund (VEVE)</span></li></ul><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">C: Long only bond investments: All bond ETFs</span></li><ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">Benchmarked against a cheap global bond fund (AGGG)</span></li></ul><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">D: Long only investments: All UK stocks, bond ETFs and stock ETFs</span></li><ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">Benchmarked against a cheap 80:20 fund. </span></li></ul><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">E: Futures trading: Return from the futures contracts traded by my fully automated system. The denominator of performance here is the notional capital at risk in my account (usually less than the account value).</span></li><ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">Benchmarks are a similar fund run by my ex employers AHL, and the SG CTA index, adjusted for volatility.</span></li></ul><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">F: Everything: Long only investments, plus futures hedge, plus futures trading. I include the value of any cash included in my trading or investment accounts, since if I wasn't trading I could invest this. </span></li><ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="font-family: inherit;">For the benchmark I use a cheap 60:40 fund.</span></li></ul></ul></div><p style="background-color: white; color: #222222;"></p><div style="background-color: white; color: #222222;"><div><span style="font-family: inherit;"><br /></span></div><div><span style="font-family: inherit;">If you prefer maths, then the relationship to the first set of categories is:</span></div><div><span style="font-family: inherit;"><br /></span></div><div><span style="font-family: inherit;">A = 1</span></div><div><span style="font-family: inherit;">B = 1 + 2 </span></div><div><span style="font-family: inherit;">C = 3</span></div><div><span style="font-family: inherit;">D = B + C = 1 + 2 + 3</span></div><div><span style="font-family: inherit;">E = 5 + 6</span></div><div><span style="font-family: inherit;">F = D + 4 + E = 1 + 2 + 3 + 4 +5 + 6</span></div><div><span style="font-family: inherit;"><br /></span></div></div><div style="background-color: white; color: #222222;"><br /></div><h3 style="background-color: white; color: #222222; text-align: left;">Performance contribution</h3><div style="background-color: white; color: #222222;"><br /></div><div style="background-color: white;"><div><span style="color: #222222;">The figures shown are the contribution of each category to my total investment performance:</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">1) UK equities -1.7%</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">2) Stock ETFs -1.8%</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">3) Long only bonds 0.12%</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">5 & 6) Futures trading -1.3%</span></div><div><span style="color: #222222;"><br /></span></div><div><br /></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">F) Total -4.7%</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">Here is another way of putting it:</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">Long only MTM (mark to market): -7.9%</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">Stock and ETF dividends, less fees: 4.6%</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">Futures: -1.3%</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">Now for the same figures as 'internal rates of return', which are effectively for the 'capital' employed in each area. I use the Excel function XIRR. You can't add these up, but they are comparable and account for flows between categories. Benchmarks are also shown.</span></div><div><br /></div><div><span style="color: red;"><br /></span></div><div><span>A) UK equities -7.0% Benchmark +4.3%</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">B) Long only stocks -4.7% Benchmark -2.4%</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">C) Long only bonds +1.34% Benchmark -1.10%</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">D) Long only investments -4.1% Benchmark -2.1%</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">E) Systematic futures trading -8.7% Benchmarks +5.0% -1.3% (vol matched)</span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;"><b>F) Everything -4.7% Benchmark -1.9%</b></span></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;">Well, that's a pretty dark picture. We know that 2022 wasn't great for 60:40 (my benchmark for 'everything') but things picked up in early 2023. Indeed my only outperformance came in long only bonds; maybe I should become a long only fixed income manager? (Wait, what?)</span></div><div><br /></div><div><span style="color: #222222;"><br /></span></div><div><span style="color: #222222;"><h3 style="text-align: left;">UK equities</h3><div>This portfolio is traded using a system which I've explained before (value bias, with trailing stop of 30%), but which is not automated. Instead I have the stocks set up in a spreadsheet, with alerts reminding me when stop losses occur. If I sell then I download some data to pick the best value share.</div><div><br /></div><div><br /></div><div>Current portfolio:</div><div><br /></div><div><div><span style="font-family: courier;">Vistry Group <span style="white-space: pre;"> <span> </span><span> </span><span> </span><span> </span></span>9.67%</span></div><div><span style="font-family: courier;">Centrica PLC <span style="white-space: pre;"> <span> </span><span> </span><span> </span><span> </span></span>7.93%</span></div><div><span style="font-family: courier;">3i Group <span style="white-space: pre;"> <span> </span><span> </span><span> </span><span> </span></span>7.23%</span></div><div><span style="font-family: courier;">Jupiter Fund Management<span style="white-space: pre;"> <span> </span><span> </span></span>6.52%</span></div><div><span style="font-family: courier;">Barratt Developments<span style="white-space: pre;"> <span> </span><span> </span></span>5.77%</span></div><div><span style="font-family: courier;">Bluefield Solar Income Fund <span style="white-space: pre;"> </span>5.21%</span></div><div><span style="font-family: courier;">Sequoia Economic Infrastructure<span style="white-space: pre;"> </span>5.02%</span></div><div><span style="font-family: courier;">NextEnergy Solar<span style="white-space: pre;"> <span> </span><span> </span></span>4.98%</span></div><div><span style="font-family: courier;">GCP Infrastructure Investment<span style="white-space: pre;"> </span>4.82%</span></div><div><span style="font-family: courier;">HICL Infrastructure<span style="white-space: pre;"> <span> </span><span> </span></span>4.60%</span></div><div><span style="font-family: courier;">OSB Group<span style="white-space: pre;"> <span> </span><span> </span><span> </span><span> </span></span>4.41%</span></div><div><span style="font-family: courier;">Castings<span style="white-space: pre;"> <span> </span><span> </span><span> </span><span> </span></span>4.39%</span></div><div><span style="font-family: courier;">Renewables Infrastructure <span style="white-space: pre;"> </span>4.30%</span></div><div><span style="font-family: courier;">Lloyds Banking Group <span style="white-space: pre;"> <span> </span><span> </span></span>4.26%</span></div><div><span style="font-family: courier;">Legal & General Group<span style="white-space: pre;"> <span> </span><span> </span></span>4.23%</span></div><div><span style="font-family: courier;">Phoenix Group <span style="white-space: pre;"> <span> </span><span> </span><span> </span><span> </span></span>3.46%</span></div><div><span style="font-family: courier;">Johnson Matthey <span style="white-space: pre;"> <span> </span><span> </span></span>3.46%</span></div><div><span style="font-family: courier;">Aviva PLC <span style="white-space: pre;"> <span> </span><span> </span><span> </span><span> </span></span>3.45%</span></div><div><span style="font-family: courier;">Persimmon PLC <span style="white-space: pre;"> <span> </span><span> </span><span> </span><span> </span></span>3.41%</span></div><div><span style="font-family: courier;">Greencoat UK Wind <span style="white-space: pre;"> <span> </span><span> </span></span>2.89%</span></div></div><div><br /></div><div><br /></div><div>Here is the performance of every share I held over the year. Percentages are taken from the start of year price, or from when I bought it during the year:</div><div><br /></div><div><br /></div><div><div><span style="font-family: courier;">Name<span style="white-space: pre;"> <span> </span><span> </span></span>MTM %<span style="white-space: pre;"> </span>Divi %<span style="white-space: pre;"> </span>TR %<span style="white-space: pre;"> </span></span></div><div><span style="font-family: courier;">3i Group Ord (L<span style="white-space: pre;"> </span>54.1%<span style="white-space: pre;"> </span>2.1%<span style="white-space: pre;"> </span>56.3%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Centrica PLC (L<span style="white-space: pre;"> </span>39.5%<span style="white-space: pre;"> </span>1.3%<span style="white-space: pre;"> </span>40.7%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Castings PLC (L<span style="white-space: pre;"> </span>16.9%<span style="white-space: pre;"> </span>10.6%<span style="white-space: pre;"> </span>27.5%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Central Asia Me<span style="white-space: pre;"> </span>17.2%<span style="white-space: pre;"> </span>9.1%<span style="white-space: pre;"> </span>26.3%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Imperial Brands<span style="white-space: pre;"> </span>17.9%<span style="white-space: pre;"> </span>5.5%<span style="white-space: pre;"> </span>23.5%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Centamin PLC (L<span style="white-space: pre;"> </span>14.9%<span style="white-space: pre;"> </span>6.7%<span style="white-space: pre;"> </span>21.6%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Barratt Develop<span style="white-space: pre;"> </span>10.1%<span style="white-space: pre;"> </span>2.1%<span style="white-space: pre;"> </span>12.3%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Vistry Group PL<span style="white-space: pre;"> </span>8.6%<span style="white-space: pre;"> </span>3.3%<span style="white-space: pre;"> </span>11.9%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Jupiter Fund Ma<span style="white-space: pre;"> </span>7.7%<span style="white-space: pre;"> </span>4.1%<span style="white-space: pre;"> </span>11.8%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Lloyds Banking <span style="white-space: pre;"> </span>6.0%<span style="white-space: pre;"> </span>4.6%<span style="white-space: pre;"> </span>10.6%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Greencoat UK Wi<span style="white-space: pre;"> </span>3.7%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>3.7%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Johnson Matthey<span style="white-space: pre;"> </span>-0.4%<span style="white-space: pre;"> </span>4.0%<span style="white-space: pre;"> </span>3.6%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Rathbones Group<span style="white-space: pre;"> </span>1.6%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>1.6%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Aviva PLC (LSE:<span style="white-space: pre;"> </span>-27.9%<span style="white-space: pre;"> </span>28.3%<span style="white-space: pre;"> </span>0.3%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Renewables Infr<span style="white-space: pre;"> </span>-5.4%<span style="white-space: pre;"> </span>5.0%<span style="white-space: pre;"> </span>-0.4%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">HICL Infrastruc<span style="white-space: pre;"> </span>-3.3%<span style="white-space: pre;"> </span>2.6%<span style="white-space: pre;"> </span>-0.7%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">NextEnergy Sola<span style="white-space: pre;"> </span>-4.0%<span style="white-space: pre;"> </span>3.2%<span style="white-space: pre;"> </span>-0.8%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Bluefield Solar<span style="white-space: pre;"> </span>-1.7%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-1.7%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Legal & General<span style="white-space: pre;"> </span>-4.6%<span style="white-space: pre;"> </span>2.1%<span style="white-space: pre;"> </span>-2.4%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Phoenix Group H<span style="white-space: pre;"> </span>-11.3%<span style="white-space: pre;"> </span>7.9%<span style="white-space: pre;"> </span>-3.4%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Tullow<span style="white-space: pre;"> <span> </span><span> </span></span>-4.4%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-4.4%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Greencore Group<span style="white-space: pre;"> </span>-4.6%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-4.6%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Sequoia Economi<span style="white-space: pre;"> </span>-5.2%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-5.2%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Babcock Interna<span style="white-space: pre;"> </span>-5.8%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-5.8%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">GCP Infrastruct<span style="white-space: pre;"> </span>-9.1%<span style="white-space: pre;"> </span>2.6%<span style="white-space: pre;"> </span>-6.5%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Morgan Advanced<span style="white-space: pre;"> </span>-9.6%<span style="white-space: pre;"> </span>1.9%<span style="white-space: pre;"> </span>-7.7%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Hammerson PLC (<span style="white-space: pre;"> </span>-12.2%<span style="white-space: pre;"> </span>0.6%<span style="white-space: pre;"> </span>-11.6%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Persimmon PLC (<span style="white-space: pre;"> </span>-13.9%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-13.9%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Currys<span style="white-space: pre;"> <span> </span><span> </span></span>-18.2%<span style="white-space: pre;"> </span>3.1%<span style="white-space: pre;"> </span>-15.1%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">OSB Group PLC (<span style="white-space: pre;"> </span>-17.2%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-17.2%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Morgan Sindall <span style="white-space: pre;"> </span>-23.5%<span style="white-space: pre;"> </span>2.6%<span style="white-space: pre;"> </span>-20.9%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">TP ICAP GROUP P<span style="white-space: pre;"> </span>-25.5%<span style="white-space: pre;"> </span>3.7%<span style="white-space: pre;"> </span>-21.7%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Investec PLC (L<span style="white-space: pre;"> </span>-26.7%<span style="white-space: pre;"> </span>2.8%<span style="white-space: pre;"> </span>-23.9%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Direct Line Ins<span style="white-space: pre;"> </span>-31.2%<span style="white-space: pre;"> </span>5.5%<span style="white-space: pre;"> </span>-25.7%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Aberdeen<span style="white-space: pre;"> </span>-31.9%<span style="white-space: pre;"> </span>3.6%<span style="white-space: pre;"> </span>-28.3%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Redde Northgate<span style="white-space: pre;"> </span>-31.9%<span style="white-space: pre;"> </span>3.5%<span style="white-space: pre;"> </span>-28.4%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">BT Group PLC (L<span style="white-space: pre;"> </span>-33.8%<span style="white-space: pre;"> </span>2.9%<span style="white-space: pre;"> </span>-30.9%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></div><div><span style="font-family: courier;">Taylor Woodrow<span style="white-space: pre;"> </span>-33.2%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-33.2%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>BOUGHT</span></div><div><span style="font-family: courier;">Synthomer<span style="white-space: pre;"> </span>-54.2%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-54.2%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>BOUGHT</span></div></div><div><br /></div><div><br /></div><div><br /></div><div>Note I generally use a 30% stop, but because the stops aren't placed I sometimes get gapped through (badly in the case of the final share). </div><div><br /></div><div><div>MTM is mark to market (the % price change since I bought it, or the start of the year), Divi(dend)% is self explanatory, TR is total return - the sum of the first two columns. The next column describes the current state of this position: do I still HOLD or have I SOLD. The final column shows when I obtained the position: at the start of the year (LEGACY) or it's something I subsequently BOUGHT.</div><div><br /></div></div><div>Turnover was 167%, eg holding period just over 7 months. This is slightly down from last year. Average dividend was 6.2%. My XIRR was <b>-7.0%</b>; you might think that sounds okay given all the bad things you've heard about stocks, but actually the UK was a standour market in the general horror of the last 12 months and my benchmark (FTSE 100 ETF) earned 4.7%.</div><div><br /></div><div><div><span style="font-family: courier;"><span style="white-space: pre;"> </span> XIRR<span style="white-space: pre;"> </span>bench</span></div><div><span style="font-family: courier;">2016 – 2017<span style="white-space: pre;"> </span>29.2%<span style="white-space: pre;"> </span>25.1%</span></div><div><span style="font-family: courier;">2017 – 2018<span style="white-space: pre;"> </span>18.3%<span style="white-space: pre;"> </span>2.2%</span></div><div><span style="font-family: courier;">2018 – 2019<span style="white-space: pre;"> </span>-2.3%<span style="white-space: pre;"> </span>7.9%</span></div><div><span style="font-family: courier;">2019 – 2020<span style="white-space: pre;"> </span>-23.1%<span style="white-space: pre;"> </span>-24.2%</span></div><div><span style="font-family: courier;">2020 – 2021<span style="white-space: pre;"> </span>64.3%<span style="white-space: pre;"> </span>29.0%</span></div><div><span style="font-family: courier;">2021 – 2022<span style="white-space: pre;"> </span>9.8%<span style="white-space: pre;"> </span>16.5%</span></div><div><span style="font-family: courier;">2022 – 2023<span style="white-space: pre;"> </span>-7.0%<span style="white-space: pre;"> </span>4.3%</span></div><div><span style="white-space: pre;"><span style="font-family: courier;"> </span></span></div><div><span style="font-family: courier;">Mean<span style="white-space: pre;"> </span> 12.74%<span style="white-space: pre;"> </span>8.68%</span></div><div><span style="font-family: courier;">Stdev<span style="white-space: pre;"> <span> </span><span> </span></span>0.28<span style="white-space: pre;"> </span>0.18</span></div><div><span style="font-family: courier;">SR<span style="white-space: pre;"> <span> </span><span> </span></span>0.45<span style="white-space: pre;"> </span>0.49</span></div><div><span style="font-family: courier;">Geo. Mean<span style="white-space: pre;"> </span>9.8%<span style="white-space: pre;"> </span>7.3%</span></div><div><span style="white-space: pre;"><span style="font-family: courier;"> </span></span></div><div><span style="font-family: courier;">Alpha<span style="white-space: pre;"> </span>1.1%<span style="white-space: pre;"> </span></span></div><div><span style="font-family: courier;">Beta<span style="white-space: pre;"> </span>1.34<span style="white-space: pre;"> </span></span></div><div><span style="font-family: courier;">Corr<span style="white-space: pre;"> </span>0.84<span style="white-space: pre;"> </span></span></div></div><div><br /></div><div><br /></div><div>So this has been my worst year in relative, and secondly only to COVID in absolute terms. After two straight years of underperformance, the benchmark is now a little ahead on SR, but I'm still winning on geometric mean.</div><div><br /></div><div><br /></div><div><br /></div><div><h2 style="font-size: 22px; margin: 0px; position: relative;">Long only Stocks</h2><p>As already noted this is consists of all my stock ETFs, plus my UK shares. With the recovery of value being one of the stories of last year, and the US/RoW spread narrowing with my permanent underweight to the overvalued US I had hoped for good things here. Some hope!</p><p>Here are the risk exposures by region within this sub-portfolio:</p><p><span style="font-family: courier;"> Start of year End Long term Target</span></p><p><span style="font-family: courier;">Asia 14% 17% 15% 18%</span></p><p><span style="font-family: courier;">EM 20% 26% 25% 23%</span></p><p><span style="font-family: courier;">Europe 17% 18% 20% 14%</span></p><p><span style="font-family: courier;">UK 29% 31% 25% 32%</span></p><p><span style="font-family: courier;">US 20% 8% 15% 13%</span></p><p><br /></p><p><i>Start</i> <i>of year </i>and <i>End</i> are self explanatory, whilst <i>Long term </i>is the strategic allocation (see my spreadsheet). After I have snapshotted the year I rebalance the portfolio to the <i>target </i>level shown, taking account of tax and transfers between accounts. </p><p>The rather wild differences between end of year and target are because <a href="https://qoppac.blogspot.com/2023/02/esg-extremely-serious-goalpost-moving.html">I'm partially through switching m portfolio to ESG ETFs.</a> This also meant that turnover was much higher than normal, but this will be a temporary situation.</p><p>The XIRR for my stocks was <b>-4.7%,</b> which isn't great the benchmark ETF I've chosen (IWRD) was only down -2.4% TR. Dividends were much healthier at <b>5.2%</b>.</p><p>No stats as I only started breaking out performance like this last year, but you can see I'm underperforming for the second year in a row:</p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">2021 - 2022 XIRR +6.1%, benchmark +14.5%</span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">2022 - 2023 XIRR -4.7%, benchmark -2.4%</span></p><p>Benchmarking note: If you check back you may see slightly different numbers for the benchmarks. This is because I was using a mixture of random ETFs for stocks/bonds, and Vanguard preblended 60:40 and 80:20. This meant there was no consistency; eg the 60:40 fund actually did worse than a 60/40 blend of my stock and bond benchmarks. I was also unsure about some of the historic marks for my benchmarks, as some of them weren't done very precisely. So I repopulated my benchmark history with total return history in GBP terms, ex fees for:</p><p></p><ul style="text-align: left;"><li>Bonds SUAG (US dollar only) until April 2018, then AGGG (all currencies, but not available until late 2017)</li><li>Equities IWRD </li><li>60:40 benchmark - a 60/40 blend of the above; so effectively annually rebalanced</li><li>80:20 benchmark - an 80/20 blend of the above</li></ul><p></p><p>My FTSE 100 ISF benchmark for UK equities is unchanged.</p><p>As with what I did last year, if anything this makes my performance look a little worse on a relative basis so I think my hands are clean.</p><p><br /></p><h2 style="font-size: 22px; margin: 0px; position: relative;">Long only Bonds</h2><p>This is just ETFs. Here are the risk exposures:</p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;"> Start of year End Long term Target</span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Asia 3% 5% 4% 2%</span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">EM 40% 41% 24% 34%</span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Europe 35% 39% 24% 19%</span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">UK 8% 2% 24% 25%</span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">US 13% 13% 24% 22%</span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;"><br /></span></p><p><span style="font-family: inherit;">Last year I started treating my 'cash like' bond ETFs as cash, and I stick to that here. These are held in my IB trading account to make more efficient use of my margin; more below.</span></p><p>Again, there are some big deltas here due to my rebalancing into ESG which I couldn't complete in the tax year without incurring.... tax. Note that the tax allowance for capital gains in the UK is now just £2k, so this might take a while longer!</p><p><span style="font-family: inherit;">I was a big buyer of bonds during the year, more than doubling my allocation. This is because the strongly negative relative momentum in bonds abated, and I tilted back to something closer to my strategic allocation.</span></p><p><span style="font-family: inherit;">This also means the XIRR figures might be a bit weird, but what the hell, I made <b>1.34% </b>versus the index (AGGG) losing 1.1%. My only green figure relative and absolute for the year, and I will take it. </span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">2021 - 2022 XIRR +1.53%, benchmark -2.97%</span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">2022 - 2023 XIRR +1.34%, benchmark -1.10%</span></p><p>Based on two years of performance, I am the bond king now - sorry <a href="https://en.wikipedia.org/wiki/Bill_H._Gross">Bill</a></p><p><br /></p><h2 style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;">Long only investments</h2><div style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></div><div><span style="font-family: inherit;"><br /></span></div><div><span style="font-family: inherit;">All of the above, in one easy to find place. You already know what is currently in this portfolio, and the regional risk exposures, so that just leaves the macro asset class level exposure. Here it is in <i>cash </i>terms:</span></div><div style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></div><div style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><p><span style="font-family: courier;"> Start of year End Long term Target</span></p><p><span style="font-family: courier;">Bonds 5% 10% 22% 12%</span></p><p><span style="font-family: courier;">Stock 95% 90% <span> </span> 78% 88%</span></p><p><br /></p></div><div><span style="font-family: inherit;">And here's <i>risk </i>terms:</span></div><div style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></div><div><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;"> Start of year End Long term Target</span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Bonds 3% 6% 10% 7%</span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Stock 97% 94% 90% 93%</span></p><p style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></p><p>Given I did badly in stocks, and I mostly own stocks at a higher level than the 80:20 benchmark I use as of last year, it's no surprise that my XIRR here of <b>-4.1% </b>was below par compared to the benchmark of -2.1%.</p><p><span style="font-family: courier; font-size: x-small;"><span style="white-space: pre;"> <span> </span><span> </span></span>XIRR<span style="white-space: pre;"> </span>bench</span></p><p><span style="font-family: courier; font-size: x-small;">2015 – 2016<span style="white-space: pre;"> </span>6.1%<span style="white-space: pre;"> </span>0.4%</span></p><p><span style="font-family: courier; font-size: x-small;">2016 – 2017<span style="white-space: pre;"> </span>22.3%<span style="white-space: pre;"> </span>28.4%</span></p><p><span style="font-family: courier; font-size: x-small;">2017 – 2018<span style="white-space: pre;"> </span>1.3%<span style="white-space: pre;"> </span>-0.5%</span></p><p><span style="font-family: courier; font-size: x-small;">2018 – 2019<span style="white-space: pre;"> </span>4.0%<span style="white-space: pre;"> </span>11.7%</span></p><p><span style="font-family: courier; font-size: x-small;">2019 – 2020<span style="white-space: pre;"> </span>-17.5%<span style="white-space: pre;"> </span>-6.4%</span></p><p><span style="font-family: courier; font-size: x-small;">2020 – 2021<span style="white-space: pre;"> </span>34.8%<span style="white-space: pre;"> </span>33.4%</span></p><p><span style="font-family: courier; font-size: x-small;">2021 – 2022<span style="white-space: pre;"> </span>5.9%<span style="white-space: pre;"> </span>11.0%</span></p><p><span style="font-family: courier; font-size: x-small;">2022 – 2023<span style="white-space: pre;"> </span>-4.11%<span style="white-space: pre;"> </span>-2.1%</span></p><p><span style="white-space: pre;"><span style="font-family: courier; font-size: x-small;"> </span></span></p><p><span style="font-family: courier; font-size: x-small;">Mean<span style="white-space: pre;"> <span> </span><span> </span></span>6.60%<span style="white-space: pre;"> </span>9.48%</span></p><p><span style="font-family: courier; font-size: x-small;">Stdev<span style="white-space: pre;"> <span> </span><span> </span></span>15.9%<span style="white-space: pre;"> </span>14.7%</span></p><p><span style="font-family: courier; font-size: x-small;">SR<span style="white-space: pre;"> <span> </span><span> </span></span>0.41<span style="white-space: pre;"> </span>0.65</span></p><p><span style="font-family: courier; font-size: x-small;">Geo. Mean<span> </span><span> </span>5.6%<span style="white-space: pre;"> </span>8.7%</span></p><p><span style="font-family: courier; font-size: x-small;">Alpha<span style="white-space: pre;"> <span> </span><span> </span></span>-3.0%<span style="white-space: pre;"> </span></span></p><p><span style="font-family: courier; font-size: x-small;">Beta<span style="white-space: pre;"> <span> </span><span> </span></span>1.02<span style="white-space: pre;"> </span></span></p><p><span style="font-family: courier; font-size: x-small;">Corr<span style="white-space: pre;"> <span> </span><span> </span></span>0.93<span style="white-space: pre;"> </span></span></p><div><span style="font-size: x-small;"><br /></span></div><div style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><div><div><br /></div></div></div><div><h2 style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;">Futures trading (brief)</h2><div style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></div></div><div>As I noted at the start of the post, I'll just put a very cursory look at my futures trading in here, with a subsequent follow up post to look at more details. All figures are as a % of my notional capital, which will usually be more than I have in my account. </div><div><br /></div><div><div style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">MTM: -9.7%</span></div><div style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><div><span style="font-family: courier;">Interest: 1.3%</span></div><div><span style="font-family: courier;">Fees: -0.06%</span></div><div><span style="font-family: courier;">Commissions: -0.21%</span></div><div><br /></div><div><span style="font-family: courier;">Net futures trading: -8.7%</span></div></div></div><div><br /></div><div>'Interest' includes dividends on 'cash like' short bond ETFs I hold to make a slightly more efficient use of my cash; I've recently (in this financial year) added a bit more to this sub portfolio. It's quite interesting how interest has gone from being irrelevant to actually adding something to performance.</div><div><br /></div><div>As I've done in previous years I compare this to two benchmarks, 'Bench2' the SGA CTA index, and a 'Bench1' a fund run by AHL, my ex employers. My loss was worse than both; on a vol corrected basis bench1 made 5% (admittedly on the back of a loss last year), and bench2 only dropped 1.3%</div><div><div><br /></div><div><div><span style="font-family: courier; font-size: x-small;"><span style="white-space: pre;"> </span> Me<span style="white-space: pre;"> </span>Bench1<span style="white-space: pre;"> </span>Bench2</span></div><div><span style="font-family: courier; font-size: x-small;">2014 – 2015<span style="white-space: pre;"> </span>58.2%<span style="white-space: pre;"> </span>70.2%<span style="white-space: pre;"> </span>50.7%</span></div><div><span style="font-family: courier; font-size: x-small;">2015 – 2016<span style="white-space: pre;"> </span>23.2%<span style="white-space: pre;"> </span>-8.7%<span style="white-space: pre;"> </span>-1.6%</span></div><div><span style="font-family: courier; font-size: x-small;">2016 – 2017<span style="white-space: pre;"> </span>-14.0%<span style="white-space: pre;"> </span>-6.2%<span style="white-space: pre;"> </span>-25.5%</span></div><div><span style="font-family: courier; font-size: x-small;">2017 – 2018<span style="white-space: pre;"> </span>-3.7%<span style="white-space: pre;"> </span>7.5%<span style="white-space: pre;"> </span>-4.4%</span></div><div><span style="font-family: courier; font-size: x-small;">2018 – 2019<span style="white-space: pre;"> </span>5.2%<span style="white-space: pre;"> </span>8.1%<span style="white-space: pre;"> </span>0.8%</span></div><div><span style="font-family: courier; font-size: x-small;">2019 – 2020<span style="white-space: pre;"> </span>39.7%<span style="white-space: pre;"> </span>22.6%<span style="white-space: pre;"> </span>9.3%</span></div><div><span style="font-family: courier; font-size: x-small;">2020 – 2021<span style="white-space: pre;"> </span>0.4%<span style="white-space: pre;"> </span>0.8%<span style="white-space: pre;"> </span>12.7%</span></div><div><span style="font-family: courier; font-size: x-small;">2021 – 2022<span style="white-space: pre;"> </span>27.0%<span style="white-space: pre;"> </span>-5.2%<span style="white-space: pre;"> </span>38.3%</span></div><div><span style="font-family: courier; font-size: x-small;">2022 - 2023<span style="white-space: pre;"> </span>-8.71%<span style="white-space: pre;"> </span>5.0%<span style="white-space: pre;"> </span>-1.30%</span></div><div><span style="white-space: pre;"><span style="font-family: courier; font-size: x-small;"> </span></span></div><div><span style="white-space: pre;"><span style="font-family: courier; font-size: x-small;"> </span></span></div><div><span style="font-family: courier; font-size: x-small;">Mean<span style="white-space: pre;"> <span> </span><span> </span></span>14.1%<span style="white-space: pre;"> </span>10.4%<span style="white-space: pre;"> </span>8.8%</span></div><div><span style="font-family: courier; font-size: x-small;">Std dev<span style="white-space: pre;"> <span> </span><span> </span></span>24.3%<span style="white-space: pre;"> </span>24.3%<span style="white-space: pre;"> </span>23.1%</span></div><div><span style="font-family: courier; font-size: x-small;">SR<span style="white-space: pre;"> <span> </span><span> </span></span>0.58<span style="white-space: pre;"> </span>0.43<span style="white-space: pre;"> </span>0.38</span></div><div><span style="font-family: courier; font-size: x-small;">Geom mean<span style="white-space: pre;"> </span>11.9%<span style="white-space: pre;"> </span>8.5%<span style="white-space: pre;"> </span>6.7%</span></div><div><span style="white-space: pre;"><span style="font-family: courier; font-size: x-small;"> </span></span></div><div><span style="font-family: courier; font-size: x-small;">Correlation<span style="white-space: pre;"> </span>0.71<span style="white-space: pre;"> </span>0.80</span></div><div><span style="white-space: pre;"><span style="font-family: courier; font-size: x-small;"> </span></span></div><div><span style="font-family: courier; font-size: x-small;">alpha<span style="white-space: pre;"> <span> </span><span> </span></span>6.7%<span style="white-space: pre;"> </span>6.8%</span></div><div><span style="font-family: courier; font-size: x-small;">beta<span style="white-space: pre;"> <span> </span><span> </span></span>0.71<span style="white-space: pre;"> </span>0.84</span></div></div><div><br /></div><div><br /></div><div>So on a longer term basis, I'm still doing well here. The relatively low correlation with AHL is kind of interesting as well. </div><div><br /></div><div><br /></div></div><div><h3 style="text-align: left;">Everything</h3><div><br /></div><div>Let's see what the final score is. The denominator here will be the total value of all the securities and investable cash I have, including both cash for futures margin and any temporarily univested cash in other accounts. I do exclude some cash I hold as a buffer, since that can't be invested. </div><div><br /></div><div>The bottom line is a loss of 4.7% vs the 60:40 benchmark down just 1.9%. Dividends were 4.6%; without those there would obviously have been a near double digit loss. Here's the history:</div><div><br /></div><div><div><div><span style="font-family: courier; font-size: x-small;"><span style="white-space: pre;"> <span> </span><span> </span></span>XIRR<span style="white-space: pre;"> </span>bench</span></div><div><span style="font-family: courier; font-size: x-small;">2014 – 2015<span style="white-space: pre;"> </span>14.40%<span style="white-space: pre;"> </span>2.0%</span></div><div><span style="font-family: courier; font-size: x-small;">2016 – 2017<span style="white-space: pre;"> </span>18.20%<span style="white-space: pre;"> </span>24.8%</span></div><div><span style="font-family: courier; font-size: x-small;">2017 – 2018<span style="white-space: pre;"> </span>0.60%<span style="white-space: pre;"> </span>-3.0%</span></div><div><span style="font-family: courier; font-size: x-small;">2018 – 2019<span style="white-space: pre;"> </span>4.40%<span style="white-space: pre;"> </span>10.4%</span></div><div><span style="font-family: courier; font-size: x-small;">2019 – 2020<span style="white-space: pre;"> </span>-6.60%<span style="white-space: pre;"> </span>-2.3%</span></div><div><span style="font-family: courier; font-size: x-small;">2020 – 2021<span style="white-space: pre;"> </span>27.90%<span style="white-space: pre;"> </span>23.4%</span></div><div><span style="font-family: courier; font-size: x-small;">2021 – 2022<span style="white-space: pre;"> </span>8.25%<span style="white-space: pre;"> </span>7.5%</span></div><div><span style="font-family: courier; font-size: x-small;">2022 – 2023<span style="white-space: pre;"> </span>-4.66%<span style="white-space: pre;"> </span>-1.9%</span></div><div><span style="white-space: pre;"><span style="font-family: courier; font-size: x-small;"> </span></span></div><div><span style="font-family: courier; font-size: x-small;">Mean<span style="white-space: pre;"> <span> </span><span> </span></span>7.81%<span style="white-space: pre;"> </span>7.61%</span></div><div><span style="font-family: courier; font-size: x-small;">Stdev<span style="white-space: pre;"> <span> </span><span> </span></span>11.8%<span style="white-space: pre;"> </span>11.2%</span></div><div><span style="font-family: courier; font-size: x-small;">SR<span style="white-space: pre;"> <span> </span><span> </span></span>0.66<span style="white-space: pre;"> </span>0.68</span></div><div><span style="font-family: courier; font-size: x-small;">Geo. Mean<span style="white-space: pre;"> </span>6.8%<span style="white-space: pre;"> </span>7.1%</span></div><div><span style="white-space: pre;"><span style="font-family: courier; font-size: x-small;"> </span></span></div><div><span style="font-family: courier; font-size: x-small;">Alpha<span style="white-space: pre;"> </span>1.1%<span style="white-space: pre;"> </span></span></div><div><span style="font-family: courier; font-size: x-small;">Beta<span style="white-space: pre;"> </span>0.89<span style="white-space: pre;"> </span></span></div><div><span style="font-family: courier; font-size: x-small;">Corr<span style="white-space: pre;"> </span>0.93<span style="white-space: pre;"> </span></span></div></div></div><div><br /></div><div><br /></div><div><h2 style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;">Summary and future plans</h2></div></div><div><br /></div><div>With writing a book and all, last year didn't see me do very much to my portfolio. I did some tidying up; now all my UK stocks are in a single account which makes attribution easier, and I started the move to <a href="https://qoppac.blogspot.com/2023/02/esg-extremely-serious-goalpost-moving.html">ESG</a>. </div><div><br /></div><div>I hoped to introduce some new futures strategies but didn't; my first act of the new year once I've written up my futures performance is going to be to add a bunch of new markets to my strategy, and then subsequently think about other strategies some more (principally RV and faster MR, although not quite in the way described in my new book - watch this space). I'm also painfully aware that I have a heap of work to do on <a href="https://github.com/robcarver17/pysystemtrade">pysystemtrade</a>.</div><div><br /></div><div>One other thing is that it seems to take longer and longer to write this post every year. It's a huge hacked together spreadsheet, full of checks and balances in case I miss something (I acidentally put a decimal point in the wrong place, and 'lost' 150k!). I really ought to automate the process somehow; which would involve keeping better records and writing some code. Hopefully I will have time this year.</div><div><br /></div><div><br /></div></div></div></span></div></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com5tag:blogger.com,1999:blog-261139923818144971.post-14592939304388575092023-04-17T10:20:00.003+01:002023-07-14T08:55:36.620+01:00Advanced Futures Trading Strategies<p> Tommorrow marks the official release of my <b>4th book</b><b>:</b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4uwB0-wkUpn1PesNqyw_e-2bdD6GLx60ek5t4hRZyDA-azmKeWbWtx4lBYRn2raSA92bWrjv3it6ZGE0w7D7VI2KI7DQ8lNnU6FJxAambnkdj301dOL6H6BPpjA2mCAWONXZX7s1q_SbfLRJXSCCpJJxt2msfOhwLsBNJXB8j-ZPSC-JEtYYcsbhwmA/s901/Screenshot%20from%202023-01-05%2009-30-45.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="901" data-original-width="635" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4uwB0-wkUpn1PesNqyw_e-2bdD6GLx60ek5t4hRZyDA-azmKeWbWtx4lBYRn2raSA92bWrjv3it6ZGE0w7D7VI2KI7DQ8lNnU6FJxAambnkdj301dOL6H6BPpjA2mCAWONXZX7s1q_SbfLRJXSCCpJJxt2msfOhwLsBNJXB8j-ZPSC-JEtYYcsbhwmA/s320/Screenshot%20from%202023-01-05%2009-30-45.png" width="226" /></a></div><br /><div style="text-align: center;"><i>Henceforth to be known as AFTS</i></div><p></p><p><br /></p><p>(I've had authors copies since the 24th February, but modern supply chains being what they are it takes considerably longer for the book to arrive in the hands of my readers; although plenty of people on twitter have been bragging about receiving their copies earlier).</p><p>You can buy it <a href="https://harriman.house/books/advanced-futures-trading-strategies/">here</a> (why haven't you already!), or read about the detail a bit more <a href="https://www.systematicmoney.org/advanced-futures">here</a>. It's my longest book so far, and in my personal opinion the best written as well (I feel like I'm getting better with practice!). </p><p>What I thought I would do in this post is explain in some more detail why I decided to write it, what it's about, and how it relates to my other books.</p><p><br /></p><h2 style="text-align: left;">Why I decided to write it</h2><div>The motivation for AFTS came from a number of different sources. Firstly, I don't think I'm bragging when I say I have a fair amount of experience in trading <i style="font-weight: bold;">futures</i>. But I've never really written about specifically trading them in my books, except to discuss how to adapt my workhorse forecasting/vol adjusting portfolio management equations to that particular asset class, as well as the odd reference to the fact you have to roll them every now and then. An obvious exception is '<a href="https://www.systematicmoney.org/leveraged-trading">Leveraged Trading</a>', where they appear as one of five classes of leveraged instruments that I specifically discuss.</div><div><br /></div><div>The second motivation was that I'm painfully aware that my books are rather short on specific trading strategies. All of them include simple trading rules, mostly of the moving average crossover and carry type, but most of the bad reviews on amazon have come from people who were expecting rather more than that. Of course you guys know that really isn't the point of my books. Systematic Trading was about designing your own strategies, whilst the point of Leveraged Trading was mostly to get people to trade in a safe and cost efficient way; the underlying trading rule is secondary to this purpose.</div><div><br /></div><div>Of course there are plenty of books on trading futures (I normally recommend Jack Schwagers work <a href="https://www.wiley.com/en-us/A+Complete+Guide+to+the+Futures+Market%3A+Technical+Analysis%2C+Trading+Systems%2C+Fundamental+Analysis%2C+Options%2C+Spreads%2C+and+Trading+Principles%2C+2nd+Edition-p-9781118853757">here</a>), and there are also compendiums full of trading strategies (Perry Kaufman seems to have written the <a href="https://www.wiley.com/en-us/Trading+Systems+and+Methods%2C+6th+Edition-p-9781119605355">longest</a>), but I still felt I could offer something unique with my purely systematic approach.</div><p>So my third source of motivation was a book I wrote a few years ago, but which very few people will ever read. When I took over the fixed income team at AHL the team consisted of a disparate group of people, not all of whom had deep familarity with the asset class. So I wrote a 'book', which mostly consisted of a lot of graphs showing how various instruments had behaved in the past, their volatility patterns, how the yield curve had behaved, and how various types of trading strategies performed across different instruments. I can't remember the exact title, but if I wrote such a book today I would call it the 'Fixed Income Almanac'. </p><p>It once occured to me that a 'Futures Almanac' would be an interesting project. There used to be a book (probably out of print, and certainly out of date now we have the internet) that listed all the futures markets in the world (perhaps someone old like me can put the title in the comments). I imagined a book with a couple of pages per market, with a graph showing the price and performance of various simple trading strategies, plus some interesting market statistics.</p><p>Of course such a book wouldn't be commercially viable, would go out of date, and more worryingly for me would become a license for overfitting ("Look, from page 925, Iron has clearly the best momentum ewmac4,16 performance"). </p><p>However it struck me that if I did write a book about trading strategies, I could make it 'alamanac-like' by testing my strategies over a huge set of futures markets, and showing the results. </p><p><br /></p><h2>What it's about</h2><div>In a sense AFTS is several books in one. </div><div><br /></div><div>Ostensibly, it's a book containing 30 trading strategies specifically for trading futures. All strategies are completely described, and I show full backtest results for each of them, in many cases breaking them down by asset class. I explain their strengths and weaknesses, and I even include some strategies I wouldn't personally trade myself. </div><div><br /></div><div>The strategies sprawl over the first five parts of the book. Part one is about long only, moving average crossovers, and carry. In part two I extend and poke around with these two basic strategies. By the end of it you will have a much fuller understanding of carry and trend, or have died trying. In part three I move on to other directional strategies. In here I also include a chapter with a detailed and coherent description of my <a href="https://qoppac.blogspot.com/2021/10/mr-greedy-and-tale-of-minimum-tracking.html">dynamic optimisation strategy</a>. </div><div><br /></div><div>Parts four and five cover ground you don't normally see me occuping. Part four is about fast mean reversion strategies, where we have to use novel execution techniques to cope with the resulting high turnover. Part five is about relative value; something I used to do plenty of back in the day, but which I no longer trade. </div><div><br /></div><div>Then in part six I discuss some of the 'plumbing' of futures trading: when to roll, optimal execution, risk management and cash management. These things are important - they won't make you a fortune but they can lose you one - but are rarely discussed in trading books. I've touched on many of these topics in my blog, but hopefully even my hard core fans will find it useful to have them systematically written up in one place.</div><div><br /></div><div>However there is more to AFTS than meets the eye. The first few chapters move from trading a single contract, to trading with fixed vol estimates, to varying vol estimates, to adding a trend filter, then a filter with forecasts and buffering, and finally multiple filters. This allows the reader to understand the value and meaning behind each of these steps. </div><div><br /></div><div>In a sense these first few chapters are an empirical and logical justification for 'my' style of trading. They also allow people to understand how a trading strategy will transform the return properties of the underyling distribution of each asset class; for example turning the VIX/V2X complex from heavily positive skew but crap returns, into still positive skew but also positive returns. Finally this approach also allows me to introduce my position sizing framework in a gradual fashion, making it easy to digest. </div><div><br /></div><div>Although this isn't a book about backtesting or system design - that would be <a href="https://www.systematicmoney.org/systematic-trading">Systematic Trading</a> and perhaps an as yet unwritten book that goes into backtesting in more detail - I also use AFTS to gently remind or introduce concepts around over fitting and robust optimisation.</div><div><br /></div><div><h2>How it relates to my other books</h2></div><div>If you're reading this blog post, there's a good chance you already own at least one of my other books, so you might be wondering if it's worth giving me some more of your money (TLDR: Yes! Give me your money. Look at all this great free content I'm giving you. I deserve it!). If you don't own any of my books - freeloader! - you may be wondering which you should buy first. OK, you should buy all of them, right now; but you might be wondering what order to read them in.</div><div><br /></div><div>If you are a futures trader, but relatively inexperienced, I would start with my first book <b>Leveraged Trading. </b>Once you have a good understanding of the asset class, then it would make sense to move on to <b>Advanced Futures Trading Strategies</b>. My first book, <b>Systematic Trading</b>, is probably one to read next if you want to move on to designing your own trading strategies.</div><div><br /></div><div>If you are not a futures trader, there is still a chance that the strategies in AFTS will be relevant to you, especially if you are trading 'futures-like' instruments like CFDs or spread-bets. Leveraged trading will help you understand how to pretend these things are really futures.</div><div><br /></div><div><b>Smart Portfolios</b> of course is a book about investing and not trading, but naturally still worth buying.</div><div><br /></div><div><br /></div><div><h2>Credits</h2></div><div>That's all I have to say, except I hope you all enjoy reading it. Roll the credits!</div><div><br /></div><div>Commissioning editor: Craig Pearce</div><div>Cover: Chris Parker</div><div>Content reviewers: Thomas Smith, Helder Palaro, Tansu Demirbilek and Riccardo Ronco</div><div><div><div>Regular nudging on his podcast to make sure I was still writing: Niels Kaastrup-Larsen</div><div>Special thanks to: Doug Hohner (for dynamic optimisation)</div></div></div><div>Assistant proof-reader: Darcey the Cat.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNOvyQHDe5wRfHHlLNKVr3nlIcHy2M7SV41FXqHSNVRyCXwBmCLkVNS8fm98igeD3XNkm5FKpYNIEagMCZNI8sqh4cf26oy67m9be7VN4NeBn3qkygvY8ZKfD-6PomfCwDO5OPqPfOA0srIoLJyzdimwj_e8qyv6hmZPaNIEP6LaztvVhsL42LT5ohbg/s4624/20230111_145326.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3468" data-original-width="4624" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNOvyQHDe5wRfHHlLNKVr3nlIcHy2M7SV41FXqHSNVRyCXwBmCLkVNS8fm98igeD3XNkm5FKpYNIEagMCZNI8sqh4cf26oy67m9be7VN4NeBn3qkygvY8ZKfD-6PomfCwDO5OPqPfOA0srIoLJyzdimwj_e8qyv6hmZPaNIEP6LaztvVhsL42LT5ohbg/s320/20230111_145326.jpg" width="320" /></a></div><br /><div style="text-align: center;"><i>Darcey the cat, looking for spelling mistakes</i></div><div style="text-align: center;"><br /></div><div><div><br /></div></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com17tag:blogger.com,1999:blog-261139923818144971.post-82848421119653988922023-03-01T08:36:00.003+00:002023-03-02T13:25:00.104+00:00I got more than 99 instruments in my portfolio but butter ain't one of them - another take on instrument diversification<p>As those of you who follow me on the <a href="https://twitter.com/investingidiocy">Elon Musk Daily News App</a> will know, I received physical copies of my new book last week (exciting!). Global supply chains being what they are, you lot will have to wait until April to get your copies. Sorry.</p><p>Anyway one of the themes I touch on in the book is the truely amazing diversification that trend following strategies offer when run across multiple instruments. </p><p>I have touched on this before (although never in detail with a complete blogpost on the subect), but I thought I would present some updated results using the data set I use in the book (102 instruments), presented with some different plots to help better grasp the intuition of what's going on. This isn't a sneak preview of stuff in the book, you'll still have to buy it :-), but goes into more detail to help understand just how amazing this effect. </p><p>Incidentally I don't trade butter because it isn't liquid enough; less than 20 contracts a day. Maybe if I left it out of the fridge in hot weather....</p><p><i>(Code is <a href="https://gist.github.com/robcarver17/c350ca7c73018c175393e44ad839c061">here</a>. These results are not exactly the same as in my latest book, as I'm using a different methodology)</i></p><p><br /></p><h3 style="text-align: left;">Measuring diversification</h3><p>The most intuitive way to measure diversification is a simple ratio: expected return for many things divided by the expected return for one thing.</p><p>But there is another way of measuring diversification through 'independent bets', which I was reminded of when I reread <a href="https://blog.thinknewfound.com/2018/07/measuring-process-diversification-in-trend-following/">this 2018 article</a> by the always excellent Cory Hoffstein, and also this article by <a href="https://investresolve.com/portfolio-optimization-case-study-managed-futures/">Resolve</a> (Adam Butler et al). </p><p>Cory's article talks about the three axis of diversification: what, how and when. That article talks a great deal about 'how': diversification across trading rules in my parlance. This blogpost and the Resolve post consider 'what': diversification across instruments. You can also consider 'when': broadly speaking, diversifying across different forecast horizons or speeds of trading rules.</p><p>The maths behind the independent bet idea is simple; if you have a portfolio of N return streams (eg trading strategies running on different instruments), scaled to the same volatility (normal for trading strategies) and they are uncorrelated, then your standard deviation will reduce by sqrt(N) versus the risk of one strategy. Assuming they have the same expected mean, your Sharpe Ratio will therefore increase by sqrt(N). If you can use leverage (like a futures trader), then you can purchase higher returns with that rise in Sharpe Ratio.</p><p>Most portfolios aren't uncorrelated, so we can bring in the idea of <b>effective </b>independent bets. That's just the value of N with uncorrelated assets that would give you the same reduction in standard deviation that you actually get in practice. For example, if your correlation is 0.5 with two assets equally weighted, then your SR will increase by 1.15. That is the same improvement that we would get from having 1.15^2 = 1.33 independent bets. </p><p>Similarly, if we have three assets with an average correlation of 0.5, then the SR will improve by 1.225 which is the same as having 1.5 independent bets.</p><p>A couple of wrinkles: The average correlation is a nice guide, but in the actual calculation you should use the entire correlation matrix. Also, the simple independent bets calculation assumes that all your assets are equally weighting in the zero correlation version. But in calculating the standard deviation for the uncorrelated portfolio you should use the actual weights. </p><p>For example, with identical off diagonal correlations of 0.3 and equal weights, there are 1.88 independent bets. But consider this piece of <a href="https://github.com/robcarver17/pysystemtrade">pysystemtrade</a> code:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">from </span>sysquant.estimators.diversification_multipliers <span style="color: #0033b3;">import </span>*<br />corr = correlationEstimate(np.array([[<span style="color: #1750eb;">1</span>,<span style="color: #1750eb;">0.5</span>, <span style="color: #1750eb;">.3</span>], [<span style="color: #1750eb;">.5</span>,<span style="color: #1750eb;">1</span>, <span style="color: #1750eb;">.1</span>], [<span style="color: #1750eb;">.3</span>,<span style="color: #1750eb;">.1</span>,<span style="color: #1750eb;">1</span>]]), <span style="color: #660099;">columns</span>=[<span style="color: teal; font-weight: bold;">'a'</span>, <span style="color: teal; font-weight: bold;">'b'</span>,<span style="color: teal; font-weight: bold;">'c'</span>])<br /><br /> a b c<br />a <span style="color: #1750eb;">1.0 0.5 0.3<br /></span>b <span style="color: #1750eb;">0.5 1.0 0.1<br /></span>c <span style="color: #1750eb;">0.3 0.1 1.0<br /></span><span style="color: #1750eb;"><br /></span>corr.average_corr()<br /><span style="color: #1750eb;">0.3<br /></span><span style="color: #1750eb;"><br /></span>weights = portfolioWeights(<span style="color: navy;">dict</span>(<span style="color: #660099;">a</span>=<span style="color: #1750eb;">.45</span>, <span style="color: #660099;">b</span>=<span style="color: #1750eb;">.45</span>, <span style="color: #660099;">c</span>=<span style="color: #1750eb;">.1</span>))<br /><br /><span style="color: #8c8c8c; font-style: italic;">## independent bets<br /></span>diversification_mult_single_period(<span style="color: #660099;">corrmatrix</span>=corr, <span style="color: #660099;">weights</span>=weights)**<span style="color: #1750eb;">3<br /></span><span style="color: #1750eb;">1.53<br /></span></span></pre><p>By allocating less to the more diversifying asset we have reduced the available diversification.</p><p>However in this post I will always optimise instrument weights to minimise the portfolio standard deviation using only the correlation matrix as an input, hence maximising the available diversification.</p><p>Now, there two ways to calculate diversification, eithier as a ratio of standard deviations (Sharpe Ratios) or as a number of independent bets. The first is to use the correlation matrix of returns, and weights, as I've already done. We can think of this as <i>expected </i>diversification benefit. In fact I do this already in my code - it's called the <b>instrument diversification multiplier (IDM)</b>. So if take IDM^2 then that will be equal to the expected benefit, measured in units of independent bets.</p><p>The second way of measuring diversification is by looking at the realised Sharpe Ratio of the portfolio, and comparing that to the Sharpe Ratio for a single instrument. We can think of that as the <i>realised </i>diversification benefit. And if I square that ratio, I will again get the realised benefit measured in independent bets.</p><p><i>There is a third way, which is to measure the realised standard deviation of the portfolio having not applied any diversification multiplier. But assuming we are pretty good at predicting risk - and we are - this will be pretty similar to the IDM figure. </i></p><p>So in summary we can measure:</p><p></p><ul style="text-align: left;"><li>Expected diversification ratio (equivalent to IDM)</li><li>Expected number of independent bets (IDM^2)</li><li>Realised diversification ratio (SR ratio)</li><li>Realised diversification as a number of independent bets</li></ul><p></p><p><br /></p><h3>Which markets?</h3><p>There is a big problem here, which is that we're comparing the diversification of one instrument with say two instruments. But which 'one instrument'? And which two instruments? We'll get different answers if we compare a portfolio of Corn and US 10 year bonds versus a portfolio with just Eurodollar, or a portfolio of Dry milk and Crude oil, versus just US 2 year.</p><p>That isn't so much of a problem with correlations, but for Sharpe Ratio which exhibits a lot of variation across instruments, it's a big problem.</p><p>The answer, is to Monte Carlo this. For each portfolio size N that we want to test we run a bunch of different random runs. Each run involves picking a random group of N markets, allocate instrument weights, and measure the resulting portfolio IDM (expected diversification) and Sharpe Ratio. Then we take the average (median) to get the values for a given N.</p><p>Incidentally I calculated instrument weights in two ways to check the robustness of my results:</p><p></p><ul style="text-align: left;"><li>Optimised using using correlation as an input into the optimisation, with flooring at zero and some shrinkage for stability.</li><li>Equal weights. I have some heterogeneity in my instruments, eg a lot of equities, so this may not be appropriate.</li></ul><p></p><p><br /></p><h3 style="text-align: left;">Long only</h3><p>Let's first consider a long only portfolio. This will be identical to the trend following portfolio except it uses a constant forecast (the 'asset allocating investor in my <a href="https://www.systematicmoney.org/systematic-trading">first book</a>').</p><p>Interestingly, the average correlation of instrument returns across the entire portfolio of 102 instruments is 0.224 (effective number of independent bets, 4.3), but the correlation of subsystem returns (basically trading each instrument, sizing positions for current volatility) is just 0.09 (number of independent bets 6.3). </p><p>First of all let's look at the expected diversification, measured by IDM, with optimised weights. Just to give you a flavour of the monte carlo, the following plot shows the individual data points for each monte carlo, plus a median line. Notice the noise falls as we get more instruments; that's because the portfolios get more similar. At the limit when we're choosing 100 out of 103 instruments, the results are going to be fairly similar.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq0QeiLs1VwgbdKQh-gqjMDdp3giP-LrWALXttPem_9lXYTtkD2Rqp-vZNGaHNSMbq-dVayzBmW13M8icK71lapxFG9zFkMgqqfr9mIWfziWd5WvRfhL15QQ8aPbAb00Om6KYk2JLE78MTDu7JLTqNvNnrngjcYforjuIfYp_8CW1ikb_nlWJK7ILhUw/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq0QeiLs1VwgbdKQh-gqjMDdp3giP-LrWALXttPem_9lXYTtkD2Rqp-vZNGaHNSMbq-dVayzBmW13M8icK71lapxFG9zFkMgqqfr9mIWfziWd5WvRfhL15QQ8aPbAb00Om6KYk2JLE78MTDu7JLTqNvNnrngjcYforjuIfYp_8CW1ikb_nlWJK7ILhUw/w640-h322/Figure_1.png" width="640" /></a></div><p>At the top end the IDM is around 4.8, which means we've got 4.8^2 = 23 independent bets.</p><p><i>Note: I am optimising weights in such a way that will maximise the IDM, hence the IDM's here are higher than in the book for both long only and trend following strategies.</i></p><p>This sounds pretty amazing, but what about the Sharpe ratio, realised diversification? To get something with a comparable y-axis we need to divide the Sharpe Ratios by the median SR for a single instrument. Here is what we get:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYC9_wxHxWggxihQ7BDu4MP69ws_uHe9va5OcdB7_-t_gVltQQy8E2O35ZRdZYk4drwTOTJM1xhr1GPD2ZL6GhIw_lBhsLua78WApPk6QkoQm85DWtdPL2KsEaul_dhW81l6PM3CTjYfZkAMPPVIqo8lafupj-Ge8a9-62HBkuZ0uUk1LoPjxesr0GQw/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYC9_wxHxWggxihQ7BDu4MP69ws_uHe9va5OcdB7_-t_gVltQQy8E2O35ZRdZYk4drwTOTJM1xhr1GPD2ZL6GhIw_lBhsLua78WApPk6QkoQm85DWtdPL2KsEaul_dhW81l6PM3CTjYfZkAMPPVIqo8lafupj-Ge8a9-62HBkuZ0uUk1LoPjxesr0GQw/w640-h322/Figure_1.png" width="640" /></a></div>I've truncated this plot to make things clearer - there is a lot of noise for smaller N as you'd expect.<div><br /></div><div>But the bottom line is that is rather disappointing. We only get a doubling of SR, equivalent to 4 independent bets. That's a lot less than the IDM would suggest, but then our portfolio weights have effectively been chosen to maximise the IDM (in sample!). But it's also a little short of the 6.3 independent bets that the average correlation would suggest. In fact, it's actually closer to what we'd expect from the average correlation of the raw instrument returns (0.22) before vol scaling. Vol scaling doesn't really add diversification, it just makes the relationship between returns more non linear, and hence reduces correlation.</div><div><br /></div><div>What difference will equal rather than optimised weights make? Check out the following plot for IDM first, with just the median lines:</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYyUXvsYvZ8quMWlJfp_SJ-5IrVzH3IKrc1K1Uvb8UCl-MxuRcIuUftCALepVOk2FNqGeKESpThuWLT5vQ29PuGmjZxeVpn75kDzXWbYgkpgJcu8h-Y5Y0MHRg4qlWvLtwPyupRf8BHdIhbiUe8bXUITKZXQnuSYjhysDxVQPDnTWVcUTFLqi3NtICYg/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYyUXvsYvZ8quMWlJfp_SJ-5IrVzH3IKrc1K1Uvb8UCl-MxuRcIuUftCALepVOk2FNqGeKESpThuWLT5vQ29PuGmjZxeVpn75kDzXWbYgkpgJcu8h-Y5Y0MHRg4qlWvLtwPyupRf8BHdIhbiUe8bXUITKZXQnuSYjhysDxVQPDnTWVcUTFLqi3NtICYg/w640-h322/Figure_1.png" width="640" /></a></div>The blue line we've already seen, and is for optimised weights. The orange line is with equal weights. This orange is more like the classic 'diversification' graph that you see everywhere, encouraging you to believe that there is no point owning more than X stocks, where here X is perhaps 40. With equal weights the IDM tops out at ~3, or 9 independent bets.</div><div><br /></div><div>Here are the same two lines, but this time for SR (relative to the median SR of a single instrument portfolio):</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcF3oypbe5H24pff6Hhdos9HhWGXY6Owd9Ds9M4LJjJPXbJRGqiotAbXJVv2WRyW1hmYS6iPpm5iMgu785oUarJWcfE1_5idmKAprqLoVZCjVNzLrB9pA0dmnImrVwGO809tAWB9dkeGI_nf1DC6uKzPcz0m64Q9hAY3xGpnh62GALZrHr8E8oeZfgUg/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcF3oypbe5H24pff6Hhdos9HhWGXY6Owd9Ds9M4LJjJPXbJRGqiotAbXJVv2WRyW1hmYS6iPpm5iMgu785oUarJWcfE1_5idmKAprqLoVZCjVNzLrB9pA0dmnImrVwGO809tAWB9dkeGI_nf1DC6uKzPcz0m64Q9hAY3xGpnh62GALZrHr8E8oeZfgUg/w640-h322/Figure_1.png" width="640" /></a></div>Equal weights actually comes out slightly better here, but we're still looking at only around 4.3 independent bets.<br /><div><br /></div><div>The bottom line is that the long only portfolio over promises (high IDM, between 9 and 24 independent bets depending on the weighting scheme), and under delivers (twofold SR improvement, for around 4 to 4.3 independent bets).</div><div><br /></div><div><br /></div><div><h3 style="text-align: left;">Trend following</h3><p>Now let's consider the same setup, but for a trend following strategy. For simplicity I just used a single trading rule, the EWMAC16,64 rule AKA the starter system from <a href="https://www.systematicmoney.org/leveraged-trading">Leveraged Trading</a>. But the results will be similar for a portfolio of such rules. First of all let's plot the IDM, for both optimised (blue) and equal weights (orange).</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB7XcPttK1Qelw41q19pUocVKQcwBioD4v8pkuxXrECuO-Xg2HZnPJxmgV04F-_3pbNkpBOerdXoHSMzubs8JwY_V13t-H5z4HS40hwG6WKrHuXMEI0OXW4VCcTjfMEzJOn-NSpoy5tvffPzMssa76isKx-dtZ8Y1uiT7yxVuR5NQVPcadITpaCNoUuw/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB7XcPttK1Qelw41q19pUocVKQcwBioD4v8pkuxXrECuO-Xg2HZnPJxmgV04F-_3pbNkpBOerdXoHSMzubs8JwY_V13t-H5z4HS40hwG6WKrHuXMEI0OXW4VCcTjfMEzJOn-NSpoy5tvffPzMssa76isKx-dtZ8Y1uiT7yxVuR5NQVPcadITpaCNoUuw/w640-h322/Figure_1.png" width="640" /></a></div>Pretty similar to before; if anything the diversification benefit available is a little lower than for long only strategies, despite similar average correlation of around 0.08. Using the more optimistic blue line with optimised weights it looks like our expected diversification is of the order of 4.2, equivalent to 18 independent bets.</div><div><br /></div><div>Now for SR, again blue is with optimised weights and orange is equal weights:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs4GNpa8-meQ_ktdiu0WqMnE0b1umlNEIPjUfuN4nYDn55OQH6tSV0MqaCBwuEh6FboRmjupHtyFtGqSSmlJltAf_geEb7rIJ21owC9hphSCSQD1-fLKKoPJ57Jeb6QjCWJvT3VJ-y31sXz3s2enHVPy_NXgHz25YAEGL_Z_V7JO6Q_1HEP4OtyJbu2g/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs4GNpa8-meQ_ktdiu0WqMnE0b1umlNEIPjUfuN4nYDn55OQH6tSV0MqaCBwuEh6FboRmjupHtyFtGqSSmlJltAf_geEb7rIJ21owC9hphSCSQD1-fLKKoPJ57Jeb6QjCWJvT3VJ-y31sXz3s2enHVPy_NXgHz25YAEGL_Z_V7JO6Q_1HEP4OtyJbu2g/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>For those crying 'in sample fitting' with respect to the optimised weights on the blue line, note that (a) my optimisation was purely on the correlation matrix, not the SR of the portfolio; (b) correlations are relatively stable over time for trading subsystems, and hence (c) I have got these sorts of improvements in SR for 'proper' backtests using rolling out of sample instrument weights. So I am pretty confident that the blue line is achievable. </div><div><br /></div><div>Looking at the blue line then, it's pretty darn good. Rather than the twofold SR improvement seen earlier, we have a relative improvement of over 4.5 times. This is actually a little higher than the improvement promised by the IDM, and hence over 20 independent bets. Even the subpar equal weight version with the orange line manages a threefold improvement, for a score of 9 independent bets.<br /><p>Another important point is that it looks like the blue line here is still going, suggesting adding even more instruments could potentially boost SR further. In contrast the long only portfolio asymptotes at around 50 instruments, with further diversification not adding anything meaningful.</p><p><br /></p><h3 style="text-align: left;">Summary</h3><p>Whenever I have plotted these graphs before it has always been to make the point that instrument diversification is the best kind. Adding different kinds of trading rule, or trading at different speeds, or both, will boost your performance - but not by very much. You will be lucky to get two independent bets worth of diversification from this source. In contrast, we can get realised performance equivalent to over <b>twenty</b> independent bets from diversifying across a trend following portfolio of 100 instruments; versus just over four in a long only setup (and it would be even lower without volatility targeting!).</p><p>Unfortunately adding instruments requires more capital or doing something smart like my <a href="https://qoppac.blogspot.com/2021/10/mr-greedy-and-tale-of-minimum-tracking.html">own dynamic optimisation technique</a>. Diversification is a free lunch, but you still need to get to the buffet... </p><p><br /></p><p><br /></p><p><br /></p><p><br /></p></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com11tag:blogger.com,1999:blog-261139923818144971.post-2053865014475428642023-02-09T14:44:00.002+00:002023-02-09T14:49:48.849+00:00Equities, Bonds and maximising CAGR<p>Lots of things have changed in the last year. Many unthinkable things are now thinkable. A war in Europe. The UK coming 2nd in the Eurovision song contest rather than the usual dismal 'null points'. And of course, the correlation of stocks and bonds has recently gone more positive than it has been for over 20 years:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNQhD2-pQc23Zovur5WVyflgZXPgmNddCAREV8xyrBrHJ6YmZlduM-5pvp-8T8C1pdXXvUaoDA3tMkXejwjLNJVN3MECODZwZPs1NkKa5F2wFEK9rEfyte7rUie7TBqEpFanf43Pxvd6pswrG0gdodPlQ3WdgHi7PoxTF6MWlGbVp0zy0BNmPDhafrqQ/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNQhD2-pQc23Zovur5WVyflgZXPgmNddCAREV8xyrBrHJ6YmZlduM-5pvp-8T8C1pdXXvUaoDA3tMkXejwjLNJVN3MECODZwZPs1NkKa5F2wFEK9rEfyte7rUie7TBqEpFanf43Pxvd6pswrG0gdodPlQ3WdgHi7PoxTF6MWlGbVp0zy0BNmPDhafrqQ/w640-h322/Figure_1.png" width="640" /></a></div><div style="text-align: center;"><i>Rolling 12 month correlation of weekly returns for S&P 500 equity and US 10 year bond futures</i></div><p>I thought it would be 'fun' to see how the optimal stock/bond portfolio is affected by correlation and expected return assumptions.</p><p>In my second book, Smart Portfolios, I noted that a 100% equity portfolio made no sense under the Kelly criteria (AKA maximising CAGR), and that pretty much everyone should have <i>some</i> exposure to bonds regardless of their risk tolerance, even though they will have a lower expected arithmetic return due to their lower risk. For a while my own strategic risk weighting has been 10% in bonds, equating to cash weights of around 80/20.</p><p>I am <a href="https://qoppac.blogspot.com/2023/02/esg-extremely-serious-goalpost-moving.html">currently reviewing my long only portfolio</a> and it seems as good a time as any to check that 80/20 still makes sense.</p><p>Simple python code is liberally scattered throughout.</p><p><br /></p><h2 style="text-align: left;">Assumptions and base case</h2><p>I'm assuming a two asset, fully invested portfolio with two assets: a global stock, and a global bond (including both government and corporates). Both assets are Gaussian normal and have a linear relationship, so I can use an approximation for geometric return.</p><p>I assume that the standard deviation of the stocks is around 20% and the bonds around 10% (it's gone up recently, can't think why). Furthermore, I assume that my central case for the expected return in stocks is around 8%, and 5% in bonds. That corresponds to a simple SR (without risk free rate) of 0.4 and 0.5 respectively; eg a SR advantage for bonds versus the average SR of 0.05.</p><p>(Real return expectations are taken <a href="https://www.aqr.com/Insights/Research/Alternative-Thinking/2023-Capital-Market-Assumptions-for-Major-Asset-Classes">from AQR</a> plus an assumed 3% inflation)<br /></p><p>My utility function is to maximise real CAGR, which in itself implies I will be fully invested. Note that means I will be at 'full Kelly' - something that isn't usually advised. However we're determining allocations here, not leverage, so it's probably not as dangerous as you might think.</p><p><br /></p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">import </span>numpy <span style="color: #0033b3;">as </span>np<br /><span style="color: #0033b3;">import </span>pandas <span style="color: #0033b3;">as </span>pd<br /><br /><br /><span style="color: #0033b3;">def </span><span style="color: black;">calculate_cagr</span>(<br /> correlation, equity_weight, mean_eq, mean_bo, stdev_eq=<span style="color: #1750eb;">0.2</span>, stdev_bo=<span style="color: #1750eb;">0.1<br /></span>):<br /> bond_weight = <span style="color: #1750eb;">1 </span>- equity_weight<br /> mean_return = (equity_weight * mean_eq) + (bond_weight * mean_bo)<br /> variance = (<br /> ((equity_weight**<span style="color: #1750eb;">2</span>) * (stdev_eq**<span style="color: #1750eb;">2</span>))<br /> + ((bond_weight**<span style="color: #1750eb;">2</span>) * (stdev_bo**<span style="color: #1750eb;">2</span>))<br /> + <span style="color: #1750eb;">2 </span>* bond_weight * equity_weight * stdev_bo * stdev_eq * correlation<br /> )<br /><br /> approx_cagr = mean_return - <span style="color: #1750eb;">0.5 </span>* variance<br /><br /> <span style="color: #0033b3;">return </span>approx_cagr<br /></span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><br /></pre><p><br /></p><h2>Effect of correlation varying with base case assumptions</h2><div><p>I'm going to vary the correlation between stocks and bonds, between -0.8 and +0.8</p></div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><pre style="font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">list_of_weight_indices = <span style="color: navy;">list</span>(np.arange(<span style="color: #1750eb;">0</span>, <span style="color: #1750eb;">1</span>, <span style="color: #1750eb;">0.001</span>))</span></pre></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">iterate_cagr</span>(correlation, mean_eq, mean_bo):<br /> cagr_list = [<br /> calculate_cagr(<br /> <span style="color: #660099;">correlation</span>=correlation,<br /> <span style="color: #660099;">equity_weight</span>=equity_weight,<br /> <span style="color: #660099;">mean_bo</span>=mean_bo,<br /> <span style="color: #660099;">mean_eq</span>=mean_eq,<br /> )<br /> <span style="color: #0033b3;">for </span>equity_weight <span style="color: #0033b3;">in list_of_weight_indices</span><br /> ]<br /> <span style="color: #0033b3;">return </span>cagr_list<br /><br /><br />corr_list = <span style="color: navy;">list</span>(np.arange(-<span style="color: #1750eb;">0.8</span>, <span style="color: #1750eb;">0.8</span>, <span style="color: #1750eb;">0.1</span>))<br />corr_list = [<span style="color: navy;">round</span>(x, <span style="color: #1750eb;">1</span>) <span style="color: #0033b3;">for </span>x <span style="color: #0033b3;">in </span>corr_list]<br /><span style="color: #8c8c8c; font-style: italic;">## plot correlation varying<br /></span>results = <span style="color: navy;">dict</span>(<br /> [(correlation, iterate_cagr(correlation, <span style="color: #1750eb;">0.08</span>, <span style="color: #1750eb;">0.05</span>)) <span style="color: #0033b3;">for </span>correlation <span style="color: #0033b3;">in </span>corr_list]<br />)<br /><br />results = pd.DataFrame(results)<br />results.columns = corr_list<br /></span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">results.index = list_of_weight_indices</span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">results.plot()</span></pre></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAe-lqImfoxqeYVOkArUy4lu1afiBNrfSZix9dM-G2Cfpqre-cvdLB07dj-gr__7c92eTif8VX4qkExk8iZbZuaKheg2W8RgO0n0s7V70O-92Xv0nBk8CmYKRzUNa097W1jffyhxGkFBrLYbXwALGrd3fxQGiuchH8HnLj1ISZyqnEaA-__DBDI3rflg/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAe-lqImfoxqeYVOkArUy4lu1afiBNrfSZix9dM-G2Cfpqre-cvdLB07dj-gr__7c92eTif8VX4qkExk8iZbZuaKheg2W8RgO0n0s7V70O-92Xv0nBk8CmYKRzUNa097W1jffyhxGkFBrLYbXwALGrd3fxQGiuchH8HnLj1ISZyqnEaA-__DBDI3rflg/w640-h322/Figure_1.png" width="640" /></a></div><br /><div><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div>So each line on this plot is a different correlation level. The x-axis is the cash weight on equities, and the y-axis is the geometric return / CAGR. You can see that as correlations get less negative and then positive, we get less diversification from bonds, and a higher weight to equities.<br /><div><br /></div><div>Let's look at the maximum CAGR in each case;</div><div><br /></div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">weight_with_max_cagr</span>(correlation, mean_eq, mean_bo):<br /> cagr_list = iterate_cagr(correlation, mean_eq, mean_bo)<br /> max_cagr = np.max(cagr_list)<br /> index_of_max = cagr_list.index(max_cagr)<br /> wt_of_max = list_of_weight_indices[index_of_max]<br /><br /> <span style="color: #0033b3;">return </span>wt_of_max<br /><br /><br />results = pd.Series(<br /> [weight_with_max_cagr(correlation, <span style="color: #1750eb;">0.08</span>, <span style="color: #1750eb;">0.05</span>) <span style="color: #0033b3;">for </span>correlation <span style="color: #0033b3;">in </span>corr_list],<br /> <span style="color: #660099;">index</span>=corr_list,<br />)<br /></span></pre></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqdJLZoVGw36KqJ1GT60gS10zs7Iogkz97ncsMEqQWC1Off8zhJqTr5-pqssHNeonCkFlnTA3ova5fpBRLzCsUSy4EC0-dS5cRYnvRxahdmIKpDt7O0pKf2eRsSjif2oLuanAdkdExEC-IzIgt5YJHw_WVG8BDxLpg1SdR3J-eVk-5tUUHQbdiYPqv0w/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqdJLZoVGw36KqJ1GT60gS10zs7Iogkz97ncsMEqQWC1Off8zhJqTr5-pqssHNeonCkFlnTA3ova5fpBRLzCsUSy4EC0-dS5cRYnvRxahdmIKpDt7O0pKf2eRsSjif2oLuanAdkdExEC-IzIgt5YJHw_WVG8BDxLpg1SdR3J-eVk-5tUUHQbdiYPqv0w/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>On the x-axis is the correlation, and on the y-axis is the weight to equities which maximises the CAGR. Remember, these are cash weights. You can see that with zero correlations my original cash weight of 80% in equities is about right. But if correlations go above around 0.4 there is no point owning any bonds at all.</div><div><br /></div><div><br /></div><div><h2>Effect of SR varying </h2><div></div></div><div>Now let's see what happens when we tweak the relative SR. I'm going to vary the relative simple Sharpe Ratio (return/standard deviation) between -0.5 and +0.5, keeping the average at 0.45 (positive numbers mean that equities are better). Note that the base case abve is equivalent to a differential of -0.05, in favour of bonds. To begin with, let's keep the correlation fixed at zero. </div><div><div></div></div><div><br /></div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">means_from_sr_diff</span>(sr_diff, avg_sr=<span style="color: #1750eb;">0.45</span>, stdev_eq=<span style="color: #1750eb;">0.2</span>, stdev_bo=<span style="color: #1750eb;">0.1</span>):<br /> <span style="color: #8c8c8c; font-style: italic;">## higher sr_diff is better for equities<br /></span><span style="color: #8c8c8c; font-style: italic;"> </span>sr_eq = avg_sr + sr_diff<br /> sr_bo = avg_sr - sr_diff<br /><br /> mean_eq = sr_eq * stdev_eq<br /> mean_bo = sr_bo * stdev_bo<br /><br /> <span style="color: #0033b3;">return </span>mean_eq, mean_bo<br /><br /><br /><span style="color: #0033b3;">def </span><span style="color: black;">weight_with_max_cagr_given_sr_diff</span>(correlation, sr_diff):<br /> mean_eq, mean_bo = means_from_sr_diff(sr_diff)<br /> <span style="color: #0033b3;">return </span>weight_with_max_cagr(correlation, mean_eq, mean_bo)<br /><br /><br /><span style="color: #8c8c8c; font-style: italic;"># fix corr at zero<br /></span>sr_diff_list = <span style="color: navy;">list</span>(np.arange(-<span style="color: #1750eb;">0.5</span>, <span style="color: #1750eb;">0.5</span>, <span style="color: #1750eb;">0.01</span>))<br />results = pd.Series(<br /> [weight_with_max_cagr_given_sr_diff(<span style="color: #1750eb;">0</span>, sr_diff) <span style="color: #0033b3;">for </span>sr_diff <span style="color: #0033b3;">in </span>sr_diff_list],<br /> <span style="color: #660099;">index</span>=sr_diff_list,<br />)<br /></span></pre></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPBHCadXrfsER_1L7J7NRM4bRotnoSrsRGp3gx1st-nwHyb2WCXm7YrsWrGDrcP8AZA0sUO3wLOwi1vlATeyeEla6gJxTSQHEbv41q9Gv-_LomfZqbZfGlFoUEa01GFNwZ4hkhpVvXTTML9_vEpGmvlB9ijg1tluh8Hqalbz1kmHMbkBf0UQ_CBXz5pA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPBHCadXrfsER_1L7J7NRM4bRotnoSrsRGp3gx1st-nwHyb2WCXm7YrsWrGDrcP8AZA0sUO3wLOwi1vlATeyeEla6gJxTSQHEbv41q9Gv-_LomfZqbZfGlFoUEa01GFNwZ4hkhpVvXTTML9_vEpGmvlB9ijg1tluh8Hqalbz1kmHMbkBf0UQ_CBXz5pA/w640-h322/Figure_1.png" width="640" /></a></div>Just because CAGR isn't the mean return of standard mean variance optimisation, doesn't mean it won't suffer from the same problem of massive sensitivity to small differences in means (and Sharpe Ratios)! We wouldn't allocate *anything* to equities if the SR difference went below -0.2 (and which point the mean returns are 5% in equities and 6.5% in bonds), or anything to bonds if it's above -0.02 (8.7% in equities and 4.7% in bonds). <br /></div><div><span style="font-size: x-small;"><br /></span></div><div><span style="font-size: x-small;"><br /></span></div><div><h2>Effect of SR and correlations varying </h2><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">sr_diff_list = <span style="color: navy;">list</span>(np.arange(-<span style="color: #1750eb;">0.25</span>, <span style="color: #1750eb;">0.0501</span>, <span style="color: #1750eb;">0.05</span>))<br />sr_diff_list = [sr_diff.round(<span style="color: #1750eb;">2</span>) <span style="color: #0033b3;">for </span>sr_diff <span style="color: #0033b3;">in </span>sr_diff_list]<br />results = pd.DataFrame(<br /> <span style="color: navy;">dict</span>(<br /> [<br /> (<br /> correlation,<br /> [<br /> weight_with_max_cagr_given_sr_diff(correlation, sr_diff)<br /> <span style="color: #0033b3;">for </span>sr_diff <span style="color: #0033b3;">in </span>sr_diff_list<br /> ],<br /> )<br /> <span style="color: #0033b3;">for </span>correlation <span style="color: #0033b3;">in </span>corr_list<br /> ]<br /> )<br />)<br /><br />results.index = sr_diff_list<br />results.columns = corr_list</span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">results = results.transpose()<br /></span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">results.plot()</span></pre></div><div><br /></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgguCE7rpyzHr4u5aD7vNQqts0fD4yeWBoSD8yT1VAorDYM82s0teQIh7J_gvJ7-NVtlFeMEV2xRthPQcvEs4C0YJ63ELQoeTRh1QQcghk_a0rXUG9NKy-ulb-3ATVaILwdtzn5ymiNMySZjU86vm2hRafTM8SoFwWGZK7nC4TMCiCbulKdAmPg_ft3IA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgguCE7rpyzHr4u5aD7vNQqts0fD4yeWBoSD8yT1VAorDYM82s0teQIh7J_gvJ7-NVtlFeMEV2xRthPQcvEs4C0YJ63ELQoeTRh1QQcghk_a0rXUG9NKy-ulb-3ATVaILwdtzn5ymiNMySZjU86vm2hRafTM8SoFwWGZK7nC4TMCiCbulKdAmPg_ft3IA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>Here again the x-axis is correlation, and the y-axis shows the weight to equities that maximises CAGR. </div><div><br /></div><div>Each of the lines on this plot is a different SR difference. The blue line has a SR advantage of 0.25 to bonds (label -0.25), and the light purple line (lillac?) is a small 0.05 SR advantage to equities. The brown line has no advantage to eithier asset class (misleadingly labelled -0.00 SR). The purple line is a -0.05SR advantage to bonds, which is equal to the base case I was using above - hence you can see the purple line matches the earlier plot of optimal weight versus correlation.</div><div><br /></div><div>Notice that a SR advantage to bonds, SR difference = -0.1 (red line) results in 50% weights, irrespective of correlation. The lines above it, with a weaker advantage to bonds, put more in equities as correlations become more positive. The lillac line, SR difference 0.05, is 100% in equities, irrespective of correlations. The lines below the red line put less in equities as correlations become more positive.</div><div><br /></div><div><br /></div><div><h2>Sensitivity</h2><div>My usual base case is that expected SR differences between asset classes are zero, which implies I am somewhere on the brown line. Unless correlations are going to be somewhat negative, this implies 100% in equities. But the AQR base case figures for SR differences allow much more headroom for correlations. Even with correlations at the average 2022 level of around 0.30, one should still have a 10% cash weight in bonds.</div><div><br /></div><div>How sensitive are my likely CAGR for the following 3 portfolios: 80% in equities, 90% and 100% in equities; over different assumptions of correlation and SR differential?</div><div><br /></div><div><br /></div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">results = []<br /><span style="color: #0033b3;">for </span>correlation <span style="color: #0033b3;">in </span>[-<span style="color: #1750eb;">0.4</span>, <span style="color: #1750eb;">0</span>, <span style="color: #1750eb;">0.4</span>]:<br /> <span style="color: #0033b3;">for </span>sr_diff <span style="color: #0033b3;">in </span>[-<span style="color: #1750eb;">0.25</span>, <span style="color: #1750eb;">0</span>, <span style="color: #1750eb;">0.25</span>]:<br /> cagr80 = cagr_with_sr_diff(<span style="color: #1750eb;">0.8</span>, correlation, sr_diff)<br /> cagr90 = cagr_with_sr_diff(<span style="color: #1750eb;">0.9</span>, correlation, sr_diff)<br /> cagr100 = cagr_with_sr_diff(<span style="color: #1750eb;">1</span>, correlation, sr_diff)<br /> loss80 = cagr100 - cagr80<br /> loss90 = cagr100 - cagr90<br /> results.append(<br /> <span style="color: navy;">dict</span>(<br /> <span style="color: #660099;">correlation</span>=correlation,<br /> <span style="color: #660099;">sr_diff</span>=sr_diff,<br /> <span style="color: #660099;">cagr100</span>=<span style="color: navy;">round</span>(cagr100 * <span style="color: #1750eb;">100</span>, <span style="color: #1750eb;">1</span>),<br /> <span style="color: #660099;">cagr90</span>=<span style="color: navy;">round</span>(cagr90 * <span style="color: #1750eb;">100</span>, <span style="color: #1750eb;">1</span>),<br /> <span style="color: #660099;">cagr80</span>=<span style="color: navy;">round</span>(cagr80 * <span style="color: #1750eb;">100</span>, <span style="color: #1750eb;">1</span>),<br /> <span style="color: #660099;">loss80</span>=<span style="color: navy;">round</span>(loss80 * <span style="color: #1750eb;">100</span>, <span style="color: #1750eb;">2</span>),<br /> <span style="color: #660099;">loss90</span>=<span style="color: navy;">round</span>(loss90 * <span style="color: #1750eb;">100</span>, <span style="color: #1750eb;">2</span>),<br /> )<br /> )<br /><br /><span style="color: navy;">print</span>(pd.DataFrame(results))<br /><br /></span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"> correlation sr_diff cagr100 cagr90 cagr80 loss80 loss90<br /><span style="color: #1750eb;">0 </span>-<span style="color: #1750eb;">0.4 </span>-<span style="color: #1750eb;">0.25 2.0 2.7 3.4 </span>-<span style="color: #1750eb;">1.43 </span>-<span style="color: #1750eb;">0.75<br /></span><span style="color: #1750eb;">1 </span>-<span style="color: #1750eb;">0.4 0.00 7.0 7.0 6.9 0.07 0.00<br /></span><span style="color: #1750eb;">2 </span>-<span style="color: #1750eb;">0.4 0.25 12.0 11.2 10.4 1.57 0.75<br /></span><span style="color: #1750eb;">3 0.0 </span>-<span style="color: #1750eb;">0.25 2.0 2.7 3.3 </span>-<span style="color: #1750eb;">1.30 </span>-<span style="color: #1750eb;">0.68<br /></span><span style="color: #1750eb;">4 0.0 0.00 7.0 6.9 6.8 0.20 0.07<br /></span><span style="color: #1750eb;">5 0.0 0.25 12.0 11.2 10.3 1.70 0.82<br /></span><span style="color: #1750eb;">6 0.4 </span>-<span style="color: #1750eb;">0.25 2.0 2.6 3.2 </span>-<span style="color: #1750eb;">1.17 </span>-<span style="color: #1750eb;">0.60<br /></span><span style="color: #1750eb;">7 0.4 0.00 7.0 6.9 6.7 0.33 0.15<br /></span><span style="color: #1750eb;">8 0.4 0.25 12.0 11.1 10.2 1.83 0.90<br /></span></span><span style="color: #1750eb; font-size: 13.8pt;"><br /></span></pre></div><div>For different scenarios of correlation and SR differential (positive better for equities remember), we can see the expected CAGR for portfolios with 100%, 90% and 80% in equities. 10.0 means a CAGR of 10% a year. The final two columns show the loss for an 80% vs 100%, and 90% vs 100% portfolio. Positive numbers mean the lower % of equities is worse, negative means they have outperformed all equities. Eg 1.00 means that the relevant portfolio has a 1% lower CAGR than 100% equities would.</div><div><br /></div><div><br /></div><div><h2>Conclusion</h2></div><div><br /></div><div>100% in equities is never going to wash for me. Even if correlations have risen, and even with equal SR differentials, I'd be uncomfortable running that. But my current strategic cash weighting of 80% in equities also feels a little low given that correlations are elevated; even if I buy the AQR differential in favour of bonds.</div><div><br /></div><div>On balance I've decided to increase my strategic cash allocation to ~87% in equities, which corresponds to a risk weighting of 93%.</div><div><br /></div><div><br /></div><div></div></div><div></div></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com4tag:blogger.com,1999:blog-261139923818144971.post-31762573920635888832023-02-09T11:48:00.004+00:002023-02-09T11:48:48.820+00:00ESG - Extremely Serious Goalpost moving: Rob goes green<p>Just a quick one:</p><p>I'm moving the goalposts on my example long only portfolio using UK listed ETFs (original <a href="https://qoppac.blogspot.com/2020/06/a-curated-etf-list-and-model-portfolio.html">blog post</a> is here), done in the spirit of my second book Smart Portfolios: </p><p><b><span style="color: #6aa84f; font-size: large;">I've replaced all the ETFs in that portfolio with ESG funds</span></b></p><p>This is something I've wanted to do for a while, but the availability of ESG funds has really exploded recently and now the coverage is good enough that I think it's realistic to run an entire portfolio with just ESG.</p><p>The criteria is similar to before: low TER, reasonable AUM and ideally a distributing fund; although I've had to be a bit more flexible as the choice obviously still isn't as good. </p><p>My ESG criteria was simple: I used the ESG criteria checkbox in <a href="http://justetf.com">justetf.com</a>; I am not going to get into an argument about good versus bad ESG as I'm not an expert on that subject. My logic is that any ESG fund is <i>probably</i> better for the environment than an average non ESG fund, even if on balance there are going to be varying degrees of ESG fund. The portfolio reflects what an average investor can achieve without doing vast amounts of research, or investing directly in the underlying stocks (which again, will require significant research).</p><p>The only fund I excluded on ESG grounds was LGGG, which is very ESG-lite and only seems to exclude companies that actively murder people (one of it's largest holdings is Exxon!). Inevitably there are a few categories where I just couldn't find a suitable ESG fund. I also added a new bond category, bond issues by multilateral institutions, which matches the fund <a href="https://www.justetf.com/uk/etf-profile.html?isin=LU1852212965 ">MDBU</a>.</p><p>Rather pleasingly, and much to my surprise, the like for like matched simple average of TER across all the various ETF is virtually unchanged from before: 0.23%, just 1bp higher. This may just reflect fee pressure in the industry generally - I haven't updated the fees of the original portfolio for a few years and they have probably come down a bit, or cheaper funds may be available that weren't around originally.</p><p>I've created a new <a href="https://docs.google.com/spreadsheets/d/1DNU1KRDZlWb44fmach9KFdhydz3rS_7NZ1ChfAXYlmI/edit?usp=sharing">spreadsheet</a> with the new tickers and portfolio in; the old spreadsheet link is still around but won't be updated. </p><p>The plan is also to move my own investments into these funds, although it might take a few years as I don't want to incur a massive capital gains tax bill in the process.</p><p><br /></p>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com11tag:blogger.com,1999:blog-261139923818144971.post-35438835511001415552023-02-03T11:17:00.004+00:002023-02-03T11:17:48.300+00:00Percentage or price differences when estimating standard deviation - that is the question<p>In a lot of my work, including my <a href="https://www.systematicmoney.org/advanced-futures">new book</a>, I use two different ways of measuring standard deviation. The first method, which most people are familiar with, is to use some series of recent <i style="font-weight: bold;">percentage</i> returns. Given a series of prices p_t you might imagine the calculation would be something like this:</p><p><span style="font-family: courier;">Sigma_% = f([p_t - p_t-1]/p_t-1, [p_t-1 - p_t-2]/pt-2, ....)</span></p><p><span style="font-family: inherit;">NOTE: I am not concerned with the form that function </span><i style="font-family: inherit; font-weight: bold;">f</i><span style="font-family: inherit;"> takes in this post, but for the sake of argument let's see it's a simple moving average standard deviation. So we would take the last N of these terms, subtract the rolling mean from them, square them, take the average, and then take the square root.</span></p><p>For futures trading we have two options for p_t: the 'current' price of the contract, and the back adjusted price. These will only be the same in the days since the last roll. In fact, because the back adjusted price can go to zero or become negative, I strongly advocate using the 'current' price as the denominator in the above equation, and the changein back adjusted price as the numerator. If we used the change in current price, we'd see a pop upwards in volatility every time there was a futures roll. So if p*_t is the current price of a contract, then:</p><p><span style="font-family: courier;">Sigma_% = f([p_t - p_t-1]/p*_t-1, [p_t-1 - p_t-2]/p*t-2, ....)</span></p><p><span style="font-family: inherit;">The alternative method, is to use some series of <i style="font-weight: bold;">price differences</i>:</span></p><p><span style="font-family: courier;">Sigma_d = f([p_t - p_t-1], [p_t-1 - p_t-2], ....)</span></p><p>Here these are all </p><p>If I wanted to convert this standard deviation into terms comparable with the % standard deviation, then I would divide this by the current price (*not* the backadjusted price):</p><p><span style="font-family: courier;">Sigma_d% = </span><span style="font-family: courier;">Sigma_d</span><span style="font-family: courier;"> / p*_t</span></p><p>Now, clearly these are not going to give exactly the same answer, except in the tedious case where there has been no volatility (and perhaps a few, other, odd corner cases). This is illustrated nicely by the following little figure-ette (figure-ine? figure-let? figure-ling?):</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><pre style="font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">import </span>pandas <span style="color: #0033b3;">as </span>pd<br />perc =(px.diff()/pxc.shift(<span style="color: #1750eb;">1</span>)).rolling(<span style="color: #1750eb;">30</span>, <span style="color: #660099;">min_periods</span>=<span style="color: #1750eb;">3</span>).std()<br />diff = (px.diff()).rolling(<span style="color: #1750eb;">30</span>, <span style="color: #660099;">min_periods</span>=<span style="color: #1750eb;">3</span>).std().ffill()/pxc.ffill()<br />both = pd.concat([perc,diff], <span style="color: #660099;">axis</span>=<span style="color: #1750eb;">1</span>)<br />both.columns = [<span style="color: teal; font-weight: bold;">'%'</span>, <span style="color: teal; font-weight: bold;">'diff'</span>]<br /></span></pre><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkKJDW4tJnmYWEcdHOzj1LvmEMQ7N2zyIeYOluAKvpP7F6gc6VA152arDrHVRzC5bX9zKGjimJhXkc7DjtTqV1jEmb3IQgxo4kUZP9hfzsRyqTpmyWQspqErlgitWecb68jB9QFXP9Qt85YmubHmgUcyo_v5GozKxnVeFRhRPdy93xEHNNVBWOPE7ZrQ/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkKJDW4tJnmYWEcdHOzj1LvmEMQ7N2zyIeYOluAKvpP7F6gc6VA152arDrHVRzC5bX9zKGjimJhXkc7DjtTqV1jEmb3IQgxo4kUZP9hfzsRyqTpmyWQspqErlgitWecb68jB9QFXP9Qt85YmubHmgUcyo_v5GozKxnVeFRhRPdy93xEHNNVBWOPE7ZrQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><pre style="font-family: "JetBrains Mono", monospace;"><br /></pre></pre><p>The two series are tracking pretty closely, except in the extreme vol of late 2008, and even they aren't that different. </p><p>Here is another one:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCJvrAUcyob9kVin-DNZW-pKY06hQZLR_aKZ84qC3KXGwL1lLi1flmPBuNYlhtwW5Mw42VIJ1-L6UNZDAouW0FzEU25um0_1mQ7eicTwZ5_WdgQ5e1rRV7dseQYlPAgfVHkhTvwrSKvK4ol2TyAX8_52rXtS3k_2Gf5b8aTDInw5rl4NCF1PZqNQALQw/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCJvrAUcyob9kVin-DNZW-pKY06hQZLR_aKZ84qC3KXGwL1lLi1flmPBuNYlhtwW5Mw42VIJ1-L6UNZDAouW0FzEU25um0_1mQ7eicTwZ5_WdgQ5e1rRV7dseQYlPAgfVHkhTvwrSKvK4ol2TyAX8_52rXtS3k_2Gf5b8aTDInw5rl4NCF1PZqNQALQw/w640-h322/Figure_1.png" width="640" /></a></div>That's WTi crude oil during COVID; and there is quite a big difference there. Incidentally, the difference could have been far worse. I was trading the December 2020 contract at the time... the front contract in this period (May 2020) went below zero for several days.<div><br /></div><div>Now most people are more familiar with % standard deviations, which is why I have used it so much, but what you may not realise is that the <b>price difference standard deviation is far more important</b>.</div><div><br /></div><div>How come? Well consider the basic position sizing equation that I have used throughout my work:</div><div><br /></div><div><span style="font-family: courier;">N = Capital × τ ÷ (Multiplier × Price × FX rate × σ_% )</span></div><div><br /></div><div>(This is the version in my latest book, but very similar versions appear in my first and third books). Ignoring most things we get:</div><div><br /></div><div><div><span style="font-family: courier;">N = X ÷ (Price × σ_%)</span></div><div><br /></div></div><div>So the number of contracts held is proportional to one divided by the price multiplied by the percentage standard deviation estimate. The price shown is, if you've been paying attention, the current price not the back adjusted one. But remember:</div><div><p><span style="font-family: courier;">Sigma_d% = </span><span style="font-family: courier;">Sigma_d</span><span style="font-family: courier;"> / p*_t</span></p></div><div>Hence the position is actually proportional to the <b>standard deviation in price difference terms</b>. We can eithier estimate this directly, or as the equation suggests recover it from the standard deviation in percentage terms, which we then multiply by the current futures price.</div><div><br /></div><div>As the graphs above suggest, in the majority of cases it won't make much difference which of these methods you choose. But for the corner case of prices close to zero, it will be more robust to use price differences. In conclusion: <b>I recommend using price differences to estimate the standard deviation</b>.</div><div><br /></div><div>Finally, there are also times when it still makes sense to use % returns. For example, when estimating risk it's more natural to do this using percentages (I do this when getting a covariance matrix for my <a href="https://qoppac.blogspot.com/2022/02/exogenous-risk-overlay-take-two.html">exogenous risk overlay</a> and <a href="https://qoppac.blogspot.com/2021/10/mr-greedy-and-tale-of-minimum-tracking.html">dynamic optimisation</a>). When percentage standard deviation is required I usually divide my price difference estimate by the absolute value of the current futures price. That will handle prices close to zero and negative prices, but it will result in temporarily very high % standard deviations. This is mostly unavoidable, but at least the problem is confined to a small part of the strategy, and the most likely outcome is that we won't take positions in these markets (probably not a bad thing!).</div><div><br /></div><div><b>Footnote: </b>Shout out to the diff(log price) people. How did those negative prices work out for you guys?</div><div><br /></div><div><br /></div><div><br /></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com0tag:blogger.com,1999:blog-261139923818144971.post-66270604770519014992023-02-02T14:06:00.003+00:002023-02-07T08:48:50.086+00:00Playing around with leveraged ETFs; or how to get positive skew without trend following<p> As readers of my books will know, I don't recommend leveraged ETFs as a way to get leverage. Their ways are very dark and mysterious. But like many dark and mysterious things, they are also kind of funky and cool. In this post I will explore their general funkiness, and I will also show you how you can use them to produce a positive skewed return without the general faff of alternative ways of doing that: building a trend following strategy or trading options. </p><p>There is some simple python code in this post, but you don't need to be a pythonista to follow.</p><p><br /></p><h3 style="text-align: left;">A simple model for leveraged ETF payoffs</h3><p>As I was feeling unusually patriotic when I wrote this post, I decided to use the following FTSE 100 2x leveraged as my real life examples of leveraged ETFs:</p><p>Long: <span face="TwitterChirp, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif" style="background-color: white; color: #1d9bf0; font-size: 20px; white-space: pre-wrap;">https://www.justetf.com/uk/etf-profile.html?isin=IE00B4QNJJ23</span></p><p>Short: <span face="TwitterChirp, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif" style="background-color: white; color: #1d9bf0; font-size: 20px; white-space: pre-wrap;"><span data-offset-key="8pssf-1-0">https://www.justetf.com/uk/etf-profile.html?isin=IE00B4QNK008</span></span><span data-offset-key="8pssf-2-0" face="TwitterChirp, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif" style="background-color: white; color: #0f1419; font-size: 20px; white-space: pre-wrap;"><span data-text="true"> </span></span></p><p>It's very easy to work out how much a 2xleveraged ETF will be worth at some terminal point in the future. Assuming the current value is 1, and given a set of daily percentage returns, and specifying a long or short ETF:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">terminal_value_of_etf</span>(returns: <span style="color: navy;">np.array</span>, long: <span style="color: navy;">bool </span>= <span style="color: #0033b3;">True</span>) -> <span style="color: navy;">float</span>:<br /> <span style="color: #0033b3;">if </span>long: <br /> leveraged_returns = returns * <span style="color: #1750eb;">2<br /></span><span style="color: #1750eb;"> </span><span style="color: #0033b3;">else</span>:<br /> leveraged_returns = returns * -<span style="color: #1750eb;">2<br /></span><span style="color: #1750eb;"><br /></span><span style="color: #1750eb;"> </span>terminal_value = (leveraged_returns + <span style="color: #1750eb;">1</span>).cumprod()[-<span style="color: #1750eb;">1</span>]<br /><br /> <span style="color: #0033b3;">return </span>terminal_value<br /></span></pre><p>Now the best things in life are free, but ETFs aren't. We have to pay trading and management costs. The management costs on my two examples are around 0.55% a year (one is 0.5%, the other 0.6%) and the spread cost come in at 0.05% per trade. If we hold for a year then that will set us back 0.65%; call it 0.75% if we also have to pay commission (that would be the commission on a £5k trade if you're paying £5 a go).</p><p>Assuming we hold the ETFs for a year (~256 business days), we can then generate some random returns with some Gaussian noise and some given parameters, and get the terminal value. Finally, it's probably easier to think in terms of percentage gain or loss:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span><span style="color: #0033b3; font-size: x-small;">from <span style="color: #080808;">random </span>import <span style="color: #080808;">gauss</span></span></span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">random_returns</span>(annual_mean=<span style="color: #1750eb;">0</span>, annual_std=<span style="color: #1750eb;">0.16</span>, count=<span style="color: #1750eb;">256</span>):<br /> <span style="color: #0033b3;">return </span>np.array([gauss(annual_mean / <span style="color: #1750eb;">256</span>, annual_std / <span style="color: #1750eb;">16</span>) <span style="color: #0033b3;">for </span>_ <span style="color: #0033b3;">in </span><span style="color: navy;">range</span>(count)])<br /><br /><br /><span style="color: #0033b3;">def </span><span style="color: black;">one_year_return_given_random_returns</span>(<br /> long: <span style="color: navy;">bool </span>= <span style="color: #0033b3;">True</span>, annual_mean=<span style="color: #1750eb;">0</span>, annual_std=<span style="color: #1750eb;">0.16</span>, cost=<span style="color: #1750eb;">0.0075<br /></span>) -> <span style="color: navy;">float</span>:<br /> returns = random_returns(<span style="color: #660099;">annual_mean</span>=annual_mean, <span style="color: #660099;">annual_std</span>=annual_std)<br /> value = terminal_value_of_etf(<br /> returns, <span style="color: #660099;">long</span>=long<br /> )<br /><br /> <span style="color: #0033b3;">return (</span>value - cost - 1.0) / 1.0<br /></span></pre><p><br /></p><p>Let's generate a bunch of these random terminal payoffs and see what they look like.</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">x = [one_year_return_given_random_returns(<span style="color: #660099;">long</span>=<span style="color: #0033b3;">False</span>) <span style="color: #0033b3;">for </span>_ <span style="color: #0033b3;">in </span><span style="color: navy;">range</span>(<span style="color: #1750eb;">100000</span>)]<br /><br /><span style="color: #0033b3;">import </span>pandas <span style="color: #0033b3;">as </span>pd<br /><span style="color: #0033b3;">def </span><span style="color: black;">plot_distr_x_and_title</span>(x: <span style="color: navy;">list</span>):<br /> x_series = pd.Series(x)<br /> x_series.plot.hist(<span style="color: #660099;">bins</span>=<span style="color: #1750eb;">50</span>)<br /> plt.title(<br /> <span style="color: teal; font-weight: bold;">"Mean %.1f%% Median %.1f%% 1%% left tail %.1f%% 1%% right tail %.1f%% skew %.3f"<br /></span><span style="color: teal; font-weight: bold;"> </span>% (<br /> x_series.mean() * <span style="color: #1750eb;">100</span>,<br /> x_series.median() * <span style="color: #1750eb;">100</span>,<br /> x_series.quantile(<span style="color: #1750eb;">0.01</span>) * <span style="color: #1750eb;">100</span>,<br /> x_series.quantile(<span style="color: #1750eb;">0.99</span>) * <span style="color: #1750eb;">100</span>,<br /> x_series.skew(),<br /> )<br /> )<br /><br />plot_distr_x_and_title(x)<br /></span></pre><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxVjE_nk-8QYjVO5uGzLIkeAyDvQiAIwbJ1qEu3WBnzEG_mp3VXzimxI4VvOzWkGwHjg6s1FfFrOy6AmSGLejGDo1U-5k2lQ1Ukpv-V8tg-G0v5_PTN29VrJpA6Mw1g7bIr8W5pkj0W3xumefz-Z5EB9zh8UFqc3AoKz9Sl36XFkXqNv9ZuzdS4XPlLA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxVjE_nk-8QYjVO5uGzLIkeAyDvQiAIwbJ1qEu3WBnzEG_mp3VXzimxI4VvOzWkGwHjg6s1FfFrOy6AmSGLejGDo1U-5k2lQ1Ukpv-V8tg-G0v5_PTN29VrJpA6Mw1g7bIr8W5pkj0W3xumefz-Z5EB9zh8UFqc3AoKz9Sl36XFkXqNv9ZuzdS4XPlLA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><p>Well the mean makes sense - it's equal to our costs (as the mean of the Gaussian noise here is zero), but where is that glorious fat right tail coming from? It's what will happen with compounded gains and losses. Think about it like this; if we get unlucky and lose say 0.1% every day then the cumulative product of 0.999^256 is 0.77; a loss of 23%. But if we make 0.1% a day then 1.001^256 is 1.29; a gain of 29%. </p><p>Note that we'd get exactly the same graph with a short leveraged ETF, again with the mean of the noisy returns equal to zero.</p><p>What if the standard deviation was higher; say 32% a year?</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirQq1Nx0RkJ1QCR97cFLgSYIkH7ZQS9nSUNdZ62xr4TZWNHxmJPX9Y-Am-xOHNJBI8wLWYdJP5jIuqPcAOKjVyvpm0iCK78WEnHGFaLLHqkpP_UMLFEPXGetNTM6BgWfUprPVjfbPTHLby6ApyZTV7RxccYgDiWU_G3ZCA8epSAaO-B3E1hICz6r7fVQ/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirQq1Nx0RkJ1QCR97cFLgSYIkH7ZQS9nSUNdZ62xr4TZWNHxmJPX9Y-Am-xOHNJBI8wLWYdJP5jIuqPcAOKjVyvpm0iCK78WEnHGFaLLHqkpP_UMLFEPXGetNTM6BgWfUprPVjfbPTHLby6ApyZTV7RxccYgDiWU_G3ZCA8epSAaO-B3E1hICz6r7fVQ/w640-h322/Figure_1.png" width="640" /></a></div>Interesting.<br /><p> </p><h3>ETF payoffs versus drift</h3><div>Now what will the payoff look like if the underlying return has some drift? To be more interesting, let's plot the ETF return vs the total cumulative return of the underlying index for each of the random samples, playing around with the drift to get a good range of possible index returns.</div><div><br /></div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">one_year_return_and_index_return_given_random_returns</span>(<br /> long: <span style="color: navy;">bool </span>= <span style="color: #0033b3;">True</span>, annual_mean=<span style="color: #1750eb;">0</span>, annual_std=<span style="color: #1750eb;">0.16</span>, cost=<span style="color: #1750eb;">0.0075<br /></span>):<br /> returns = random_returns(<span style="color: #660099;">annual_mean</span>=annual_mean, <span style="color: #660099;">annual_std</span>=annual_std)<br /> index_return = ((returns + <span style="color: #1750eb;">1</span>).cumprod() - <span style="color: #1750eb;">1</span>)[-<span style="color: #1750eb;">1</span>]<br /> value = terminal_value_of_etf(returns, <span style="color: #660099;">long</span>=long)<br /> etf_return = (value - cost - <span style="color: #1750eb;">1.0</span>) / <span style="color: #1750eb;">1.0<br /></span><span style="color: #1750eb;"><br /></span><span style="color: #1750eb;"> </span><span style="color: #0033b3;">return </span>index_return, etf_return<br /><br /><br />index_returns = np.arange(<span style="color: #660099;">start</span>=-<span style="color: #1750eb;">0.25</span>, <span style="color: #660099;">stop</span>=<span style="color: #1750eb;">0.25</span>, <span style="color: #660099;">step</span>=<span style="color: #1750eb;">0.0001</span>)<br />all_index_returns = []<br />all_etf_returns = []<br /><span style="color: #0033b3;">for </span>mean_drift <span style="color: #0033b3;">in </span>index_returns:<br /> <span style="color: #0033b3;">for </span>_ <span style="color: #0033b3;">in </span><span style="color: navy;">range</span>(<span style="color: #1750eb;">100</span>):<br /> results = one_year_return_and_index_return_given_random_returns(<br /> <span style="color: #660099;">annual_mean</span>=mean_drift<br /> )<br /> all_index_returns.append(results[<span style="color: #1750eb;">0</span>])<br /> all_etf_returns.append(results[<span style="color: #1750eb;">1</span>])<br /><br />to_scatter = pd.DataFrame(<br /> <span style="color: navy;">dict</span>(<span style="color: #660099;">index_returns</span>=all_index_returns, <span style="color: #660099;">etf_returns</span>=all_etf_returns)<br />)<br /><br />to_scatter.plot.scatter(<span style="color: #660099;">x</span>=<span style="color: teal; font-weight: bold;">"index_returns"</span>, <span style="color: #660099;">y</span>=<span style="color: teal; font-weight: bold;">"etf_returns"</span>)<br /></span></pre></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIBytDOGZumWToCgzslXE-jlBBNrtbsu6n-_WGKV4G-T52Jy7GqWqzQTR0ztp9qMqnHz_lr4Q_KA4CN8fD7u9ZsOhBir-7Irn6Fy0oBa3vCJSCdGoZMBUOFLv5HIF-vp5HRLkxcZ21iYWbJX-xMHs051qzdWu0efgH0dMGNYdPIGr5drAjIqnK17R3Cg/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIBytDOGZumWToCgzslXE-jlBBNrtbsu6n-_WGKV4G-T52Jy7GqWqzQTR0ztp9qMqnHz_lr4Q_KA4CN8fD7u9ZsOhBir-7Irn6Fy0oBa3vCJSCdGoZMBUOFLv5HIF-vp5HRLkxcZ21iYWbJX-xMHs051qzdWu0efgH0dMGNYdPIGr5drAjIqnK17R3Cg/w640-h322/Figure_1.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div>Looks like an option payoff doesn't it?</div><div><br /></div><div><h3>Double the fun</h3></div><div>So.... if owning a long (or short) 2xleveraged ETF is a bit like owning an option, then owning a long AND a short leveraged ETF will be a bit like owning a straddle? And since the payoff from owning a straddle is a bit like the payoff from trend following...</div><div><br /></div><div>So let's simulate what happens if we buy both a long AND a short leveraged ETF.</div><div><br /></div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">one_year_return_and_index_return_given_random_returns_for_long_and_short</span>(<br /> annual_mean=<span style="color: #1750eb;">0</span>, annual_std=<span style="color: #1750eb;">0.16</span>, cost=<span style="color: #1750eb;">0.0075<br /></span>):<br /> returns = random_returns(<span style="color: #660099;">annual_mean</span>=annual_mean, <span style="color: #660099;">annual_std</span>=annual_std)<br /> index_return = returns.mean()*len(returns)<br /> long_value = terminal_value_of_etf(returns, <span style="color: #660099;">long</span>=<span style="color: #0033b3;">True</span>)<br /> short_value = terminal_value_of_etf(returns, <span style="color: #660099;">long</span>=<span style="color: #0033b3;">False</span>)<br /><br /> long_etf_return = (long_value - cost - <span style="color: #1750eb;">1.0</span>) / <span style="color: #1750eb;">1.0<br /></span><span style="color: #1750eb;"> </span>short_etf_return = (short_value - cost - <span style="color: #1750eb;">1.0</span>) / <span style="color: #1750eb;">1.0<br /></span><span style="color: #1750eb;"><br /></span><span style="color: #1750eb;"> </span>total_return = (long_etf_return + short_etf_return) / <span style="color: #1750eb;">2.0<br /></span><span style="color: #1750eb;"><br /></span><span style="color: #1750eb;"> </span><span style="color: #0033b3;">return </span>index_return, total_return<br /><br /><br />index_returns = np.arange(<span style="color: #660099;">start</span>=-<span style="color: #1750eb;">0.25</span>, <span style="color: #660099;">stop</span>=<span style="color: #1750eb;">0.25</span>, <span style="color: #660099;">step</span>=<span style="color: #1750eb;">0.0001</span>)<br />all_index_returns = []<br />all_etf_returns = []<br /><span style="color: #0033b3;">for </span>mean_drift <span style="color: #0033b3;">in </span>index_returns:<br /> <span style="color: #0033b3;">for </span>_ <span style="color: #0033b3;">in </span><span style="color: navy;">range</span>(<span style="color: #1750eb;">100</span>):<br /> results = (<br /> one_year_return_and_index_return_given_random_returns_for_long_and_short(<br /> <span style="color: #660099;">annual_mean</span>=mean_drift<br /> )<br /> )<br /> all_index_returns.append(results[<span style="color: #1750eb;">0</span>])<br /> all_etf_returns.append(results[<span style="color: #1750eb;">1</span>])<br /><br />to_scatter = pd.DataFrame(<br /> <span style="color: navy;">dict</span>(<span style="color: #660099;">index_returns</span>=all_index_returns, <span style="color: #660099;">etf_returns</span>=all_etf_returns)<br />)<br /><br />to_scatter.plot.scatter(<span style="color: #660099;">x</span>=<span style="color: teal; font-weight: bold;">"index_returns"</span>, <span style="color: #660099;">y</span>=<span style="color: teal; font-weight: bold;">"etf_returns"</span>)<br /></span></pre></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc7lIZv9wJcxJL8Zr0jhAnJ9BWtam-Md7R8QWnRAIM5za7B3Hhik2nrOqIsyI54iRLNOa3ty5Rk4w9acbzKrZ4dKBNEN2v5IeTaVtpgaWd1nv1-Yo1hUdzGv2pQhYVMbV8KCoBJFF84qlcK3KekTKg92wJ1Jqw-HFTNp8KNdRrq_p0MUGRGDAnwkB8mA/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc7lIZv9wJcxJL8Zr0jhAnJ9BWtam-Md7R8QWnRAIM5za7B3Hhik2nrOqIsyI54iRLNOa3ty5Rk4w9acbzKrZ4dKBNEN2v5IeTaVtpgaWd1nv1-Yo1hUdzGv2pQhYVMbV8KCoBJFF84qlcK3KekTKg92wJ1Jqw-HFTNp8KNdRrq_p0MUGRGDAnwkB8mA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div>Certainly looks like the payoff of a long straddle, or trend following. We never lose more than 7% - which is a bit like the premium of the option - but if the index moves a fair bit in eithier direction then we make serious bank.</div><div><br /></div><div><br /></div><h3 style="text-align: left;">And in conclusion...</h3><div>This has been a nice bit of fun, but am I seriously suggesting that buying a paired set of ETFs is a serious substitute for a trend following strategy? I'd like to think that trend following has a positive expectancy, whereas this is certainly a bit more like owning a long straddle; paying a premium if prices don't move very much and then getting a non linear payoff if they move a lot.</div><div><br /></div><div>And my usual advice still stands - leveraged ETFs are not for the faint hearted, and have no place in most investors portfolios.</div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com7tag:blogger.com,1999:blog-261139923818144971.post-19032202303854187162023-02-01T08:50:00.000+00:002023-02-01T08:50:12.338+00:00Fast but not furious: Do fast trading rules actually cost a lot to trade?<p>This is the second post in a series I'm doing about whether I can trade faster strategies than I currently do, without being destroyed by high trading costs. The series is motivated in the first post, <a href="https://qoppac.blogspot.com/2023/01/scream-if-you-want-to-go-faster.html">here</a>.</p><p>In this post, I see if it's possible to 'smuggle in' high cost trading strategies, due to the many layers of position sizing, buffering and optimisation that sit between the underlying forecast and the final trades that are done. Of course, it's also possible that the layering completely removes the effect of the high cost strategy!</p><p>Why might we want to do this? Well fast trend following strategies in particular have some nice properties, as <a href="https://www.man.com/maninstitute/need-for-speed-trend-following">discussed in this piece by my former employers AHL</a>. And fast mean reversion strategies, of the type I discuss in part four of my forthcoming book, are extremely diversifiying versus medium and slow speed trend following.</p><p><i>It's a nice piece, but I'm a bit cross they have taken another of the possible 'speed/fast' cultural references that I planned to use in this series.</i></p><p>Full series of posts:</p><p></p><ul style="text-align: left;"><li>In the<a href="https://qoppac.blogspot.com/2023/01/scream-if-you-want-to-go-faster.html"> first post</a>, I explored the relationshipd between instrument cost and momentum performance.</li><li>This is the second post</li></ul><p></p><p><br /></p><p><br /></p><h2 style="text-align: left;">My two trading strategies</h2><p>It's worth briefly reviewing how my two trading strategies actually work (the one I traded until about a year ago, and the one I currently trade).</p><p>Both strategies start off the same way; I have a pool of trading rule variations that create forecasts for a given instrument. What is a trading rule variation? Well a trading rule would be something like a <a href="https://qoppac.blogspot.com/2016/05/a-simple-breakout-trading-rule.html">breakout</a> rule with an N day lookback. A variation of that rule is a specific parameter value for N. How do we decide which instruments should use which trading rule variations? Primarily, that decision is based around costs. A variation that trades quickly - has a higher forecast turnover - like a breakout rule with a small value for N, wouldn't be suitable for an instrument with a high risk adjusted cost per trade.</p><p>Once I have a set of trading rule variations for a given instrument, I take a weighted average of their forecast values, which gives me a combined forecast. Note that I use equal weights to keep things simple. That forecast will change less for expensive instruments. I then convert those forecasts into idealised positions in numbers of contracts. At this stage these idealised numbers are unrounded. During that process there will be some additional turnover introduced by the effect of scaling positions for volatility, changes in price, movements in FX rates and changes in capital.</p><p>For my original trading system (as described in some detail in my <a href="https://www.systematicmoney.org/systematic-trading">first</a> and<a href="https://www.systematicmoney.org/leveraged-trading"> third</a> books), I then use a cost reduction technique known as <i>buffering</i> (or <i>position inertia</i> in my first book <i>Systematic Trading</i>). Essentially this resolves the unrounded position to a rounded position, but I only trade if my current position is outside of a buffer around the idealised position. So if the idealised position moves a small amount, we don't bother trading.</p><p>Importantly, the buffering width I use is the same for all instruments (10% of an average position); actually in theory it should be wider for expensive instruments and narrower for cheaper instruments. </p><p>My new trading system uses a technique called dynamic optimisation ('DO'), which tries to trade the portfolio of integer positions that most closely match the idealised position, bearing in mind I have woefully insufficient capital to trade an idealised portfolio with over 100 instruments. You can read about this in the new book, or for cheapskates there is a <a href="https://qoppac.blogspot.com/2021/06/optimising-my-way-out-of-small-fund.html">series of blogposts</a> you can read for free. </p><p>As far as slowing down trading goes, there are two stages here. The first is that when we optimise our positions, we consider the trades required, and penalise expensive trades. I use the actual trading cost here, so we'll be less likely to trade in more expensive instruments. The second stage involves something similar to the buffering technique mentioned above, except that it is applied to the entire set of trades. More <a href="https://qoppac.blogspot.com/2021/11/mr-greedy-and-tale-of-minimum-tracking.html">here</a>. In common with the buffer on my original trading strategy, the width of the buffer is effectively the same for every instrument.</p><p>Finally for both strategies, there will be additional trading from <b>rolling</b> to new futures contracts.</p><p>To summarise then, the following will determine the trading frequency for a given instrument:</p><p></p><ol style="text-align: left;"><li>The set of trading rule variations we have selected, using per instrument trading costs.</li><li>The effect of rolling, scaling positions for volatility, changes in price, movements in FX rates (and <a href="https://qoppac.blogspot.com/2016/06/capital-correction-pysystemtrade.html">in production, but not my constant capital backtests</a>, changes in capital).</li><li>In my original system, a <b>buffer</b> that's applied to each instrument position, with a width that is invariant to per instrument trading cost.</li><li>In my new DO system, a <b>cost penalty on trading </b>which is calculated using per instrument trading cost.</li><li>In my new DO system, a <b>buffer</b> that's applied to all trades in one go, with a width that is invariant to per instrument trading cost.</li></ol><p></p><p><i>(There are some slight simplifications here; I'm missing out some of the extra bits in my strategy such as vol attenuation and a risk overlay which may also contribute to turnover)</i></p><p>There are some consequeces of this. One is that even if you have a constant forecast (the so-called 'asset allocating investor' in <i>Systematic Trading</i>), you will still do some trading because of the effects listed under point 2. Another is that if you are trading very quickly, it's plausible that quite a lot of that trading will get 'soaked up' by stage 3, or stages 4 and 5 if you're running DO.</p><p>It's this latter effect we're going to explore in this post. My thesis is that we might be able to include a faster trading trading rule variation alongside slower variations, as we'll get the following behaviour: Most of the time the faster rule will be 'damped out' by stages 4 to 6, and we'll effectively only be trading the slower trading rule variations. However when it has a particularly large effect on our forecasts, then it will contribute to our positions, giving us a little extra alpha. That's the idea anyway.</p><p><br /></p><p><br /></p><h2>Rolling the pitch</h2><p>Before doing any kind of back-testing around trading costs, it's important to make sure we're using accurate numbers. This is particularly important for me, as I've recently added another few instruments to my database, and I now have over 200 (206 to be precise!), although without duplicates like micro/mini futures the figure comes down to 176.</p><p>First I double checked that I had the right level of commissions in my <a href="https://github.com/robcarver17/pysystemtrade/blob/master/data/futures/csvconfig/instrumentconfig.csv">configuration file</a>, by going through my brokerage trade report (sadly this is a manual process right now). It turns out my broker has been inflating comissions a bit since I last checked, and there were also some errors and ommissions.</p><p>Next I checked I had realistic levels for trading spreads. For this I have a<a href="https://github.com/robcarver17/reports/blob/master/Slippage_report"> report</a> and a semi-automated process that updates my configuration using information from both trades and regular price samples.</p><p>Since I was in spring cleaning mode (OK, it's autum in the UK, but I guess it's spring in the southern hemisphere?) I also took the opportunity to update my list of '<a href="https://github.com/robcarver17/reports/blob/master/Remove_markets_report">bad markets</a>' that are too illiquid or costly to trade, and also my list of <a href="https://github.com/robcarver17/reports/blob/master/Duplicate_markets_report">duplicate markets</a> where I have the choice of trading e.g. the mini or micro future for a given instrument. Turns out quite a few of the recently added instruments are decently liquid micro futures, which I can trade instead of the full fat alternatives.</p><p>At some point I will want to change my instrument weights to reflect these changes, but I'm going to hold fire until after I've finished this research. It will also make more sense to do this in April, when I do my usual end of year review. If I wait until then, it will make it easier to compare backtested and live results for the last 12 months.</p><p><br /></p><h2>Changes in turnover </h2><p>To get some intuition about the effect of these various effects, I'm going to start off testing one of my current trading rules: exponentially weighted moving average crossover (EWMAC). There are 6 variations of this rule that I trade, ranging from EWMAC4,16 (which is very fast), up to EWMAC64,25 (slow). </p><p>To start with, let's measure the different turnover of forecasts and positions for each of these trading rules as we move through the following stages:</p><p></p><ul style="text-align: left;"><li>Trading rule forecast </li><li>Raw position before buffering</li><li>Buffered position</li></ul><p></p><p>I will use the S&P 500 as my arbitrary instrument here, but in practice it won't make much difference - I could even use <a href="https://qoppac.blogspot.com/2015/11/using-random-data.html">random data</a> to get a sensible answer here.</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><pre style="font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"> forecast raw_position buffered_position<br /><span style="color: #1750eb;">4 61.80 52.63 49.81<br /></span><span style="color: #1750eb;">8 31.13 27.80 24.98<br /></span><span style="color: #1750eb;">16 16.32 16.23 13.88<br /></span><span style="color: #1750eb;">32 9.69 11.44 8.92<br /></span><span style="color: #1750eb;">64 7.46 10.16 7.04<br /></span><span style="color: #1750eb;">Long 0.00 2.53 2.14<br /></span></span></pre></pre><p>Obviously, the turnover of the forecast slows as we increase the span of the EWMAC in the first column. The final row shows a constant forecast rule, which obviously has a turnover of zero. In the next column is the turnover of the raw position. For very slow forecasts, this is higher than for the underyling forecast, as we do tradings for the reasons outlined above (the effect of rolling, scaling positions for volatility, changes in price and movement in FX rates). As the final row shows, this imposes a lower bound on turnover no matter how slow your forecasts are. However for very fast forecasts, the position turnover is actually a little lower than the forecast turnover. This is a hint that 'smuggling in' may have some promise.</p><p>Now consider the buffered position. Obviously this has a lower turnover than the raw position. The reduction is proportionally higher for slower trading rules: it's about a 5% reduction for ewmac4 and more like 30% for the very slowest momentum rule. Curiously, the buffering has less of an effect on the long only constant forecast rule than on ewmac64.</p><p>All of this means that something we think has a turnover of over 60 (ewmac4) will actually end up with a turnover of more like 50 after buffering. That is a 17% reduction.</p><p>Don't get too excited yet, because turnover will be higher in a multi instrument portfolio, because of the effect of instrument diversification: turnover will be roughly equal to the IDM multiplied by the turnover for a single instrument, and the IDM for my highly diversified portfolio here is around 2.0.</p><p>Now, what about the effects of dynamic optimisation. Because dynamic optimisation only makes sense across instruments, I'm going to do this exercise for 50 or so randomly selected instruments (50 rather than 200 to save time running backtests - it won't affect the results much). </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJid5lSvloepxgMHhYNSFzQUUiyHOsxWNtJFICOlRd3_Hs-zpFgExFYfILNxDQhTB4vzuglfnMY7-hiNkXUs2uvJM6tJHJglgIzg-Z6SaMBFAnMIHdqvNhFeCU-3qMBb2dzNHzU0jhXdNrG7-aXKzoiFKou5lfqVzVwmdaQMLCI8J1OM7vxSk0KuNRJQ/s640/Figure_2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJid5lSvloepxgMHhYNSFzQUUiyHOsxWNtJFICOlRd3_Hs-zpFgExFYfILNxDQhTB4vzuglfnMY7-hiNkXUs2uvJM6tJHJglgIzg-Z6SaMBFAnMIHdqvNhFeCU-3qMBb2dzNHzU0jhXdNrG7-aXKzoiFKou5lfqVzVwmdaQMLCI8J1OM7vxSk0KuNRJQ/w640-h480/Figure_2.png" width="640" /></a></div>The y-axis shows the turnover, with each line representing a different trading speed.<br /><p>The x-axis labels are as follows:</p><p></p><ul><li>The total turnover of the strategy before any dynamic optimisation takes place; this is analogous to the raw position in the table above. Again this is higher than the figures for the S&P 500 above because of the effect of instrument diversification.</li><li>The total turnover of the strategy after dynamic optimisation, but without any cost penalty or buffering.</li><li>The total turnover of the strategy after dynamic optimisation, with a cost penalty, but with no buffering.</li><li>The total turnover of the strategy after dynamic optimisation, without a cost penalty, but with buffering.</li><li>The total turnover of the strategy after dynamic optimisation, with a cost penalty and buffering.</li></ul><p></p><p>Interestingly the optimisation adds a 'fixed cost' of turnover to the strategy of extra turnover per year, although this does not happen with the fastest rule. Both buffering and the trading cost penalty reduce the turnover, although the cost penalty has the larger standalone effect. Taken together, costs and buffering reduce turnover significantly, between around a half and a third.</p><p>What does this all mean? Well it means we probably have a little more headroom than we think when considering whether a particular trading rule is viable, since it's likely the net effect of position sizing plus buffering will slow things down. This isn't true for the very slowest trading rules with dynamic optimisation which can't quite overcome the turnover increase from position sizing, but they this is unlikely to be an issue for the cheaper instruments where we'd consider adding a faster trading rule.</p><p><br /></p><h2>Changes in costs (dynamic optimisation)</h2><div><br /></div><div>You might expect higher turnover to always linearly lead to higher costs. That's certainly the case for the simple one instrument, S&P 500 only, setup above. But this is not automatically the case for dynamic optimisation. Indeed, we can think of some pathological examples where the turnover is much higher for a given strategy, but costs are lower, because the DO has chosen to trade instrument(s) with lower costs.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh31HIBwsQmK_s4lmlPQJfCcuoHDngA375hY0gfeG6c7BzEahlMQ6QKAyZWCmKbyeWqnWZ8XrHioUxVJcxGcnJfbupu4ydnSpwe9DJyqrxtFyb6VEyp67KQ9Cn5cMbUWz6dioUCUk-6hiUMxE-iWb05CroiQwC7_4q5Zg9oZSDToneF8waA3qsvFLgFUg/s640/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh31HIBwsQmK_s4lmlPQJfCcuoHDngA375hY0gfeG6c7BzEahlMQ6QKAyZWCmKbyeWqnWZ8XrHioUxVJcxGcnJfbupu4ydnSpwe9DJyqrxtFyb6VEyp67KQ9Cn5cMbUWz6dioUCUk-6hiUMxE-iWb05CroiQwC7_4q5Zg9oZSDToneF8waA3qsvFLgFUg/w640-h480/Figure_1.png" width="640" /></a></div><br /><div>In fact the picture here is quite similar to turnover, so the point still stands. We can knock off about 1/3 of the costs of trading the very fastest EWMA through the use of dynamic optimisation with a cost penalty (and buffering also helps). Even with the slowest of our EWMA we still see a 25% reduction in costs. </div><div><br /></div><div><br /></div><h2>Forecast combination</h2><p>Now let us move from a simple world in which we are selecting a single momentum rule, and foolishly trading it on every instrument we own regardless of costs, to one in which we trade multiple momentum rules.</p><p>There is another effect at work in a full fledged trading strategy, that won't be obvious from the isolated research we've done so far, and that is forecast combination. If we introduce a new fast trading rule, we're unlikely to give it 100% of the forecast weights. This means that it's effect on the overall turnover of the strategy will be limited.</p><p>To take a simple example, suppose we're trading a strategy with a forecast turnover of 15, leading to a likely final turnover of ~13.3 after buffering and what not (as explained above). Now we introduce a new trading rule with a 10% allocation, that has a turnover of 25. If the trading rule has zero correlation with the other rules, then our forecast turnover will increase to (0.9 * 15) + (0.1 * 25) = 16. After buffering and what not the final turnover will be around 14.0. A very modest increase really.</p><p>This is too simplified. If a forecast really is uncorrelated, then it adding it will increase the forecast diversification multiplier (FDM), which will increase the turnover of the final combined forecast. But if the forecast is highly correlated, then the raw turnover will increase by more than we expect. In both of these cases get slightly more turnover; so things will be a little worse than we expect.</p><p><br /></p><p><br /></p><h2>Implications for the speed limit</h2><p><br /></p><p>A reminder: I have a trading <b>speed limit</b> concept which states that I don't want to allocate more than third of my expected pre-cost Sharpe Ratio towards trading costs. For an individual trading rule on a single instrument, that equates to a maximum of around 0.13 or 0.10 SR annual units to be spent on costs, depending on which of my books you are reading (consistency is for the hoi polloi). The logic is that the realistic median performance for an individual instrument is unlikely to be more than 0.40 or 0.30 SR.</p><p>(At a portfolio level we get higher costs because of additional leverage from the instrument diversification multiplier, but as long as the realised improvement in Sharpe Ratio is at least as good as that we'll end up paying the same or a lower proportion in expected costs).</p><p>How does that calculation work in practice? Suppose you are trading an instrument which rolls quarterly, and you have a cost of 0.005 SR units per trade. The maximum turnover for a forecast to meet my speed limit, and thus be included in the forecast combination for a given instrument, assuming a speed limit of 0.13 SR units is:</p><p><span style="font-family: courier; font-size: x-small;">Annual cost, SR units = (forecast turnover + rolls per year) * cost per trade </span></p><p><span style="font-family: courier; font-size: x-small;">Maximum annual cost, SR units = (maximum forecast turnover + rolls per year) * cost per trade </span></p><p><span style="font-family: courier; font-size: x-small;">Maximum forecast turnover = (Maximum annual cost / cost per trade) - rolls per year</span></p><p><span style="font-family: courier; font-size: x-small;">Maximum forecast turnover = (0.13 / 0.005) - 4 = 22</span></p><p>However that ignores the effect of everything we've discussed so far:</p><p></p><ul style="text-align: left;"><li>forecast combination </li><li>the FDM (adds leverage, makes things worse)</li><li>other sources of position turnover, mainly vol scaling (makes things better for very fast rules)</li><li>the IDM multiplier (adds leverage, makes things worse)</li><li>buffering (static system) - makes things better</li><li>buffering and cost penalty (DO) - makes things better</li></ul><p></p><p>Of course it's better, all other things being equal, to trade more slowly and spend less on costs but all of this suggests we probably do have room to make a modest allocation to a relatively fast trading rule without it absolutely killing us on trading costs.</p><p><br /></p><p><br /></p><h2>An experiment with combined forecasts</h2><div>Let's setup the following experiment. I'm interested in three different setups:</div><div><ol style="text-align: left;"><li>Allocating only to the very slowest three momentum speed (regardless of instrument cost, equally weighted)</li><li>Allocating only to the very fastest three momentum speeds (regardless of instrument cost, equally weighted)</li><li>Allocating conditionally to momentum speeds depending on the costs of an instrument and the turnover of the trading rule, ensuring I remain below the 'speed limit'. This is what I do now. Note that this will imply that some instruments are excluded.</li><li>Allocating to all six momentum speeds in every instrument (regardless of instrument cost, equally weighted)</li></ol><div>1. is a fast system, whilst 2. is a 'slow' system (it's not that slow!). In the absence of costs, we would probably want to trade them both, given the likely diversification and other benefits. Options 3 and 4 explore two different ways of doing that. Option 3 involves throwing away trading rules that are too quick for a given instrument, whilst option 4 ploughs on hoping everything will be okay.</div><div><br /></div><div>How should we evaluate these? Naturally, we're probably most interested in the turnover and costs of options 3 and 4. It will be interesting to see if the costs of option 4 are a hell of a lot higher, or if we are managing to 'smuggle in'.</div><div><br /></div><div>What about performance? Pure Sharpe ratio is one way, but may give us a mixed picture. In particular, the pre-cost SR of the faster rules has historically been worse than the slower rules. The fourth option will produce a 50:50 split between the two, which is likely to be sub-optimal. Really what we are interested in here is the 'character' of the strategies. Hence a better way is to run regressions of 3 and 4 versus 1 and 2. This will tell us the implicit proportion of fast trading that has survived the various layers between forecast and position.</div></div><div><br /></div><div><i>Nerdy note: Correlations between 1 and 2 are likely to be reasonably high (around 0.80), but not enough to cause problems with co-linearity in the regression.</i></div><div><br /></div><div>To do this exercise I'm going to shift to a series of slightly different portfolio setups. Firstly, I will use the full 102 instruments in my 'jumbo portfolio'. Each of these has met a cutoff for SR costs per transaction. I will see how this does for both the static set of instruments (using a notional $50 million to avoid rounding errors), but also for the dynamic optimisation (using $500K). </div><div><br /></div><div>However I'm also going to run my full list of 176 instruments only for dynamic optimisation, which will include many instruments that are far too expensive to meet my SR cost cutoff or are otherwise too illiquid (you can see a list of them in <a href="https://github.com/robcarver17/reports/blob/master/Remove_markets_report">this report</a>; there are about 70 or so at the time of writing; there is no point doing this for static optimisation as the costs would be absolutely penal for option 4). I will consider two sub options here: forming forecasts for these instruments but not trading them (which is my current approach), and allowing them to trade (if they can survive the cost penalty, which I will still be applying).</div><div><br /></div><div><i>Note that I'm going to fit instrument weights (naturally in a robust, 'handcrafted' setup using only correlations). Otherwise I'd have an unbalanced portfolio, since there are more equities in my data set than other instruments.</i></div><div><br /></div><div>To summarise then we have the following four scenarios in which to test the four options:</div><div><ol style="text-align: left;"><li>Static system with 102 instruments ($50 million capital)</li><li>Dynamic optimisation with 102 instruments ($500k)</li><li>Dynamic optimisation with 176 instruments, constraining around 70 expensive or illiquid instruments from trading ($500k)</li><li>Dynamic optimisation with 176 instruments, allowing expensive instruments to trade (but still applying a cost penalty) ($500k)</li></ol></div><div><br /></div><h2 style="text-align: left;">Results</h2><div>Let's begin as before by looking at the total turnover and costs. Each line on the graph shows a different scenario:</div><div><br /></div><div><div><ol><li>(<b>Static</b>) Static system with 102 instruments ($50 million capital)</li><li>(<b>DO_cheap</b>) Dynamic optimisation with 102 instruments ($500k), which excludes expensive and illiquid instruments</li><li>(<b>DO_constrain</b>) Dynamic optimisation with 176 instruments, constraining around 70 expensive or illiquid instruments from trading ($500k)</li><li>(<b>DO_unconstrain</b>) Dynamic optimisation with 176 instruments, allowing expensive instruments to trade (but still applying a cost penalty) ($500k)</li></ol></div><div><br /></div></div><div> The x-axis show the different options: </div><div><ol><li>(<b>slow</b>) Allocating only to the very slowest three momentum speed (regardless of instrument cost, equally weighted)</li><li>(<b>fast) </b>Allocating only to the very fastest three momentum speeds (regardless of instrument cost, equally weighted)</li><li>(<b>condition</b>) Allocating conditionally to momentum speeds depending on the costs of an instrument and the turnover of the trading rule, ensuring I remain below the 'speed limit'. This is what I do now. Note that this will imply that some instruments are excluded completely.</li><li>(<b>all</b>) Allocating to all six momentum speeds in every instrument (regardless of instrument cost, equally weighted)</li></ol></div><div>First the turnovers</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV6QpMOvvhip91lMPUQ-8p5rl9xpDMuyp5edHrxiQ6oO0tVFOPQg2XtDITMOVPo-DSd4D8OL7WwrorJmOfzyhaIGWbvPknhfCAq4jf6X2dGSkVDkRtGHtSOWtDfK-eAU7PMiwL2Kjk2Q6JxgGBzFRwojpkXoQIrDbmXLNolySfhHRtTpk3KbgzHaF0zw/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV6QpMOvvhip91lMPUQ-8p5rl9xpDMuyp5edHrxiQ6oO0tVFOPQg2XtDITMOVPo-DSd4D8OL7WwrorJmOfzyhaIGWbvPknhfCAq4jf6X2dGSkVDkRtGHtSOWtDfK-eAU7PMiwL2Kjk2Q6JxgGBzFRwojpkXoQIrDbmXLNolySfhHRtTpk3KbgzHaF0zw/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div><br /></div><div>Now the costs (in SR units):</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR80AZPKXx93wjy47X5S7CNYBILUuu4yM5o3IBZMmoANHiVyjbLqGWHB75-0vbFiDDMumSXrXY4mcwdqqvSa0aVJvX2r5HRi5_Psq2PRG6jsL_y0LN-7lQ24zJzf_ILZLTgULOtPZfbzaYWnxb-ySb5xb_In4LQ3IjVVZES3zqC69NL4s02uQBpso0cg/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR80AZPKXx93wjy47X5S7CNYBILUuu4yM5o3IBZMmoANHiVyjbLqGWHB75-0vbFiDDMumSXrXY4mcwdqqvSa0aVJvX2r5HRi5_Psq2PRG6jsL_y0LN-7lQ24zJzf_ILZLTgULOtPZfbzaYWnxb-ySb5xb_In4LQ3IjVVZES3zqC69NL4s02uQBpso0cg/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>These show a similar pattern, but the difference between lines is more marked for costs. Generally speaking the static system is the most expensive way to trade anything. This is despite the fact that it does not have any super expensive instruments, since these have already been weeded out. Introducing DO with a full set of instruments, including many that are too expensive to trade, and allowing all of them to trade still reduces costs by around 20% when trading the three fastest rules or all six rules together.</div><div><br /></div><div>Preventing the expensive instruments from trading (DO_constrain) lowers the costs even further, by around 30% [Reminder: This is what I currently do]. Completely removing expensive instruments provides a further reduction, but it is negligible.</div><div><br /></div><div>Conditionally trading fast rules, as I do now, allows us to trade pretty much at the same cost level as a slow system: it's only 1 basis point of SR more expensive. But trading all trading rules for all instruments is a little more pricey. </div><div><br /></div><div>Now how about considering the 'character' of returns? For each of the options 3 and 4, I am going to regress their returns on the returns of option 1 and option 2. The following tables shows the results. Each row is a scenario, and the columns show the betas on 'slow' (option 1) and 'slow' respectively. I've resampled returns to a monthly frequency to reduce the noise.</div><div><br /></div><div><div>First let's regress the returns from a strategy that uses *all* the trading rules for every instrument.</div><div><br /></div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"> fast slow<br />static <span style="color: #1750eb;">0.590 0.557<br /></span>DO_cheap <span style="color: #1750eb;">0.564 0.557<br /></span>DO_constrain <span style="color: #1750eb;">0.550 0.561<br /></span>DO_unconstrain <span style="color: #1750eb;">0.535 0.559</span></span></pre></div><div><br /></div><div>Each individual instrument is 50% fast, 50% slow, so this is exactly what we would expect with about half the returns of the combined strategy coming from exposure to the fast strategy, and about half from the slow (note there is no constraint for the Betas to add up to one, and no reason why they would do so exactly).</div></div><div><br /></div><div>Now let's regress the returns from a conditional strategy on the fast and slow strategies in each scenario:</div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"> fast slow<br />static <span style="color: #1750eb;">0.762 0.337<br /></span>DO_cheap <span style="color: #1750eb;">0.743 0.313<br /></span>DO_constrain <span style="color: #1750eb;">0.805 0.288<br /></span>DO_unconstrain </span><span style="color: #1750eb;"><span style="font-size: x-small;">0.786 0.271</span><span style="font-size: 13.8pt;"><br /></span></span></pre></div><div><br /></div><div>This is.... surprising! About 75% of the returns of the conditional strategy come from exposure to the fast trading rules, and 25% from the slow ones. By only letting the cheapest instruments trade the fast strategy, we've actually made the overall strategy look <b><i>more</i></b> like a fast strategy. </div><div><br /></div><div><br /></div><div><br /></div><h2>Conclusions</h2><div><br /></div><div>This has been a long post! Let me briefly summarise the implications.</div><div><br /></div><div><ul style="text-align: left;"><li>Buffering in a static system reduces turnover, and thus costs, by 17% on a very fast strategy giving us a little more headroom on the 'speed limit' that we think we have.</li><li>Dynamic optimisation has the same effect, but is more efficient reducing costs by around a third; as unlike static buffering the cost penalty is instrument specific.</li><li>It's worth preventing expensive instruments from trading in DO, as the cost penalty doesn't seem to be 100% efficient in preventing them from trading. But there isn't any benefit in completely excluding these expensive instruments from the forecast construction stage.</li><li>Surprisingly, allowing expensive instruments to trade quicker trading rules actually makes a strategy less correlated to a faster trading strategy. It also increases costs by around 50% versus the conditional approach (where only cheap instruments can trade quick rules). </li></ul></div><div><br /></div><div>Good news: all of this is a confirmation that what I'm currently doing* is probably pretty optimal! </div><div><br /></div><div><i>* running DO with expensive instruments, but not allowing them to trade, and preventing expensive instruments from using quicker trading rules.</i></div><div><br /></div><div>Bad news: it does seem that my original idea of just trading more fast momentum, in the hope of 'smuggling in' some more diversifying trading rules, is a little dead in the water.</div><div><br /></div><div>In the next post, I will consider an alternative way of 'smuggling in' faster trading strategies - by using them as an execution overlay on a slower system.</div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com0tag:blogger.com,1999:blog-261139923818144971.post-88402897833990082072023-01-05T14:08:00.008+00:002023-02-01T14:39:15.352+00:00Scream if you want to go faster<p>Happy new year.</p><p>I didn't post very much in 2022, because I was in the process of writing a <a href="https://www.systematicmoney.org/advanced-futures">new book</a> (out in April!). Save a few loose ends, my work on that project is pretty much done. Now I have some research topics I will be looking at this year, with the intention of returning to something like a monthly posting cycle. </p><p><i>To be clear this is *not* a new years resolution, and therefore is *not* legally or morally binding.</i></p><p>The first of these research projects relates to <b>expensive (high cost) trading strategies.</b> Now I deal with these strategies in a fairly disdainful way, since I'm conservative when it comes to trading fast and I prefer to avoid throwing away too much return on (certain) costs in the pursuit of (uncertain) returns. </p><p>Put simply: I don't trade anything that is too quick. To be more precise, I do not allocate risk capital to trading rules where <span style="font-family: courier; font-size: x-small;">turnover * cost per trade > 'speed limit'</span>. The effect of this is that instruments that are cheaper to trade get an allocation to expensive trading rules that have a high turnover; but most don't. And there are a whole series of potential trading rules which are far too rich for all but the very cheapest instruments that I trade.</p><p>My plan is to do a series of posts that explore in more depth whether this is the correct approach, and whether there is actually some room for faster trading strategies in my quiver. Broadly speaking, it might be that eithier:</p><p></p><ul style="text-align: left;"><li>The layers of <a href="https://qoppac.blogspot.com/2021/11/mr-greedy-and-tale-of-minimum-tracking.html">buffering and optimisation</a> in my system mean it is possible to add faster strategies without worrying about the costs they incur. </li><li><b>Or</b> there could be some other way of smuggling in faster trading, perhaps via an additional execution layer that optimises the execution of orders coming from the (slow) core strategy. </li></ul><p></p><p>Part of the motivation for this is that in my <a href="https://www.systematicmoney.org/advanced-futures">new book</a> I introduce some relatively quick trading strategies which are viable with most instruments, but which require a different execution architecture from my current system (a portfolio that is <a href="https://qoppac.blogspot.com/2021/10/mr-greedy-and-tale-of-minimum-tracking.html">dynamically optimised</a> daily, allowing me to include over 100 instruments despite a relatively modest capital base). Thus the quicker strategies are not worth trading with my retail sized trading account; since to do so would result in a severe loss of instrument diversification which would more than negate any advantages. I'll allude to these specific strategies further at some point in the series, when I determine if there are other ways to sneak them into the system.</p><p>For this first post I'm going to explore the relationship <b>between instrument cost and momentum performance.</b> Mostly this will be an exercise in determining whether my current approach to fitting instrument and forecast weights is correct, or if I am missing something. But it will also allow me to judge whether it is worth trying to 'smuggle in' faster momentum trading rules that are too pricey for most instruments to actually trade.</p><p>The full series of posts:</p><p></p><ul style="text-align: left;"><li>This is the first post</li><li>The <a href="https://qoppac.blogspot.com/2023/01/scream-if-you-want-to-go-faster.html">second post</a> discusses whether fast trading rules can be 'smuggled in' to my existing system</li></ul><p></p><p><i>Note 1: There is some low quality python code <a href="https://gist.github.com/robcarver17/795d11b977261065d1f0da68eb95624f">here</a>, for those that use my open source package <a href="https://github.com/robcarver17/pysystemtrade">pysystemtrade</a>. And for those who haven't yet pre-ordered the book, you may be interested to know that this post effectively fleshes out some more work I present in chapter nine around momentum speed.</i></p><p><i>Note 2: The title comes from this song, but please don't draw any implications from it. It's not my favourite Geri Halliwell song (that's 'Look at Me'), and Geri isn't even my favourite Spice Girl (that's Emma), and the Spice Girls are certainly not my favourite band (they aren't even in my top 500).</i></p><p></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/ttlbmgV-eL4" width="320" youtube-src-id="ttlbmgV-eL4"></iframe></div><br /><p></p><h2><br /></h2><h2>The theories</h2><p>There are two dogs in this fight. </p><p><i>Well metaphorical dogs, I don't believe in dog fighting. Don't cancel me! But the fight is very real and not metaphorical at all. </i></p><p>I'm interested in how much truth there is in the following two hypothesis:</p><p></p><ul style="text-align: left;"><li>We have a prior belief that the expected<b style="font-style: italic;"> pre-cost </b>performance for a given trading rule is the same regardless of underlying instrument cost. </li><li>"No free lunch": expected pre-cost performance is higher for instruments that cost more to trade, but costs exactly offset this effet. Therefore expected <i><b>post-cost</b></i> performance for a given trading rule will be identical regardless of instrument cost.</li></ul><p></p><p><i>I use expectations here because in reality, as we shall see, there is huge variation in performance over instruments but quite a lot of that isn't statistically significant.</i></p><p>What implications do these hypothesis have? If the first is true, then we shouldn't bother trading expensive instruments (or at least radically downweight them, since there will be diversification benefits). They are just expensive ways of getting the same pre-cost performance. But if the second statement is true then an expensive instrument is just as good as a cheaper one.</p><p>Note that my current dynamic optimisation allows me to side step this issue; I generate signals for instruments regardless of their costs and I don't set instrument weights according to costs, but then I use a cost penalty optimisation which makes it unlikely I will actually trade expensive instruments to implement my view. Of course there are some instruments I don't trade at all, as their costs are just far too high. </p><p>Moving on, the above two statements have the following counterparts:</p><p></p><p style="-webkit-text-stroke-width: 0px; color: black; font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></p><p></p><ul style="-webkit-text-stroke-width: 0px; color: black; font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><li>We have a prior belief that the expected<b style="font-style: italic; font-weight: 400;"> pre-cost<span> </span></b>performance <b>across</b> trading rules for a given instrument is constant. </li><li style="font-weight: 400;">Expected<span> </span><i><b>post-cost</b></i><span> </span>performance across trading rules for a given instrument will be identical.</li></ul><p>What implications do these theories have for deciding how fast to trade a given instrument, and how much forecast weight to give to a given speed of momentum? If pre-cost SR is equal, we should give a higher weight to slower trading rules; particularly if an instrument is expensive to trade. If post-cost SR is equal, then we should probably give everything equal weights.</p><p>Note that I currently don't do eithier of these things: I completely delete rules that are too quick beyond some (relatively arbitrary) boundary, then set the other weights to be equal. In some ways this is a compromise between these two extremes approaches.</p><p><b><i>A brief footnote:</i></b> </p><p>You may ask why I am looking into this now? Well, I was pointed to <a href="https://flirtingwithmodels.libsyn.com/giuliana-bordigoni-alternative-markets-specialist-strategies-s5e14">this podcast</a> by an ex-colleague, in which another ex-colleague of mine makes a rather interesting claim:</p><p><span style="font-family: helvetica;">"if you see a market that is more commoditised [lower costs] you tend to see faster momentum disappear."</span></p><p><i>Incidentally it's worth listening to the entire podcast, which as you'd expect from a former team member of yours truely is excellent in every way.</i></p><p>Definitely interesting! This would be in line with the 'no free lunch' theory. If fast momentum is only profitable before costs for instruments that cost a lot to trade, then it won't be possible to exploit it. And the implication of this is that I am doing exactly the wrong thing: if an instrument is cheap enough to trade faster momentum, I shouldn't just unthinkingly let it. Conversely if an instrument is expensive, it might be worth considering faster momentum if we can work out some way of avoiding those high costs. </p><p>It's also worth saying that there are already some stylised facts that support this theory. Principally, faster momentum signals stopped working particularly in equity markets in the 1990s; and equity markets became the cheapest instruments to trade in the same period.</p><p><i>Incidentally, I explore the change in momentum profitability over time more in the new book.</i> </p><p><br /></p><p><br /></p><h2 style="text-align: left;">The setup</h2><p>I started with my current set of 206 instruments, and removed duplicates (eg mini S&P 500, for which the results would be the same as micro), and those with less than one year of history (for reasons that will become clearer later, but basically this is to ensure my results are robust). This left me with 160 instruments - still a decent sample.</p><p>I then set up my usual six exponentially weighted moving average crossover (EWMAC) trading rules, all of the form N,4N so EWMAC2 denotes a 2 day span minus an 8 day span: EWMAC2, EWMAC4, EWMAC8, EWMAC16, EWMAC32, EWMAC64.</p><p>I'm going to use Sharpe ratio as my quick and dirty measure of performance, and measure trading costs per instruments as the cost per trade in SR units. However because the range of SR trading costs is very large, covering several orders of magnitude (from 0.0003 for NASDAQ to over 90 for the rather obscure Euribor contract I have in my database), I will use <span style="font-family: courier; font-size: x-small;">log(costs)</span> as my fitting variable and for plotting purposes. </p><p>Before proceeding, there is an effect we have to bear in mind, which is the different lengths of data involved. Some instruments in this dataset have 40+years of data, others just one. But in a straight median or mean over instrument SR they will get the same weighting. We need to check that there is no bias; for example because equities generally have less data and are also the cheapest:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRdBll19txZ5JzNil9E_iXVoCkUAPtStxGZDioQv9Bi1hSeJ3jFFCojDGsc1BwMubXgrWcNvsunWHqsOsFaNQIgspO7Fl8DmS344LSocB1cEaCBfJB2hMva8oTK1cfAg7Qb6Kvb9VWFMDnnIkF2rfy-_tuZ8ZgqQGfBMk_gqnZ4dmkuoP_uJaP7rVg-g/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRdBll19txZ5JzNil9E_iXVoCkUAPtStxGZDioQv9Bi1hSeJ3jFFCojDGsc1BwMubXgrWcNvsunWHqsOsFaNQIgspO7Fl8DmS344LSocB1cEaCBfJB2hMva8oTK1cfAg7Qb6Kvb9VWFMDnnIkF2rfy-_tuZ8ZgqQGfBMk_gqnZ4dmkuoP_uJaP7rVg-g/w640-h322/Figure_1.png" width="640" /></a></div><p><i>Here the y-axis shows the SR cost per trade (log axis) and the x-axis shows the number of days of data. <br /></i></p><p>There doesn't seem to be a clear bias, eg more recent instruments especially cheap, so it's probably safe to ignore the data length issue.</p><p><br /></p><h2>Gross SR performance by trading rule versus costs</h2><div>Now to consider the relationship between the cost of an instrument, and the performance of a given trading rule. Each of these scatter plots has one point per instrument; each point shows the SR cost per trade (log) on the x-axis, and the gross SR performance of a given trading rule on the y-axis. I've also added regression lines, and R squared for those regressions.</div><div><br /></div><div><b>If the 'no free lunch' rule of equal post cost SR applied, we'd see a positive slope in these charts, whereas if SR were equal pre-cost we'd see a flat line.</b></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR6N3MTUpmohEcZh45gSsh_oDGehNe40US6-YP3Cjyxg65-Hs26v9ARcokTSquk4fzJJlZ88j1EDzl1t4EqELfM219ZzF9yRsNRwpvSKs6rbHzW1NifVLf_O236kHPOa2_fzfOgk50WNo8e66DXaRNd1C10Uod39Av6eL3CGWGxX3Kp2sbUMX6C79fnA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR6N3MTUpmohEcZh45gSsh_oDGehNe40US6-YP3Cjyxg65-Hs26v9ARcokTSquk4fzJJlZ88j1EDzl1t4EqELfM219ZzF9yRsNRwpvSKs6rbHzW1NifVLf_O236kHPOa2_fzfOgk50WNo8e66DXaRNd1C10Uod39Av6eL3CGWGxX3Kp2sbUMX6C79fnA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaRLJqHU9W38NG2BMyhAmnEOknz117rzaSHz5eDAdBJf4vdCVIF1vmrei9QoChlLy2OE89l399wwYbBEiprNWSSXze_TMaNwb9aC0J8hwFhUIqrSlWN4DlIEG1QKrJwCkH_Y6Xde4z_tIlk8RomqFCIQSPYa8BTJ6W2LQ-Qg8x62ZU5g7az8H-MEXvRQ/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaRLJqHU9W38NG2BMyhAmnEOknz117rzaSHz5eDAdBJf4vdCVIF1vmrei9QoChlLy2OE89l399wwYbBEiprNWSSXze_TMaNwb9aC0J8hwFhUIqrSlWN4DlIEG1QKrJwCkH_Y6Xde4z_tIlk8RomqFCIQSPYa8BTJ6W2LQ-Qg8x62ZU5g7az8H-MEXvRQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihSdTBkTUjmFhY9G71MT_Ezz4TXB4EtgbMGrySRUBIevH_Xj0Po7u9bC1KSkcYhwsVLBQHvIYb_KmFNCz4J1EclabsBNkAsTHx63dPypwS0gXjDb9x48Tj8h3LQ8f3EjkBp1lUd7Au7bKlma1MMvJ9OqRIu_IC3prW55aNv0prL5Vc3RXomI8ClO1qOQ/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihSdTBkTUjmFhY9G71MT_Ezz4TXB4EtgbMGrySRUBIevH_Xj0Po7u9bC1KSkcYhwsVLBQHvIYb_KmFNCz4J1EclabsBNkAsTHx63dPypwS0gXjDb9x48Tj8h3LQ8f3EjkBp1lUd7Au7bKlma1MMvJ9OqRIu_IC3prW55aNv0prL5Vc3RXomI8ClO1qOQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbvPfC_TZyxPxfyMiOVal1XROXCp1H5ZD6ciCmLUQAtis4P5sFPCTH9KOcwO1IcZNT_s-xfhySFvdbMvtKbNsQQ98IP-bt2bfvs1oJePxFQ7JPqn5EDJEZysMkEKX5LKfxAexFCLXipWHfeUMa-BkGNALeXFlpN1LO47EktVdlt-yZxFDPGEvayldYFQ/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbvPfC_TZyxPxfyMiOVal1XROXCp1H5ZD6ciCmLUQAtis4P5sFPCTH9KOcwO1IcZNT_s-xfhySFvdbMvtKbNsQQ98IP-bt2bfvs1oJePxFQ7JPqn5EDJEZysMkEKX5LKfxAexFCLXipWHfeUMa-BkGNALeXFlpN1LO47EktVdlt-yZxFDPGEvayldYFQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMkCau9IhsG4UHb_uqCP0GnSsryvt5FbCiTNOaD7eJaAOgNyoq5wIlOnuxr-BAgW3zG78Hk1tT7NcFvCD4LXmOIAVaM0iTxFvCe7DVnvt2W5qDHSv86Ma2xC_5hMJ3dz2zsoN9_QZ2h8g81AGkC8huMl_qOnZQY-ASHTGz6n8kanhE_GVsLy59XlD-Cw/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMkCau9IhsG4UHb_uqCP0GnSsryvt5FbCiTNOaD7eJaAOgNyoq5wIlOnuxr-BAgW3zG78Hk1tT7NcFvCD4LXmOIAVaM0iTxFvCe7DVnvt2W5qDHSv86Ma2xC_5hMJ3dz2zsoN9_QZ2h8g81AGkC8huMl_qOnZQY-ASHTGz6n8kanhE_GVsLy59XlD-Cw/w640-h322/Figure_1.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIgVtxO9wfWk9lQAe8olaPebNxQxEZzxWIns2c7pNOAsAi20LCCL16ESX9jvobs0pGUjWufXwZYRKn-zcJSHS0tfG5gViVUZFSpGaAe-sCVEnfDoSSEIyAjNc0tVvI3c4H03c1wLmLVrfjJV3zFKK8Lw9eKhsDdFHrJtVJMEnA1BJasmxuQ-h8QU3-qg/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIgVtxO9wfWk9lQAe8olaPebNxQxEZzxWIns2c7pNOAsAi20LCCL16ESX9jvobs0pGUjWufXwZYRKn-zcJSHS0tfG5gViVUZFSpGaAe-sCVEnfDoSSEIyAjNc0tVvI3c4H03c1wLmLVrfjJV3zFKK8Lw9eKhsDdFHrJtVJMEnA1BJasmxuQ-h8QU3-qg/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>So there is something interesting here. For the very fastest trading rules, there is a weak positive relationship (R squared of 0.075) whereby the more expensive an instrument is, the higher the gross SR. That relationship gets monotonically weaker as we slow down, and completely vanishes for the very slowest momentum rule. This does seem to chime with the 'no free lunch' theory; gross profits on very fast momentum are only available for instruments where that would be too expensive to trade.</div><div><br /></div><div>Perhaps then there is something in the idea that we can use very fast trading rules on expensive instruments, if we can get round the pesky trading costs!</div><div><br /></div><div><br /></div><div><h2>Net SR performance by trading rule versus costs</h2></div><div><br /></div><div>What happens if we repeat these plots, but with <b>net</b> performance? If the no free lunch (equal post-cost SR) rule is exactly correct, then this should be a horizontal line with no relationship between net SR and the cost of trading a given instruments. Of course if the other hypothesis (equal pre-cost SR) is true, then we'd see a downward sloping line- and because we have log(costs) on the x-axis it would slope downward exponentially. Let's have a look at the very fastest rule:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbs8sXqrqT2u77io0Bfi4JTU0YuIJzHFeuf13LOSx74EOPAgTimXKhNad4h4wm8yhqi01nkMOFkPyV5gb0p8pPTOxFm5OkYrK6FvFm0SqgtRkBfckoBsEvga0GfCWgtIxrOlSzAWKZrawI5GEvY9HCO4wWSeVF9GvIxzXD-kwfxmo_89MspDupF1_z9A/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbs8sXqrqT2u77io0Bfi4JTU0YuIJzHFeuf13LOSx74EOPAgTimXKhNad4h4wm8yhqi01nkMOFkPyV5gb0p8pPTOxFm5OkYrK6FvFm0SqgtRkBfckoBsEvga0GfCWgtIxrOlSzAWKZrawI5GEvY9HCO4wWSeVF9GvIxzXD-kwfxmo_89MspDupF1_z9A/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>I haven't dropped a regression line on here, because there clearly isn't a linear relationship. The red vertical line shows the point at which I'd currently stop trading this rule for a given instrument. Everything to the right of this line is an instrument that is too expensive for this trading rule; a SR cost above 0.0031 units. To the right of this line it's clear that we lose more and more money for more expensive instruments; the small improvement in gross SR we saw before for costlier instruments is completely dominated by much higher costs. </div><div><p><i>Technically I should allow for the effect of rolls on turnover but in for simplicity I ignore those when drawing the red line, since roll frequency is different for each instrument. They will only have an effect for very expensive instruments at very slow speeds.</i></p></div><div>But to the left of it things aren't as obvious:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkm-5Q8FiHW5tYWpn8npqs25-MHFv_vw9B6q7vEB7IjS7n4ljKaJI9RS7FoNBl3YcowGS5kpzNGnotqCI-i2ZalLJmhYJWa1I_rWLEG7bzWDMY7Py6pYZW6Z010ZtA6FT7LWx7J6m25wtOXvvtokDWTcEVzgxsyelY0ZU9Fqvown0Wb8fNzBXtWC3cRw/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkm-5Q8FiHW5tYWpn8npqs25-MHFv_vw9B6q7vEB7IjS7n4ljKaJI9RS7FoNBl3YcowGS5kpzNGnotqCI-i2ZalLJmhYJWa1I_rWLEG7bzWDMY7Py6pYZW6Z010ZtA6FT7LWx7J6m25wtOXvvtokDWTcEVzgxsyelY0ZU9Fqvown0Wb8fNzBXtWC3cRw/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>There aren't that many data points here, but there doesn't seem to be much of an upward or downward slope here, which is what we'd expect from the no free lunch theory; to put it another way if costs aren't too high then we can treat the post cost SR as equal, which is a vindication of my forecast weight allocation process. We can confirm that by adding a regression line, but fitting only on the points to the left of the line:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtDqM3FgQBxbsqcpFs4NlkWmNi48YjRVBfIrbu21Uce8XAJ35AsSK02FqDUrvWxgkmPxV9VMUClBUix8pxbKU7pxhfOlnKUl0pmbod4uLJCU2r-NfTXCyadfK24LpocDW4ZNbi_OPsZ_zElZ-fhF3g9EYpsk6rM2qEI4KDkgVbX3hMG_H73hKe8-6aww/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtDqM3FgQBxbsqcpFs4NlkWmNi48YjRVBfIrbu21Uce8XAJ35AsSK02FqDUrvWxgkmPxV9VMUClBUix8pxbKU7pxhfOlnKUl0pmbod4uLJCU2r-NfTXCyadfK24LpocDW4ZNbi_OPsZ_zElZ-fhF3g9EYpsk6rM2qEI4KDkgVbX3hMG_H73hKe8-6aww/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>There is a very slight downward slope; indicating that this very fast momentum might be a little closer to the 'equal pre-cost' than 'equal post-cost' hypothesis. But the R squared is very small, and there aren't many data points, reflecting the very small number of instruments that can trade this rule.</div><div><br /></div><div>Let's continue using this approach for slower rules:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwvgeeC_lUfUaEWRS_aKdJM0Bvqndic9pKE25J1wy54mr-pLIOgC1uUa6M1ubJ7Y11WxRPDqElzPtWs4Ln4UMr3Glofef4TJpaHVZ3LjYTjRfKqlZIHi-isMvJFaC0Xjk9Sxcf9WY8T8awY3r7gxAsFz3lmS3ps71S7I0LRkRD_AIudGzVAlBB9hT3gg/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwvgeeC_lUfUaEWRS_aKdJM0Bvqndic9pKE25J1wy54mr-pLIOgC1uUa6M1ubJ7Y11WxRPDqElzPtWs4Ln4UMr3Glofef4TJpaHVZ3LjYTjRfKqlZIHi-isMvJFaC0Xjk9Sxcf9WY8T8awY3r7gxAsFz3lmS3ps71S7I0LRkRD_AIudGzVAlBB9hT3gg/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPDdO4x-AK_0oB_aNrfvT_RjH2b4QnC6DqQv1V3MFVeeeMAsZixgkKaX3LO_6o_MoUY18iNcp1MWkFiom305MnS2UNDd2PLIV-TDwzH7M7WOiW1HDXZXCdbiLABgycfDzBlaDMZH2kvOSmnXWOmawD7tbWcWIaeLxpqv7fT1Xl82eOZeaIXwciFRSm6w/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPDdO4x-AK_0oB_aNrfvT_RjH2b4QnC6DqQv1V3MFVeeeMAsZixgkKaX3LO_6o_MoUY18iNcp1MWkFiom305MnS2UNDd2PLIV-TDwzH7M7WOiW1HDXZXCdbiLABgycfDzBlaDMZH2kvOSmnXWOmawD7tbWcWIaeLxpqv7fT1Xl82eOZeaIXwciFRSm6w/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgmAo46hELtTZaaCNnfDw6oeI7uoMbur6eV8-XBJLML_HDvBZ0FevcDOh-_fEvhus3Q0f-rNY7p0dzQkFxA7q5Eb3Ll6OILgEzjmAo2wrvkZupB62cmcTb7H5zFHbS6Ispdk1eNJheIto9NMxTuQFHxh2MM5k8gaIm_ZsG24XKKqbsCdcOB1QL6GxgqA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgmAo46hELtTZaaCNnfDw6oeI7uoMbur6eV8-XBJLML_HDvBZ0FevcDOh-_fEvhus3Q0f-rNY7p0dzQkFxA7q5Eb3Ll6OILgEzjmAo2wrvkZupB62cmcTb7H5zFHbS6Ispdk1eNJheIto9NMxTuQFHxh2MM5k8gaIm_ZsG24XKKqbsCdcOB1QL6GxgqA/w640-h322/Figure_1.png" width="640" /></a></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0kwaRto6-a2u9fDR1XAnQAeYGrYZ9nfl4Ma10n5QlhkBsyObDfoSf3SE4pYOZi3xrkk4WSCiXR8bVftW448HjJXcoYQJ7-3ReP1B9tbULDL0W8Q_7oICiG_djDZUD6UE_aTILgr_9Z69gOg1ZIz3_usxcS1S8xe8fPC5jIpZA0OWMREkPGxEZ4mM10A/s1920/Figure_2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0kwaRto6-a2u9fDR1XAnQAeYGrYZ9nfl4Ma10n5QlhkBsyObDfoSf3SE4pYOZi3xrkk4WSCiXR8bVftW448HjJXcoYQJ7-3ReP1B9tbULDL0W8Q_7oICiG_djDZUD6UE_aTILgr_9Z69gOg1ZIz3_usxcS1S8xe8fPC5jIpZA0OWMREkPGxEZ4mM10A/w640-h322/Figure_2.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSD7bzfJIx7H3Xwm2siv4s1X6SQoz6JuBHJtMyZvP4NL9ksvM-TznODhCynpV9PQ6epMLJ6mDMBZjxnOQsM6b9YMud_wGeU3pO7M-Yq6QAe4VbJ8PqNm2gPdZA_HJiwvwizlnYNfc7zvtX-Phn5UtKI3FdgtKXN956QuizcTwEN79GKX_MrPFLurkRKA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSD7bzfJIx7H3Xwm2siv4s1X6SQoz6JuBHJtMyZvP4NL9ksvM-TznODhCynpV9PQ6epMLJ6mDMBZjxnOQsM6b9YMud_wGeU3pO7M-Yq6QAe4VbJ8PqNm2gPdZA_HJiwvwizlnYNfc7zvtX-Phn5UtKI3FdgtKXN956QuizcTwEN79GKX_MrPFLurkRKA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>By the time we get to the very slowest trading rule, it looks much more like the assumption of equal post cost SR is true. The R squared is barely in double figures, so this isn't a very clear result, but it does look like you would want to downweight expensive instruments, as well as removing those that exceed the cost threshold and are to the right of the red line. This remains true even if we're only trading the very slowest EWMAC64 speed on those instruments, which we would be. </div><div><br /></div><div>Indeed, if we trust the regression line it looks the cost ceiling for EWMAC64 (and therefore the global cost ceiling to decide whether to trade an instrument at all, in the absence of any cheaper trading rules) should be something like a log cost of -5, or 0.007 SR cost units (the point at which the regression line crosses the x-axis of zero expected SR). </div><div><br /></div><div>That's actually a little more conservative than my current global maximum for instrument costs, which is 0.01 SR units (<a href="https://qoppac.blogspot.com/2021/05/adding-new-instruments-or-how-i-learned.html">discussed here</a>), but on the other hand the use of dynamic cost penalties means I can probably relax a little on this front.</div><div><div><h2><br /></h2></div></div><div><h2>Optimal trading speed</h2><p>Let's return to the second set of statements we want to test:</p><ol style="text-align: left;"><li>We have a prior belief that the expected<b style="font-style: italic;"> pre-cost </b>performance across trading rules for a given instrument is constant. </li><li>Expected <i><b>post-cost</b></i> performance across trading rules for a given instrument will be identical.</li></ol><div>To put it another way, in a pre-cost world the optimal trading speed will be eithier:</div></div><div><ol style="text-align: left;"><li>Identical regardless of instrument costs</li><li>Faster for more expensive instruments</li></ol><div>And in a post-cost world, optimal trading speed will be:</div></div><div><ol><li>Slower for more expensive instruments</li><li>Identical regardless of instrument costs</li></ol><div>How do we measure optimal trading speed? This is a bit tricker than just measuring the SR of the rule, since it's effectively the result of a portfolio optimisation. A full blown optimisation would seem a bit much, but just using the EWMAC with the highest SR would be far too noisy. </div></div><div><br /></div><div>I decided to use the following method, which effectively allocates in proportion to SR (where positive):</div><div><br /></div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">speed_as_list = np.array([<span style="color: #1750eb;">1</span>,<span style="color: #1750eb;">2</span>,<span style="color: #1750eb;">3</span>,<span style="color: #1750eb;">4</span>,<span style="color: #1750eb;">5</span>,<span style="color: #1750eb;">6</span>])<br /><span style="color: #0033b3;">def </span><span style="color: black;">optimal_trading_rule_for_instrument</span>(instrument_code, curve_type=<span style="color: teal; font-weight: bold;">"gross"</span>):<br /> sr_by_rule = pd.Series([<br /> sr_for_rule_type_instrument(rule_name, instrument_code, <span style="color: #660099;">curve_type</span>=curve_type) <br /> <span style="color: #0033b3;">for </span>rule_name <span style="color: #0033b3;">in </span>list_of_rules])<br /> <br /> sr_by_rule[sr_by_rule<<span style="color: #1750eb;">0</span>] = <span style="color: #1750eb;">0<br /></span><span style="color: #1750eb;"> </span><span style="color: #0033b3;">if </span>sr_by_rule.sum()==<span style="color: #1750eb;">0</span>:<br /> <span style="color: #0033b3;">return </span>7.0<br /><br /> sr_by_rule_as_weight = sr_by_rule / sr_by_rule.sum()<br /> weight_by_speed = sr_by_rule_as_weight * speed_as_list<br /> optimal_speed = weight_by_speed.sum()<br /><br /> <span style="color: #0033b3;">return </span>optimal_speed<br /></span></pre></div><div><br /></div><div>This returns a 'speed number'. The optimal speed number will be 1 (if EWMAC 2 is the best), 2 (if it's EWMAC 4, or something like a combination of EWMAC2,4, and 8 which works out as an average of 4), 3 (EWMAC8), 4 (EWMAC16).... 6 (EWMAC64) or 7 if there are no trading rules with a positive Sharpe (which could be due to very high costs; or just bad luck).</div><div><br /></div><div><br /></div><div><h2>Optimal trading speed with gross SR</h2><div class="separator" style="clear: both; text-align: left;">Let's repeat the exercise of scatter plotting. Log(costs) of instrument is still on the x-axis, but on the y-axis we have the optimal trading speed, as a number between 1 (fast!) and 6 (very slow!), or 7 (don't bother).</div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3LhFG6tEizQypLj8C9h9iB5Q2n9oWp0XQ6BefNwGGoDoSc9fT7oV3DB4XSj_Pgi7rk45WG9oPsadbMQpnlLR7kkwSBq7kgrSrBn5BXosVH818LkUCyscO7eGhkgWwDRuj9UrCUpLj9XJ4e2p-VlkYj8mNptzRKQ93uztq-dNtCIjfLH9bWDfS3JlLVA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3LhFG6tEizQypLj8C9h9iB5Q2n9oWp0XQ6BefNwGGoDoSc9fT7oV3DB4XSj_Pgi7rk45WG9oPsadbMQpnlLR7kkwSBq7kgrSrBn5BXosVH818LkUCyscO7eGhkgWwDRuj9UrCUpLj9XJ4e2p-VlkYj8mNptzRKQ93uztq-dNtCIjfLH9bWDfS3JlLVA/w640-h322/Figure_1.png" width="640" /></a><br /><p>Well this looks pretty flat. The optimal trading speed is roughly 3.5 (somewhere between EWMAC8 and EWMAC16) for very cheap instruments, and perhaps 3 for very expensive ones. But it's noisy as anything. It's probably safe to assume that there is no clear relationship between optimal speed and instrument costs, if we only use gross returns.</p><p><br /></p><h2>Optimal trading speed with net SR</h2><p>Now let's do the same thing, but this time we find the optimal speed using net rather than gross returns.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5w7t5rdnL_eyom1_zUcHeuDg9VBpPPcSWKUty8cEG_-oqGriHpF6kZj0v8AyeG-wDAj5rtMHvr_FgtbmGI9nbL9ANhygTIxIcsOVRBanZ1iQDbywfGr4_jskCvOZcOMtITC3-y2XnQotaNYSwH2RX1MCoVNKIAf-q8vaRPBoXrji6UMxDjXVrflDBbA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5w7t5rdnL_eyom1_zUcHeuDg9VBpPPcSWKUty8cEG_-oqGriHpF6kZj0v8AyeG-wDAj5rtMHvr_FgtbmGI9nbL9ANhygTIxIcsOVRBanZ1iQDbywfGr4_jskCvOZcOMtITC3-y2XnQotaNYSwH2RX1MCoVNKIAf-q8vaRPBoXrji6UMxDjXVrflDBbA/w640-h322/Figure_1.png" width="640" /></a></div>As before I've added a red vertical line. Instruments to the right of this are too expensive to trade, even with 100% weight on my slowest trading rule, since their costs would exceed my speed limit of 0.13 SR units per year. <br /><p>There are a lot more '7' here, as you'd expect, especially for high cost instruments (which all have negative SR after costs for all momentum), but there are also quite a few lower cost instruments with the same problem. This is just luck - we know that SR by trading rule is noisy, so by bad luck we'd have a few instruments which have negative SR for all our trading rules. </p><p>As we did before, let's ignore the instruments above the red line, and run a regression on what's left over:</p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPL4sUrZH9ZPmDPNG4FQBUNYfOd2Icncp4rmjiS1x3YqamJ3nkWckCeHdKwnnSxz876FwEF4nticg_HGGoWoLTIJ1IxOc6fFJhqUgK29oBk5-WB-C3yyYySsAp9wW3nK50EI7uJdM6wwJB9zd9HmezqbrHeHYLwVNHNXrfcZsOu0hPrp6qWl6JnfSE2Q/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPL4sUrZH9ZPmDPNG4FQBUNYfOd2Icncp4rmjiS1x3YqamJ3nkWckCeHdKwnnSxz876FwEF4nticg_HGGoWoLTIJ1IxOc6fFJhqUgK29oBk5-WB-C3yyYySsAp9wW3nK50EI7uJdM6wwJB9zd9HmezqbrHeHYLwVNHNXrfcZsOu0hPrp6qWl6JnfSE2Q/w640-h322/Figure_1.png" width="640" /></a></div>That's certainly a strong result, and very much in favour of trading more slowly as instrument costs rise.</div><div><br /></div><div>However it might be unduly influenced by the '7' points, so let's drop those and see what it looks like without them:<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-f8KOkVX0eTenIhG8W--680aV7TKLQ6tCKLkErR-K5ohvORdlvKRVIPWexWGp0FgZgQk0rNRAPyEaIuqabUSWdj-zNv8Oa4XBQ-dpk-0dNo-hwhfYd2i9EAQQ-ZybY6FIflYMsJJdVGUooypzFOWUbkAM615Lw4UlH3r53Jq-w8JD4lbWor1HlvMLEw/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-f8KOkVX0eTenIhG8W--680aV7TKLQ6tCKLkErR-K5ohvORdlvKRVIPWexWGp0FgZgQk0rNRAPyEaIuqabUSWdj-zNv8Oa4XBQ-dpk-0dNo-hwhfYd2i9EAQQ-ZybY6FIflYMsJJdVGUooypzFOWUbkAM615Lw4UlH3r53Jq-w8JD4lbWor1HlvMLEw/w640-h322/Figure_1.png" width="640" /></a></div>There is still something there, but it's a bit weaker. Roughly speaking, for the very cheapest instruments the optimal trading speed is around 3.5 (something like an equal weight of EWMAC8 and EWMAC16), and for the costliest it's around 5 (EWMAC32, or equivalently an equal weight of 16,32 and 64). </div><div><br /></div><div>It's probably worth contrasting this with the weights I currently allocate. Rule turnovers are roughly 42 (EWMAC2), 20, 9, 3.8, 2.3, and 2.1 (EWMAC64). To trade all six rules I would need an instrument SR cost of less than 0.00283 (assuming quarterly rolls), around -5.9 in log space. Such an instrument would have equal weights across all six rules, and therefore a speed number of around 3.5. That is a little faster than the above regression would suggest (-5.9 is closer to an optimal speed number of 4.1), but the regression is very noisy. </div><div><p>To trade EWMAC64 and nothing else, I'd require an instrument SR cost of less than 0.021 (again assuming quarterly rolls; it would be higher for monthly rolls), or -3.8 in log space. With costs higher than that I couldn't trade anything at all. </p><p><i>Note that is to the left of the red line, since the red line ignores the effect of rolling on turnover. </i></p><p>Just EWMAC64 is a speed number of 6, and the regression suggests a speed number of 5.9 with -3.8 log costs. That is a pretty good match.</p><p><br /></p><h2>Summary and implications</h2></div><div class="separator" style="clear: both; text-align: center;"><br /></div>Let's deal with the issue of <i>optimal speed</i> first, since the implications here are more straightforward. Broadly speaking it is correct that pre-cost optimal speed is flat, and therefore we should <b>slow down as instruments get more expensive to trade</b>. Although the results are noisy, they suggest that with my current simplistic method for allocating forecast weights I'm spot on with the most expensive instruments, but I might be trading the very cheapest instruments a tiny bit too quickly. However the difference isn't enough to worry about.<br /><div><br /></div><div>Turning to the <i>issue of performance of momentum according to instrument cost</i>, I draw two main conclusions. </div><div><br /></div><div>Firstly, the post-cost results suggest that<b> trading rule performance gets worse for more expensive instruments, even if we're trading them slowly</b>. Hence, if I was trading a <i>static</i> system without dynamic optimisation, then <b>I would give consideration to penalising the instrument weight of instruments with high costs </b>(but which were still cheap enough to trade). It's important to note that this is at odds with the approach I've taken before, and discussed in my <a href="https://www.systematicmoney.org/systematic-trading">first book</a>, where I generally set instrument weights without considering costs (assuming post cost SR is equal). Also, <b>my 'cheap enough to trade' bar of 0.01 SR units may be set a little aggressively</b>; 0.007 could be closer to the mark.</div><div><br /></div><div>However, as I'm currently using dynamic optimisation with a cost penalty, I'm less worried about these issues. This will naturally allocate less to more expensive instruments, and trade them less.</div><div><br /></div><div>Secondly, the pre-cost performance of momentum versus instrument costs suggests that there is some truth in the idea that <b>more expensive instruments can be traded with fast momentum if you don't have to worry about costs</b>. This is quite a weak result, but I will bear it in mind when I think about 'smuggling in' faster trading rules.</div><div><br /></div><div>In conclusion, I'm happy that my current pragmatic and simplistic approach to fitting is good enough, but it's been a useful exercise to properly interrogate my assumptions on trading costs and find some surprising results. </div><div><br /></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com1tag:blogger.com,1999:blog-261139923818144971.post-5698277601282177752022-11-14T16:42:00.010+00:002022-11-16T11:28:36.781+00:00If you're so smart, how come you're not SBF? The Kelly criterion and choice of expectations and utility function when bet sizing<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDp5SCpem5sBIzMm3r9V4aJbZHCdraW_VrShXWQW0OU3m5kFZG5RgNzmRjWs-Xm1UqxY5jL5VDrjKeT263pVxLjK4mBTpc7MISikoZc7_ypN_v1L0hUBlJ4f32vKZskOlCWounfP4uu3lokGpP96KCm6QWilutYmdT-VwccwoA4hB6hPWvJBMdo3rwOA/s888/70q2vq%20(1).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="499" data-original-width="888" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDp5SCpem5sBIzMm3r9V4aJbZHCdraW_VrShXWQW0OU3m5kFZG5RgNzmRjWs-Xm1UqxY5jL5VDrjKeT263pVxLjK4mBTpc7MISikoZc7_ypN_v1L0hUBlJ4f32vKZskOlCWounfP4uu3lokGpP96KCm6QWilutYmdT-VwccwoA4hB6hPWvJBMdo3rwOA/w640-h360/70q2vq%20(1).jpg" width="640" /></a></div><br /><p><br /></p><p>There has been a very interesting discussion on twitter, relating to some stuff said by Sam Bankman-Fried (SBF), who at the time of writing has just completely vaporized billions of dollars in record time via the medium of his crypto exchange FTX, and provided a useful example to future school children of the meaning of the phrase <a href="https://en.wikipedia.org/wiki/Nominative_determinism">nominative determinism</a>*.</p><p><i>* Sam, Bank Man: Fried. Geddit?</i> </p><p>Read the whole thread from the top:</p><p><a href="https://twitter.com/breakingthemark/status/1591114381508558849">https://twitter.com/breakingthemark/status/1591114381508558849</a></p><p>TLDR the views of SBF can be summarised as follows:</p><p></p><ul style="text-align: left;"><li>Kelly criterion maximises log utility</li><li>I don't have a log utility function. It's probably closer to linear.</li><li>Therefore I should bet at higher than Kelly. Up to 5x would be just fine.</li></ul>I, and many others, have pointed out that SBF is an idiot. Of course it's easier to do this when he's just proven his business incompetence on a grand scale, but to be fair I was barely aware of the guy until a week ago. Specifically, he's wrong about the chain of reasoning above*. <div><br /></div><div><p><i>* It's unclear whether this is specifically what brought SBF down. At the time of writing he appears to have taken money from his exchange to prop up his hedge fund, so maybe the hedge fund was using >>> Kelly leverage, and this really is the case. </i></p></div><div>In this post I will explain why he was wrong, with pictures. To be clearer, I'll discuss how the <b>choice of expectation and utility function affects optimal bet sizing. </b><div><p>I've discussed parts of this subject <a href="https://qoppac.blogspot.com/2017/02/can-you-eat-geometric-returns.html">briefly before</a>, but you don't need to read the previous post.</p><p><br /></p><h2 style="text-align: left;">Scope and assumptions</h2><p><br /></p><p>To keep it tight, and relevant to finance, this post will ignore arguments seen on twitter related to one off bets, and whether you should bet differently if you are considering your contribution to society as a whole. These are mostly philosophical discussions which it's hard to solve with pictures. So the set up we have is:</p><p></p><ul style="text-align: left;"><li>There is an arbitrary investment strategy, which I assume consists of a data generating process (DGP) producing Gaussian returns with a known mean and standard deviation (this ignores parameter uncertainty, which I've banged on about often enough, but effectively would result in even lower bet sizing).</li><li>We make a decision as to how much of our capital we allocate to this strategy for an investment horizon of some arbitrary number of years, let's say ten.</li><li>We're optimising <b><i>L, </i></b>the leverage factor, where <i>L =</i>1 would be full investment, 2 would be 100% leverage, 0.5 would be 50% in cash 50% in the strategy and so on.</li><li>We're interested in maximising the <b>expectation</b> of <b><i>f</i></b>(terminal wealth) after ten years, where <i style="font-weight: bold;">f </i>is our utility function.</li><li>Because we're measuring expectations, we generate a series of possible future outcomes based on the DGP and take the expectation over those.</li></ul><div>Note that I'm using the contionous version of the Kelly criterion here, but the results would be equally valid for the sort of discrete bets that appear in the original discussion.</div><div><br /></div><div><br /></div><div><h2>Specific parameters</h2></div><div>Let's take a specific example. Set mean =10% and standard deviation = 20%, which is a Sharpe ratio of 0.5, and therefore Kelly should be maxed at 50% risk, equating to L = 50/20 = 2.5. SBF optimal leverage would be around 5 times that, L = 12.5. We start with wealth of 1 unit, and compound it over 10 years.</div><div><br /></div><div>I don't normally paste huge chunks of code in these blog posts, but this is a fairly short chunk:</div><div><br /></div><p></p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><pre style="font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">import </span>pandas <span style="color: #0033b3;">as </span>pd<br /><span style="color: #0033b3;">import </span>numpy <span style="color: #0033b3;">as </span>np<br /><span style="color: #0033b3;">from </span>math <span style="color: #0033b3;">import </span>log<br /><br />ann_return = <span style="color: #1750eb;">0.1<br /></span>ann_std_dev = <span style="color: #1750eb;">0.2<br /></span><span style="color: #1750eb;"><br /></span>BUSINESS_DAYS_IN_YEAR = <span style="color: #1750eb;">256<br /></span>daily_return = ann_return / BUSINESS_DAYS_IN_YEAR<br />daily_std_dev = ann_std_dev / (BUSINESS_DAYS_IN_YEAR**<span style="color: #1750eb;">.5</span>)<br /><br />years = <span style="color: #1750eb;">10<br /></span>number_days = years * BUSINESS_DAYS_IN_YEAR<br /><br /><br /><span style="color: #0033b3;">def </span><span style="color: black;">get_series_of_final_account_values</span>(monte_return_streams,<br /> leverage_factor = <span style="color: #1750eb;">1</span>):<br /> account_values = [account_value_from_returns(returns,<br /> <span style="color: #660099;">leverage_factor</span>=leverage_factor)<br /> <span style="color: #0033b3;">for </span>returns <span style="color: #0033b3;">in </span>monte_return_streams]<br /><br /> <span style="color: #0033b3;">return </span>account_values<br /><br /><span style="color: #0033b3;">def </span><span style="color: black;">get_monte_return_streams</span>():<br /> monte_return_streams = [get_return_stream() <span style="color: #0033b3;">for </span>__ <span style="color: #0033b3;">in </span><span style="color: navy;">range</span>(<span style="color: #1750eb;">10000</span>)]<br /><br /> <span style="color: #0033b3;">return </span>monte_return_streams<br /><br /><span style="color: #0033b3;">def </span><span style="color: black;">get_return_stream</span>():<br /> <span style="color: #0033b3;">return </span>np.random.normal(daily_return,<br /> daily_std_dev,<br /> number_days)<br /><br /><span style="color: #0033b3;">def </span><span style="color: black;">account_value_from_returns</span>(returns, leverage_factor: <span style="color: navy;">float </span>= <span style="color: #1750eb;">1.0</span>):<br /> one_plus_return = np.array(<br /> [<span style="color: #1750eb;">1</span>+(return_item*leverage_factor)<br /> <span style="color: #0033b3;">for </span>return_item <span style="color: #0033b3;">in </span>returns])<br /> cum_return = one_plus_return.cumprod()<br /><br /> <span style="color: #0033b3;">return </span>cum_return[-<span style="color: #1750eb;">1</span>]<br /><br />monte_return_streams = get_monte_return_streams()<br /></span></pre></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><br /></span><div style="color: black; font-family: "Times New Roman"; white-space: normal;"><h2>Utility function: Expected log(wealth) [Kelly]</h2></div></pre><div></div><p></p><div>Kelly first. We want to maximise the expected log final wealth:</div><div><br /></div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><pre style="font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">expected_log_value</span>(monte_return_streams,<br /> leverage_factor = <span style="color: #1750eb;">1</span>):<br /><br /> series_of_account_values =get_series_of_final_account_values(<br /> <span style="color: #660099;">monte_return_streams </span>= monte_return_streams,<br /> <span style="color: #660099;">leverage_factor </span>= leverage_factor)<br /> log_values_over_account_values = [log(account_value) <span style="color: #0033b3;">for </span>account_value <span style="color: #0033b3;">in </span>series_of_account_values]<br /><br /> <span style="color: #0033b3;">return </span>np.mean(log_values_over_account_values)</span><span style="font-size: 13.8pt;"><br /></span></pre></pre></div><p></p><p>And let's plot the results:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">plot_over_leverage</span>(monte_return_streams, value_function):<br /> leverage_ratios = np.arange(<span style="color: #1750eb;">1.5</span>, <span style="color: #1750eb;">5.1</span>, <span style="color: #1750eb;">0.1</span>)<br /> values = []<br /> <span style="color: #0033b3;">for </span>leverage <span style="color: #0033b3;">in </span>leverage_ratios:<br /> <span style="color: navy;">print</span>(leverage)<br /> values.append(<br /> value_function(monte_return_streams, <span style="color: #660099;">leverage_factor</span>=leverage)<br /> )<br /><br /> leverage_to_plot = pd.Series(<br /> values, <span style="color: #660099;">index </span>= leverage_ratios<br /> )<br /><br /> <span style="color: #0033b3;">return </span>leverage_to_plot<br /><br />leverage_to_plot = plot_over_leverage(monte_return_streams,<br /> expected_log_value)<br />leverage_to_plot.plot()</span><span style="font-size: 13.8pt;"><br /></span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEpYplxIb2fm05WYA3wKdo7cT-QW_-HLqabS8v2j3QYNB7IJoDEaEBXGbph0B3CkqRZx3MFp35GEiE4mCVd1jb2KULryn_o7WV0RNdgoOdaUh2pkeGU2z84AepjRPJpT-kk0PLh46L_Y7dSkMK2AUN-iJqYE5B_omdCMkyWvPI9ohNngBzfriCyO2nHA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEpYplxIb2fm05WYA3wKdo7cT-QW_-HLqabS8v2j3QYNB7IJoDEaEBXGbph0B3CkqRZx3MFp35GEiE4mCVd1jb2KULryn_o7WV0RNdgoOdaUh2pkeGU2z84AepjRPJpT-kk0PLh46L_Y7dSkMK2AUN-iJqYE5B_omdCMkyWvPI9ohNngBzfriCyO2nHA/w640-h322/Figure_1.png" width="640" /></a></div></pre><p>In this plot, and nearly all of those to come, the x-axis shows the leverage L and the y-axis shows the value of the expected utility. To find the optimal L we look to see where the highest point of the utility curve is.</p><p>As we'd expect:</p><p></p><ul style="text-align: left;"><li>Max expected log(wealth) is at L=2.5. This is the optimal Kelly leverage factor.</li><li>At twice optimal we expect to have log wealth of zero, equivalent to making no money at all (since starting wealth is 1).</li><li>Not plotted here, but at SBF leverage (12.5) we'd have expected log(wealth) of <undefined> and have lost pretty much all of our money.</li></ul><p></p><p><br /></p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><div style="color: black; font-family: "Times New Roman"; white-space: normal;"><h2>Utility function: Expected (wealth) [SBF?]</h2></div></pre><div></div><p></p><p>Now let's look at a linear utility function, since SBF noted that his utility was 'roughly close to linear'. Here our utility is just equal to our terminal wealth, so it's purely linear.</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">expected_value</span>(monte_return_streams,<br /> leverage_factor = <span style="color: #1750eb;">1</span>):<br /><br /> series_of_account_values =get_series_of_final_account_values(<br /> <span style="color: #660099;">monte_return_streams </span>= monte_return_streams,<br /> <span style="color: #660099;">leverage_factor </span>= leverage_factor)<br /><br /> <span style="color: #0033b3;">return </span>np.mean(series_of_account_values)</span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><pre style="font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">leverage_to_plot = plot_over_leverage(monte_return_streams,<br /> expected_value)<br /></span></pre></pre><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrLT947EkWXI-Xrl2hRZUz6isey_qKQdh_8j7G0I36BsF4NTjqJ8dhlWSHr9znubjG9jCcEmPi-t3K_Ycc-SrZSO6h7WQ59zvU_o0LNQKwG543hfXzUc038mpta65Zz11KPMjDLoj4y2h84GD6_y7gnBusM8QSXBdBogvOx8hHlanKTzoU28HPwA8XpA/s640/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrLT947EkWXI-Xrl2hRZUz6isey_qKQdh_8j7G0I36BsF4NTjqJ8dhlWSHr9znubjG9jCcEmPi-t3K_Ycc-SrZSO6h7WQ59zvU_o0LNQKwG543hfXzUc038mpta65Zz11KPMjDLoj4y2h84GD6_y7gnBusM8QSXBdBogvOx8hHlanKTzoU28HPwA8XpA/w640-h480/Figure_1.png" width="640" /></a></div><div><br /></div>You can see where SBF was coming from, right? Utility gets exponentially higher and higher, as we add more leverage. Five times leverage is a lot better than 2.5 times, the Kelly criterion. Five times Kelly, or 2.5 * 5= 12.5, would be even better.<div><br /></div><div><br /></div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><div style="color: black; font-family: "Times New Roman"; white-space: normal;"><h2>Utility function: Median(wealth) </h2></div></pre><div>However there is an important assumption above, which is the use of the <b><i>mean</i></b> for the expectation operator. This is dumb. It would mean (pun, sorry), for example, that of the following:</div><div><br /></div><div><ol style="text-align: left;"><li>An investment that lost $1,000 99 times out of 100; and paid out $1,000,000 1% of the time</li><li>An investment that is guaranteed to gain $9,000 </li></ol></div><div><br /></div><div>... we would theoretically prefer option 1 since it has an expected value of $9,010, higher than the trivial expected value of $9,000 for option 2. There might be some degenerate gamblers who prefer 1 to 2, but not many.</div><div><br /></div><div>(Your wealth would also affect which of these you would prefer. If $1,000 is a relatively trivial amount to you, you might prefer 1. If this is the case consider if you'd still prefer 1 to 2 if the figures were 1000 times larger, or a million times larger). </div><div><br /></div><div>I've <a href="https://qoppac.blogspot.com/2017/02/can-you-eat-geometric-returns.html">discussed this before</a>, but I think the <b><i>median</i></b> is the more appropriate. What the median implies in this context is something like this: </div><div><br /></div><div><b>Considering all possible future outcomes, how can I maximise the utility I receive in the outcome that will occur half the time?</b></div><div><b><br /></b></div><div>I note that the median of option 1 above is zero, whilst the median of option 2 is $9,000. Option 2 is now far more attractive.</div><div><br /></div><div><br /><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #0033b3;">def </span><span style="color: black;">median_value</span>(monte_return_streams,<br /> leverage_factor = <span style="color: #1750eb;">1</span>):<br /><br /> series_of_account_values =get_series_of_final_account_values(<br /> <span style="color: #660099;">monte_return_streams </span>= monte_return_streams,<br /> <span style="color: #660099;">leverage_factor </span>= leverage_factor)<br /><br /> <span style="color: #0033b3;">return </span>np.median(series_of_account_values)</span><span style="font-size: 13.8pt;"><br /></span></pre><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh99WgcA4h8b0kNwdYTDWiQIA-ZJxgJl2ibS19wZ5Hntj0-0zzM3-u6774ntX4tlZHiqnfg9devB9SRxZXbT6owpiS_O3n0W76lJri8HuYdI7rrjHKS1xB-VQg9zPLFS4S-pX3ee2V7jPmxr4qxmVyjkXu6V8us4uphCxlPNbBmva7UTZ5RDR3JyvcVRw/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh99WgcA4h8b0kNwdYTDWiQIA-ZJxgJl2ibS19wZ5Hntj0-0zzM3-u6774ntX4tlZHiqnfg9devB9SRxZXbT6owpiS_O3n0W76lJri8HuYdI7rrjHKS1xB-VQg9zPLFS4S-pX3ee2V7jPmxr4qxmVyjkXu6V8us4uphCxlPNbBmva7UTZ5RDR3JyvcVRw/w640-h322/Figure_1.png" width="640" /></a></div><br /><p>The spooky result here is that the optimal leverage is now 2.5, the same as the Kelly criterion.</p><p><b>Even with linear utility, if we use the median expectation, Kelly is the optimal strategy.</b></p><p>The reason why people prefer to use mean(log(wealth)) rather than median(wealth), even though they are equivalent, is that the former is more computationally attractive.</p><p><i>Note also the well known fact that Kelly also maximises the geometric return.</i></p><p><b>With Kelly we aren't really making any assumptions about utility function: our assumption is effectively that the median is the correct expectations operator</b></p><p>The entire discussion about utility is really a red herring. It's very hard to measure utility functions, and everyone probably does have a different one, I think it's much better to focus on expectations.</p><p><br /></p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><div style="color: black; font-family: "Times New Roman"; white-space: normal;"><h2>Utility function: Nth percentile(wealth) </h2></div></pre><p>Well you might be thinking that SBF seems like a particularly optimistic kind of guy. He isn't interested in the median outcome (which is the 50% percentile). Surely there must be some percentile at which it makes sense to bet 5 times Kelly? Maybe he is interested in the 75% percentile outcome?</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">QUANTILE = <span style="color: #1750eb;">.75<br /></span><span style="color: #0033b3;">def </span><span style="color: black;">value_quantile</span>(monte_return_streams,<br /> leverage_factor = <span style="color: #1750eb;">1</span>):<br /><br /> series_of_account_values =get_series_of_final_account_values(<br /> <span style="color: #660099;">monte_return_streams </span>= monte_return_streams,<br /> <span style="color: #660099;">leverage_factor </span>= leverage_factor)<br /><br /> <span style="color: #0033b3;">return </span>np.quantile(series_of_account_values, QUANTILE)</span><span style="font-size: 13.8pt;"><br /></span></pre><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6pSstl1eQ4IRjlkJ2XZzgyOXq4t9T8ce2vakZ5y4xkuoc9IsFx8xiUqdh2Owe0TaiRTIRNFyFf3C9PDJB7ym-8OBW3WnV4R3cxNLyt6aija5JnFf_l6bHJPYFEFRMgGYZxM-4KUH2tqxc61e26brPvye5EL8tywy7WpHTdfmpjSZ0GIeXf-0CHc1PCw/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6pSstl1eQ4IRjlkJ2XZzgyOXq4t9T8ce2vakZ5y4xkuoc9IsFx8xiUqdh2Owe0TaiRTIRNFyFf3C9PDJB7ym-8OBW3WnV4R3cxNLyt6aija5JnFf_l6bHJPYFEFRMgGYZxM-4KUH2tqxc61e26brPvye5EL8tywy7WpHTdfmpjSZ0GIeXf-0CHc1PCw/w640-h322/Figure_1.png" width="640" /></a></div><p>Now the optimal is around L=3.5. This is considerably higher than the Kelly max of L=2.5, but it is still nowhere near the SBF optimal L of 12.5.</p><p>Let's plot the utility curves for a bunch of different quantile points:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;">list_over_quantiles = []<br />quantile_ranges = np.arange(<span style="color: #1750eb;">.4</span>, <span style="color: #1750eb;">0.91</span>, <span style="color: #1750eb;">.1</span>)<br /><span style="color: #0033b3;">for </span>QUANTILE <span style="color: #0033b3;">in </span>quantile_ranges:<br /> leverage_to_plot = plot_over_leverage(monte_return_streams,<br /> value_quantile)<br /> list_over_quantiles.append(leverage_to_plot)<br /><br />pd_list = pd.DataFrame(list_over_quantiles)<br />pd_list.index = quantile_ranges<br />pd_list.transpose().plot()</span></pre><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB4KAwkAwBdneka15mHQrNQed5p7YoA_5TsWlc-e2AqodxPZcVgeVpnRtXHi5NNE2DaDr7M-vCtUHmQgsvI4WyLZBARFSop3X_AEujtAlMxVa-sOwbGrsMgXkZVTuYbrBN2DiEHJOt2riEbutecjUjZc9ZnjNSSkYU-b5G5g6SjDMLGQr-v5XziqUpIw/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB4KAwkAwBdneka15mHQrNQed5p7YoA_5TsWlc-e2AqodxPZcVgeVpnRtXHi5NNE2DaDr7M-vCtUHmQgsvI4WyLZBARFSop3X_AEujtAlMxVa-sOwbGrsMgXkZVTuYbrBN2DiEHJOt2riEbutecjUjZc9ZnjNSSkYU-b5G5g6SjDMLGQr-v5XziqUpIw/w640-h322/Figure_1.png" width="640" /></a></div><br /><p>It's hard to see what's going on here, legend floating point representation notwithstanding, but you can hopefully see that the maximum <i>L</i> (hump of each curve) gets higher as we go up the quantile scale, as the curves themselves get higher (as you would expect).</p><p>But in none of these quantiles we are still nowhere near reaching an optimal L of 12.5. Even at the 90% quantile - evaluating something that only happens one in ten times - we have a maximum L of under 4.5.</p><p>Now there will be <i>some </i>quantile point at which L=12.5 is indeed optimal. Returning to my simple example:</p><div><ol><li>An investment that lost $1,000 99 times out of 100; and paid out $1,000,000 1% of the time</li><li>An investment that is guaranteed to gain $9,000 </li></ol></div><p>... if we focus on outcomes that will happen less than one in a million times (the 99.9999% quantile and above) then yes sure, we'd prefer option 1.</p><p>So at what quantile point does a leverage factor of 12.5 become optimal? I couldn't find out exactly, since to look at extremely rare quantile points requires very large numbers of outcomes*. I actually broke my laptop before I could work out what the quantile point was. </p><p><i>* for example, if you want ten observations to accurately measure the quintile point, then for the 99.99% quantile you would need 10* (1/(1-0.9999)) = 100,000 outcomes.</i></p><p>But even for a quantile of 99.99% (!), we still aren't at an optimal leverage of 12.5! </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEkygTeg32CB89xGtAZ6sJBD8UU8uCKh3p1x0XH6GsP8atarHaNU58usOST5Z0v0kz5ZcCWFfKfPNT6EJJ2Z9o8Y67fCoTb0tb4Kh2HChqskTJKLScxE75C9o9yiCyNxP1L_WGdV10Hha-sLRj7AaFObqm3yEHpHO5oKR1Jt-cNU8_oqklmzHQJ138oQ/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEkygTeg32CB89xGtAZ6sJBD8UU8uCKh3p1x0XH6GsP8atarHaNU58usOST5Z0v0kz5ZcCWFfKfPNT6EJJ2Z9o8Y67fCoTb0tb4Kh2HChqskTJKLScxE75C9o9yiCyNxP1L_WGdV10Hha-sLRj7AaFObqm3yEHpHO5oKR1Jt-cNU8_oqklmzHQJ138oQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><p>You can see that the optimal leverage is 8 (around 3.2 x Kelly), still way short of 12.5.</p><p><br /></p><h2>Summary</h2><div>Rather than utility functions, I think it's easier to say to ask people the likelihood of outcome they are concerned about. I'd argue that sensible people would think about the median outcome, which is what you expect to happen 50% of the time. And if you are a bit risk averse, you should probably consider an even lower quantile. </div><div><br /></div><div>In contrast SBF went for bet sizing that would only make sense in the set of outcomes that happens significantly less than 0.01% of the time. That is <i>insanely </i>optimistic; and given he was dealing with billions of dollars of other peoples money it was also insanely irresponsible.</div><div><br /></div><div>Was SBF really that recklessly optimistic, or dumb? In this particular case I'd argue the latter. He had a very superfical understanding of Kelly bet sizing, and because of that he thought he could ignore it. </div><div>This is a classic example of 'a little knowledge is a dangerous thing'. A dumb person doesn't understand anything, but reads on the internet somewhere that half Kelly is the correct bet sizing. So they use it. A "smart" person like SBF glances at the Kelly formula, thinks 'oh but I don't have log utility' and leverages up five times Kelly and thinks 'Wow I am so smart look at all my money'. And that ended well...</div><div><br /></div><div>A truely enlightened person understands that it isn't about the utility function, but about the expectation operator. They also understand about uncertainty, optimistic backtesting bias, and a whole bunch of factors that imply that even 0.5 x Kelly is a little reckless. I, for example, use something south of a quarter Kelly. </div><div><br /></div><div>Which brings us back to the meme at the start of the post:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDp5SCpem5sBIzMm3r9V4aJbZHCdraW_VrShXWQW0OU3m5kFZG5RgNzmRjWs-Xm1UqxY5jL5VDrjKeT263pVxLjK4mBTpc7MISikoZc7_ypN_v1L0hUBlJ4f32vKZskOlCWounfP4uu3lokGpP96KCm6QWilutYmdT-VwccwoA4hB6hPWvJBMdo3rwOA/s888/70q2vq%20(1).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="499" data-original-width="888" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDp5SCpem5sBIzMm3r9V4aJbZHCdraW_VrShXWQW0OU3m5kFZG5RgNzmRjWs-Xm1UqxY5jL5VDrjKeT263pVxLjK4mBTpc7MISikoZc7_ypN_v1L0hUBlJ4f32vKZskOlCWounfP4uu3lokGpP96KCm6QWilutYmdT-VwccwoA4hB6hPWvJBMdo3rwOA/w640-h360/70q2vq%20(1).jpg" width="640" /></a></div><br /><p>Note I am not saying I am smarter than SBF. On pure IQ, I am almost certainly much, much dumber. In fact, it's because I know I am not a genius that I'm not arrogant enough to completely follow or ignore the Kelly criteria without first truely understanding it.</p><p>Whilst this particular misunderstanding might not have brought down SBF's empire, it shows that really really smart people can be really dumb - particularly when they think that they are so smart they don't need to properly understand something before ignoring it*.</p><p><i>* Here is <a href="https://www.ft.com/content/e669de5a-87a8-4d78-bf4d-758f7d0a8a67">another example</a> of him getting something completely wrong</i></p><p><br /></p><h2 style="text-align: left;">Postscript (16th November 2022)</h2><div>I had some interesting feedback from <a href="https://twitter.com/edwin_teejay">Edwin Teejay</a> on twitter, which is worth addressing here as well. Some of the feedback I've incorporated into the post already.</div><div><br /></div><div><div><i>(Incidentally, Edwin is a disciple of <a href="https://en.wikipedia.org/wiki/Ergodicity_economics">Ergodic Economics</a>, which has a lot of very interesting stuff to say about the entire problem of utility maximisation)</i></div></div><div><br /></div><div>First he commented that the max(median) = max(log) relationship is only true for a long sequence of bets, i.e. asymptotically. We effectively have 5000 bets in our ten year return sequence. As I said originally, I framed this as a typical asset optimisation problem rather than a one off bet (or small number of one off bets).</div><div><br /></div><div>He then gives an example of a one off bet decision where the median would be inappropriate:</div><div><ol style="text-align: left;"><li>100% win $1</li><li>51% win $0 / 49% win $1'000'000</li></ol></div><div>The expected values (mean expectation) are $1 and $490,000 respectively, but the medians are $1 and $0. But any sane person would pick the second option.</div><div><br /></div><div>My retort to this is essentially the same as before - this isn't something that could realistically happen in a long sequence of bets. Suppose we are presented with making the bet above every single week for 5 weeks. The distribution of wealth outcomes for option 1 is single peaked - we earn $5. The distribution of wealth outcomes for option 2 will vary from $0 (with probability 3.4%) to $5,000,000 (with a slightly lower probability of 2.8% - I am ignoring 'compounding', eg the possibility to buy more bets with money we've already won), with a mean of $2.45 million. </div><div><br /></div><div>But the median is pretty good: $1 million. So we'd definitely pick option 2. And that is with just 5 bets in the sequence. So the moment we are looking at any kind of repeating bet, the law of large numbers gets us closer and closer to the median being the optimal decision. We are just extremely unlikely to see the sort of payoff structure in the bet shown in a series of repeated bets.</div><div><br /></div><div>Now what about the example I posted:</div><div><div><ol><li>An investment that lost $1,000 99 times out of 100; and paid out $1,000,000 1% of the time</li><li>An investment that is guaranteed to gain $9,000 </li></ol></div><div>Is it realistic to expect this kind of payoff structure in a series of repeated bets? Well consider instead the following:</div></div><div><ol><li>An investment that lost $1 most of the time; and paid out $1,000,000 0.001% of the time</li><li>An investment that is guaranteed to gain $5</li></ol></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div><div>The mean of these bets is ~$9 and $5, and the medians are $-1 and $5.</div><div><br /></div></div>Is this unrealistic? Well, these sorts of payoffs do exist in the world- they are called lottery tickets (albeit it is rare to get a lottery ticket with a $9 positive mean!). And this is something closer to the SBF example, since I noted that he would have to be looking at somewhere north of the 0.01% quantile to choose 5x Kelly Leverage.</div><div><br /></div><div>Now what happens if we run the above as a series of 5000 repeated bets (again with no compounding for simplicity). We end up with the following distributions:</div></div></div></div><div><div><ol><li>An investment that lost $5000 95.1% of the time, and makes $1 million or more 5% of the time.</li><li>An investment that is guaranteed to gain $25,000</li></ol></div><div class="separator" style="clear: both; text-align: center;"><br /></div></div><div>Since there is no compounding we can just multiply up the individual numbers to get the mean ($45,000 and $25,000 respectively). The medians are -$5,000 and $25,000. Personally, I still prefer option 2! You might still prefer option 2 if spending $5,000 on lottery tickets over 10 years reflects a small proportion of your wealth, but I refer you to the previous discussion on this topi: make </div><div><br /></div><div>So I would argue that it in a long run of bets we are more likely in real life to get payoff structures of the kind I posited, than the closer to 50:50 bet suggested by Edwin. Ultimately, I think we agree that for long sequences of bets the median makes more sense (with a caveat). I personally think long run decision making is more relevant to most people than one off bets. </div><div><br /></div><div>What is the caveat? Edwin also said that the choice of the median is 'arbitrary'. I disagree here. The median is 'what happens half the time'. I still think for most people that is a logical reference point for 'what I expect to happen', as well as in terms of the maths: both median and mean are averages after all. I personally think it's fine to be more conservative than this if you are risk averse, but <i>not</i> to be more aggressive - bear in mind that will mean you are betting at more than Kelly.</div><div><br /></div><div>But anyway, as <a href="https://twitter.com/breakingthemark">Matt Hollerbach</a>, whose orginal series of tweets inspired this post, said:</div><div><br /></div><div><i>"The best part of Robs framework is you don't have to use the median,50%. You could use 60% or 70% or 40% if your more conservative. And it intuitively tells you what the chance of reaching your goal is. You don't get duped into a crazy long shot that the mean might be hiding in." </i> (typos corrected from original tweet)</div><div><br /></div><div>This fits well into my general framework for thinking about uncertainty. Quantify it, and be aware of it. Then if you still do something crazy/stupid, well at least you know you're being an idiot...</div><div><br /></div><div><br /></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com6tag:blogger.com,1999:blog-261139923818144971.post-56923592633928711012022-11-02T16:17:00.007+00:002022-11-02T16:17:52.865+00:00Optimal trend following allocation under conditions of uncertainty and without secular trends<p style="text-align: justify;">Few people are brave enough to put their entire net worth into a CTA fund or home grown trend following strategy (my fellow co-host on the <a href="https://www.toptradersunplugged.com/podcasts/systematic-investor/">TTU</a> podcast, <a href="http://www.chesapeakecapital.com/our-team/">Jerry Parker</a>, being an honorable exception with his 'Trend following plus nothing' portfolio allocation strategy). Most people have considerably less than 100% - and I include myself firmly in that category. And it's probably true that most people have less than the sort of optimal allocation that is recommended by portfolio optimisation engines.</p><p style="text-align: justify;">Still it is a useful exercise to think about just how much we should allocate to trend following, at least in theory. The figure that comes out of such an exercise will serve as both a ceiling (you probably don't want any more than this), and a target (you should be aiming for this). </p><p style="text-align: justify;">However any sort of portfolio optimisation based on historical returns is likely to be deeply flawed. I've covered the problems involved at length before, in particular in my <a href="https://www.systematicmoney.org/smart">second book</a> and in this <a href="https://qoppac.blogspot.com/2018/12/portfolio-construction-through.html">blogpost</a>, but here's a quick recap:</p><p></p><ol style="text-align: left;"><li style="text-align: justify;">Standard portfolio optimisation techniques are not very robust</li><li style="text-align: justify;">We often assume normal distributions, but financial returns are famously abnormal</li><li style="text-align: justify;">There is uncertainty in the parameter estimates we make from the data</li><li style="text-align: justify;">Past returns distributions may be biased and unlikely to repeat in the future</li></ol><p></p><p style="text-align: justify;">As an example of the final effect, consider the historically strong performance of equities and bonds in a 60:40 style portfolio during my own lifetime, at least until 2022. Do we expect such a performance to be repeated? Given it was driven by a secular fall in inflation from high double digits, and a resulting fall in interest rates and equity discount rates, probably not. </p><p style="text-align: justify;">Importantly, a regime change to lower bond and equity returns will have varying impact on a 60:40 long only portfolio (which will get hammered), a slow trend following strategy (which will suffer a little), and a fast trend following strategy (which will hardly be affected). </p><p style="text-align: justify;">Consider also the second issue: non Gaussian return distributions. In particular equities have famously negative skew, whilst trend following - especially the speedier variation - is somewhat positive in this respect. Since skew affects optimal leverage, we can potentially 'eat' extra skew in the form of higher leverage and returns. </p><p style="text-align: justify;">In conclusion then, some of the problems of portfolio optimisation are likely to be especially toxic when we're looking at blends of standard long only assets combined with trend following. In this post I'll consider some <strike>tricks</strike> methods we can use to alleviate these problems, and thus come up with a sensible suggestion for allocating to trend following. </p><p style="text-align: justify;">If nothing else, this is a nice toy model for considering the issues we have when optimising, something I've written about at length eg <a href="https://qoppac.blogspot.com/2018/12/portfolio-construction-through.html">here</a>. So even if you don't care about this problem, you'll find some interesting ways to think about robust portfolio optimisation within.</p><p style="text-align: justify;">Credit: This post was inspired by <a href="https://twitter.com/Piwy20/status/1587100932118118400">this tweet</a>.</p><p style="text-align: justify;">Some very messy code with hardcoding galore, is <a href="https://gist.github.com/robcarver17/94e66e91ea49a3d986c1378c58425ba0">here</a>.</p><p style="text-align: justify;"><br /></p><h3 style="text-align: left;">The assets</h3><p style="text-align: justify;">Let's first consider the assets we have at our disposal. I'm going to make this a very simple setup so we can focus on what is important whilst still learning some interesting lessons. For reasons that will become apparent later, I'm limiting myself to 3 assets. We have to decide how much to allocate to each of the following three assets:</p><p></p><ul style="text-align: left;"><li style="text-align: justify;">A 60:40 long only portfolio of bonds and equities, represented by the US 10 year and S&P 500</li><li style="text-align: justify;">A slow/medium speed trend following strategy, trading the US 10 year and S&P 500 future with equal risk allocation, with a 12% equity-like annualised risk target. This is a combination of EWMAC crossovers: 32,128 and 64,256</li><li style="text-align: justify;">A relatively fast trend following strategy, trading the US 10 year and S&P 500 future with equal risk allocation, with a 12% annualised risk target. Again this is a combination of EWMAC crossovers: 8, 32 and 16,64</li></ul><p></p><p style="text-align: justify;">Now there is a lot to argue with here. I've already explained why I want to allocate seperately to fast and slow trend following; as it will highlight the effect of secular trends.</p><p style="text-align: justify;">The reason for the relatively low standard deviation target is that I'm going to use a non risk adjusted measure of returns, and if I used a more typical CTA style risk (25%) it would produce results that are harder to interpret.</p><p style="text-align: justify;">You may also ask why I don't have any commodities in my trend following fund. But what I find especially interesting here is the effect on correlations between these kinds of strategies when we adjust for long term secular trends. These correlations will be dampened if there are other instruments in the pot. The implication of this is that the allocation to a properly diversified trend following fund running futures across multiple asset classes will likely be higher than what is shown here.</p><p style="text-align: justify;">Why 60:40? Rather than 60:40, I could directly try and work out the optimal allocation to a universe of bonds and equities seperately. But I'm taking this as exogenous, just to simplify things. Since I'm going to demean equity and bond returns in a similar way, this shouldn't affect their relative weightings.</p><p style="text-align: justify;">50:50 risk weights on the mini trend following strategies is more defensible; again I'm using fixed weights here to make things easier and more interpretable. For what it's worth the allocation within trend following for an in sample backtest would be higher for bonds than for equities, and this is especially true for the faster trading strategy.</p><p style="text-align: justify;">Ultimately three assets makes the problem both tractable and intuitive to solve, whilst giving us plenty of insight.</p><p style="text-align: justify;"><br /></p><h3 style="text-align: justify;">Characteristics of the underyling data</h3><p style="text-align: justify;">Note I am going to use futures data even for my 60:40, which means all the returns I'm using are excess returns.</p><p style="text-align: justify;">Let's start with a nice picture:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSxO9YoTaV45U3R6XHLPn6tnfJY_C7MFP0_dQliugSeR6AEPRGCBJZF2Wk0-1wdet2H0XNWjgpPJniCO-K1kXV7gs4C9Jw2NtoROl2vl-xQ3cqNDT9hjueZjsTZ7YF7dFuRBDUdLHapvGLdlNydjeQXD7HJcsI9BMVRIxlPr3Su2mmSXobRK735y7-0A/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSxO9YoTaV45U3R6XHLPn6tnfJY_C7MFP0_dQliugSeR6AEPRGCBJZF2Wk0-1wdet2H0XNWjgpPJniCO-K1kXV7gs4C9Jw2NtoROl2vl-xQ3cqNDT9hjueZjsTZ7YF7dFuRBDUdLHapvGLdlNydjeQXD7HJcsI9BMVRIxlPr3Su2mmSXobRK735y7-0A/w640-h322/Figure_1.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: justify;"><br /></div><div style="text-align: justify;">So the first thing to note is that the vol of the 60:40 is fairly low at around 12%; as you'd expect given it has a chunky allocation to bonds (vol ~6.4%). In particular, check out the beautifully smooth run from 2009 to 2022. The two trading strategies also come in around the 12% annualised vol mark, by design. In terms of Sharpe Ratio, the relative figures are 0.31 (fast trading strategy), 0.38 (long only) and 0.49 (slow trading strategy). However as I've already noted, the performance of the long only and slow strategies is likely to be flattered by the secular trends in equities and bonds seen since 1982 (when the backtest starts).</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Correlations matter, so here they are:</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><span style="color: #080808;"> <b>60:40 Fast TF Slow TF</b><br /></span><b>60:</b><b>40</b> <span style="color: #1750eb;">1.00 </span><span style="color: #080808;">-</span><span style="color: #1750eb;">0.02 0.25<br /></span><b style="color: #080808;">Fast TF</b><span style="color: #080808;"> -</span><span style="color: #1750eb;">0.02 1.00 0.68<br /></span><b style="color: #080808;">Slow TF</b><span style="color: #080808;"> </span><span style="color: #1750eb;">0.25 0.68 1.00<br /></span></span></pre></div><div style="text-align: justify;"><br /></div><div><div style="text-align: justify;">What about higher moments? The monthly skews are -1.44 (long only), 0.08 (slow) and 0.80 (fast). Finally what about the tails? I have a novel method for measuring these which I discuss in my <a href="https://www.systematicmoney.org/advanced-futures">new book</a>, but all you need to know is that a figure greater than one indicates a non-normal distribution. The lower tail ratios are 1.26 (fast), 1.35 (slow) and 2.04 (long only); whilst the uppers are 1.91 (fast), 1.74 (slow) and 1.53 (long only). In other words, the long only strategy has nastier skew and worst tails than the fast trading strategy, whilst the slow strategy comes somewhere in between.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><br /></div><div><h3 style="text-align: justify;">Demeaning</h3><p style="text-align: justify;">To reiterate, again, the performance of the long only and slow strategies is likely to be flattered by the secular trends in equities and bonds, caused by valuation rerating in equities and falling interest rates in bonds. </p><p style="text-align: justify;">Lets take equities. The P/E ratio in September 1982 was around 9.0, versus 20.1 now. This equates to 2.0% a year in returns coming from the rerating of equities. Over the same period US 10 year bond yields have fallen from around 10.2% to 4.0% now, equating to around 1.2% a year in returns. I can do a simple demeaning to reduce the returns achieved by the appropriate amounts.</p><p style="text-align: justify;">Here are the demeaned series with the original backadjusted prices. First S&P:</p><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik9IDKcSPW8MfbXI4lXGbaP8CtduDWJLeQVJc9sGgUaFtrCAa9nKTVOjFk4oStJVaIUyh4UuheFniTHKQRibofG0kHDQsgnYORRat9kdAxpii76ftznTzXJAouvIe-JFTloGAu7phdnnJoaQkeTSUuqbFKEdqe3SqpnNrwslpcpg_Q-ST7c9sMgrDFaw/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik9IDKcSPW8MfbXI4lXGbaP8CtduDWJLeQVJc9sGgUaFtrCAa9nKTVOjFk4oStJVaIUyh4UuheFniTHKQRibofG0kHDQsgnYORRat9kdAxpii76ftznTzXJAouvIe-JFTloGAu7phdnnJoaQkeTSUuqbFKEdqe3SqpnNrwslpcpg_Q-ST7c9sMgrDFaw/w640-h322/Figure_1.png" width="640" /></a></div><p style="text-align: justify;">And for US10:</p><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6VAV7rhbsZ58WQF0lRgHYTfKpxs3CZJG6fHa1USgu80Ks-kpmBqFreCRLd-cYs0wE4ybNihQSOLAI3HwicNc05sXiIZgBrOkz2SnaYWAeRh-xKCsOQkZv0a6t8KzCo7yDzpXS8kJutb_jkcTaZG6YG2yNSrezKA-CMb_TS1Ccqf3H3KshLYU8SYNx0g/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6VAV7rhbsZ58WQF0lRgHYTfKpxs3CZJG6fHa1USgu80Ks-kpmBqFreCRLd-cYs0wE4ybNihQSOLAI3HwicNc05sXiIZgBrOkz2SnaYWAeRh-xKCsOQkZv0a6t8KzCo7yDzpXS8kJutb_jkcTaZG6YG2yNSrezKA-CMb_TS1Ccqf3H3KshLYU8SYNx0g/w640-h322/Figure_1.png" width="640" /></a></div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">What effect does the demeaning have? It doesn't affect significantly standard deviations, skew, or tail ratios. But it does affect the Sharpe Ratio:</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><br /></div><span style="font-family: courier; font-size: x-small;"><div style="text-align: justify;"> Original Demean Difference</div></span><p style="text-align: justify;"><span style="font-family: courier; font-size: x-small;">Long only 0.38 0.24 -0.14</span></p><p style="text-align: justify;"><span style="font-family: courier; font-size: small;">Slow TF 0.49 0.41 -0.08</span></p><p style="text-align: justify;"><span style="font-family: courier; font-size: x-small;">Fast TF 0.31 0.25 -0.06</span></p><div style="text-align: justify;">This is exactly what we would expect. The demeaning has a larger effect on the long only 60:40, and to a lesser extent the slower trend following. </div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">And the correlation is also a little different:</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><pre style="background-color: white; font-family: "JetBrains Mono", monospace;"><span style="font-size: x-small;"><b><span style="color: #080808;"> </span>60:40 <span style="color: black;"> </span><span style="color: #080808;">Fast TF Slow TF</span></b><span style="color: #080808;"><br /></span><b>60:</b><span style="color: black;"><b>40</b> </span><span style="color: #1750eb;">1.00 </span><span style="color: #080808;">-</span><span style="color: #1750eb;">0.06 0.18<br /></span><b style="color: #080808;">Fast TF</b><span style="color: #080808;"> -</span><span style="color: #1750eb;">0.06 1.00 0.66<br /></span><b style="color: #080808;">Slow TF</b><span style="color: #080808;"> </span><span style="color: #1750eb;">0.18 0.66 1.00<br /></span></span></pre></div><p style="text-align: justify;">Both types of trend have become slightly less correlated with 60:40, which makes sense.</p><p style="text-align: justify;"><br /></p><h3 style="text-align: justify;">The optimisation</h3><div style="text-align: justify;">Any optimisation requires (a) a utility or fitness function that we are maximising, and (b) a method for finding the highest value of that function. In terms of (b) we should bear in mind the comments I made earlier about robustness, but let's first think about (a).</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">An important question here is whether we should be targeting a risk adjusted measure like Sharpe Ratio, and hence assuming leverage is freely available, which is what I normally do. But for an exercise like this a more appropriate utility function will target outright return and assume we can't access leverage. Hence our portfolio weights will need to sum to exactly 100% (we don't force this to allow for the possibility of holding cash; though this is unlikely). </div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">It's more correct to use geometric return, also known as CAGR, rather than arithmetic mean since that is effectively the same as maximising the (log) final value of your portfolio (Kelly criteria). Using geometric mean also means that negative skew and high kurtosis strategies will be punished, as will excessive standard deviation. By assuming a CAGR maximiser, I don't need to worry about the efficient frontier, I can maximise for a single point. It's for this reason that I've created TF strategies with similar vol to 60:40.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">I'll deal with uncertainty by using a resampling technique. Basically, I randomly sample with replacement from the joint distribution of daily returns for the three assets I'm optimising for, to create a new set of account curves (this will preserve correlations, but not autocorrelations. This would be problematic if I was using drawdown statistics, but I'm not). For a given set of instrument weights, I then measure the utility statistic (CAGR) for the resampled returns. I repeat this exercise a few times, and then I end up with a distribution of CAGR for a given set of weights. This allows us to take into account the effect of uncertainty. </div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Finally we have the choice of optimisation technique. Given we have just three weights to play with, and only two degrees of freedom, it doesn't seem too heroic to use a simple grid search. So let's do that.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><h3>Some pretty pictures</h3></div><div style="text-align: justify;">Because we only have two degrees of freedom, we can plot the results on a 2-d heatmap. Here's the results for the median CAGR, with the original set of returns before demeaning:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpT-h0d67lzxZZYgFwA1ZsdfkWucCec08yxvMddb43vI6CKjJGIaWhcR7B0jqVzzvv9pjwXq5j0hWhW4Nf2qs0_H5BDdgJ1He9Fzx06ewxALzpAu3Jz5m5x5CDzbKNLl4Pp2bYu7SYGAf3wZ_XvNSAWzDvEzXjqsL9hORI6eoywXarDDHhIwNi3eUy-g/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpT-h0d67lzxZZYgFwA1ZsdfkWucCec08yxvMddb43vI6CKjJGIaWhcR7B0jqVzzvv9pjwXq5j0hWhW4Nf2qs0_H5BDdgJ1He9Fzx06ewxALzpAu3Jz5m5x5CDzbKNLl4Pp2bYu7SYGAf3wZ_XvNSAWzDvEzXjqsL9hORI6eoywXarDDHhIwNi3eUy-g/w640-h322/Figure_1.png" width="640" /></a></div><div style="text-align: justify;">Sorry for the illegible labels - you might have to click on the plots to see them. The colour shown reflects the CAGR. The x-axis is the weight for the long only 60:40 portfolio, and the y-axis for slow trend following. The weight to fast trend following will be whatever is left over. The top diagonal isn't populated since that would require weights greater than 1; the diagonal line from top left to bottom right is where there is zero weight to fast trend following; top left is 100% slow TF and bottom right is 100% long only.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Ignoring uncertainty then, the optimal weight (brightest yellow) is 94% in slow TF and 6% in long only. More than most people have! However note that there is a fairly large range of yellow CAGR that are quite similar. </div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">The 30% quantile estimate for the optimal weights is a CAGR of 4.36, and for the 70% quantile it's 6.61. Let's say we'd be indifferent between any weights whose median CAGR falls in that range (in practice then, anything whose median CAGR is greater than 4.36). If I replace everything that is statistically indistinguishable from the maximum with white space, and redo the heatmap I get this:</div><div style="text-align: justify;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOwjvvB1A46HZFLxqhxqUgpsfe1mQDxOvHgkLz8dVfX_L-JnesH4IRv3VXkOeADhEToC1Btp8DW5Ai5TX7ZDr5_p1wmhmO6so-KRfJpqyaBOu5ROORA79jOHMFu1bJFCoSbzz2SPFpBp1k0nG7eqm9VHTDdH9bn3C98gJo0dDzo6aaR7F5v4ZisIzQhQ/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOwjvvB1A46HZFLxqhxqUgpsfe1mQDxOvHgkLz8dVfX_L-JnesH4IRv3VXkOeADhEToC1Btp8DW5Ai5TX7ZDr5_p1wmhmO6so-KRfJpqyaBOu5ROORA79jOHMFu1bJFCoSbzz2SPFpBp1k0nG7eqm9VHTDdH9bn3C98gJo0dDzo6aaR7F5v4ZisIzQhQ/w640-h322/Figure_1.png" width="640" /></a></div>This means that, for example, a weight of 30% in long only, 34% in slow trend following, and 36% in fast trend following; is just inside the whitespace and thus is statistically indistinguishable from the optimal set of weights. Perhaps of more interest, the maximum weight we can have to long only and still remain within this region (at the bottom left, just before the diagonal line reappears) is about 80%.</div><div><br /></div><div><b>Implication: We should have at least 20% in trend following.</b></div><div><b><br /></b></div><div>If I had to choose an optimal weight, I'd go for the centroid of the convex hull of the whitespace. I can't be bothered to code that up, but by eye it's at roughly 40% 60/40, 50% slow TF, 10% fast TF.<br /><div style="text-align: justify;"><br /></div></div><div><div style="text-align: justify;">Now let's repeat this exercise with the secular trends removed from the data.</div><div style="text-align: justify;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiISCdqmpbYp7Dz-7ZXLFR_H30Jn03m0YZVi8y6wFvWHlqpmB2P68B9A6WGGIBzWsL_9xc1vKEUb14z-qHkit6EwCWZCETknqEvHvfKqPpxs_ubQhA9ekYFKLcaH6AWz9Uk4yH-4bu9o3oR2dmdBbzm1KmPvshgo037mH1ykDhgcJqEl8M-WPvBlBTZtw/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiISCdqmpbYp7Dz-7ZXLFR_H30Jn03m0YZVi8y6wFvWHlqpmB2P68B9A6WGGIBzWsL_9xc1vKEUb14z-qHkit6EwCWZCETknqEvHvfKqPpxs_ubQhA9ekYFKLcaH6AWz9Uk4yH-4bu9o3oR2dmdBbzm1KmPvshgo037mH1ykDhgcJqEl8M-WPvBlBTZtw/w640-h322/Figure_1.png" width="640" /></a></div>The plot is similar, but notice that the top left has got much better than the bottom right; we should have a lower weight to 60:40 than in the past. In fact the optimal is 100% in slow trend following; zilch, nil, zero, nada in both fast TF and 60:40.</div><div><br /></div><div>But let's repeat the whitespace exercise to see how robust this result is:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4DDvJBoOBqPLcIWzgrOKcYDln5OCEZgUgcW0hp5HMr4MtQifOJ9V4GxtHBGi7V42Np24n7C3r5qTJu3UVMRj6ztrEYwL1G8ZzjgtD8uaB53CL4htYkfwDfsjoF0bGJLl44jaYMuiqAxUbwGggS8Su-rhofzcFgVMLDClkD8YIR5xxfT_R8Hq-Vp_2Dw/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4DDvJBoOBqPLcIWzgrOKcYDln5OCEZgUgcW0hp5HMr4MtQifOJ9V4GxtHBGi7V42Np24n7C3r5qTJu3UVMRj6ztrEYwL1G8ZzjgtD8uaB53CL4htYkfwDfsjoF0bGJLl44jaYMuiqAxUbwGggS8Su-rhofzcFgVMLDClkD8YIR5xxfT_R8Hq-Vp_2Dw/w640-h322/Figure_1.png" width="640" /></a></div>The whitespace region is much smaller than before, and is heavily biased towards the top left. Valid portfolio weights that are indistinguishable from the maximum include 45% in 60:40 and 55% in slow TF (and <b>45% is the most you should have in 60:40 </b>whilst remaining in this region). We've seen a shift away from long only (which we'd expect), but interestingly no shift towards fast TF, which we might have expected as it is less affected by demeaning.</div><div><div><br /></div><div>The optimal (centroid, convex hull, yada yada...) is somewhere around 20% 60:40, 75% slow TF and 5% in fast TF.<br /><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><div><div><h3>Summary: practical implications</h3></div></div><div>This has been a highly stylised exercise, deliberately designed to shine a light on some interesting facts and show you some interesting ways to visualise the uncertainty in portfolio optimisation. You've hopefully seen how we need to consider uncertainty in optimisation, and I've shown you a nice intuitive way to produce robust weights.</div><div><br /></div><div>The bottom line then is that a robust set of allocations would be something like <span style="text-align: left;"><b>40% 60/40</b>, 50% slow TF, 10% fast TF; but with a <b>maximum allocation to 60/40 of about 80%</b>. If we use data that has had past secular trends removed, we're looking at an even higher allocation to TF, with the maximum 60/40 allocation reducing considerably, to around<b> 45%</b>. </span></div><div><span style="text-align: left;"><br /></span></div><div>Importantly, this has of course been an entirely in sample exercise. Although we've made an effort to make things more realistic by demeaning, much of the results depend on the finding that slow TF has a higher SR than 60:40, an advantage that is increased by demeaning. Correcting for this would result in a higher weight to 60:40, but also to fast TF.</div><div><br /></div><div><span style="text-align: left;">Of course if we make this exercise more realistic, it will change these results:</span></div><div><ul><li>Improving 60:40 equities- Introducing non US assets, and allocating to individual equities</li><li>Improving 60:40 bonds - including more of the term structure, inflation and corporate bonds, </li><li>Improving 60:40 by including other non TF alternatives</li><li>Improving the CTA offering - introducing a wider set of instruments across asset classes (there would also be a modest benefit from widening beyond a single type of trading rule)</li><li>Adding fees to the CTA offering </li></ul></div><div>I'd expect the net effect of these changes to result in a higher weight to TF, as the diversification benefits in going from two instruments to say 100 is considerable; and far outweights the effect of fees and improved diversification in the long only space.</div><div><br /></div></div></div></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com1tag:blogger.com,1999:blog-261139923818144971.post-37374797032939656862022-09-20T10:58:00.003+01:002022-09-21T08:55:57.562+01:00What exactly is a CTA?<p><span face=""Tate regular", Arial, "Helvetica Neue", Helvetica, sans-serif" style="background-color: white; color: #313131; font-size: 46px; font-variant-ligatures: no-common-ligatures; letter-spacing: 0.17px; text-align: center;">When I use a word... it means just what I choose it to mean</span></p><p><br /></p><p>CTA. An industry standard term, that seems straightforward to define: Commodity Trading Advisor. We can all name a bunch of CTAs - I used to <a href="https://www.man.com/ahl">work for one</a>. There are indices for them, such as <a href="https://wholesale.banking.societegenerale.com/en/prime-services-indices/">this one</a> or <a href="https://portal.barclayhedge.com/cgi-bin/indices/displayHfIndex.cgi?indexCat=Barclay-Investable-Benchmarks&indexName=BTOP50-Index">this one</a> (also <a href="https://www.eurekahedge.com/Indices/IndexView/Eurekahedge/476/Eurekahedge-CTA-Managed-Futures-Hedge-Fund-Index">this</a>, and <a href="https://www.iasg.com/en/indexes">this</a>, oh and <a href="https://nilssonhedge.com/index/cta-index/">this</a>, plus <a href="http://www.ctaindexes.com/List_Altegris.html">this</a>, and these guys have<a href="https://www.isenberg.umass.edu/centers/center-for-international-securities-and-derivatives-markets/cisdm-indices"> one</a>, as do these <a href="https://lab.credit-suisse.com/#:~:text=The%20Credit%20Suisse%20Hedge%20Fund,includes%20open%20and%20closed%20funds.&text=The%20Credit%20Suisse%20AllHedge%20Index,measure%20of%20an%20investable%20portfolio.">guys</a>, oh and dont' forget this <a href="https://www.stoxx.com/download/indices/factsheets/STXECMF.pdf">one</a> ... I probably missed some but I'm bored now). But in practice, the term CTA is a somewhat ill defined term with multiple overlapping meanings. Let's dive in.</p><p><br /></p><h2>Advising and managed accounts</h2><p><br /></p><p>The most intriguing word in the term CTA is the final one: <i style="font-weight: bold;">advisor</i>. CTA's are not fund managers in the normal sense of the word. </p><p>Fund managers normally do this: They take your cash and comingle it with others in a legal vehicle, selling you shares in the vehicle in exchange. Then they go out and buy assets with the cash. You don't legally own the assets - the fund does. There's normally a second legal vehicle which is responsible for actually managing the fund - the fund manager. You don't own shares in that. </p><p>The CTA is a bit like the second legal vehicle in a standard fund structure - it advises but doesn't actually own the assets. But in a traditional CTA structure the assets are not comingled but kept seperate. So it works as follows: you open a <i style="font-weight: bold;">managed account </i>and put some cash into it. The CTA fund then makes decisions about what that account buys or sells. Importantly, you still own the assets in the account. If something happened to another customers assets, it wouldn't affect you.</p><p>Note that the advisory term is a bit misleading as it implies that you have full trading discretion on the account, and the CTA ocasionally rings you up and <i>advises</i> you about what you might think about trading. That may have been the case in the 1970s when CTAs started to become popular, but nowadays CTAs almost always trade customers accounts for them, often with automated execution algos that are a world away from requiring someone to pick up the phone. </p><p><br /></p><p><br /></p><h2>Choice of instrument</h2><p><br /></p><p>In theory any asset can be put inside a managed account, but they have normally been used to trade <i style="font-weight: bold;">futures</i>. The combination of a managed account and futures trading brings us to the term <i style="font-weight: bold;">managed futures </i>which is often used interchangeably with the designation CTA. Since CTA is a term of US legal art, this definition is safer and can be used across geographical regions.</p><p>An important implication of this is that you need a fair bit of money to have a managed account. To hold a properly diversified portfolio of futures with anything less than a few tens of millions, without running into discretisation issues is tricky, as I've discussed at length on this blog. There are also admin and operational fixed costs associated with having a number of managed accounts.</p><p>Over time many CTAs have gradually increased the minimum required to hold managed accounts, or have switched to using non managed account structures, which also allow them to trade assets that aren't futures. </p><p><br /></p><p><br /></p><h2 style="text-align: left;">The asset class </h2><p><br /></p><p>You might think that commodity trading advisors manage <b><i>commodities</i></b>: things like Wheat and Crude Oil. The easiest way to manage such things, especially in a managed account type setup, is through futures contracts.</p><p>However it's pretty rare for a CTA to only trade commodity futures. Nearly all of them also trade financial futures like the S&P 500 equity index or US 10 year bonds (there's perhaps an argument about whether metals like Gold are commodities or not).</p><p>Over time, CTAs have begun to trade non futures instruments. For example, it's hard to get adequate diversification in FX with just the available futures contracts. Adding FX forwards makes a lot of sense in this context, as they are very similar to futures although obviously OTC rather than exchange traded. This has implications for the legal structure of the CTA, since you can't easily put these in managed accounts.</p><p><br /></p><p><br /></p><h2 style="text-align: left;">The legal / regulatory definition</h2><p><br /></p><p>CTA is a <u style="font-weight: bold;">US regulatory term</u>. From the <a href="https://www.nfa.futures.org/registration-membership/who-has-to-register/cta.html">horses mouth</a>:</p><p>Commodity Trading Advisor (CTA) Registration</p><p>A commodity trading advisor (CTA) is an individual or organization that, for compensation or profit, advises others, directly or indirectly, as to the value of or the advisability of trading futures contracts, options on futures, retail off-exchange forex contracts or swaps.</p><p>There's quite a bit to unpick there. The most obvious is this: the advisor is expected to advise, suggesting a managed account structure rather than a traditional structure. Secondly, and contrary to what has been stated before, you can be a CTA and manage non futures assets. This is somewhat alien to the concept of managed futures, but reflects the reality of the modern CTA industry. </p><p><br /></p><h2>Trading style and speed</h2><div><br /></div><div>Until now I haven't discussed exactly <i>how</i> the CTA trades, only what it trades, and the legal structure set up to do that trading. In theory a CTA could be anything from a high frequency futures trader, up to a slow moving risk parity fund. They could be doing pure trend following, or some dangerous combination of carry, mean reversion, and a systematic short position in VIX.</div><div><br /></div><div>Generally though when people refer to CTAs or managed futures they are mostly expecting such funds to trade <b>medium to slow speed trend following</b>. This is pure path dependence and tradition - there is nothing in the CFTC or NFA definition that says you have to trade like this. But because CTAs have been around for a while, and because trading costs where higher in the past, and because trends work well in futures particularly during the inflation ridden era when CTAs came to prominence, and because trends work better for holding periods between a few months and a year... for all of these reasons the CTA industry grew up as fairly slow trend followers.</div><div><br /></div><div>(Remarkably this is true of both the US and European 'wings' of the CTA industry; even though the latter grew up fairly independently.)</div><div><br /></div><div>There is a degree of self reinforcement here. CTAs have done very well in several market downturns, leading to the mythical status of 'crisis alpha'; something that is both uncorrelated and yet provides a positive return, plus nice skew properties. Some of that is just maths - a trend following strategy will have the payoff function of a long straddle and positive skew when judged at the right time horizon - and some of it may be myth, luck, or due to secular trends and correlations that may not hold in the future. But as a marketing story it's certainly become popular in certain circles, which means that many clients expect CTAs to have a certain trading style to fit within their particular style box.</div><div><br /></div><div>However the fact that there are now seperate 'SG CTA', 'SG CTA Trend', and 'SG Short term' CTA indices suggests there is now more to the industry than slothful trend followers.</div><div><br /></div><div><i>Note: The HFRI index family does not use the term CTA, but does have the following confusing set of indices:</i></div><div><i><br /></i></div><div><ul style="text-align: left;"><li><i>HFRI Macro: Systematic Diversified Index </i></li><li><i>HFRI Macro: Systematic Directional Index </i></li><li><i>HFRI Trend Following Directional Index </i></li></ul></div><div><br /></div><div><br /></div><h2>Systematic or discretionary</h2><div><br /></div><div>The very first CTAs can really only have been discretionary; men (back then, always men!) in green eye shades in darkened rooms looking at point and figure charts. However the use of trend following naturally lends itself to a systematic process. Systematisation also allows maximal diversification across numerous futures instruments, something that will improve expected performance.</div><div><br /></div><div>The term CTA has thus become synonymous with systematic trend following. </div><div><br /></div><div>Notice that <i>systematic</i> is not the same as <i>automated</i>. It's possible in theory to have a fully systematic process which is hand cranked, or done in spreadsheets or with a calculator. The original turtles operated in such a fashion. But the easy availability of computer power means that the generation of trades in the vast majority of CTAS is now done in an automated fashion.</div><div><br /></div><div><br /></div><div><h2>The modern CTA</h2><p><br /></p><p>A modern CTA may well still have some legacy managed accounts, or accounts opened for particularly large clients who want that traditional structure, but they are more likely to have morphed into a more typical hedge fund setup.</p><p>Instead of opening a managed account clients will buy shares in various legal investment vehicles, and there is usually a good offering of alternative jurisdictions (both onshore and offshore), currencies and types of fund (eg UCITS). In many cases a single legal vehicle may have different share classes, offering different currencies or degrees of leverage. </p><p>(Another possibility is that the CTA uses a master-feeder structure. The client puts money into a feeder, which in turn is invested in various master funds. For example, a CTA might offer a variety of options that blend between a more traditional futures trend following fund, and an alternative that holds OTC assets.) </p><p>These various funds will then have futures accounts opened them. Arguably these are also managed accounts, but the legal owner of the assets within them are funds <i>not</i> the final clients, so this is different from the traditional setup. </p><p>However the investment funds can also go out shopping for assets that aren't futures. These can include other on exchange assets, like options on futures, or equities; or OTC assets like FX forwards, interest rate swaps or cash bonds. This gives the clients access to a more diviersified set of instruments, something that would be extremely difficult in a traditional managed account structure. Consider for example the hassle of setting up 50 ISDA agreements for 50 $20 million managed accounts, rather than a single $1 billion fund.</p><p>It's likely that a modern CTA is fully systematic and automated up to the point of trade generation, although many funds will outsource the execution of their trades to in house human traders or external brokers. </p><p>The variety of trading strategies is probably the area where the industry remains most heterogeneous. </p><p>Many CTAs probably still have some medium speed trend following at their core, and may offer funds that are purer, but will have plenty of other signals such as carry and mean reversion. They may also offer funds that are very different but leverage off their experience, such as leveraged risk parity or equity market neutral. But this is a generalisation, and there are plenty of CTAs that have stuck more to their traditional knitting of medium speed trend following "plus nothing". We can even have a further debate about what does, or does not, constitute the correct use of the word trend following - but perhaps we should not do that today!</p><p><br /></p><h2 style="text-align: left;">Conclusion</h2></div><div><br /></div><div>In summary, when you say CTA you may mean something quite different from what I mean. There is no such thing as a 'pure' or 'true' CTA. This is most true when it comes to defining the trading style. CTA is a poorly defined term, but it seems we are stuck with it (after all, 'managed futures' is not much better!).</div><div><br /></div><div><br /></div><h2><br /></h2>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com2tag:blogger.com,1999:blog-261139923818144971.post-54574617903153342652022-06-27T15:10:00.002+01:002022-06-29T08:56:03.571+01:00Vol targeting: A CA(g)R race<p>Regular listeners to the <a href="https://www.toptradersunplugged.com/category/systematic-investor/">podcast</a> I ocasionally co-host will know that I enjoy some light hearted banter with some of my fellow podcasters, many of whom describe themselves as 'pure' trend followers, whilst I am an apostate who deserves to be cast into the outer darkness. My (main) sin? The use of '<b>vol targeting</b>', an evil methodology not to be found in the <a href="https://oxfordstrat.com/coasdfASD32/uploads/2016/01/turtle-rules.pdf">original texts</a> of trend following, or even in the <a href="https://www.turtletrader.com/">apocrypha</a>, and thus making me unworthy. In brief, vol targeting involves adjusting the size of a trade if volatility changes during the period that you are holding it for. A real trend follower would maintain the position in the original size.</p><p>(But we agree that the initial position should be sized according to the risk when the trade is entered into)</p><p>I've briefly discussed this subject <a href="https://qoppac.blogspot.com/2020/12/dynamic-trend-following.html">before</a>, but I thought it might be worthwhile to have another look. In particular, the pure trendies generally object to my use of Sharpe Ratios (SR) as a method for evaulating trading performance. And you know what - they are right. It doesn't make much sense to use SR when two or more trading strategies have different return distributions. And it's well known that purer trend following has a more positive skew than the vol targeted alternative, although that effect isn't as large when you look at returns as you might expect. Also, for what it's worth, purer trend following has fatter tails, both left and right.</p><p>The reason I use Sharpe Ratio of course is that it's a risk adjusted return, which makes in invariant to the amount of leverage. So if we're not going to use risk adjusted returns, then what? I'm going to do the following, and pick the strategy with the<b> best annualised compounding return </b>at the <b>optimal leverage level for that strategy. </b>Because positively skewed strategies can have higher leverage than those with less skew (see my first book <a href="https://www.systematicmoney.org/systematic-trading"><i>Systematic Trading</i></a> for some evidence), this will flatter the purer form of trend following.</p><p>** EDIT 29th June - added 3 slower strategies and turnover statistics **</p><p><br /></p><h2 style="text-align: left;">The systems</h2><p>What I'm trying to do here is to isolate the effect of vol targeting by making the trading systems as close as possible to each other. </p><p>Each of the alternatives will use a single kind of moving average crossover trading rule(s), but the way they are used will be rather different:</p><p></p><ol style="text-align: left;"><li><b>1E1S'One entry, one stop'</b> (binary, no vol targeting). We enter a trade with a full sized fixed position when the crossover goes long or short, and we exit when we hit a trailing stop loss. We reenter the trade when the crossover has changed signs. The size of the stop loss is calibrated to match the turnover of the entry rule (see <a href="https://qoppac.blogspot.com/2020/02/what-is-right-way-to-set-stop-losses.html">here</a> and <a href="https://qoppac.blogspot.com/2020/04/how-fast-should-we-trade.html">here</a>). The stop loss gap remains fixed throughout the life of the trade, as does the position size. This is basically the <i>starter system</i> in chapter six of <i><a href="https://www.systematicmoney.org/leveraged-trading">Leveraged Trading</a>.</i></li><li><b>1E1E 'One entry, one exit'</b> (binary, no vol targeting). We enter a trade with a full sized fixed position when the crossover goes long or short, and we exit when the crossover has changed signs, immediately opening a new position in the opposite direction. The position size remains unchanged. This is the system in chapter nine of <i><a href="https://www.systematicmoney.org/leveraged-trading">Leveraged Trading</a>.</i></li><li><b>BV 'Binary with vol targeting' </b>(binary, vol targeting)<b>.</b> We enter a trade with a full sized position when the crossover goes long or short, and we exit when the crossover has changed signs. Whilst holding the trade we adjust our positions according to changes in volatility, using a buffer to reduce trading costs.</li><li><b>FV 'Forecasts and vol targeting' </b>(continous, vol targeting). We hold a position that is proportional to a forecast of risk adjutsed returns (the size of the crossover divided by volatility), and is adjusted for current volatility, using a buffer to reduce changing costs. This is my standard trading model, which is in the final part of <i><a href="https://www.systematicmoney.org/leveraged-trading">Leveraged Trading</a> </i>and also in <a href="https://www.systematicmoney.org/systematic-trading"><i>Systematic Trading</i></a>. </li></ol><p>I've included both FV and BV to demonstrate that any difference isn't purely down to the use of forecasting, but is because of vol targeting. Similarly, I've included both 1E1E and 1E1S to show that it's the vol targeting that's creating any differences, not just the use of a particular exit methodology.</p><p><i>If you forget which is which then the things with numbers next to them are not vol targeted (1E1E, 1E1S), and the pure letter acronyms which include the letter V are vol targeted (FV, BV).</i></p><p>It's probably easier to visualise the above with a picture; here's a plot of the position held in S&P 500 using each of the different methods, all based on the EWMAC64,256 opening rule.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoomkZzaNnI0pOsBdm0hwyliND9x23VDHirJFd8d_EKnpO-2UORRTycLx6KJFWBc_xN1A0zEy6lZ7RrRyb0jdzhhu_X1u00bdpX1ylz8n3eb8HpExlYx0OUmtc-3Ar5y0oBys5CKYjf0ZNGhEZPpF4KJ0SrjgS647DBkmCRsqcpdlqWEbnUBaMbNAXEA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoomkZzaNnI0pOsBdm0hwyliND9x23VDHirJFd8d_EKnpO-2UORRTycLx6KJFWBc_xN1A0zEy6lZ7RrRyb0jdzhhu_X1u00bdpX1ylz8n3eb8HpExlYx0OUmtc-3Ar5y0oBys5CKYjf0ZNGhEZPpF4KJ0SrjgS647DBkmCRsqcpdlqWEbnUBaMbNAXEA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>Notice how the 1E1S and 1E1E strategies hold their position in lots fixed in between trades; they don't match exactly since they are using different closing rules, eg in October 2021 the 1E1E goes short because the forecast switches sign, but the 1E1S remains long as the stop hasn't been hit.<br /><p>The binary forecast (red BV) holds a steady long or short in risk terms, but adjusts this according to vol. Finally the continous forecast (green FV) starts off with a small position which is then built up as the trend continues, and cut when the trend fades</p><p>I will do this exercise for the following EWMAC trading rules: EWMAC8,32; EWMAC16,64; EWMAC32,128; EWMAC64,256. I'm excluding the fastest two rules I trade, since they can't be traded by a lot of instruments due to excessive costs. The skew is higher the faster you trade, so this will give us some interesting results. If I refer to EWMAC<i>N</i>, that's my shorthand for the rule EWMACN,4N.</p><p>I will also look at the joint performance of an equally weighted system with all of the above (EWMACX). In the case of the joint performance, I equally weight the individual forecasts, before forming a combined forecast and then follow the rules above.</p><p>For my set of instruments, I will use the <i>Jumbo portfolio</i>. This is discussed in my new book (still being written), but it's a set of 100 futures markets which I've chosen to be liquid and not too expensive to trade. For instrument weights, I use the handcrafted weights for my own trading system, excluding instruments that I have in my system which aren't in the Jumbo portfolio. The results won't be significantly affected by using a different set of instruments or instrument weights. </p><p>Notional capital is $100 million; this is to avoid any rounding errors on positions making a big difference; for example if capital was too small then BV would look an awful lot like 1E1E.</p><p><br /></p><h2>Basic statistics</h2><p>Let's begin with some basic statistics; first realised standard deviation:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac4 <span style="color: #1750eb;">23.2 17.0 14.3 18.4<br /></span>ewmac8 <span style="color: #1750eb;">23.3 16.8 13.9 19.2<br /></span>ewmac16 <span style="color: #1750eb;">23.4 16.8 13.8 22.8<br /></span>ewmac32 <span style="color: #1750eb;">23.3 16.8 13.0 26.8<br /></span>ewmac64 <span style="color: #1750eb;">23.0 16.8 13.5 30.8</span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">ewmacx <span style="color: #1750eb;">21.5 16.8 13.2 23.1</span></pre><pre style="background-color: white; color: #080808; font-family: 'JetBrains Mono',monospace; font-size: 13.8pt;"><span style="color: #1750eb;"><br /></span></pre><p>I ran all these systems with a 20% standard deviation target. However, because that kind of target only makes sense with the 'FV' type of strategy (which ends up slightly overshooting, as it happens), the others are a bit all over the shop. Already we can see it's going to be unfair to compare these different strategy variations.</p><p>Next, the mean annual return:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac4 <span style="color: #1750eb;">20.2 13.8 11.9 14.3<br /></span>ewmac8 <span style="color: #1750eb;">24.8 17.0 14.1 17.5<br /></span>ewmac16 <span style="color: #1750eb;">26.0 18.5 11.9 20.4<br /></span>ewmac32 <span style="color: #1750eb;">25.4 18.8 9.3 22.4<br /></span>ewmac64 <span style="color: #1750eb;">23.2 16.7 10.3 19.3<br /></span>ewmacx <span style="color: #1750eb;">25.3 19.4 11.6 20.3<br /></span></pre><p>'FV' looks better than the alternatives, but again it also has the highest standard deviation so that isn't a huge surprise. To correct for that - although we know it's not ideal - let's look at risk adjusted returns using the much maligned Sharpe Ratio, with zero risk free rate (which as futures traders is appropriate):</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac4 <span style="color: #1750eb;">0.87 0.81 0.83 0.78<br /></span>ewmac8 <span style="color: #1750eb;">1.06 1.01 1.01 0.91<br /></span>ewmac16 <span style="color: #1750eb;">1.11 1.10 0.86 0.89<br /></span>ewmac32 <span style="color: #1750eb;">1.09 1.12 0.72 0.83<br /></span>ewmac64 <span style="color: #1750eb;">1.00 0.99 0.76 0.62<br /></span>ewmacx <span style="color: #1750eb;">1.18 1.15 0.88 0.88<br /></span></pre><p>FV is a little better than BV especially for faster opening rules, but both are superior to the non vol targeted alternatives. Notice that as we speed up, the improvement generated by vol targeting shrinks. This makes sense as if you're holding a position for only a week or so then it won't make difference if you adjust that position for volatility over such a short period of time. </p><p><i>(In the limit: a holding period of a single day with daily trading, both BV and 1E1E would be identical.)</i></p><p>What about costs?</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac4 -<span style="color: #1750eb;">3.4 </span>-<span style="color: #1750eb;">2.6 </span>-<span style="color: #1750eb;">1.3 </span>-<span style="color: #1750eb;">2.5<br /></span>ewmac8 -<span style="color: #1750eb;">1.9 </span>-<span style="color: #1750eb;">1.6 </span>-<span style="color: #1750eb;">0.6 </span>-<span style="color: #1750eb;">1.4<br /></span>ewmac16 -<span style="color: #1750eb;">1.2 </span>-<span style="color: #1750eb;">1.0 </span>-<span style="color: #1750eb;">0.5 </span>-<span style="color: #1750eb;">0.9<br /></span>ewmac32 -<span style="color: #1750eb;">0.9 </span>-<span style="color: #1750eb;">0.7 </span>-<span style="color: #1750eb;">0.4 </span>-<span style="color: #1750eb;">0.6<br /></span>ewmac64 -<span style="color: #1750eb;">0.8 </span>-<span style="color: #1750eb;">0.6 </span>-<span style="color: #1750eb;">0.3 </span>-<span style="color: #1750eb;">0.5<br /></span>ewmacx -<span style="color: #1750eb;">1.1 </span>-<span style="color: #1750eb;">1.0 </span>-<span style="color: #1750eb;">0.4 </span>-<span style="color: #1750eb;">0.9<br /></span></pre><p>Obviously FV and BV are a little more expensive, because they trade more often; and of course faster trading rules are always more expensive regarddless of what you do with them.</p><p>How 'bout monthly skew?</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac4 <span style="color: #1750eb;">2.14 1.27 1.54 1.67<br /></span>ewmac8 <span style="color: #1750eb;">1.72 0.86 2.14 1.00<br /></span>ewmac16 <span style="color: #1750eb;">1.26 0.70 1.84 1.00<br /></span>ewmac32 <span style="color: #1750eb;">0.88 0.62 0.87 </span>-<span style="color: #1750eb;">0.73<br /></span>ewmac64 <span style="color: #1750eb;">0.71 0.47 0.87 </span>-<span style="color: #1750eb;">3.21<br /></span>ewmacx <span style="color: #1750eb;">1.41 0.78 1.98 0.47<br /></span></pre><p>We already know from my previous research that return skew is a little better when you drop vol targeting, and that's certainly true of 1E1S. Something weird is going on with 1E1E; it turns out to be a couple of rogue days, and is an excellent example of why skew isn't a very robust statistic as it is badly affected by outliers.</p><p>Now consider the <b><i>lower tail ratio</i></b>. This is a statistic that I recently invented as an alternative to skew. It's more fully explained in my new book (coming out early 2023), but for now a figure of 1 means that the 5% left tail of the distribution is Gaussian. A higher number means the left tail is fatter than Gaussian, and the higher the number the less Gaussian it is. So lower is good.</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac4 <span style="color: #1750eb;">1.79 1.46 1.50 1.58<br /></span>ewmac8 <span style="color: #1750eb;">1.80 1.45 1.54 1.63<br /></span>ewmac16 <span style="color: #1750eb;">1.83 1.46 1.60 1.97<br /></span>ewmac32 <span style="color: #1750eb;">1.82 1.42 1.70 2.40<br /></span>ewmac64 <span style="color: #1750eb;">1.81 1.49 1.83 2.71<br /></span>ewmacx <span style="color: #1750eb;">1.95 1.47 1.62 2.01<br /></span></pre><p>Again, 1E1S has the nicest left tail, although interestingly BV is better than anything and 1E1E is worse, suggesting this might not be a vol targeting story. </p><p>Max drawdown anyone?</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac4 -<span style="color: #1750eb;">64.2 </span>-<span style="color: #1750eb;">47.6 </span>-<span style="color: #1750eb;">31.4 </span>-<span style="color: #1750eb;">49.2<br /></span>ewmac8 -<span style="color: #1750eb;">45.7 </span>-<span style="color: #1750eb;">40.5 </span>-<span style="color: #1750eb;">33.5 </span>-<span style="color: #1750eb;">46.0<br /></span>ewmac16 -<span style="color: #1750eb;">41.6 </span>-<span style="color: #1750eb;">27.8 </span>-<span style="color: #1750eb;">23.0 </span>-<span style="color: #1750eb;">122.0<br /></span>ewmac32 -<span style="color: #1750eb;">75.6 </span>-<span style="color: #1750eb;">44.5 </span>-<span style="color: #1750eb;">38.8 </span>-<span style="color: #1750eb;">191.7<br /></span>ewmac64 -<span style="color: #1750eb;">85.8 </span>-<span style="color: #1750eb;">48.7 </span>-<span style="color: #1750eb;">44.7 </span>-<span style="color: #1750eb;">297.9<br /></span>ewmacx -<span style="color: #1750eb;">42.6 </span>-<span style="color: #1750eb;">36.1 </span>-<span style="color: #1750eb;">35.6 </span>-<span style="color: #1750eb;">115.6<br /></span></pre><p>Note that a max drawdown of over 100% is possible because these are non compounded returns. With compounded returns the numbers would be smaller, but the relative figures would be the same.</p><p>And finally, the figure we're focused on, the CAGR:</p><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac4 <span style="color: #1750eb;">19.1 13.2 11.5 13.5<br /></span>ewmac8 <span style="color: #1750eb;">24.7 16.9 14.0 17.0<br /></span>ewmac16 <span style="color: #1750eb;">26.2 18.7 11.5 19.5<br /></span>ewmac32 <span style="color: #1750eb;">25.5 19.0 8.8 20.6<br /></span>ewmac64 <span style="color: #1750eb;">22.8 16.5 9.8 15.6<br /></span>ewmacx <span style="color: #1750eb;">25.8 19.7 11.3 19.3<br /></span></pre><p><br /></p><h2>The effect of relative leverage </h2><p>On the face of it then we should go with the FV system, which handily is what I trade myself. The BV system isn't quite as good, but it is better than eithier of the non vol targeted systems. For pretty much every statistic we have looked at, with the exception of costs and skew, there is no reason you'd go for eithier 1E1S or 1E1E over the vol targeted alternatives.</p><p>But it is hard to compare these strategies with any single statistic. They have different characteristics. Different distributions of returns. Different standard deviations. Different skews. Different tails.</p><p>How can we try and do a fairer comparision? Well, we can very easily run these strategies with <b><i>different relative leverage</i></b>. This is a futures portfolio, so we are already using some degree of leverage, but within reason we can choose to multiply all our positions by some number <b><i>N</i></b> which will result in higher or lower leverage than we started with. Doing this will change most of the statistics above.</p><p>Let's think about how the statistics above change with changes to leverage. First of all, the dull ones:</p><p>- Sharpe ratio: Invariant to leverage</p><p>- Skew: Invariant to leverage</p><p>- Left tail ratio: Invariant to leverage</p><p><br /></p><p>Then the easy ones:</p><p>- Annual mean: Linearly increases with leverage</p><p>- Annual standard deviation: Linearly increases with leverage</p><p>- Costs: Linearly increases with leverage </p><p>- Drawdown: Linearly increases with leverage</p><p>OK, so applying leverage won't change the <b>relative</b> rankings of those statistics, so let's consider the one that does:</p><p>- <b>CAGR: Non linear; will increase with more leverage, then peak and start to fall.</b></p><p>WTF? Time for some theory.</p><p><br /></p><h2>Interlude: Leverage and CAGR and Kelly</h2><p>CAGR, also known as annualised geometric returns, behaves differently to other kinds of statistics, and thus is sensitive to the distribution of returns. Arithmetic mean will scale with leverage*, as will standard deviation, which means that Sharpe Ratios are invariant. But geometric returns don't do that. They increase with leverage, but in a non linear way. And at some point, adding leverage actually reduces geometric returns. <b>There is an optimal amount of relative leverage where we will maximise CAGR. </b>Alternatively, this can be expressed as an optimal risk target, measured as an annualised standard deviation of returns.</p><p><i>* Strictly speaking it's excess mean returns that scale with leverage, but with futures we can assume the risk free rate is zero</i></p><p>If your returns are Gaussian, then the optimal annualised standard deviation will (neatly!) be equal to the Sharpe Ratio. This is another way of stating the famous <b>Kelly criteria </b>(discussed in several blog posts, including <a href="https://qoppac.blogspot.com/2014/12/should-billionaires-and-bricklayers.html">here</a>, and also in all my books).</p><p>But in a non Gaussian world, CAGR will change differently according to the character of the strategy, and this Kelly result will not hold. Consider a negatively skewed strategy, with mostly positive returns, and one massive negative return - a day when we lose 50%. It might have a sufficiently good SR that the optimal Gaussian leverage is 5. But applying leverage of 2 or more times to that strategy will put the CAGR at zero! Conversely, a positively skewed strategy which loses 1% every day and has one massive positive return will require leverage of 100 or more times to hit a zero CAGR. </p><p>What this means is that negatively skewed strategies can't be run at such a high relative leverage before they get to the point of their maximum CAGR, which is also their Kelly optimal level; and beyond that level they will see a sharper reduction in their CAGR. There is a graph in my first book, <i><a href="https://www.systematicmoney.org/systematic-trading">Systematic Trading</a></i>, which shows this happening:</p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj3ZbsGoyeXeBpxlV4pboj34UMneDlYz8k7uGgcy3xo_gRrRxNeqw0Uq85oSCurk6tWTJw-dv2f_MtwfIoae65IJNVCvPVHnbmYnoMc7pGeEORVclg9zwU-bxJ8PQoVTYw2e5dAYzapDZeD-kaoBBNbZk0RAyt7FdRnru2k6MN44bfXhNn7hfrko2PyPQ" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="525" data-original-width="925" height="364" src="https://blogger.googleusercontent.com/img/a/AVvXsEj3ZbsGoyeXeBpxlV4pboj34UMneDlYz8k7uGgcy3xo_gRrRxNeqw0Uq85oSCurk6tWTJw-dv2f_MtwfIoae65IJNVCvPVHnbmYnoMc7pGeEORVclg9zwU-bxJ8PQoVTYw2e5dAYzapDZeD-kaoBBNbZk0RAyt7FdRnru2k6MN44bfXhNn7hfrko2PyPQ=w640-h364" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>Y-axis is geometric return, X-axis is target annualised standard deviation. Each line shows a strategy with different skew. The optimum risk target is higher for positively skewed strategies</i></td></tr></tbody></table><br />Another way of thinking about this, is that to approximate geometric mean calculations for a normal distribution you can use the approximation:<p></p><p><span style="font-family: courier;">m - 0.5s^2</span></p><p>Where m is the arithmetic mean, and s is the standard deviation. But this won't work for a negatively skewed strategy! That will have a lower geometric mean than what is given by the approximation. And a positively skewed strategy will have a higher GM (see <a href="https://math.stackexchange.com/questions/2787355/approximation-of-geometric-mean">here</a> for details).</p><p>Consider then in general terms the following two alternatives:</p><p>A- Something with a better Sharpe Ratio, but worse skew</p><p>B- Something with a worse Sharpe Ratio, but better skew</p><p>It might help to think of a pair of concrete examples, not related to vol targeting. Option A could be a equity neutral strategy, which with it's starting leverage has a very low standard deviation but nasty skew. Let's say it returns 5% arithmetic mean with 5% standard deviation. The CAGR will be a little below 4.9% (using the approximation above, knocking something off for negative skew).</p><p>Option B is some trend following strategy (with or without vol targeting - you choose!) with a 15% arithmetic mean and 20% standard deviation, but with positive skew. This is a worse Sharpe Ratio. But without applying any leverage it has the better CAGR. It will be a little above 13% (adding something on for positive skew).</p><p>What happens when we increase leverage? To begin with, option A will look better. It might be that we can apply double relative leverage, which will give us a CAGR just below 9.5%. With triple relative leverage, if the skew isn't too bad, we can get a CAGR of just under 14%, which will be better than option B. </p><p>However we can also increase the leverage on option B. With double leverage it would have a CAGR of just over 22%.</p><p>We can keep down this path, and if both A and B were Gaussian normal with zero skew, then strategy A would achieve maximum CAGR with 20x leverage (!) and a standard deviation of 100% (!!), for a CAGR of 50%; whilst strategy B would have maximum CAGR with relative leverage of 3.75, and a standard deviation of 75%, for a CAGR of just over 28%.</p><p>But they aren't Gaussian normal, so at some point before then it's quite likely that the negative skew of strategy A will start to cause serious problems. For example if the worst loss on strategy A was 10%, then it would hit zero CAGR for all relative leverage above x10, and it's optimal leverage and maximum CAGR would be considerably less than the 20x in the Gaussian case. Conversely, strategy B is unlikely to hit the point of ruin until much later.</p><p>The upshot of this is: <b>In a CAGR fight between two strategies, the winner will be the one whose skew & kurtosis / sharpe ratio trade off is optimal.</b></p><p>Now, in many cases it's unwise to run exactly at optimal leverage; or full Kelly, because we don't know exactly what the Sharpe or skew are in practice. But generally speaking if something has a higher CAGR at it's optimal leverage, then that will be a safer strategy to run at a lower leverage since there is a lower risk of ruin. It will generally be true that for a given level of risk (standard deviation), you will want the strategy with the best CAGR, which will usually be the strategy with the highest optimal CAGR.</p><p>So the metric of <b>maximum CAGR at optimal leverage</b> is generally useful.</p><p><br /></p><h2>Optimal leverage and CAGR for vol targeting</h2><div>Back to the empirical results. Let's consider then how CAGR changes for the examples we are considering. Each of the following plots shows the CAGR (Y axis) for different styles of strategy (coloured lines) at different levels of relative leverage (X-axis), where relative leverage 1 is the original strategy.</div><div><br /></div><div>Starting with EWMAC4:</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoYFlBnx7RkBRM8I1uDq310jC9o6L3iVAFMdr7WrDqzfv64Lv3Q3JyylvWJ34eLjEhXeR3vktxE0eVC-YTTlcU6eqoxxYW7eYFTOWVxUFs5UCKSntSUMRcQ0M10iyTtjXITMFY73GHrU7QEEOiX7_VjFrOvABLdvY-wODUX_h2VGjCFcBVRaUQlEFP5g/s1920/Figure_2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoYFlBnx7RkBRM8I1uDq310jC9o6L3iVAFMdr7WrDqzfv64Lv3Q3JyylvWJ34eLjEhXeR3vktxE0eVC-YTTlcU6eqoxxYW7eYFTOWVxUFs5UCKSntSUMRcQ0M10iyTtjXITMFY73GHrU7QEEOiX7_VjFrOvABLdvY-wODUX_h2VGjCFcBVRaUQlEFP5g/w640-h322/Figure_2.png" width="640" /></a></div>The original relative leverage is 1, where we know that FV is the better option although the other strategies are fairly close - it's a short time period so changing vol doesn't affect things too much. The CAGR improves with more leverage, up to a point. For FV that's at about 3 times the original leverage. The other strategies can take a bit more leverage, mainly because they have lower starting standard deviation. <div><br /></div><div>Incidentally for leverage of 6 the 1E1S strategy has at least one day when it loses 100% or more - hence the CAGR going to zero. A similar thing happens for FV, but until much later. It will happen for the other two strategies, but not in the range of leverage shown.</div><div><br /></div><div>The important thing here is that the FV strategy has a higher maximum CAGR than say 1E1S; but it's achieved at a lower leverage. We'd still want to use FV to maximise CAGR, even if we had a free hand on choosing leverage.</div><div><br /></div><div>(The CAGR are pretty similar, and that's because this is a fast trading strategy)</div><div><br /></div><div>I will quickly show the other forecasts - which show a similar picture - and then do more detailed analysis.<br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><b><br /></b></div><div style="text-align: center;"><b>EWMAC8:</b></div><div class="separator" style="clear: both; text-align: center;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBXnx7A7M-qCuiAjdciTgFIt38UrPZpQ0TB5hwRaQDdhRSKYZVf8OvDCGxZVPoYd2um8FBK7EIEHCzyKjdtl79mw3gevxQqfLR1PGlIwGfy3iHsaXx0OhE5KxX9KXiZFWGNQmrlqEZOs9a851pi5czhDgsbPP7T7YT4GnVpRFUSyogP-mUPK2u6qIwQA/s1920/Figure_1.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBXnx7A7M-qCuiAjdciTgFIt38UrPZpQ0TB5hwRaQDdhRSKYZVf8OvDCGxZVPoYd2um8FBK7EIEHCzyKjdtl79mw3gevxQqfLR1PGlIwGfy3iHsaXx0OhE5KxX9KXiZFWGNQmrlqEZOs9a851pi5czhDgsbPP7T7YT4GnVpRFUSyogP-mUPK2u6qIwQA/w640-h322/Figure_1.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"></td></tr></tbody></table><div><br /><div style="text-align: center;"><b><br /></b></div><div style="text-align: center;"><b>EWMAC16:</b></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpiAs9bBnl63ty6sOn6EVqicXAj3U-M6JhWuns8Cv47-5XGaFCXlFH3977f5T2fLIh_3PN_r83MNSlKuJRiHzeTC90i-SqfSk5Q6wxp7ZLktDOqEcqiSbGR_HsNBVDP3HcRY7kk-0iSrPh9ShI-Hn7VZ89MoLLRyXJ4EwWwqIGV1nsZZBfMto0sgzh0w/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpiAs9bBnl63ty6sOn6EVqicXAj3U-M6JhWuns8Cv47-5XGaFCXlFH3977f5T2fLIh_3PN_r83MNSlKuJRiHzeTC90i-SqfSk5Q6wxp7ZLktDOqEcqiSbGR_HsNBVDP3HcRY7kk-0iSrPh9ShI-Hn7VZ89MoLLRyXJ4EwWwqIGV1nsZZBfMto0sgzh0w/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><b><br /></b></div><b><div style="text-align: center;"><b>EWMAC32:</b></div></b></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEierFA5DHK8BWwZmnQ-2iW3BJUyH9LPbD-Tqw8DK1-fdq84NPNaOf_9RNi4tKuj5ewBfkEtZ83mWt_MBuw19ZGmdK8twYbwbQYzH5vSKZlsUA3LXYnd2p6btsYFXaDyfxN3MH3CKU83SP3wsj_doSsjFCEYSrLFgYO8eJKcEu9QdoF3ZXqja7E_PIwcZg/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEierFA5DHK8BWwZmnQ-2iW3BJUyH9LPbD-Tqw8DK1-fdq84NPNaOf_9RNi4tKuj5ewBfkEtZ83mWt_MBuw19ZGmdK8twYbwbQYzH5vSKZlsUA3LXYnd2p6btsYFXaDyfxN3MH3CKU83SP3wsj_doSsjFCEYSrLFgYO8eJKcEu9QdoF3ZXqja7E_PIwcZg/w640-h322/Figure_1.png" width="640" /></a></div><div><div><br /></div><div><br /></div><div style="text-align: center;"><b>EWMAC64:</b></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp25Xk3opJuCXrYruWfB1_YO9M6QoOuCw4YGzjGNUzleUj7y9wPCY-1LkAkHpRs2vb3tV3cq-a6d49GKhQM0oaRaBE1mQMwgZDQOFqXdngqdd5y_Xb-Lz64kp6KTH99vX6J2juHuY0WeJcIiRxQWrQzEW2Sv60IhgYDMj9X4ARN5LExHk1nYjZcAqv5A/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp25Xk3opJuCXrYruWfB1_YO9M6QoOuCw4YGzjGNUzleUj7y9wPCY-1LkAkHpRs2vb3tV3cq-a6d49GKhQM0oaRaBE1mQMwgZDQOFqXdngqdd5y_Xb-Lz64kp6KTH99vX6J2juHuY0WeJcIiRxQWrQzEW2Sv60IhgYDMj9X4ARN5LExHk1nYjZcAqv5A/w640-h322/Figure_1.png" width="640" /></a></div><br /><div style="text-align: center;"><b>EWMACX (Everything):</b></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBP7aS42QsxWD6k3aXzQLCN4S0aR2Z9SwY3MUC_p7LtxbNehdvNsiTnCY168jAVBD7W4dnW5_ieT8ORrRHObmEFmEREsGcUTkV2QjhYvVX13kLXHfpBeu9M5q1DeqrikHnyj7C4K6-s3d4lYrBdLoctOw7RotItwQexILdlq5Vcn0csp1-d2KusB1bLg/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBP7aS42QsxWD6k3aXzQLCN4S0aR2Z9SwY3MUC_p7LtxbNehdvNsiTnCY168jAVBD7W4dnW5_ieT8ORrRHObmEFmEREsGcUTkV2QjhYvVX13kLXHfpBeu9M5q1DeqrikHnyj7C4K6-s3d4lYrBdLoctOw7RotItwQexILdlq5Vcn0csp1-d2KusB1bLg/w640-h322/Figure_1.png" width="640" /></a></div>Let's focus on the final plot, which shows the results from running all the different speeds of trend following together (EWMACX). The best leverage (highest CAGR) for FV is roughly around 5x, and for 1E1S around 6x; for 1E1E it's roughly 3x, and for BV approximately 7 times.</div><div><br /></div><div>Let's quickly remind ourselves of the starting statistics for each strategy, with relative leverage of 1:</div><div><div><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br /><br /></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">stdev <span style="color: #1750eb;">21.5 16.8 13.2 23.1</span></pre><pre style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">mean <span style="background-color: transparent; color: #1750eb; font-size: 13.8pt;">25.3 19.4 11.6 20.3</span></pre><p><span style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">costs -</span><span style="color: #1750eb; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">1.1 </span><span style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">-</span><span style="color: #1750eb; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">1.0 </span><span style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">-</span><span style="color: #1750eb; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">0.4 </span><span style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">-</span><span style="color: #1750eb; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">0.9</span></p><p><span style="background-color: white; color: #080808; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">cagr </span><span style="color: #1750eb; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">25.8 19.7 11.3 19.3</span></p></div><div><span style="color: #1750eb;"><br /></span></div><div>OK, so what happens if we apply the optimal relative leverage ratios above? We get (the relative leverage numbers in the column headers):</div><div><br /></div><div><div><pre style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><span style="color: #2b00fe;"> 5xFV 7xBV 6x<span>1E1</span>S 3x<span>1E1</span>E<br /><br /></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><span style="color: #2b00fe;">stdev <span>107.5 117.6 79.2 69.3</span></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><span style="color: #2b00fe;">mean <span style="background-color: transparent; font-size: 13.8pt;">126.5 135.8 69.6 60.9</span></span></pre><p><span style="color: #2b00fe;"><span style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">costs -</span><span style="font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">5.5 </span><span style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">-7</span><span style="font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">.0 </span><span style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">-2</span><span style="font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">.4 </span><span style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">-2</span><span style="font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">.7</span></span></p><p><span style="color: #2b00fe;"><span style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">cagr </span><span style="font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">129.0 137.9 67.8 57.9</span></span></p></div></div><div><span style="color: #1750eb; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><br /></span></div><div>The vol targeted strategies achieve about double what the non vol targeted achieve. </div><div>But, that risk is kind of crazy, so how about if we run it at "Half Kelly", half the optimal leverage figures?</div><div><br /></div><div><div><pre style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><span style="color: #2b00fe;"> 2.5xFV 3.5xBV 3x<span>1E1</span>S 1.5x<span>1E1</span>E<br /><br /></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><span style="color: #2b00fe;">stdev 53.8 58.8 39.6 34.7</span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><span style="color: #2b00fe;">mean 63.3 67.9 34.8 30.5</span></pre><p><span style="color: #2b00fe;"><span style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">costs -2.8 -3.5 -1.2 -1.4</span></span></p><p><span style="color: #2b00fe;"><span style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">cagr 64.5 69.0 33.9 29.0</span></span></p></div></div><div><br /></div><div>Still not great for non vol targeting. OK....how about if we run everything at a 30% annualised standard deviation? That's pretty much the top end for an institutional fund.</div><div><br /></div><div><br /></div><div><pre style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><span style="color: #2b00fe;"> 1.4xFV 1.8xBV 2.3x<span>1E1</span>S 1.3x<span>1E1</span>E<br /><br /></span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><span style="color: #2b00fe;">stdev 30.0 30.0 30.0 30.0</span></pre><pre style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><span style="color: #2b00fe;">mean 35.3 34.6 26.4 26.4</span></pre><p><span style="color: #2b00fe;"><span style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">costs -1.5 -1.8 -0.9 -1.2</span></span></p><p><span style="color: #2b00fe;"><span style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;">cagr 36.0 35.2 25.7 25.1</span></span></p></div><div> </div><div>We still get a CAGR that's about 40% higher with the same annualised standard deviation.</div><div><br /></div><div><b>That's a series of straight wins for vol targeting, regardless of the relative leverage or resulting level of risk.</b></div><div><br /></div><div>In fact, from the graph above, the only time when at least one of the non vol targeted strategies (1E1S) beats one of the vol targeted strategies (FV) is for a <b>very</b> high relative leverage, much higher than any sensible person would run at. To put it another way, <span style="color: red;"><b>we need an awful lot of risk before the less positive skew of FV becomes enough of a drag to overcome the Sharpe ratio advantage it has.</b></span></div><div><span style="color: red;"><b><br /></b></span></div><div><br /></div><div>Finally, I know a lot of people will be interested in the ratio CAGR/maximum drawdown. So I quickly plotted that up as well. It tells the same story:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-FJxCvIF6HnO4R4ArGOiPZNLwsKJqFgon2VU-6nbxJm-wpxoWZ9ryeHbrLQxSw29iTfbMT0S00dIFJDjDL3b8_RMiP0CJsZWCUqgEVKEC1aZEt4OX0a5F00JdxMjql-771G_fckL8Cn0byCIHwmw5pP7RrGWBy6WPyJBdxJvcqMnO0JMtHWcvrE_LjA/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-FJxCvIF6HnO4R4ArGOiPZNLwsKJqFgon2VU-6nbxJm-wpxoWZ9ryeHbrLQxSw29iTfbMT0S00dIFJDjDL3b8_RMiP0CJsZWCUqgEVKEC1aZEt4OX0a5F00JdxMjql-771G_fckL8Cn0byCIHwmw5pP7RrGWBy6WPyJBdxJvcqMnO0JMtHWcvrE_LjA/w640-h322/Figure_1.png" width="640" /></a></div><div><p><br /></p></div><div><h2>Conclusions</h2></div><div><p>The backtest evidence shows that you <b>can achieve a higher maximum CAGR with vol targeting, because it has a large Sharpe Ratio advantage that is only partly offset by it's small skew disadvantage. </b>For lower levels of relative leverage, at more sensible risk targets, vol targeting still has a substantially higher CAGR. The slightly worse skew of vol targeting does not become problematic enough to overcome the SR advantage, except at extremely high levels of risk; well beyond what any sensible person would run.</p><p>Now it's very hard to win these kinds of arguments because you run up against the inevitable straw man system effect. Whatever results I show here you can argue wouldn't hold with the particular system that you, as a purer trend follower reading this post, happen to be running. The other issue you could argue about is whether any back test is to be trusted; even one like this with 100 instruments and up to 50 years of data, and no fitting. </p><p><i>(At least any implicit fitting, in choosing the set of opening rules used, affects all the strategies to the same degree).</i></p><p><b>However, we can make the following general observations, irrespective of the backtest results. </b></p><p>It's certainly true and a fair criticism that evaluating strategies purely on Sharpe Ratio means that you will end up favouring negative skew strategies with low standard deviation, because it looks like they can be leveraged up to hit a higher CAGR. But they can't, because they will blow up! Equity market neutral, option selling, fixed income RV, and EM FX carry on quasi pegged currencies .... all fit into this category. </p><p>A lower Sharpe Ratio trend following type strategy; with positive skew and usually higher standard deviation, is actually a better bets. You can leverage them up a little more, if you wish, to achieve a higher maximum CAGR. But even at sensible risk target levels they will have a higher CAGR than the strategies with blow up risk.</p><p> But that's not what we have here! We have an alternative strategy (vol targeting) which has a significant Sharpe Ratio advantage, but which still has positive skew, just not quite as good as non vol targeting.</p><p><b>For my backtested results above to be wrong, it must be true that eithier </b></p><p>(i) vol targeting has some skeletons in the form of much nastier skew than the backtest suggests,</p><p>(ii) the true positive skew for non vol targeting is much higher than in the backtest, </p><p>or that (ii) the Sharpe ratio advantage of vol targeting is massively overstated, </p><p>or the costs of vol targeting are substantially higher than in the backest.</p><p>The first point is a valid criticism of option selling or EM FX carry type strategies with insufficient back test data (the 'peso problem'), the archetype of negative skew, but I do not think it is likely that trend following vol targeting suffers from this backtesting bias. Ultimately we cut positions that move against us; in nearly all cases quicker than they are cut by non vol targeting. Of course this curtails right tail outliers, but it also means we are extremely unlikely to see large left tail outliers. </p><p>Nor do I think that it is plausible that there is undiscovered additional positive skew that isn't present in the non vol targeted strategies. Even if there was, we'd need an astonishing amount of additional skew to overcome the Sharpe Ratio disadvantage at sensible levels of risk.</p><p>I also think it's highly plausible that vol targeting has a Sharpe Ratio advantage; it strives for more consistent expected risk (measured by standard deviation), so it's unsurprising it does better based on this metric. I've never met anyone who thinks that vol targeting has a lower SR than non vol targeting - all the traditional trend followers I know use this as a reason for pooh-poohing the Sharpe Ratio as a performance measure! Finally the costs of vol targeting would need to be EIGHT TIMES HIGHER than in the backtest for it to be suboptimal. Again this seems unlikely - and I've consistently achieved my backtested costs year after year with my vol targeted system.</p><p>In conclusion then:</p><p><b>It is perfectly valid to express a preference for positive skew above all else, and to select a non vol targeted strategy on that basis, but to do so because you think you will get a higher terminal wealth (equi</b><b>valent to a higher maximum CAGR, or higher CAGR at some given level of risk) is incorrect and not supported by the evidence.</b></p><p><br /></p><h2 style="text-align: left;"><b>Postscript</b></h2><p>I added three very slow rules to address a point made on twitter: EWMAC128, 512; EWMAC 256, 1024; and EWMAC512,2048. For interests sake, the average holding period of these rules is between one and two years.</p><p>Quick summary: As we slow down beyond EWMAC64 performance tends to degrade on all metrics regardless of whether you are vol targeting or not. This is because most assets tend to mean revert at that point. Not shown here, but the Beta of your strategies also increases - you get more correlated to long only portfolios, because historically at least most assets have gone up; and your alpha reduces.</p><p>The SR advantage of vol targeting improves, but the skew shows a mixed picture; overall at 'natural' leverage the CAGR of vol targeting improves further as we slow down. However there is a huge difference between 1E1E and 1E1S, the latter ends up with negative skew and a negative CAGR; similarly BV looks better than FV as we slow down.</p><p>The maximum optimal CAGR is higher for vol targeting on these slower systems, and the advantage increases as we slow down.</p><p>I would also add a huge note of caution: with such slow trading systems, even with 100+ instruments and up to 50 years of data the number of unique data points is relatively small, so the results are unlikely to be statistically significant - which is why I usually never go this slow for my back tests.</p><p>Standard deviation</p><pre style="background-color: white; color: #080808; font-family: 'JetBrains Mono',monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac128 <span style="color: #1750eb;">14.8 16.3 14.2 34.5<br /></span>ewmac256 <span style="color: #1750eb;">17.2 16.1 16.0 37.4<br /></span>ewmac512 <span style="color: #1750eb;">18.0 15.9 16.0 42.2<br /></span></pre><p><br /></p><p>Mean</p><pre style="background-color: white; color: #080808; font-family: 'JetBrains Mono',monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac128 <span style="color: #1750eb;">11.5 12.8 9.0 13.2<br /></span>ewmac256 <span style="color: #1750eb;">10.3 10.1 6.9 10.5<br /></span>ewmac512 <span style="color: #1750eb;">8.5 9.2 4.8 7.6<br /></span></pre><p><br /></p><p>Sharpe Ratio</p><pre style="background-color: white; color: #080808; font-family: 'JetBrains Mono',monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac128 <span style="color: #1750eb;">0.78 0.78 0.63 0.38<br /></span>ewmac256 <span style="color: #1750eb;">0.59 0.63 0.43 0.28<br /></span>ewmac512 <span style="color: #1750eb;">0.47 0.58 0.30 0.18<br /></span></pre><p><br /></p><p>Skew</p><pre style="background-color: white; color: #080808; font-family: 'JetBrains Mono',monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac128 <span style="color: #1750eb;">0.48 0.39 2.80 </span>-<span style="color: #1750eb;">2.35<br /></span>ewmac256 <span style="color: #1750eb;">0.11 0.36 3.81 </span>-<span style="color: #1750eb;">2.55<br /></span>ewmac512 -<span style="color: #1750eb;">0.27 0.29 2.13 </span>-<span style="color: #1750eb;">4.11<br /></span></pre><p><br /></p><p>Lower tail ratio</p><pre style="background-color: white; color: #080808; font-family: 'JetBrains Mono',monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac128 <span style="color: #1750eb;">1.90 1.51 1.81 3.46<br /></span>ewmac256 <span style="color: #1750eb;">1.72 1.48 1.89 3.45<br /></span>ewmac512 <span style="color: #1750eb;">1.60 1.48 2.11 3.71<br /></span></pre><p><br /></p><p>CAGR</p><pre style="background-color: white; color: #080808; font-family: 'JetBrains Mono',monospace; font-size: 13.8pt;"> FV BV <span style="color: #1750eb;">1E1</span>S <span style="color: #1750eb;">1E1</span>E<br />ewmac128 <span style="color: #1750eb;">11.02 12.10 8.32 7.43<br /></span>ewmac256 <span style="color: #1750eb;">9.18 9.22 5.76 3.46<br /></span>ewmac512 <span style="color: #1750eb;">7.12 8.24 3.61 </span>-<span style="color: #1750eb;">1.43<br /></span></pre><div><br /></div><div>Results of applying leverage: EWMAC128</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJBMJ_J9rh4ZTmsNNP6abaP9FyjqJTSLDn_rB3oVzeJL9M8UgZRRRLkbyFrJW2wWBHt-G-X6Lw88x0KJeF6ZXLWU7S6uUwJ_rdnFsGNOZJkFax6rkC0yEyCLueHVc1rSGM9QIifcmpaXEEI5h__ceYChxlWSHuNtSeAFmG6aHSiWXsgCsXthBMRPCAyg/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJBMJ_J9rh4ZTmsNNP6abaP9FyjqJTSLDn_rB3oVzeJL9M8UgZRRRLkbyFrJW2wWBHt-G-X6Lw88x0KJeF6ZXLWU7S6uUwJ_rdnFsGNOZJkFax6rkC0yEyCLueHVc1rSGM9QIifcmpaXEEI5h__ceYChxlWSHuNtSeAFmG6aHSiWXsgCsXthBMRPCAyg/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>EWMAC256</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgliRgHoFpx90V0wqsQmYf1ljYoG6Mz_4sfU1k-LW7-nkIBgYpeDBo4iBaaPQZG5IOWxz0aHWtDZQoAIb_Tac3SENSz6qMa72u0cUcM3rsgEkktFvWo70JnI3phjoqhr0woduJeIOY3wFjdmsrsezWPudNAHR1OkYA_MutbJnpBxjSVco3cdkmZ8TNf9A/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgliRgHoFpx90V0wqsQmYf1ljYoG6Mz_4sfU1k-LW7-nkIBgYpeDBo4iBaaPQZG5IOWxz0aHWtDZQoAIb_Tac3SENSz6qMa72u0cUcM3rsgEkktFvWo70JnI3phjoqhr0woduJeIOY3wFjdmsrsezWPudNAHR1OkYA_MutbJnpBxjSVco3cdkmZ8TNf9A/w640-h322/Figure_1.png" width="640" /></a></div><br /><div>EWMAC512</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2kjtE6_9fDk9ZQz29GdVJVhZkTzordlGhR3ELSe2pBQEkP_MzwIzatd1OKWm4I67uanbyfWDGgVRC9e1ycHreDdb070wLDFYjUJ6i6HJ8CCDsXVyLr1XrudRNDuQLAO0ONWkTZloz4JbNZIv3qZK-2XvCyPqu9SKhZl39pCTad_Lfq0josE6X0eIMXQ/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2kjtE6_9fDk9ZQz29GdVJVhZkTzordlGhR3ELSe2pBQEkP_MzwIzatd1OKWm4I67uanbyfWDGgVRC9e1ycHreDdb070wLDFYjUJ6i6HJ8CCDsXVyLr1XrudRNDuQLAO0ONWkTZloz4JbNZIv3qZK-2XvCyPqu9SKhZl39pCTad_Lfq0josE6X0eIMXQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><div><br /></div><p><br /></p><p><br /></p><p><br /></p><p><br /></p></div><div><br /></div><div><br /></div><div><br /></div></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com6tag:blogger.com,1999:blog-261139923818144971.post-12201538667175435162022-05-11T11:14:00.006+01:002022-05-11T11:14:59.459+01:00Historic and recent performance by trading rule<p> Another brief post this month; the deadline for the first draft of my latest book is only a couple of months away and I haven't got much free time! But I was asked an excellent question on twitter recently, which was how the various types of trading rule have contributed to my p&l this year. </p><p><b>TLDR: divergent eg momentum good, skew brilliant, other convergent rules poor.</b></p><p>In fact with my new <a href="https://qoppac.blogspot.com/2021/10/mr-greedy-and-tale-of-minimum-tracking.html">dynamic optimisation strategy</a> it's actually quite hard to answer that question. For example, it's plausible that I could have made all my money in one particular trading rule in a group of instruments that I don't ever take a position in. Instead, I can tell you what would have been contributed had I been trading a static portfolio without any contract rounding issues. This should be a pretty decent proxy, although generally it will over estimate what I have actually been able to achieve with my relatively modest capital.</p><p>[To get technical, it would be impossible to do this100% accurately for a static strategy unless it had (1) very large capital and (2) no buffering or other path dependency in positions]</p><p>An important question is whether we look at this performance on a <b>weighted </b>or <b>unweighted </b>basis. Weighted performance for a trading rule is basically the contribution of that performance to our aggregate p&l. The disadvantage of looking at this, is that rules with small forecast weights will be hard to see. </p><p>I have a lot of trading rules! Plotting them all in one go would be (a) messy and (b) kill my computer. Instead I set up sub-strategies, <b>each with a subset of my trading rules,</b> and then plotted the performance of (i) <b>the entire account curve for that subset </b>(which effectively weights the rules within that subset according to the forecast weights for each instrument) - these are the thick black lines, and (ii) <b>the individual trading rules in that subset</b> at the same risk - i.e. unweighted - this allows us to see their performance more clearly.</p><p>I've also chucked in some Sharpe ratio figures for the total (in the title of each chart) and for each rule variation (in the legend). Sharpes are a bit wild for just year to date, but there you go. Naturally, everything here is after costs. Finally, note that this data goes up to to the 4th April, so misses some poor performance over the last couple of days (I'm writing this on 10th May).</p><p>Anyway enough chat, here's some pictures. First of all, let's look at the year to date. </p><p>Here's my backtested performance YTD after dynamic optimisation, plus my actual performance. It's reasonably meaningful to do this, since I've run with the same strategy since November.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqdxb_SlWKuH3d1vAE9fxp4yBnr1YVfHU8-RO3WDpNl_iEv59yjgIvL0RzfeLwWugUPlBRAl8gdp49_iqAWEC5fUH3_KU1PnfN3YhkGVCvFVuqV9Rr0r3HzOFdLgN12zRK9-pJrExGj-KcqEhpY5TJ2V7CO2K_fp9E5ZBWtUo2vC9V2rugrBkeelkQHw/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqdxb_SlWKuH3d1vAE9fxp4yBnr1YVfHU8-RO3WDpNl_iEv59yjgIvL0RzfeLwWugUPlBRAl8gdp49_iqAWEC5fUH3_KU1PnfN3YhkGVCvFVuqV9Rr0r3HzOFdLgN12zRK9-pJrExGj-KcqEhpY5TJ2V7CO2K_fp9E5ZBWtUo2vC9V2rugrBkeelkQHw/w640-h322/Figure_1.png" width="640" /></a></div><br /><p>Looks like I got lucky with executions when the market turned against me in early March.</p><p><br /></p><p>Now for the figures for each trading rule.</p><p>Acceleration: </p><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilnjSJs2Vpb26khw4CESS73_Bxq4reI8TRxBYAoLXnEO4Rzoq7VkoaXNyXenMPon4w_k9MODjNYlYtidLKGBMKbKc-5NK0L1aDu-_05Rfytwfk-Ikx2KAYUdES0CC5z1RqmGI-7_OwUDcip3KoCtrxFj2SAMNeBbyObH2rOzPY3BuEmOgv-mYQC0GLRQ/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilnjSJs2Vpb26khw4CESS73_Bxq4reI8TRxBYAoLXnEO4Rzoq7VkoaXNyXenMPon4w_k9MODjNYlYtidLKGBMKbKc-5NK0L1aDu-_05Rfytwfk-Ikx2KAYUdES0CC5z1RqmGI-7_OwUDcip3KoCtrxFj2SAMNeBbyObH2rOzPY3BuEmOgv-mYQC0GLRQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><p>Asset trend:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-mo-VoUa_kJNCy49zfYfJU1IN1VmDWUzbXmNE_ojeSDAm3e2ljusX8pLgeG7K-w6O-M88KlMozotinUWZGh1euUWhpJtXHxeRvh9xGwr4xGjXEVvXw1VyqTcgJGLXGEyg313iiAzCwfEbEJXb_RNVjAnGVMDpTOz5FzvvC0v5GN4tQx0KK6imTKkW0w/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-mo-VoUa_kJNCy49zfYfJU1IN1VmDWUzbXmNE_ojeSDAm3e2ljusX8pLgeG7K-w6O-M88KlMozotinUWZGh1euUWhpJtXHxeRvh9xGwr4xGjXEVvXw1VyqTcgJGLXGEyg313iiAzCwfEbEJXb_RNVjAnGVMDpTOz5FzvvC0v5GN4tQx0KK6imTKkW0w/w640-h322/Figure_1.png" width="640" /></a></div><br /><p>Normalised momentum:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixyDK_C8bn0dhjZLogmo7YV2YgQGxEotK2PcN2QTdHWuMZLKO_26Pztz4fwOQqs4sw-xuQtr-SmiTGWRiODG7g2AJVtaL3ObrSFmZoSRbzxkZUoXyxtOHuv7Z3I06DdNG0dJCpdST11HkpRgfI14n-iVUecZnl_xGOJBZx6BKdi07m2s2qqz2vr7Xx0g/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixyDK_C8bn0dhjZLogmo7YV2YgQGxEotK2PcN2QTdHWuMZLKO_26Pztz4fwOQqs4sw-xuQtr-SmiTGWRiODG7g2AJVtaL3ObrSFmZoSRbzxkZUoXyxtOHuv7Z3I06DdNG0dJCpdST11HkpRgfI14n-iVUecZnl_xGOJBZx6BKdi07m2s2qqz2vr7Xx0g/w640-h322/Figure_1.png" width="640" /></a></div><br /><p>Momentum (EWMAC):</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjQcSpskth3PwFkqrHNe7vn2p-uM37W7I2-HtVl3pOldaTljceKpEbrtf1d-8qcZl_nLohVLqix4DdwJQTx1S_iuRuXG3XjD86WOzG0Xc8pi0ClN_3tPpnU89JcuONajkx_7hpWSYSALBLbih-OCcL5w8irsPAyGOYauTBe_2aWvK_CzJ2e-X4J_uN6w/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjQcSpskth3PwFkqrHNe7vn2p-uM37W7I2-HtVl3pOldaTljceKpEbrtf1d-8qcZl_nLohVLqix4DdwJQTx1S_iuRuXG3XjD86WOzG0Xc8pi0ClN_3tPpnU89JcuONajkx_7hpWSYSALBLbih-OCcL5w8irsPAyGOYauTBe_2aWvK_CzJ2e-X4J_uN6w/w640-h322/Figure_1.png" width="640" /></a></div><div><br /></div><div>Breakout:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWwiQdm267xpmkxHW7GZLkls7OO-1wrR5n0XMBAfb4RJLooJqTe6TsgfOSujXk1ZdBhe70_oRYe8mbleWfFYU_MWBrWsZtJxo-tMtpB2rkl6Dw1k7VGJeuOKADKMARijfOgeop-v9QEwA2h2dpsPIz4a1FWGM1FlkAG6gysy_evabt2vQmgfxacmhJ2w/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWwiQdm267xpmkxHW7GZLkls7OO-1wrR5n0XMBAfb4RJLooJqTe6TsgfOSujXk1ZdBhe70_oRYe8mbleWfFYU_MWBrWsZtJxo-tMtpB2rkl6Dw1k7VGJeuOKADKMARijfOgeop-v9QEwA2h2dpsPIz4a1FWGM1FlkAG6gysy_evabt2vQmgfxacmhJ2w/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><p>Relative momentum</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid5TKUMo7TdO15rXTuGKC21RmWQjy-9twQhR7GfBmXlwkAZjU5EFMTPYI-uFePVX53nPvDxqxn56s1F8ANhtUaU0liYFF7s3KO4crW8VP5mQ7fwZFsCEBFY4JlhQXkIRexzWK6tvY53csVVF94zITlVA79nll_sRXzReC9q58gexB8qIsWx8m82E5Bdg/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid5TKUMo7TdO15rXTuGKC21RmWQjy-9twQhR7GfBmXlwkAZjU5EFMTPYI-uFePVX53nPvDxqxn56s1F8ANhtUaU0liYFF7s3KO4crW8VP5mQ7fwZFsCEBFY4JlhQXkIRexzWK6tvY53csVVF94zITlVA79nll_sRXzReC9q58gexB8qIsWx8m82E5Bdg/w640-h322/Figure_1.png" width="640" /></a></div><br /><p>With the exception of relative momentum, all very good, but also all very similar so not much diversification there.</p><div class="separator" style="clear: both; text-align: center;"><br /></div>That's it for the 'divergent' rules, now for the 'convergent'. <div>First, Carry:<div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizoRnXGurHWPI-m0LkmPYN4VTn8ccSTUbNub3aFtZU39Icl8s49ksI3DlC6nHIJhaU7k_fmfUtF4G-PVzWT-Tq4L4ax02Qr3VafX1JJ8Rpv4_PuLVcFw3IT3Oik__g55C26hLanAvJs750MgGL_EtpdG-wRpzSjiqGjMRvNHo1g-0fjP3lUYkAf0dcaA/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizoRnXGurHWPI-m0LkmPYN4VTn8ccSTUbNub3aFtZU39Icl8s49ksI3DlC6nHIJhaU7k_fmfUtF4G-PVzWT-Tq4L4ax02Qr3VafX1JJ8Rpv4_PuLVcFw3IT3Oik__g55C26hLanAvJs750MgGL_EtpdG-wRpzSjiqGjMRvNHo1g-0fjP3lUYkAf0dcaA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div><br /></div><div><p>Relative carry (only one rule variation)</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTl99RpNP8JAWWcC8kH4cqUQuHJFJsvW4ZyMhecNIRXonkOckT5VtXhR_Qyc9GWtKO_1m9-A_0bkYIDaZgU_uUZoV-PGMHvXVoXDBtM9AgeLC-3weFFbQEtbJITMc5KJI3rjFcd1W3Y37JFXUwhwukpNwbTun3skvJpW3TBH5u-ap4AdK4Pur2DSfFAw/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTl99RpNP8JAWWcC8kH4cqUQuHJFJsvW4ZyMhecNIRXonkOckT5VtXhR_Qyc9GWtKO_1m9-A_0bkYIDaZgU_uUZoV-PGMHvXVoXDBtM9AgeLC-3weFFbQEtbJITMc5KJI3rjFcd1W3Y37JFXUwhwukpNwbTun3skvJpW3TBH5u-ap4AdK4Pur2DSfFAw/w640-h322/Figure_1.png" width="640" /></a></div><br /><p>Mean reversion in asset class</p></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitaTeo7a8aG-LJEPFXn9VPeRPpLBmsMvmTLxRqIfB-89t-2u3Nd0GDbVT8bHEs8NVROF1sJMbskNl3f9ypnkKg3Sp3XzEmX8-fazTA5Z5TQbOtDp7w1wEnAERc236KL3nWzhmkj4hBnFrX29GnvDdyV3kcrdKv-EGa-fbybLouj3Px1dPnWvGL2DgNzA/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitaTeo7a8aG-LJEPFXn9VPeRPpLBmsMvmTLxRqIfB-89t-2u3Nd0GDbVT8bHEs8NVROF1sJMbskNl3f9ypnkKg3Sp3XzEmX8-fazTA5Z5TQbOtDp7w1wEnAERc236KL3nWzhmkj4hBnFrX29GnvDdyV3kcrdKv-EGa-fbybLouj3Px1dPnWvGL2DgNzA/w640-h322/Figure_1.png" width="640" /></a></div><p>Mean reversion in the wings</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDbWW1otn-YThnNNqnZvFkJOdNZpNUWZLv_DzYqCTje9oDa0iPeARzkYlqcOwhDYJotrHXOJmI0wht0EsNkFSfE4VLGk-N_XGvvB7XoqKS5NnVExELSUZrFsBCbUzjdtK9vwTZRP1LjVTTirqpM1CIB5uqwXymb9YxLHtKs0ADFJkSTqwExM0YI_L-iw/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDbWW1otn-YThnNNqnZvFkJOdNZpNUWZLv_DzYqCTje9oDa0iPeARzkYlqcOwhDYJotrHXOJmI0wht0EsNkFSfE4VLGk-N_XGvvB7XoqKS5NnVExELSUZrFsBCbUzjdtK9vwTZRP1LjVTTirqpM1CIB5uqwXymb9YxLHtKs0ADFJkSTqwExM0YI_L-iw/w640-h322/Figure_1.png" width="640" /></a></div><p>Skew (absolute):</p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg95W7cUXRX2Nb_i7P5t6wW8pt0dbr6zucyCeqZncEmjFR6RgiaPVYkV29O8HwHWuGYZb-hwWSD5LyD3iyz9ySQWE691SVaAGPa1LXVudY4ZejsoFwj1Rtd5C2EFwMwgyAlxreohWygfvwslkE35hjGQSlyjxDxIXWPh07nfh3bNAfgVz1KTjuLq_U2xg/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg95W7cUXRX2Nb_i7P5t6wW8pt0dbr6zucyCeqZncEmjFR6RgiaPVYkV29O8HwHWuGYZb-hwWSD5LyD3iyz9ySQWE691SVaAGPa1LXVudY4ZejsoFwj1Rtd5C2EFwMwgyAlxreohWygfvwslkE35hjGQSlyjxDxIXWPh07nfh3bNAfgVz1KTjuLq_U2xg/w640-h322/Figure_1.png" width="640" /></a></div><br /><p><br /></p><p>Skew(relative)</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHsqQhPKSNPgnBIK57nkmD63HBHzjqdoFh8aPaP2OzHeHPzn9uWu70-5PZHXhkz0lNqrre4dsXA9gZx8NcjHRUCQsUa0yF61toK2dyYrMxBSx_zhBWL7Ff49kETVdzmbgZ_CnHwaravSXVUM6gvuJGgRDmKg65W2W59DU-khG2yrvWXKlBlhc95fXvSQ/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHsqQhPKSNPgnBIK57nkmD63HBHzjqdoFh8aPaP2OzHeHPzn9uWu70-5PZHXhkz0lNqrre4dsXA9gZx8NcjHRUCQsUa0yF61toK2dyYrMxBSx_zhBWL7Ff49kETVdzmbgZ_CnHwaravSXVUM6gvuJGgRDmKg65W2W59DU-khG2yrvWXKlBlhc95fXvSQ/w640-h322/Figure_1.png" width="640" /></a></div><p>Not such a good performance, apart from skew which was flipping amazing.</p><p><b>So year to date, very much driven by the 'divergent' trading rules.</b></p><p><br /></p><p>Out of curiosity, what does live vs backtest look like since I started trading (April 2014)? Remember that prior to November 2021 I was using a rather different strategy, so they are unlikely to match precisely before that date:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAAuQKfNazHzz1WgsXckaLI-T3KL_OhUFWe8xOKMBZo5qLvQGvnUbIR1IgNUmV551LTvJfKpR__r4MC6osU0aqPD15SnXsgC0XD7gfCaoeWW1QQCEiZ_A6JBSNZ-afyOH7_jHWQfHqWRTslJ87qGqORmcsXQ3cVZCzLfcgnSA3jNjkcGJXTlf7aHx0vg/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAAuQKfNazHzz1WgsXckaLI-T3KL_OhUFWe8xOKMBZo5qLvQGvnUbIR1IgNUmV551LTvJfKpR__r4MC6osU0aqPD15SnXsgC0XD7gfCaoeWW1QQCEiZ_A6JBSNZ-afyOH7_jHWQfHqWRTslJ87qGqORmcsXQ3cVZCzLfcgnSA3jNjkcGJXTlf7aHx0vg/w640-h322/Figure_1.png" width="640" /></a></div><br /><p><br /></p><p>Now, as we have the data, let's look at the performance by trading rule group for some other time periods.</p><p><br /></p><p>Last 10 years:</p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjord3ucl4Ogde8OoD8dzBlJcgK-yIc_5k2TK4oDjly_C5xTSeF1HOgd4gcXRFBOuSuKVG8PlOpuZiDnR6AvQaNfpElc7u8wVYsbAm1qI2gtOunfyn0oJUWTAiUiw_Y_jQOKmh4H5FNsRz47Xapn4Ky76Hh4ATCgdMYF5AMBctiyO_xLO_1FIR4dCy_0A/s1920/Figure_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjord3ucl4Ogde8OoD8dzBlJcgK-yIc_5k2TK4oDjly_C5xTSeF1HOgd4gcXRFBOuSuKVG8PlOpuZiDnR6AvQaNfpElc7u8wVYsbAm1qI2gtOunfyn0oJUWTAiUiw_Y_jQOKmh4H5FNsRz47Xapn4Ky76Hh4ATCgdMYF5AMBctiyO_xLO_1FIR4dCy_0A/w640-h322/Figure_2.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWA48MsG2UNoIjARGsr9JboUSVd9I3XIZ1ur187hgJ20w0iH9z5D9TsOzVs_3bivpAX0nqfJY-6Z_7XoIP8UmM8Cj0w-X4KRzGtJO4_zyg3kVNYT84RlqW30RQQOColNP7THw6UET35J2g0ljiZVql5k1Kk02dHfi9q56HG8OvaGjDxCb8V9DsC_z3HA/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWA48MsG2UNoIjARGsr9JboUSVd9I3XIZ1ur187hgJ20w0iH9z5D9TsOzVs_3bivpAX0nqfJY-6Z_7XoIP8UmM8Cj0w-X4KRzGtJO4_zyg3kVNYT84RlqW30RQQOColNP7THw6UET35J2g0ljiZVql5k1Kk02dHfi9q56HG8OvaGjDxCb8V9DsC_z3HA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtdiIgAEzHDdruUMFGkrkuSDw57Nj6SzywnY31K2vUvHUb7QmHxRoFZ3-kQhaKk5OMK4dNW0jRx1fPKov0upozVCRoofNg0B9qDqPLwydpWbIMeJ_M22KKMiAA2t01HkdbVN6UL8xkmfWZ8NaT69TXXkt2746UNIunMVjWDPYWeaDuzyfVXqEtKfxjWA/s1920/Figure_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtdiIgAEzHDdruUMFGkrkuSDw57Nj6SzywnY31K2vUvHUb7QmHxRoFZ3-kQhaKk5OMK4dNW0jRx1fPKov0upozVCRoofNg0B9qDqPLwydpWbIMeJ_M22KKMiAA2t01HkdbVN6UL8xkmfWZ8NaT69TXXkt2746UNIunMVjWDPYWeaDuzyfVXqEtKfxjWA/w640-h322/Figure_2.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi13OBXI7IiP6V6mZ-8z-gR-87M41KYm5DNwCfRkH22oKmvFKXtzFi3U-x9I6Q5cCuEsmPhIpzc6w3d570ufVKkseVbV8lS-dxq2jjKRgKB9EuOzclP_tOk5n7Z_-AhLtyBCI6oBC_esM-PzNqQdsiZ19x8iX_mrd2LOaP2vUlhQUVmCGVPEyAAn_7hPA/s1920/Figure_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi13OBXI7IiP6V6mZ-8z-gR-87M41KYm5DNwCfRkH22oKmvFKXtzFi3U-x9I6Q5cCuEsmPhIpzc6w3d570ufVKkseVbV8lS-dxq2jjKRgKB9EuOzclP_tOk5n7Z_-AhLtyBCI6oBC_esM-PzNqQdsiZ19x8iX_mrd2LOaP2vUlhQUVmCGVPEyAAn_7hPA/w640-h322/Figure_2.png" width="640" /></a><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNaqSlsWqeh335mo4KIUCn4-DlXr0xWIjduq78OafKT53lU0ZEB2meycfkUgHm9S99tZl6dTjxUZvXS-obTHqnQfLHvbsgra0z5lEzYnQvwbEHrplFYep5-gWUXceb-binHQj3EHs4uMKBIndO9RfjJfuvN2_421FYUwa01xeVjEcM5WI1dYhH4rzXfg/s1920/Figure_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNaqSlsWqeh335mo4KIUCn4-DlXr0xWIjduq78OafKT53lU0ZEB2meycfkUgHm9S99tZl6dTjxUZvXS-obTHqnQfLHvbsgra0z5lEzYnQvwbEHrplFYep5-gWUXceb-binHQj3EHs4uMKBIndO9RfjJfuvN2_421FYUwa01xeVjEcM5WI1dYhH4rzXfg/w640-h322/Figure_2.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Notice how correlated these last 3 rules are.</div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0BeF_2Zd3Mao2D2EX8Gbugoofmask6xOThLMJdB9ZrsHYhwTJQa_3nb2jroqIHeDrUeEwIrSZTyNnhsuyIp4zApeuAToMDl13a8cT5PRqpKm7uvvAPlfu9hQKpkbQJcNsyhjE6QmNX0VV_B92i-78GMr2Z67CjRKwLBYAcZDdmsfmk9BCmjOCuaTGxg/s1920/Figure_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0BeF_2Zd3Mao2D2EX8Gbugoofmask6xOThLMJdB9ZrsHYhwTJQa_3nb2jroqIHeDrUeEwIrSZTyNnhsuyIp4zApeuAToMDl13a8cT5PRqpKm7uvvAPlfu9hQKpkbQJcNsyhjE6QmNX0VV_B92i-78GMr2Z67CjRKwLBYAcZDdmsfmk9BCmjOCuaTGxg/w640-h322/Figure_2.png" width="640" /></a><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSnovoHCmtUOPXw6lygBy8ZG50J1-2VxQPwoDfUBhIRXV8oWzY6MlB5k-rO9LucVE1TDVyr7x6KJ4DeemQmwi6Z0m-3iQ3SGP4HzbtOOINpzz690mmSLNhnm43Kt1u806sjrypH9qeOPYfTfYsYJnbScEUjyS1BO62AsHrTR_W_W9pW_UhWBUFbFCLBw/s1920/Figure_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSnovoHCmtUOPXw6lygBy8ZG50J1-2VxQPwoDfUBhIRXV8oWzY6MlB5k-rO9LucVE1TDVyr7x6KJ4DeemQmwi6Z0m-3iQ3SGP4HzbtOOINpzz690mmSLNhnm43Kt1u806sjrypH9qeOPYfTfYsYJnbScEUjyS1BO62AsHrTR_W_W9pW_UhWBUFbFCLBw/w640-h322/Figure_2.png" width="640" /></a></div><br /><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicZiizkmzdAbnG4x2OSIt705xENfEBCnLtlMi1KtLs4JzvSEuu_IbdYzvZf1n60-JmFTBlRZYq1l4b-O-qgl7hxp4ellF6JOm9yHhbd25zEq9UcRRDxKHvBCRDXIQ3pgsTwqqehpDEGg1_rb0jazffQDLo4Et96d-0NbZ8hrAaflFq7cf6TJLDeaAwqw/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicZiizkmzdAbnG4x2OSIt705xENfEBCnLtlMi1KtLs4JzvSEuu_IbdYzvZf1n60-JmFTBlRZYq1l4b-O-qgl7hxp4ellF6JOm9yHhbd25zEq9UcRRDxKHvBCRDXIQ3pgsTwqqehpDEGg1_rb0jazffQDLo4Et96d-0NbZ8hrAaflFq7cf6TJLDeaAwqw/w640-h322/Figure_1.png" width="640" /></a></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV5SBU9SWb2W0mNON3G1RgbNvMGRtjI3wyBBYkS3mEbGHAnN4hhZFFdGE1u3RCafnbN8UV3ItN4vknRYTnzi9B2AHe9y-QjaWuYk1sUG6XLkhdlEhpF_wgTMgmCi8Y9O3RxpVEoShsHxAlYrJKSJ7Rdiy71sX6t-yt7GolrE1ZdXj58luc2bfms66Myg/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV5SBU9SWb2W0mNON3G1RgbNvMGRtjI3wyBBYkS3mEbGHAnN4hhZFFdGE1u3RCafnbN8UV3ItN4vknRYTnzi9B2AHe9y-QjaWuYk1sUG6XLkhdlEhpF_wgTMgmCi8Y9O3RxpVEoShsHxAlYrJKSJ7Rdiy71sX6t-yt7GolrE1ZdXj58luc2bfms66Myg/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-R4ZntMSfcRHidC-cFeObJMOm1mGw0LpnkYStG94cPATAT_nkYm-G_6-Edx5KK6Ke_sLgZQ9BLckp3B-whTq0w79JNaMOiCWrrlGeuHGcZ-kaPsq587f7KLFT_7-bqtHEEtOhJafRCN0c43M9nlfVLKGRxGePbv7xr9z_RYtOVI_WGWOEUe3KrwDKvQ/s1920/Figure_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-R4ZntMSfcRHidC-cFeObJMOm1mGw0LpnkYStG94cPATAT_nkYm-G_6-Edx5KK6Ke_sLgZQ9BLckp3B-whTq0w79JNaMOiCWrrlGeuHGcZ-kaPsq587f7KLFT_7-bqtHEEtOhJafRCN0c43M9nlfVLKGRxGePbv7xr9z_RYtOVI_WGWOEUe3KrwDKvQ/w640-h322/Figure_2.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMNwEIoDxglDF27ttGoPoAA9wmwj1ymBiZhfcH2ty28JVZft-7rOH5H3QeIOclDaQznRv3LURPSe84JWTQAjPHO-rCZTlKaGC9myyeeWEvpGWLxOBRyGbGDBDkZHSnez7DZPrGP01KgKbPrCSL2Yj2FqUhZBZSx_ZAwecH9T8corKSsQ5Vm-2JtpzCsQ/s1920/Figure_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMNwEIoDxglDF27ttGoPoAA9wmwj1ymBiZhfcH2ty28JVZft-7rOH5H3QeIOclDaQznRv3LURPSe84JWTQAjPHO-rCZTlKaGC9myyeeWEvpGWLxOBRyGbGDBDkZHSnez7DZPrGP01KgKbPrCSL2Yj2FqUhZBZSx_ZAwecH9T8corKSsQ5Vm-2JtpzCsQ/w640-h322/Figure_3.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQKrONYTdDLh7lGhh07rHj5nZFMGiY4YO0850BTe4XmpjOoiJclQIP4JGxVjATp-9CzWXcPQ3KbMbwqoU1jEKExLIz-3YrXwV956fMxFsWcEIbx9djRdsGFqtOshlL-QOitCikW4HL3fZVCcHz0PjOD2V9h0oaUC6L4eBfKV0Xti3sQ6vU56kF6aWcLw/s1920/Figure_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQKrONYTdDLh7lGhh07rHj5nZFMGiY4YO0850BTe4XmpjOoiJclQIP4JGxVjATp-9CzWXcPQ3KbMbwqoU1jEKExLIz-3YrXwV956fMxFsWcEIbx9djRdsGFqtOshlL-QOitCikW4HL3fZVCcHz0PjOD2V9h0oaUC6L4eBfKV0Xti3sQ6vU56kF6aWcLw/w640-h322/Figure_2.png" width="640" /></a></div><br /><p><br /></p><p><br /></p><p>And now for the entire back test</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrI_Pax7BLrz6glmqYX7O5OtehM8JmJ9PtCdJ5Af_JLkt2VgpylMJ9_sxYRULobWHQa73METVtoDK3XqS-hgqKUAgFOB24ufu79VmmT6jI_nGdigmBWLhoV-ZIma3lDohGYwAgQnyo0fmdA77ZfzNT7Dw_fKHoQuX41PW5JdXSuALYXKfhJchpaouf4A/s1920/Figure_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrI_Pax7BLrz6glmqYX7O5OtehM8JmJ9PtCdJ5Af_JLkt2VgpylMJ9_sxYRULobWHQa73METVtoDK3XqS-hgqKUAgFOB24ufu79VmmT6jI_nGdigmBWLhoV-ZIma3lDohGYwAgQnyo0fmdA77ZfzNT7Dw_fKHoQuX41PW5JdXSuALYXKfhJchpaouf4A/w640-h322/Figure_2.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBV7RoTwrezHyFxUrJMfZbX8t4HIY1T8kPSBuFlS4At9e0P7KU5aiUG5Mw0PMxR2blvDrBJRyZdP8heJ9o0T2oNkrSMY7tVL9XlqVqqJBI-JtnsEGEfMYNRjMKFdvhqJGO8WI_e2n4VwvaxQ_UZTaVG2tdjADEpaniUfCXlLyeRi6cHN3OqurK1qBKhA/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBV7RoTwrezHyFxUrJMfZbX8t4HIY1T8kPSBuFlS4At9e0P7KU5aiUG5Mw0PMxR2blvDrBJRyZdP8heJ9o0T2oNkrSMY7tVL9XlqVqqJBI-JtnsEGEfMYNRjMKFdvhqJGO8WI_e2n4VwvaxQ_UZTaVG2tdjADEpaniUfCXlLyeRi6cHN3OqurK1qBKhA/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRFhlLmNPttHP3yco61qkV6K4e9_-tdpDTwvfvQTgfOxwbwkL58qqFc4tv3iaVeVdiMMUnzr5uvLS_uZ1izCPrY0nXnmtVtAbRVAHkv72OkwSK5JPQ9XhAG5YlU78SUXx6eOfmPXJ7OjfTu-sHXl9TLQhINQoeiURUwxYGddiYJuy5l2mhljBwcJ1SwQ/s1920/Figure_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRFhlLmNPttHP3yco61qkV6K4e9_-tdpDTwvfvQTgfOxwbwkL58qqFc4tv3iaVeVdiMMUnzr5uvLS_uZ1izCPrY0nXnmtVtAbRVAHkv72OkwSK5JPQ9XhAG5YlU78SUXx6eOfmPXJ7OjfTu-sHXl9TLQhINQoeiURUwxYGddiYJuy5l2mhljBwcJ1SwQ/w640-h322/Figure_3.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOaZx6gpGWCGlWg5AlXD538nMQIbA1ytDpunIt7T-lfwvHJz-bA4W6JM-apj0wClOZzSyNA225M6COJgWP73m-_6PycNWQ_FMdgXqMB7Fc_50OTn9zT-S_4fR8w415-KYEzcKhhKxJAQjtDe1xf4hgQT1JTaUvJw7S0JKMINV45IPzThz6ZJ3QxUiRvg/s1920/Figure_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOaZx6gpGWCGlWg5AlXD538nMQIbA1ytDpunIt7T-lfwvHJz-bA4W6JM-apj0wClOZzSyNA225M6COJgWP73m-_6PycNWQ_FMdgXqMB7Fc_50OTn9zT-S_4fR8w415-KYEzcKhhKxJAQjtDe1xf4hgQT1JTaUvJw7S0JKMINV45IPzThz6ZJ3QxUiRvg/w640-h322/Figure_3.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcrWNlAooMK8Ukpqt-eYbunEKn-4pFwCEL3-qmyj0e2bCuqVH7NP3Ui-4Z1N74q5KDUBQKh5ipX2_mDs_gUNjYApuM2NNrJSnX_Iwl3cW7THbvsa-nb-YgwV65flCblTsBR4YeyaDIR1-pe9PVWAX7q56ym_4JnluM6zCGEhsgyrwdjwflhrlGrfa-WA/s1920/Figure_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcrWNlAooMK8Ukpqt-eYbunEKn-4pFwCEL3-qmyj0e2bCuqVH7NP3Ui-4Z1N74q5KDUBQKh5ipX2_mDs_gUNjYApuM2NNrJSnX_Iwl3cW7THbvsa-nb-YgwV65flCblTsBR4YeyaDIR1-pe9PVWAX7q56ym_4JnluM6zCGEhsgyrwdjwflhrlGrfa-WA/w640-h322/Figure_3.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4lVBNBgHgVu_WD5r4l-buigKMUv6YOH6JQb5imqKqPXt-gf4gW7WXiEYnwSyvZsz_k_n92Cju5rDqSl0sgZKXIS381vd_FmJ1ygS3VuAvhF19xX_a0C5r4mHYYAqM_dcX0NkBipRHmF3bosc5zVUypu9e6tRnW44hXS1cHzni11RkIhxN1kBfEuZEqA/s1920/Figure_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4lVBNBgHgVu_WD5r4l-buigKMUv6YOH6JQb5imqKqPXt-gf4gW7WXiEYnwSyvZsz_k_n92Cju5rDqSl0sgZKXIS381vd_FmJ1ygS3VuAvhF19xX_a0C5r4mHYYAqM_dcX0NkBipRHmF3bosc5zVUypu9e6tRnW44hXS1cHzni11RkIhxN1kBfEuZEqA/w640-h322/Figure_3.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj80yFTTNbp8iYsbJFqT_jJa-VJxnydi-Qp4bMfMDCTW7R6N-KYys4gQrA-NJQJspmpA0nc3d7YyW0u6rzDiXQxzPps3K1YjahW1f3lUWWc3B6zurFUtcd1eFFt9uKP0poyzl1GE8f0ccRvbwyHbFmTop0VfzI3m3OgpoHLKkvg1eErv9oFzZsBuit3YA/s1920/Figure_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj80yFTTNbp8iYsbJFqT_jJa-VJxnydi-Qp4bMfMDCTW7R6N-KYys4gQrA-NJQJspmpA0nc3d7YyW0u6rzDiXQxzPps3K1YjahW1f3lUWWc3B6zurFUtcd1eFFt9uKP0poyzl1GE8f0ccRvbwyHbFmTop0VfzI3m3OgpoHLKkvg1eErv9oFzZsBuit3YA/w640-h322/Figure_3.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJlQlM6LIuhwIWFwI9GxxOg0mXHr2IHg467NqH0K4rM9sMDqB187-KwqF9dE1m1TenZAR3M5VP635CFNhE-9yb7xgcRCVlTEizSofBqdGPNyClUxVdC1s58bLi6lZtUfPONBYPIfbRRgcmIVe2dep6nyIG-uN8weP4U8CjkH-pu4P98Mphu4JMTlC0vQ/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJlQlM6LIuhwIWFwI9GxxOg0mXHr2IHg467NqH0K4rM9sMDqB187-KwqF9dE1m1TenZAR3M5VP635CFNhE-9yb7xgcRCVlTEizSofBqdGPNyClUxVdC1s58bLi6lZtUfPONBYPIfbRRgcmIVe2dep6nyIG-uN8weP4U8CjkH-pu4P98Mphu4JMTlC0vQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSHZvBgVdILS4GjC81B4YiWSGT_pBFpw6mw29hKNIMLsmx_2ScjitHEe__PSq6jQC1IrLSLr3-dSs6RHvkDiuCAMC2H8Dh_HJD4XqAPO1jTV_0eygeG5XVhb6rgW1g8C2zu149gdwBGCJEJ5B2_XbfDaYO78SzBCZM1l46wUO5lMnT_XICXnVeOqULzQ/s1920/Figure_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSHZvBgVdILS4GjC81B4YiWSGT_pBFpw6mw29hKNIMLsmx_2ScjitHEe__PSq6jQC1IrLSLr3-dSs6RHvkDiuCAMC2H8Dh_HJD4XqAPO1jTV_0eygeG5XVhb6rgW1g8C2zu149gdwBGCJEJ5B2_XbfDaYO78SzBCZM1l46wUO5lMnT_XICXnVeOqULzQ/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKSNEHLCwitqV3jZLiXKWdauYzuYmq8uDRUjTSsWWDpc8m768ew04yyBo9kumkvGv-BSnGfRBxGGiK8x14gEJk1xxoXaOZaj9hbOABJ_PpzD9hcGTpQIdolDMQMmyGqr5pDlksia2PpzdlQu53aVc_reIR7YOzya7oTGp6RfHta-DYmgLWYJanO7DpDg/s1920/Figure_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKSNEHLCwitqV3jZLiXKWdauYzuYmq8uDRUjTSsWWDpc8m768ew04yyBo9kumkvGv-BSnGfRBxGGiK8x14gEJk1xxoXaOZaj9hbOABJ_PpzD9hcGTpQIdolDMQMmyGqr5pDlksia2PpzdlQu53aVc_reIR7YOzya7oTGp6RfHta-DYmgLWYJanO7DpDg/w640-h322/Figure_3.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlJGNcRMzSlTtM9kCZs0piH_tJDnguldxZPCm5d3J-OE1rmEm7qAj8fl_r05Ei4ZI8r6Si9g-JILrNOfTABUG4af8pYdJpTdonQLo5D9YxuufQ2zZIPyQo0TqM1nDgr5oKxCEIgsKNdUoNBDFxSbQ6M5md7hTxCwnZlgvApEfa8hWH2nF4aAvc-bfZKw/s1920/Figure_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlJGNcRMzSlTtM9kCZs0piH_tJDnguldxZPCm5d3J-OE1rmEm7qAj8fl_r05Ei4ZI8r6Si9g-JILrNOfTABUG4af8pYdJpTdonQLo5D9YxuufQ2zZIPyQo0TqM1nDgr5oKxCEIgsKNdUoNBDFxSbQ6M5md7hTxCwnZlgvApEfa8hWH2nF4aAvc-bfZKw/w640-h322/Figure_3.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf4_uJgziHqA4quQ4WVp1jEy341N7ML25E3SIqJMZg16te9TY82pAr9VZ_7ZhZzzatepicmGppW-BFx0y6ikXlMxXLzAj0cbQi8mU-DDq_eQtZ77B9ZlRIscP9dXLGvwI22-sMPRhNmn8ERpjThFJnQbPLp8Pnmk_0fryT0zlA4FLxpU2QGRWTxk2Slg/s1920/Figure_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf4_uJgziHqA4quQ4WVp1jEy341N7ML25E3SIqJMZg16te9TY82pAr9VZ_7ZhZzzatepicmGppW-BFx0y6ikXlMxXLzAj0cbQi8mU-DDq_eQtZ77B9ZlRIscP9dXLGvwI22-sMPRhNmn8ERpjThFJnQbPLp8Pnmk_0fryT0zlA4FLxpU2QGRWTxk2Slg/w640-h322/Figure_3.png" width="640" /></a></div><br />Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com8tag:blogger.com,1999:blog-261139923818144971.post-57021377132511271082022-04-14T17:18:00.005+01:002022-04-16T17:27:37.582+01:00Trading and investing performance: year eight<p> Eight years! Wow. </p><p>In late 2013 I walked out of an office for the last time where I had been working for AHL, a large systematic futures trading fund. A few months later, in April 2014, I had my own very small systematic futures trading account, and I started doing these performance reviews. And this is my eighth review. Double wow! </p><p><br /></p><p>As usual these cover the UK tax year, in this case from April 6th 2021 to April 5th 2022.</p><p>TLDR:</p><p>Great futures trading, no thanks to 'Black Friday', mostly thanks to the energy crisis. Outperformed AHL, but a little short of the wider index. Poor stock selection and country allocation; better in bonds; good asset allocation. Net-net: <b>8.2%</b> vs my benchmark <b>+3.8%</b></p><p><br /></p><p><br /></p><h2 style="text-align: left;">Overview of my world</h2><p><br /></p><p>I promised last year I would simplify things, and I have. My investments fall into the following categories:</p><p><br /></p><p>Investing:</p><p></p><p style="text-align: left;"></p><ul style="text-align: left;"><li>1 UK stocks</li><li>2 Various stock ETFs</li><li>3 Various bond ETFs</li><li>4 A small amount of uninvested cash</li></ul><div>Trading:</div><div><ul style="text-align: left;"><li>5 Futures contracts traded by my fully automated trading strategy</li><li>6 Cash as trading capital for the above, of which usually around a third is required for initial margin</li></ul></div>Excluded from this analysis is:<p></p><p style="text-align: left;"></p><ul style="text-align: left;"><li>My house</li><li>A cash buffer I keep to cover living expenses</li></ul><div>I benchmark my investments in the following way:</div><div><br /></div><p></p><div><ul style="text-align: left;"><li>A: UK single stocks </li><ul><li>Benchmarked against ISF, a cheap FTSE 100 ETF (FTSE 350 is probably a better benchmark but these ETFs tend to be more expensive).</li></ul><li>B: Long only stocks investments: All stock ETFs and UK stocks</li><ul><li>Benchmarked against a cheap global equity fund (VEVE)</li></ul><li>C: Long only bond investments: All bond ETFs</li><ul><li>Benchmarked against a cheap global bond fund (AGGG)</li></ul><li>D: Long only investments: All UK stocks, bond ETFs and stock ETFs</li><ul><li>Benchmarked against a cheap 80:20 fund. </li></ul><li>E: Futures trading: Return from the futures contracts traded by my fully automated system. The denominator of performance here is the notional capital at risk in my account (usually close to, but not exactly the same as the account value).</li><ul><li>Benchmarks are a similar fund run by my ex employers AHL, and the SG CTA index, adjusted for volatility.</li></ul><li>F: Everything: Long only investments, plus futures hedge, plus futures trading. I include the value of any cash included in my trading or investment accounts, since if I wasn't trading I could invest this. </li><ul><li>For the benchmark I use a cheap 60:40 fund.</li></ul></ul></div><p></p><div><div><br /></div><div>If you prefer maths, then the relationship to the first set of categories is:</div><div><br /></div><div>A = 1</div><div>B = 1 + 2 </div><div>C = 3</div><div>D = B + C = 1 + 2 + 3</div><div>E = 5 + 6</div><div>F = D + 4 + E = 1 + 2 + 3 + 4 +5 + 6</div><div><br /></div></div><div>If you've been following me for a while you can see that I've opted to split out my equities and bonds performance; something I haven't done before. I've also moved stuff around a bit - the 'risk' section is now under the relevant performance category, and there are some more detailed figures on costs and turnover.</div><div><br /></div><div><br /></div><h2 style="text-align: left;">Performance contribution</h2><p><br /></p><p>The figures shown are the contribution of each category to my total investment performance:</p><p><br /></p><p>1) UK equities 1.8%</p><p>2) Stock ETFs 2.6%</p><p>3) Long only bonds 0.07%</p><p>5) Futures trading 3.7%</p><p>4 & 6) Cash 0.0%</p><p>F) Total +8.2%</p><p><br /></p><p>Here is another way of putting it:</p><p>Long only MTM (mark to market): 1.2%</p><p>Stock and ETF dividends: 3.2%</p><p>Futures: 3.7%</p><p>Now for the same figures as 'internal rates of return', which are effectively for the 'capital' employed in each area. I use the Excel function XIRR. You can't add these up, but they are comparable and account for flows between categories. Benchmarks are also shown.</p><p><br /></p><p><span style="color: #e06666;">A) UK equities +9.8% Benchmark +16.6%</span></p><p><span style="color: #e06666;">B) Long only stocks +6.1% Benchmark +12%</span></p><p><span style="color: #38761d;">C) Long only bonds 1.5% Benchmark -3.0%</span></p><p><span style="color: #e06666;">D) Long only investments 5.9% Benchmark +7.9%</span></p><p><span style="color: #2b00fe;">E) Systematic futures trading 27.0% Benchmarks -4.9% +32.3% (vol matched)</span></p><p><b>F) Everything +8.2% Benchmark+3.8%</b></p><p><br /></p><p>I have colour coded these to give an indication of where the good, bad and unsure are.</p><p><br /></p><h2 style="text-align: left;">UK equities</h2><p><br /></p><p>This portfolio is traded using a <i>system</i> which I've explained before (value bias, with trailing stop of 30%), but which is not automated. Instead I have the stocks set up in a spreadsheet, with alerts reminding me when stop losses occur. If I sell then I download some data to pick the best value share.</p><p>The current portfolio looks like this:</p><p><span style="font-family: courier;">Hammerson PLC (LSE:HMSO)<span style="white-space: pre;"> </span>0.21%</span></p><p><span style="font-family: courier;">Babcock International Group PLC (LSE:BAB)<span style="white-space: pre;"> </span>2.45%</span></p><p><span style="font-family: courier;">Greencoat UK Wind (LSE:UKW)<span style="white-space: pre;"> </span>2.60%</span></p><p><span style="font-family: courier;">Imperial Brands PLC (LSE:IMB)<span style="white-space: pre;"> </span>3.17%</span></p><p><span style="font-family: courier;">Johnson Matthey PLC (LSE:JMAT)<span style="white-space: pre;"> </span>3.24%</span></p><p><span style="font-family: courier;">Morgan Advanced Materials PLC (LSE:MGAM)<span style="white-space: pre;"> </span>3.47%</span></p><p><span style="font-family: courier;">Castings PLC (LSE:CGS)<span style="white-space: pre;"> </span>3.50%</span></p><p><span style="font-family: courier;">Barratt Developments PLC (LSE:BDEV)<span style="white-space: pre;"> </span>3.53%</span></p><p><span style="font-family: courier;">Phoenix Group Holdings PLC (LSE:PHNX)<span style="white-space: pre;"> </span>3.64%</span></p><p><span style="font-family: courier;">Lloyds Banking Group PLC (LSE:LLOY)<span style="white-space: pre;"> </span>3.75%</span></p><p><span style="font-family: courier;">BT Group PLC (LSE:BT.A)<span style="white-space: pre;"> </span>3.82%</span></p><p><span style="font-family: courier;">TP ICAP GROUP PLC (LSE:TCAP)<span style="white-space: pre;"> </span>3.96%</span></p><p><span style="font-family: courier;">Centamin PLC (LSE:CEY)<span style="white-space: pre;"> </span>4.05%</span></p><p><span style="font-family: courier;">Renewables Infrastructure Grp (LSE:TRIG)<span style="white-space: pre;"> </span>4.24%</span></p><p><span style="font-family: courier;">Greencore Group PLC <span style="white-space: pre;"> </span>4.33%</span></p><p><span style="font-family: courier;">Redde Northgate PLC (LSE:REDD)<span style="white-space: pre;"> </span>4.39%</span></p><p><span style="font-family: courier;">Aviva PLC (LSE:AV.)<span style="white-space: pre;"> </span>4.46%</span></p><p><span style="font-family: courier;">Rathbones Group Plc<span style="white-space: pre;"> </span>4.49%</span></p><p><span style="font-family: courier;">Central Asia Metals PLC (LSE:CAML)<span style="white-space: pre;"> </span>4.58%</span></p><p><span style="font-family: courier;">Morgan Sindall Group PLC (LSE:MGNS)<span style="white-space: pre;"> </span>4.89%</span></p><p><span style="font-family: courier;">Centrica PLC (LSE:CNA)<span style="white-space: pre;"> </span>5.30%</span></p><p><span style="font-family: courier;">Direct Line Insurance Group PLC (LSE:DLG)<span style="white-space: pre;"> </span>5.87%</span></p><p><span style="font-family: courier;">Investec PLC (LSE:INVP)<span style="white-space: pre;"> </span>16.05%</span></p><div><br /></div><p>Most of these were bought 'normally', but I bought a double dose of Investec last year as it was a screaming buy at a time when nothing else passed my filters (this was a good decision - see below). All are above their stops except Hammerson, which was the first share I bought coming out of the 2020 COVID market pandemic: too early as it turns out. It completely cratered before I could activate the stop and now I keep it as an out of the money call option on UK property or sentimental reminder of the importance of stops - take your pick.</p><p>Here is the performance of every share I held over the year. Percentages are taken from the start of year price, or from when I bought it during the year:</p><p><span style="font-family: courier; font-size: x-small;"> <span style="white-space: pre;"> </span>MTM %<span style="white-space: pre;"> </span>Divi %<span style="white-space: pre;"> </span>TR %<span style="white-space: pre;"> </span></span></p><p><span style="font-family: courier; font-size: x-small;">Investec PLC (LSE:INVP)<span style="white-space: pre;"> </span> 138.2%<span style="white-space: pre;"> </span>8.3%<span style="white-space: pre;"> </span>146.5%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Morrisons (LSE:MRW)<span style="white-space: pre;"> </span> 62.7%<span style="white-space: pre;"> </span>2.8%<span style="white-space: pre;"> </span>65.5%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Morgan Sindall Group PLC (LSE:MGNS)<span style="white-space: pre;"> </span> 33.5%<span style="white-space: pre;"> </span>4.0%<span style="white-space: pre;"> </span>37.4%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Babcock International Group PLC (LSE:BAB)<span style="white-space: pre;"> </span>36.5%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>36.5%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Greencoat UK Wind (LSE:UKW)<span style="white-space: pre;"> </span> 20.2%<span style="white-space: pre;"> </span>5.5%<span style="white-space: pre;"> </span>25.7%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Rathbones Group Plc<span style="white-space: pre;"> </span> 19.6%<span style="white-space: pre;"> </span>4.2%<span style="white-space: pre;"> </span>23.8%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Imperial Brands PLC (LSE:IMB)<span style="white-space: pre;"> </span> 11.5%<span style="white-space: pre;"> </span>9.3%<span style="white-space: pre;"> </span>20.8%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">BT Group PLC (LSE:BT.A)<span style="white-space: pre;"> </span> 17.8%<span style="white-space: pre;"> </span>1.5%<span style="white-space: pre;"> </span>19.2%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Aviva PLC (LSE:AV.)<span style="white-space: pre;"> </span> 7.5%<span style="white-space: pre;"> </span>5.2%<span style="white-space: pre;"> </span>12.7%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Lloyds Banking Group PLC (LSE:LLOY)<span style="white-space: pre;"> </span> 8.1%<span style="white-space: pre;"> </span>2.9%<span style="white-space: pre;"> </span>11.0%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Senior (LSE:SNR)<span style="white-space: pre;"> </span> 10.5%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>10.5%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Marks And Spencer Group Plc (LSE:MKS)<span style="white-space: pre;"> </span> 8.9%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>8.9%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Central Asia Metals PLC (LSE:CAML)<span style="white-space: pre;"> </span> 8.8%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>8.8%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></p><p><span style="font-family: courier; font-size: x-small;">Redde Northgate PLC (LSE:REDD)<span style="white-space: pre;"> </span> 4.3%<span style="white-space: pre;"> </span>1.5%<span style="white-space: pre;"> </span>5.7%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></p><p><span style="font-family: courier; font-size: x-small;">Johnson Matthey PLC (LSE:JMAT)<span style="white-space: pre;"> </span> 1.1%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>1.1%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></p><p><span style="font-family: courier; font-size: x-small;">Renewables Infrastructure Grp (LSE:TRIG)<span style="white-space: pre;"> </span>-0.5%<span style="white-space: pre;"> </span>1.2%<span style="white-space: pre;"> </span>0.8%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></p><p><span style="font-family: courier; font-size: x-small;">Phoenix Group Holdings PLC (LSE:PHNX)<span style="white-space: pre;"> </span> 0.6%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>0.6%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></p><p><span style="font-family: courier; font-size: x-small;">Centrica PLC (LSE:CNA)<span style="white-space: pre;"> </span> 0.0%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Hammerson PLC (LSE:HMSO)<span style="white-space: pre;"> </span> -2.5%<span style="white-space: pre;"> </span>1.2%<span style="white-space: pre;"> </span>-1.3%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Morgan Advanced Materials PLC (LSE:MGAM)<span style="white-space: pre;"> </span>-3.5%<span style="white-space: pre;"> </span>2.1%<span style="white-space: pre;"> </span>-1.4%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Centamin PLC (LSE:CEY)<span style="white-space: pre;"> </span> -3.9%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-3.9%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></p><p><span style="font-family: courier; font-size: x-small;">TP ICAP GROUP PLC (LSE:TCAP)<span style="white-space: pre;"> </span> -6.8%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-6.8%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></p><p><span style="font-family: courier; font-size: x-small;">Direct Line Insurance Group PLC (LSE:DLG)<span style="white-space: pre;"> </span>-14.3%<span style="white-space: pre;"> </span>4.5%<span style="white-space: pre;"> </span>-9.8%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Royal Mail Plc (LSE:RMG)<span style="white-space: pre;"> </span> -13.5%<span style="white-space: pre;"> </span>2.1%<span style="white-space: pre;"> </span>-11.5%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Synthomer Plc (LSE:SYNT)<span style="white-space: pre;"> </span> -16.4%<span style="white-space: pre;"> </span>3.7%<span style="white-space: pre;"> </span>-12.7%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Barratt Developments PLC (LSE:BDEV)<span style="white-space: pre;"> </span> -12.8%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-12.8%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></p><p><span style="font-family: courier; font-size: x-small;">Castings PLC (LSE:CGS)<span style="white-space: pre;"> </span> -17.3%<span style="white-space: pre;"> </span>1.0%<span style="white-space: pre;"> </span>-16.3%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>BOUGHT</span></p><p><span style="font-family: courier; font-size: x-small;">Greencore Group PLC <span style="white-space: pre;"> </span> -18.2%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-18.2%<span style="white-space: pre;"> </span>HELD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Crest Nicholson Holdings Plc (LSE:CRST)<span style="white-space: pre;"> </span> -21.0%<span style="white-space: pre;"> </span>1.0%<span style="white-space: pre;"> </span>-20.0%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Micro Focus International Plc (LSE:MCRO)<span style="white-space: pre;"> </span>-27.6%<span style="white-space: pre;"> </span>3.2%<span style="white-space: pre;"> </span>-24.5%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Vesuvius Plc (LSE:VSVS)<span style="white-space: pre;"> </span> -29.0%<span style="white-space: pre;"> </span>3.8%<span style="white-space: pre;"> </span>-25.2%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Currys Plc (LSE:DC.)<span style="white-space: pre;"> </span> -28.4%<span style="white-space: pre;"> </span>2.8%<span style="white-space: pre;"> </span>-25.6%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">ITV PLC (LSE:ITV)<span style="white-space: pre;"> </span> -31.3%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-31.3%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></p><p><span style="font-family: courier; font-size: x-small;">Go-Ahead group (LSE:GOOG)<span style="white-space: pre;"> </span> -34.5%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>-34.5%<span style="white-space: pre;"> </span>SOLD<span style="white-space: pre;"> </span>LEGACY</span></p><div><br /></div><p>Let me explain the columns: MTM is mark to market (the % price change since I bought it, or the start of the year), Divi(dend)% is self explanatory, TR is total return - the sum of the first two columns. The next column describes the current state of this position: do I still HOLD or have I SOLD. The final column shows when I obtained the position: at the start of the year (LEGACY) or it's something I subsequently BOUGHT.</p><p>Of course there is a bias towards selling shares that have gone down, because of the effect of the stop loss. Morrisons is an obvious exception; I sold it in October because it was being taken over and I didn't want to wait for the cash to arrive - I actually got a small premium above the final takeover price so that was a nice fluke.</p><p>I did 21 trades in this portfolio last year for a turnover of around 85%; i.e. my average holding period is probably around 15 months. That is pretty much what I expect to achieve, and I've calibrated my stop loss accordingly. It's certainly quieter than the frantic trading I did in 2020, which covered two of my performance years. Commissions came in at 0.035% of the initial portfolio value, and stamp duty tax was 0.125% plus a few quid in PTM levies. </p><p>Stamp duty is 0.5% on buys only, but some of my shares weren't eligible (not sure why and don't really want to find out). I could avoid this by trading CFDs, but the broker I mainly use for UK shares doesn't offer these, and I'm not sure I could do this within a tax protected wrapper (as I'm actively trading, I want to avoid capital gains tax or having my trades distorted by tax optimisation).I would have paid other taxes on dividends, but generally in this post I ignore taxes.</p><p>I don't record slippage data here, but as I'm only trading FTSE 350 stocks it won't be too bad. There were other custody charges but I will account for those later since in most of my accounts I mix UK shares and ETFs (although I've since taken steps to simplify this, so I now have a single UK shares only account).</p><p style="background-color: white; color: #222222;">Over the year I was a net seller of UK stocks to the tune of 6% of the starting value; this was to achieve my required regional weightings (see the next section).</p><p>This has traditionally been the best part of my portfolio on a relative basis, but all good things must come to an end, or at least pause for a while. I earned an IRR of 9.8% which would be okay except the benchmark (a UK FTSE 100 tracker, ISF) returned 16.7%. It seems to finally have been the year when the much belagaured UK market actually started to catch up.</p><p>Of that sum dividends returned 3.3% - better than the 1% of last year, but still well down from the 4.6% of the year before. Forward expectations for my current portfolio show a further improvement next year, but we shall see.</p><p><br /></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">2016 - 2017 XIRR 29.2%, benchmark 22.7%</span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">2017 - 2018 XIRR 18.3%, benchmark 2.2%</span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">2018 - 2019 XIRR -2.3%, benchmark 7.6%</span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">2019 - 2020 XIRR -23.1%, benchmark -24.3%</span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">2020 - 2021 XIRR +64.3%, benchmark +24.6%</span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">2021 - 2022 XIRR +9.8%, benchmark +16.7%</span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;"><br /></span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Mean Me 16.0% benchmark 8.3%</span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Sharpe Ratio </span><span style="font-family: courier;">Me 0.54 benchmark 0.45</span><span style="font-family: courier;"> </span></p><p style="background-color: white; color: #222222; font-size: 13.2px;"><span style="font-family: courier;">Geometric mean </span><span style="font-family: courier;">Me 12.9% benchmark 6.8%</span></p><p style="background-color: white; color: #222222; font-size: 13.2px;"><br /></p><h2 style="background-color: white; color: #222222; text-align: left;">Long only Stocks</h2><p style="background-color: white; color: #222222;"><br /></p><p style="background-color: white; color: #222222;">As already noted this is a new category which consists of all my stock ETFs, plus my UK shares. For consistency, although it's perhaps less meaningful, here's my current portfolio of stock ETFs:</p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">UC07<span style="white-space: pre;"> </span>US<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>0.95%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">PGIT*<span style="white-space: pre;"> </span>Global<span style="white-space: pre;"> </span>Infrastructure<span style="white-space: pre;"> </span>1.46%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">HMEF<span style="white-space: pre;"> </span>EM<span style="white-space: pre;"> </span>Normal<span style="white-space: pre;"> </span> 1.58%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">EQDS<span style="white-space: pre;"> </span>Europe<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>3.69%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">VHYL<span style="white-space: pre;"> </span>Global<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>4.30%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">IAPD<span style="white-space: pre;"> </span>Asia<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>5.09%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">PADV<span style="white-space: pre;"> </span>Asia<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>7.07%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">PAXG<span style="white-space: pre;"> </span>Asia<span style="white-space: pre;"> </span>Normal<span style="white-space: pre;"> </span> 8.38%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">IDVY<span style="white-space: pre;"> </span>Europe<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>9.41%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">HDLG<span style="white-space: pre;"> </span>US<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>12.10%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">EUDV<span style="white-space: pre;"> </span>Europe<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>12.78%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">USDV<span style="white-space: pre;"> </span>US<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>13.10%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">SEDY<span style="white-space: pre;"> </span>EM<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>19.20%</span></p><div><br /></div><p style="background-color: white; color: #222222;">(PGIT is actually a UK investment trust, but I'm treating it as a stock ETF to avoid creating a new category)</p><p style="background-color: white; color: #222222;">Perhaps more useful are the risk exposures by region within this sub-portfolio:</p><p style="background-color: white; color: #222222;"><span style="font-family: courier;"> Start of year End Long term Target</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">Asia 12% 14% 15% 14%</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">EM 23% 20% 25% 28%</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">Europe 23% 17% 20% 18%</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">UK 30% 29% 25% 28%</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">US 12% 20% 15% 12%</span></p><p style="background-color: white; color: #222222;"><br /></p><p style="background-color: white; color: #222222;"><i>Start</i> <i>of year </i>and <i>End</i> are self explanatory, whilst <i>Long term </i>is the strategic allocation (see my spreadsheet). After I have snapshotted the year I rebalance the portfolio to the <i>target </i>level shown, taking account of tax and transfers between accounts. </p><p style="background-color: white; color: #222222;">Turnover on the ETF part of the portfolio was lower as I gradually rebalance according to the rules in my <a href="https://www.systematicmoney.org/smart">second book</a> <i>Smart Portfolios</i>, and it came in at 30% with commisions of 0.0078%. Again I don't capture slippage here; and I will also of course be paying a management fee on my ETFs, but I try to keep this as low as possible. Incidentally a shout out to one of my brokers, iweb, who are now showing a very clear screen with all the charges you'd pay when you buy an ETF before the trade goes through. </p><p style="background-color: white; color: #222222;">For the stock portfolio as a whole then then the turnover was 47%, with commissions and taxes coming in at 0.06% (most of that being the pesky taxes on UK shares). Again there are other management charges at the account level, but as I have both stocks and bonds in many accounts (I do try and keep my tax sheltered accounts purely for stock ETFs for reasons explained in <i>Smart Portfolios, </i>but my non tax sheltered accounts have both bonds and stocks).</p><p style="background-color: white; color: #222222;">I was a net buyer of stocks during the year, as will become clear below, to the tune of 12% of the starting value of the portfolio. </p><p style="background-color: white; color: #222222;">Anyway, the XIRR for this weird stock/ETF hybrid beast is <b>6.1%,</b> which isn't wonderful - in fact it's significantly less than the benchmark ETF I've chosen (VEVE) which returned 12%. Dividends were 3.9%.</p><p style="background-color: white; color: #222222;">Since the start of 2022 I'm seeing signs that my long run bets on value and the UK, and permanent US underweight, are starting to bear some fruit, so maybe this will look better next year.</p><p style="background-color: white; color: #222222;">No performance history here as this is the first time I've calculated this figure.</p><p style="background-color: white; color: #222222;"><br /></p><p style="background-color: white; color: #222222;"><br /></p><h2 style="background-color: white; color: #222222;">Long only Bonds</h2><p style="background-color: white; color: #222222;"><br /></p><p style="background-color: white; color: #222222;">Another new section, this time with just ETFs. Current portfolio:</p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">SLXX<span style="white-space: pre;"> </span>UK<span style="white-space: pre;"> </span>Corporate<span style="white-space: pre;"> </span>8.48%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">EMCP<span style="white-space: pre;"> </span>EM<span style="white-space: pre;"> </span>Corporate<span style="white-space: pre;"> </span>9.00%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">FAHY<span style="white-space: pre;"> </span>US<span style="white-space: pre;"> </span>High yield<span style="white-space: pre;"> </span>9.15%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">JNKE<span style="white-space: pre;"> </span>Europe<span style="white-space: pre;"> </span>High yield<span style="white-space: pre;"> </span>10.31%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">VSL*<span style="white-space: pre;"> </span>Global<span style="white-space: pre;"> </span>High yield<span style="white-space: pre;"> </span>15.90%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">VDET<span style="white-space: pre;"> </span>EM<span style="white-space: pre;"> </span>Government<span style="white-space: pre;"> </span>19.80%</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">SHYG<span style="white-space: pre;"> </span>Europe<span style="white-space: pre;"> </span>High yield<span style="white-space: pre;"> </span>27.36%</span></p><div><br /></div><p style="background-color: white; color: #222222;"><i>* VSL is actually a UK investment trust, but I'm treating it as a bond ETF to avoid creating a new category</i></p><p style="background-color: white; color: #222222;">Risk:</p><p style="background-color: white; color: #222222;"><span style="font-family: courier;"> Start of year End Long term Target</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">Asia 1% 3% None 5%</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">EM 44% 40% 25% 27%</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">Europe 20% 35% 25% 24%</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">UK 34% 8% 25% 28%</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">US 2% 13% 25% 16%</span></p><p style="background-color: white; color: #222222;">Note: in previous years I've classified the 'cash like' ETF XSTR as a bond ETF. This year I've classified it as cash, which makes reporting easier and also makes more sense. The UK starting risk figure above has been recalculated to reflect this, so won't be comparable with previous years.</p><p style="background-color: white; color: #222222;">Note also that I don't own any Asian bond ETFs or have a long term allocation for them as there weren't any available last time I checked: the exposure shown is a 'look through' from the global bond ETFs I own.</p><p style="background-color: white; color: #222222;">Turnover was high in this portfolio at 178% of the average start and end value; but it's perhaps easier to point out that I was a huge net seller of bonds this year, the portfolio reducing in size by 60% (and that does not include the effect of reclassifying XSTR) which was entirely driven by net selling, not performance. Commissions were 0.044% of average capital.</p><p style="background-color: white; color: #222222;">The XIRR is <b>1.53%,</b> which sounds mediocre until you remember we are in the middle of a massive bond bear market, and the benchmark AGGG was down -2.97%. My weighting towards corporate and high yield rather than government bonds helped here. Dividends - or rather coupons - added a massive 4.63%. A weird year when bonds, albeit risky ones, earned me more in dividends than stocks! Although the fact I was a big net seller makes this figure hard to calculate.</p><p style="background-color: white; color: #222222;">Again no performance history here as this is the first time I've calculated this figure.</p><p style="background-color: white; color: #222222;"><br /></p><h2 style="background-color: white; color: #222222;">Long only investments</h2><div><br /></div><div>This is basically everything except my futures trading account (although to be pendantic, the odd chunks of univested cash I have lying around in my investment accounts won't be included in this section). You already know what is currently in this portfolio, and the regional risk exposures, so that just leaves the macro asset class level exposure. Here it is in <i>cash </i>terms:</div><div><br /></div><div><p style="background-color: white; color: #222222;"><span style="font-family: courier;"> Start of year End Long term Target</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">Bonds 13% 5% 22% 8%</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">Stock 87% 95% 78% 92%</span></p><p style="background-color: white; color: #222222;"><br /></p></div><div>And here's <i>risk </i>terms:</div><div><br /></div><div><p style="background-color: white; color: #222222;"><span style="font-family: courier;"> Start of year End Long term Target</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">Bonds 8% 3% 10% 5%</span></p><p style="background-color: white; color: #222222;"><span style="font-family: courier;">Stock 92% 97% 90% 95%</span></p><p style="background-color: white; color: #222222;"><br /></p></div><div>What has been happening here is that the sell off in bonds has driven the required allocation lower over the year. Now the needle is starting to move back - mainly due to poorer equity returns - so I'm gradually rebuilding my bond exposure although it's still only going to be half the long term target even after my current bout of rebalancing (which will take me to <i>target</i>).</div><div><br /></div><div>It seems a bit weird to talk about winners and losers in the context of ETFs, but in the interests of transparancy here are the simple (not XIRR) returns for everything I held during the year in both stock and bond ETFs:</div><div><br /></div><div><div><span style="font-family: courier;"><span style="white-space: pre;"> </span> MTM %<span style="white-space: pre;"> </span>Divi %<span style="white-space: pre;"> </span>TR %</span></div><div><span style="font-family: courier;">HDLG<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>US<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>16.6%<span style="white-space: pre;"> </span>3.6%<span style="white-space: pre;"> </span>20.1%</span></div><div><span style="font-family: courier;">USDV<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>US<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>16.0%<span style="white-space: pre;"> </span>3.0%<span style="white-space: pre;"> </span>19.0%</span></div><div><span style="font-family: courier;">VSL*<span style="white-space: pre;"> </span>Bond<span style="white-space: pre;"> </span>Global<span style="white-space: pre;"> </span>High yield<span style="white-space: pre;"> </span>5.4%<span style="white-space: pre;"> </span>11.8%<span style="white-space: pre;"> </span>17.2%</span></div><div><span style="font-family: courier;">VHYL<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>Global<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>14.4%<span style="white-space: pre;"> </span>0.6%<span style="white-space: pre;"> </span>15.0%</span></div><div><span style="font-family: courier;">PGIT*<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>Global<span style="white-space: pre;"> </span>Infrastructure<span style="white-space: pre;"> </span>10.1%<span style="white-space: pre;"> </span>4.4%<span style="white-space: pre;"> </span>14.6%</span></div><div><span style="font-family: courier;">EQDS<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>Europe<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>9.0%<span style="white-space: pre;"> </span>4.8%<span style="white-space: pre;"> </span>13.7%</span></div><div><span style="font-family: courier;">UC07<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>US<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>10.1%<span style="white-space: pre;"> </span>1.8%<span style="white-space: pre;"> </span>11.9%</span></div><div><span style="font-family: courier;">JNKE<span style="white-space: pre;"> </span>Bond<span style="white-space: pre;"> </span>Europe<span style="white-space: pre;"> </span>High yield<span style="white-space: pre;"> </span>7.1%<span style="white-space: pre;"> </span>2.8%<span style="white-space: pre;"> </span>9.9%</span></div><div><span style="font-family: courier;">PAXG<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>Asia<span style="white-space: pre;"> </span>Normal<span style="white-space: pre;"> </span> 5.0%<span style="white-space: pre;"> </span>3.6%<span style="white-space: pre;"> </span>8.6%</span></div><div><span style="font-family: courier;">IAPD<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>Asia<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>-1.3%<span style="white-space: pre;"> </span>5.2%<span style="white-space: pre;"> </span>3.9%</span></div><div><span style="font-family: courier;">SEMB<span style="white-space: pre;"> </span>Bond<span style="white-space: pre;"> </span>EM<span style="white-space: pre;"> </span>Government<span style="white-space: pre;"> </span>1.4%<span style="white-space: pre;"> </span>0.7%<span style="white-space: pre;"> </span>2.1%</span></div><div><span style="font-family: courier;">ISXF<span style="white-space: pre;"> </span>Bond<span style="white-space: pre;"> </span>UK<span style="white-space: pre;"> </span>High yield<span style="white-space: pre;"> </span>0.3%<span style="white-space: pre;"> </span>0.0%<span style="white-space: pre;"> </span>0.3%</span></div><div><span style="font-family: courier;">EMCP<span style="white-space: pre;"> </span>Bond<span style="white-space: pre;"> </span>EM<span style="white-space: pre;"> </span>Corporate<span style="white-space: pre;"> </span>-0.8%<span style="white-space: pre;"> </span>0.4%<span style="white-space: pre;"> </span>-0.4%</span></div><div><span style="font-family: courier;">PADV<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>Asia<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>-5.8%<span style="white-space: pre;"> </span>5.0%<span style="white-space: pre;"> </span>-0.8%</span></div><div><span style="font-family: courier;">FAHY<span style="white-space: pre;"> </span>Bond<span style="white-space: pre;"> </span>US<span style="white-space: pre;"> </span>High yield<span style="white-space: pre;"> </span>-4.9%<span style="white-space: pre;"> </span>3.5%<span style="white-space: pre;"> </span>-1.5%</span></div><div><span style="font-family: courier;">SEDY<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>EM<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>-9.5%<span style="white-space: pre;"> </span>7.8%<span style="white-space: pre;"> </span>-1.6%</span></div><div><span style="font-family: courier;">SHYG<span style="white-space: pre;"> </span>Bond<span style="white-space: pre;"> </span>Europe<span style="white-space: pre;"> </span>High yield<span style="white-space: pre;"> </span>-3.5%<span style="white-space: pre;"> </span>1.7%<span style="white-space: pre;"> </span>-1.9%</span></div><div><span style="font-family: courier;">EUDV<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>Europe<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>-4.9%<span style="white-space: pre;"> </span>2.5%<span style="white-space: pre;"> </span>-2.4%</span></div><div><span style="font-family: courier;">VDET<span style="white-space: pre;"> </span>Bond<span style="white-space: pre;"> </span>EM<span style="white-space: pre;"> </span>Government<span style="white-space: pre;"> </span>-9.9%<span style="white-space: pre;"> </span>6.2%<span style="white-space: pre;"> </span>-3.7%</span></div><div><span style="font-family: courier;">IDVY<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>Europe<span style="white-space: pre;"> </span>Dividend<span style="white-space: pre;"> </span>-9.2%<span style="white-space: pre;"> </span>3.9%<span style="white-space: pre;"> </span>-5.3%</span></div><div><span style="font-family: courier;">HMEF<span style="white-space: pre;"> </span>Equity<span style="white-space: pre;"> </span>EM<span style="white-space: pre;"> </span>Normal<span style="white-space: pre;"> </span> -10.3%<span style="white-space: pre;"> </span>2.0%<span style="white-space: pre;"> </span>-8.3%</span></div><div><span style="font-family: courier;">SLXX<span style="white-space: pre;"> </span>Bond<span style="white-space: pre;"> </span>UK<span style="white-space: pre;"> </span>Corporate<span style="white-space: pre;"> </span>-11.0%<span style="white-space: pre;"> </span>1.5%<span style="white-space: pre;"> </span>-9.6%</span></div></div><div><span style="font-family: courier;"><br /></span></div><div>* investment trusts, classified as ETFs</div><div><br /></div><div>For the sake of completeness, the turnover was 58.7% on this aggregate portfolio and commissions plus taxes were 0.09%. </div><div><br /></div><div>You already know it was stocks good (but relatively bad), bonds bad (but relatively good), so how do we end up overall? Pretty good actually, the XIRR on all my long only investments was <b>5.9%</b> which compares well to my usual benchmark, Vanguard 60:40 which returned 3.8%. However, mostly that is because my average equities allocation of around 92% cash was much higher, and equities outperformed bonds. Exactly 4% of that return was dividends.</div><div><br /></div><div>Let's have a quick look at some history before discussing the benchmark.</div><div><br /></div><div><div><span style="font-family: courier; font-size: small;">2016 - 2017 XIRR 22.3%, benchmark 17.7%</span></div><div><span style="font-family: courier; font-size: x-small;">2017 - 2018 XIRR 1.3%, benchmark 1.3%</span></div><div><span style="font-family: courier; font-size: x-small;">2018 - 2019 XIRR 4.0%, benchmark 7.2%</span></div><div><span style="font-family: courier; font-size: x-small;">2019 - 2020 XIRR -17.5%, benchmark -10.5%</span></div><div><span style="font-family: courier; font-size: x-small;">2020 - 2021 XIRR +34.8%, benchmark +21.5%</span></div></div><div><span style="font-family: courier; font-size: x-small;">2021 - 2022 XIRR +5.9%, benchmark +3.8%</span></div><div><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Std. dev Me 18.1% benchmark 11.6%</span></p><div style="background-color: white; color: #222222; text-align: left;"><span style="background-color: transparent;"><span style="font-family: times;">I have said this before but it might seem a bit weird to have a 60:40 benchmark, when my long run cash allocation is closer to 80:20. The reason I have done this is because on my overall portfolio including futures trading I expect to hit vol closer to 60:40 due to diversification effects (despite my futures trading being run at 25% vol) - as you will see later, this is broadly correct. And I didn't want to use a different benchmark, because I was lazy. And indeed, the standard deviation differences above clearly show that I am running at a higher vol than 60:40</span></span></div></div><div><br /></div><div>Normally changing benchmarks is cheating, but in this case it will actually make me look worse, so I hope you will allow it. So here are the restated figures again for Vanguard 80:20 as a benchmark:</div><div><br /></div><div><div><div><span style="font-family: courier; font-size: x-small;">2015 - 2016 XIRR 6.1%, benchmark 0.1%</span></div><div><span style="font-family: courier; font-size: x-small;">2016 - 2017 XIRR 22.3%, benchmark 25.0%</span></div><div><span style="font-family: courier; font-size: x-small;">2017 - 2018 XIRR 1.3%, benchmark 2.9%</span></div><div><span style="font-family: courier; font-size: x-small;">2018 - 2019 XIRR 4.0%, benchmark 9.3%</span></div><div><span style="font-family: courier; font-size: x-small;">2019 - 2020 XIRR -17.5%, benchmark -10.7%</span></div><div><span style="font-family: courier; font-size: x-small;">2020 - 2021 XIRR +34.8%, benchmark +32.6%</span></div></div><div><span style="font-family: courier; font-size: x-small;">2021 - 2022 XIRR +5.9%, benchmark +7.9%</span></div><div><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Std. dev Me 18.1% benchmark 15.6%</span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Mean Me 8.5% benchmark 11.1%</span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Sharpe Ratio </span><span style="font-family: courier;">Me 0.47 benchmark 0.72</span><span style="font-family: courier;"> </span></p><p style="background-color: white; color: #222222; font-size: 13.2px;"><span style="font-family: courier;">Geometric mean </span><span style="font-family: courier;">Me 7.2% benchmark 10.2%</span></p><p style="background-color: white; color: #222222; font-size: 13.2px;"><br /></p></div></div><div>The risk here still isn't spot on, but it's closer and since 80:20 is my long term target I think this new benchmark makes sense. On this revised basis then I underperformed this year, with <b>5.9% </b>worse than the Vanguard 80:20 benchmark of 7.9%. This was despite my tactical weightings looking more like 90:10; but as we already know the 90% I put in stocks didn't do so well versus the benchmark. In fact a 90:10 Vanguard would have earned around 9.2%, so clearly my intra asset allocation was a bit rubbish especially in stocks.</div><div><br /></div><div><br /></div><div><h2 style="background-color: white; color: #222222;">Futures trading </h2></div><div>So far it's not going well, but don't worry futures will save the day :-)</div><div><br /></div><div>Here are some statistics (all as a percentage of initial capital at the start of the year):</div><div><br /></div><div><span style="font-family: courier;">MTM: 24.7%</span></div><div><div><span style="font-family: courier;">Interest: -0.07%</span></div><div><span style="font-family: courier;">Fees: -0.09%</span></div><div><span style="font-family: courier;">Commissions: -0.58%</span></div><div><span style="font-family: courier;">Margin held, FX gain/loss: 3.1%</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;">Net futures trading: +27.0%</span></div></div><div><br /></div><div><br /></div><div><div>Let's start with the long view:</div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgFy4xXXmKao7t_Qbm4rd3SEoRsNd_bZKesAkPRMLOrOAc39ew48BB8KgwCFpS9ERbvBkXNaw4wev_7bvNzYKV7ZReK6D92DF9tff7bZIeraZCDbG_6vgi-f1iv4sUxNMBfAdhG9XEnhL0D5aUPZb9Pv8ebYJkjIiPUGrGjAPB0lY4PY-Yt80hA4k-pA/s1920/Figure_1.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgFy4xXXmKao7t_Qbm4rd3SEoRsNd_bZKesAkPRMLOrOAc39ew48BB8KgwCFpS9ERbvBkXNaw4wev_7bvNzYKV7ZReK6D92DF9tff7bZIeraZCDbG_6vgi-f1iv4sUxNMBfAdhG9XEnhL0D5aUPZb9Pv8ebYJkjIiPUGrGjAPB0lY4PY-Yt80hA4k-pA/w640-h322/Figure_1.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"></td></tr></tbody></table>And what about last year?<div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCo-mEJYidIhyiBwkW9tky4fFT0etPB-Y-Mde5omBn62NJisuzEzrWbSOjR0hKTD1XKpITac6fZ5d_rtj-Qa5ArE4UzBTDw5DJZQSjU_yCRs8-e7fkGIprAme5JnEbRrc1rNilms0N5wwxSYsXhFCFKyJFv1NjbdOcNp8Zht6PnTBSIouA0caojWW-fw/s1920/Figure_1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCo-mEJYidIhyiBwkW9tky4fFT0etPB-Y-Mde5omBn62NJisuzEzrWbSOjR0hKTD1XKpITac6fZ5d_rtj-Qa5ArE4UzBTDw5DJZQSjU_yCRs8-e7fkGIprAme5JnEbRrc1rNilms0N5wwxSYsXhFCFKyJFv1NjbdOcNp8Zht6PnTBSIouA0caojWW-fw/w640-h322/Figure_1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisoyQA9pdIdoOtYf8p_iE9pArrVaIZ3MH33AGivEjIywh7PmJNriCOQReRxGkcvOynCjZKwENXbTLtZBro-f8YsHfjV1HlHcGXprEPH2mTpPmMaKpmhGxCM_NOjY2KoxYEFsm4RoXUP2aedg1ilF3cX7Wr_vZSWrnus-fqajdTDylJUUeUj3xgk2e_fg/s1920/Figure_3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisoyQA9pdIdoOtYf8p_iE9pArrVaIZ3MH33AGivEjIywh7PmJNriCOQReRxGkcvOynCjZKwENXbTLtZBro-f8YsHfjV1HlHcGXprEPH2mTpPmMaKpmhGxCM_NOjY2KoxYEFsm4RoXUP2aedg1ilF3cX7Wr_vZSWrnus-fqajdTDylJUUeUj3xgk2e_fg/w640-h322/Figure_3.png" width="640" /></a></div><br /><div><br /></div><div><br /></div><div>Basically I had a fairly jumpy few months where I made a small net gain, then 'Black Friday', a few days in November when I lost bigly, and then of course the acceleration of the last few months. This run up ended on March 9th when there was a modest loss resulting in my risk being cut and many positions being closed. Since then I'm pretty flat.<br /><div class="separator" style="clear: both; text-align: center;"><br /></div>Which markets did I make profits in?</div><div><span style="font-family: courier;"><br /></span></div><div><div><span style="font-family: courier;"> codes pandl</span></div><div><span style="font-family: courier;">0 Bond -5.0</span></div><div><span style="font-family: courier;">1 Metals -2.0</span></div><div><span style="font-family: courier;">2 Sector -0.3</span></div><div><span style="font-family: courier;">3 Vol 0.6</span></div><div><span style="font-family: courier;">4 FX 0.9</span></div><div><span style="font-family: courier;">5 Equity 1.0</span></div><div><span style="font-family: courier;">6 Ags 5.1</span></div><div><span style="font-family: courier;">7 OilGas 21.7</span></div></div><div><br /></div><div>These don't add up to the total p&l for reasons I haven't got time to check now, but the general pattern is clear. This really was the year of the energy markets, with a small contribution from the Agricultural markets offset by poor performance in bonds where I struggled to deal with the bear market. This is borne out by the p&l by market list:</div><div><br /></div><div><br /></div><div><pre class="moz-quote-pre" wrap=""><span style="font-family: courier;"> codes pandl
0 PLAT -2.7
1 AEX -2.5
2 BUND -1.4
3 LEANHOG -1.3
<br /></span></pre><pre class="moz-quote-pre" wrap=""><span style="font-family: courier;"><SNIP></span></pre><pre class="moz-quote-pre" wrap=""><span style="font-family: courier;">67 OAT 1.0
68 SP400 1.2
69 VIX 1.5
70 SP500_micro 1.6
71 NASDAQ_micro 1.6
72 GAS_US_mini 1.6
73 JPY 1.9
74 SMI 2.2
75 SOYBEAN 2.8
76 CORN 2.8
77 BRENT-LAST 4.1
78 CRUDE_W_mini 4.9
79 HEATOIL 5.1
80 GASOILINE 5.7
</span></pre></div><div><br /></div><div><br /></div><div>How about costs? Total slippage was a rather hefty 2.4%, which meant I paid around 3% in total costs. This is more than I normally pay (my <a href="https://qoppac.blogspot.com/2021/12/my-trading-system.html">backtest</a> says 1%), but I have made quite a few changes to my models this year. My new dynamic trading strategy includes costs in it's optimisation, and I've become more systematic in excluding markets that are too price to trade, so I'm comfortable this will be back under control next year.<br /><div><br /></div><div>My slippage would have been higher but I earned about 0.5% using my simple execution algo which reduced it. </div><div><br /></div><div>Well 27% certainly shoots the light out in absolute terms, and beats the pants off the long only benchmarks, but what about on a relative basis?</div></div></div><div><br /></div><div>As I've done in previous years I compare this to two benchmarks, 'Bench2' the <a href="https://portal.barclayhedge.com/cgi-bin/indices/displayHfIndex.cgi?indexCat=SG-Prime-Services-Indices&indexName=SG-CTA-Index">SGA CTA</a> index, and a 'Bench1' a <a href="https://www.man.com/products/man-ahl-trend-alternative-dny-h-gbp-acc">fund run by AHL</a>, my ex employers. The former has daily data, but for the latter I have monthly data only, this the figures are April to March. Both benchmarks are normalised so they have the same standard deviation. I redo this normalisation every year, so the figures here won't be exactly comparable to previous years.</div><div><br /></div><div>On this basis I returned <b>27%</b> versus <b>38.3% </b>for SG CTA and a loss of <b>-4.9% </b>for AHL. It's clearly been an excellent year for trend following, especially in the last few months; the underperformance of AHL is somewhat puzzling but they had a pretty poor January which meant that a good March didn't really get them back in the game.</div><div><br /></div><div>My historic figures here are only for futures trading (including FX margin mark to market) - remember I used to have an equity hedge component as well. </div><div><br /></div><div><div><span style="font-family: courier; font-size: x-small;"><span style="white-space: pre;"> </span> My futures<span style="white-space: pre;"> </span>Bench1<span style="white-space: pre;"> </span>Bench2</span></div><div><span style="font-family: courier; font-size: x-small;">2014 – 2015<span style="white-space: pre;"> </span>58.2%<span style="white-space: pre;"> </span>65.9%<span style="white-space: pre;"> </span>50.7%</span></div><div><span style="font-family: courier; font-size: x-small;">2015 – 2016<span style="white-space: pre;"> </span>23.2%<span style="white-space: pre;"> </span>-8.2%<span style="white-space: pre;"> </span>-1.6%</span></div><div><span style="font-family: courier; font-size: x-small;">2016 – 2017 -14.0%<span style="white-space: pre;"> </span>-5.8% -25.5%</span></div><div><span style="font-family: courier; font-size: x-small;">2017 – 2018 -3.7%<span style="white-space: pre;"> </span> 7.0%<span style="white-space: pre;"> </span>-4.4%</span></div><div><span style="font-family: courier; font-size: x-small;">2018 – 2019<span style="white-space: pre;"> </span> 5.2%<span style="white-space: pre;"> </span> 7.6%<span style="white-space: pre;"> </span> 0.8%</span></div><div><span style="font-family: courier; font-size: x-small;">2019 – 2020<span style="white-space: pre;"> </span>39.7%<span style="white-space: pre;"> </span>21.3%<span style="white-space: pre;"> </span> 9.3%</span></div><div><span style="font-family: courier; font-size: x-small;">2020 – 2021<span style="white-space: pre;"> </span> 0.4%<span style="white-space: pre;"> </span> 0.7%<span style="white-space: pre;"> </span>12.7%</span></div><div><span style="font-family: courier; font-size: x-small;">2021 – 2022<span style="white-space: pre;"> </span>27.0%<span style="white-space: pre;"> </span>-4.9%<span style="white-space: pre;"> </span>38.3%</span></div></div><div><span style="background-color: white; color: #222222; font-family: courier; font-size: 13.2px;"><br /></span></div><div><span style="background-color: white; color: #222222; font-family: courier; font-size: 13.2px;">Correlation 1.0 0.73 0.80</span></div><div><p style="background-color: white;"><span style="color: #222222; font-family: courier;"><span style="font-size: 13.2px;">Mean<span style="white-space: pre;"> </span> 17.0%<span style="white-space: pre;"> </span>10.5%<span style="white-space: pre;"> </span>10.0%</span></span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;"><span style="font-size: 13.2px;">Sharpe ratio<span style="white-space: pre;"> </span>0.70<span style="white-space: pre;"> </span> 0.43<span style="white-space: pre;"> </span> 0.41</span></span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;"><span style="font-size: 13.2px;">Geometric mean<span style="white-space: pre;"> </span>14.8%<span style="white-space: pre;"> </span> 8.5%<span style="white-space: pre;"> </span> 7.7%</span></span></p><div><br /></div></div><div>Of course I don't charge fees so perhaps the comparison is slightly unfair, but I'm still pretty happy with that. On a long run basis I'm outperforming both Bench1 (which did very well prior to this year) and Bench2 (which has done particularly well in the last couple of years). </div><div><br /></div><div>It's worth noting that my daily and monthly Sharpe Ratios are better than those shown above; this is characteristic of positive skewed assets.</div><div><br /></div><div><br /></div><div><div><h2 style="background-color: white; color: #222222;">Everything</h2></div></div><div>Well all that remains is to add up the futures and long only performance, and see what the aggregate scorecard is. The denominator here will be the total value of all the securities and investable cash I have, including both cash for futures margin and any temporarily univested cash in other accounts. I do exclude some cash I hold as a buffer, since that can't be invested. </div><div><br /></div><div>The bottom line is <b>8.2%</b> vs the Vanguard 60:40 benchmark of +3.8%. Dividends were 3.2% (less than the 4% before since the capital base is larger, including the dividend cash). Here's the history:</div><div><br /></div><div><span style="font-size: x-small;"><div style="font-size: medium;"><span style="font-family: courier; font-size: x-small;">2015 - 2016 XIRR 14.4%, benchmark 0.1%</span></div></span></div><div><div><span style="font-family: courier; font-size: x-small;">2016 - 2017 XIRR 18.2%, benchmark 19.3%</span></div><div><span style="font-family: courier; font-size: x-small;">2017 - 2018 XIRR 0.6%, benchmark 1.3%</span></div><div><span style="font-family: courier; font-size: x-small;">2018 - 2019 XIRR 4.4%, benchmark 7.2%</span></div><div><span style="font-family: courier; font-size: x-small;">2019 - 2020 XIRR -6.6%, benchmark -10.5%</span></div><div><span style="font-family: courier; font-size: x-small;">2020 - 2021 XIRR 27.9%, benchmark 21.0%</span></div></div><div><div><span style="font-family: courier; font-size: x-small;">2021 - 2022 XIRR 8.2%, benchmark 3.8%</span></div><div><br /></div></div><div><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Std. dev Me 11.7% benchmark 10.9%</span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Mean Me 9.1% benchmark 5.9%</span></p><p style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><span style="font-family: courier;">Sharpe Ratio </span><span style="font-family: courier;">Me 0.78 benchmark 0.54</span><span style="font-family: courier;"> </span></p><p style="background-color: white; color: #222222; font-size: 13.2px;"><span style="font-family: courier;">Geometric mean </span><span style="font-family: courier;">Me 8.6% benchmark 5.4%</span></p><p style="background-color: white; color: #222222; font-size: 13.2px;"><br /></p></div><div>Note: My historic figures <b>include</b> the 'equity hedge' part of my portfolio which I used to have prior to this year. </div><div><br /></div><div>As you can see the standard deviations above are fairly close, so it seems appropriate to continue using Vanguard 60:40 as the benchmark for this part of my portfolio. The correlation - with only six observations - is 0.96. I have had three years of underperformance, followed by three years of outperformance. I'm ahead, but probably not enough to be statistically significant. Of course the latter three years span the whole COVID crisis plus Ukraine; I don't know if that is important.</div><div><br /></div><div><br /></div><div><div><h2 style="background-color: white; color: #222222;">Summary</h2></div></div><div>It's worth briefly reviewing my plans from last year:</div><div><br /></div><div><br /></div><div><i> I've brought some more rigour to my methodology (in the form of the model portfolio) and also done some cleaning and tidying to simplify things (removing the equity hedge).</i></div><div><div><br /></div><div><i> UK stockpicking has obviously done well, but I have no interest in substantially increasing the size of my book here, that's now up to 25 names and is also a fraction over it's tactical target allocation. </i></div><div><br /></div><div>There are 24 names listed above, although I just bought another post the end of year so that's going well. The allocation has been fairly constant.</div><div><br /></div><div><i>I'm happy with my new model portfolio based approach to managing my ETF exposure; now much more formally in line with the sort of thing outlined in Smart Portfolios, and only a few minutes of work every month to keep updated. </i></div><div><br /></div><div><i>I'm currently in the middle of a massive refactoring of my pysystemtrade research code; once completed I hope to research and implement some new futures trading systems. Watch this space!</i></div></div><div><br /></div><div><a href="https://qoppac.blogspot.com/2021/12/my-trading-system.html">I certainly did that</a>.</div><div><br /></div><div>For this year, as I've already mentioned, I am doing some more cleaning up by making one account a pure UK stock picking account. On the futures side I'm hoping to implement some of the new trading strategies I have been researching as part of my new book, which I'm going to go back to writing once I press 'pubish'.</div><div><br /></div><div><br /></div><div><div><h2 style="background-color: white; color: #222222;"><br /></h2></div></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com11tag:blogger.com,1999:blog-261139923818144971.post-33413777200276855182022-03-01T07:02:00.000+00:002022-03-01T07:02:30.624+00:00Is 60:40 a dead parrot? Or just resting?<p> Very brief blog post this month; I'm deep into book writing mode at the moment. Chanelling <a href="https://www.aqr.com/Insights/Perspectives/Thats-it-Thats-the-Blog">Clif Assness</a>, I'm just going to present a few charts and lead you to draw your own conclusions.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiFbRvImZ21ESVUpHctUkx7P4BJ-OlYh5LCxM0Nr5uvVhAYHRi-LqKbviFYFiRHDDQFFoA9xhz1VuJSF5rUENmb-A0Yx6Rarrw4XJOvZ9VO3h8Yy58jC5-mLF_QlDKTWrXJLdeqGvP77hkzv4SCIySDwhgwXgHvLw-6juG1pIe04A7N5i_r_Y9vlHr2NQ" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/a/AVvXsEiFbRvImZ21ESVUpHctUkx7P4BJ-OlYh5LCxM0Nr5uvVhAYHRi-LqKbviFYFiRHDDQFFoA9xhz1VuJSF5rUENmb-A0Yx6Rarrw4XJOvZ9VO3h8Yy58jC5-mLF_QlDKTWrXJLdeqGvP77hkzv4SCIySDwhgwXgHvLw-6juG1pIe04A7N5i_r_Y9vlHr2NQ=w640-h322" width="640" /></a></div><i><div style="text-align: center;"><i>Excess / futures returns from portfolio of 60% S&P 500, 40% US Ten year treasuries (Authors own data)</i></div></i><br /><p></p><p><br /></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEipn_S0_uvbpCCYCdM2MOKBWQB_zE79wzM7EE8rm_V-0r9IZHz1RcPjtuLc3LE3ecOC_juguo9H8BTWAHvmozaCVtlz_yBtX6JgM9DKhgKp1c3CUhDjeqxTT4Edoa-wn4db-NWpmN4KVDWluZN6aXDZPiOLpnakc7x_wH5jFoH7pLqf4EJ2WCOzwYYugw" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="326" data-original-width="675" height="310" src="https://blogger.googleusercontent.com/img/a/AVvXsEipn_S0_uvbpCCYCdM2MOKBWQB_zE79wzM7EE8rm_V-0r9IZHz1RcPjtuLc3LE3ecOC_juguo9H8BTWAHvmozaCVtlz_yBtX6JgM9DKhgKp1c3CUhDjeqxTT4Edoa-wn4db-NWpmN4KVDWluZN6aXDZPiOLpnakc7x_wH5jFoH7pLqf4EJ2WCOzwYYugw=w640-h310" width="640" /></a></div><br /><div style="text-align: center;"><i>Jorda et al “The rate of return on everything” QJE 2019</i></div><p></p><p><br /></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEivRubBkYGnMANjQQeZq3IUhWv0gfCcTI8PGfnvJ4pb_C98ziSwPF8PEXoIdK-IqjRq4vin7y-_n25ghQ6D7OIkqzzWB9FXvALTIPW9tDPt8vGBdcN5R4S2_W7K0IP_wPj0CWkaxdauGhK728C9wttEnygAo5MzhRPAOk4qs9kzpohDOzlQBmWVfaFMSQ" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/a/AVvXsEivRubBkYGnMANjQQeZq3IUhWv0gfCcTI8PGfnvJ4pb_C98ziSwPF8PEXoIdK-IqjRq4vin7y-_n25ghQ6D7OIkqzzWB9FXvALTIPW9tDPt8vGBdcN5R4S2_W7K0IP_wPj0CWkaxdauGhK728C9wttEnygAo5MzhRPAOk4qs9kzpohDOzlQBmWVfaFMSQ=w640-h322" width="640" /></a></div><br /><div style="text-align: center;"><i>One year rolling correlation of S&P 500 and US 10 year bond daily % returns (Source; Authors own data)</i></div><p></p><p><br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEinMgW8Awnh6xJZNBSB2D8jXFG6_vhl15JKgv9adSs9NVpKrFuuMIbV1JKKvyWV_XANRCbUjeEXJb0vc32i4DJviL0_LF7uZLrrmB4aH15yQvwI21IX2qlaKhIZteNMznp1OUVr6ySmxrdfVyV237TBQQf-6BdwtjQdWFzqqPsn7FZNuomvETtT7zLp1g=s967" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="500" data-original-width="967" height="330" src="https://blogger.googleusercontent.com/img/a/AVvXsEinMgW8Awnh6xJZNBSB2D8jXFG6_vhl15JKgv9adSs9NVpKrFuuMIbV1JKKvyWV_XANRCbUjeEXJb0vc32i4DJviL0_LF7uZLrrmB4aH15yQvwI21IX2qlaKhIZteNMznp1OUVr6ySmxrdfVyV237TBQQf-6BdwtjQdWFzqqPsn7FZNuomvETtT7zLp1g=w640-h330" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><i>US inflation rate https://tradingeconomics.com/</i></td></tr></tbody></table><br /><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhDyu34ckiqPbObdjqK9LGAnb9JAW3sdf1djUcRPwGyRg1F2BphMp_p6qF_8djD6bMZkgeuSNX_JjohImKoNTlCdZvWs6Kf133vCL8WrBP5t1JdaVKNalkyvTqV-Yk8spWq3FzHtOSErNvPnQA18Y6XNsvxI80J4KWed3ATCm03fUq7Lnhm29f3jOHJXg=s1151" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="646" data-original-width="1151" height="360" src="https://blogger.googleusercontent.com/img/a/AVvXsEhDyu34ckiqPbObdjqK9LGAnb9JAW3sdf1djUcRPwGyRg1F2BphMp_p6qF_8djD6bMZkgeuSNX_JjohImKoNTlCdZvWs6Kf133vCL8WrBP5t1JdaVKNalkyvTqV-Yk8spWq3FzHtOSErNvPnQA18Y6XNsvxI80J4KWed3ATCm03fUq7Lnhm29f3jOHJXg=w640-h360" width="640" /></a></div><i><div><i><br /></i></div><div style="text-align: center;"><i>Source: https://www.currentmarketvaluation.com/</i></div></i><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgATrY8JTMEHI61nJfDPW17oWXJQDpO4HsMSW9G6q_hvebBhKrEucEdm6dfPAA1DKWZoCNLBo5HsmlJNx_eGVgPOz0mcvXvdcZTLCHTB_9PloLu8BQ1wuvHnq9iZ1nmuPZlDUoQgAFjbiHv7rM9TYtrwSkz6vSbXIWtuGd1p0woPeKjcvZwyfiy6T07cw=s968" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="676" data-original-width="968" height="446" src="https://blogger.googleusercontent.com/img/a/AVvXsEgATrY8JTMEHI61nJfDPW17oWXJQDpO4HsMSW9G6q_hvebBhKrEucEdm6dfPAA1DKWZoCNLBo5HsmlJNx_eGVgPOz0mcvXvdcZTLCHTB_9PloLu8BQ1wuvHnq9iZ1nmuPZlDUoQgAFjbiHv7rM9TYtrwSkz6vSbXIWtuGd1p0woPeKjcvZwyfiy6T07cw=w640-h446" width="640" /></a></div><br /><p style="text-align: center;"><i>US 10 year interes rates. Source: tradingeconomics.com</i></p><p><br /></p><p>And finally, for those who didn't get the <a href="https://en.wikipedia.org/wiki/Dead_Parrot_sketch">Monty Python reference:</a></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/vZw35VUBdzo" width="320" youtube-src-id="vZw35VUBdzo"></iframe></div><p><br /></p><p>Footnote: The computing language, python, in which <a href="https://github.com/robcarver17/pysystemtrade">my trading system</a> is written was named after Monty Python <b>not</b> the snake. Hence a <a href="https://www.oreilly.com/library/view/introducing-python-2nd/9781492051374/">certain publishing company</a> that likes putting animmals on the front of their IT reference books might consider replacing the snake with a parrot...</p><p><br /></p>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com6tag:blogger.com,1999:blog-261139923818144971.post-5679942645372959192022-02-02T12:48:00.001+00:002022-02-02T12:48:13.435+00:00Exogenous risk overlay: take two<p>This is a short follow up post to one I did a couple of years ago, on "<a href="https://qoppac.blogspot.com/2020/05/when-endogenous-risk-management-isnt.html">Exogenous risk management</a>". This was quite an interesting post which dug into why expected risk changes for a typical diversified futures trading system. And then I introduced my risk overlay:</p><p><br /></p><p>"<span face="Arial, Tahoma, Helvetica, FreeSans, sans-serif" style="background-color: white; color: #222222; font-size: 13.2px;">Now we have a better understanding of what is driving our expected risk, it's time to introduce the risk overlay. The risk overlay calculates a</span><span face="Arial, Tahoma, Helvetica, FreeSans, sans-serif" style="background-color: white; color: #222222; font-size: 13.2px;"> </span><i style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">risk position multiplier, </i><span face="Arial, Tahoma, Helvetica, FreeSans, sans-serif" style="background-color: white; color: #222222; font-size: 13.2px;">which is between 0 and 1. When this multiplier is one we make no changes to the positions calculated by our system. If it was 0.5, then we'd reduce our positions by half. And so on.</span></p><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><div>So the overlay acts across the entire portfolio, reducing risk proportionally on all positions at the same time. </div><div><br /></div></div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">The risk overlay has three components, designed to deal with the following issues:</div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">- Expected risk that is too high</div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">- Weird correlation shocks combined with extreme positions</div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">- Jumpy volatility (non stationary and non Gaussian vol)</div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">Each component calculates it's own risk multipler, and then we take the lowest (most conservative) value.</div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">That's it. I could easily make this a lot more complicated, but I wanted to keep the overlay pretty simple. It's also easy to apply this overlay to other strategies, as long as you know your portfolio weights and can estimate a covariance matrix "</div><p style="background-color: white; color: #222222; font-size: 13.2px; text-align: left;"><span style="font-family: inherit;"><br /></span></p><p style="background-color: white; color: #222222; text-align: left;"><span style="font-family: inherit;">Since I wrote that post, I've radically changed the way my trading strategy is designed. This is discussed at length <a href="https://qoppac.blogspot.com/2021/12/my-trading-system.html">here</a>. Here are some relevant highlights</span></p><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">"Things that worked, but I decided not to implement:</div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;">....</li><li style="margin: 0px 0px 0.25em; padding: 0px;"><a href="https://qoppac.blogspot.com/2020/05/when-endogenous-risk-management-isnt.html" style="color: #2288bb; text-decoration-line: none;">A risk overlay</a> (actually was in my old system, but not yet in my new system - <b>a change I plan to make soon</b>)</li><li style="margin: 0px 0px 0.25em; padding: 0px;">....</li></ul></div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><br /></div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">Things that worked and I did implement during 2021:</div><div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;"><ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;"><li style="margin: 0px 0px 0.25em; padding: 0px;">Dynamic optimisation using minimum tracking error (<a href="https://qoppac.blogspot.com/2021/10/mr-greedy-and-tale-of-minimum-tracking.html" style="color: #2288bb; text-decoration-line: none;">here</a> and <a href="https://qoppac.blogspot.com/2021/11/mr-greedy-and-tale-of-minimum-tracking.html" style="color: #2288bb; text-decoration-line: none;">here</a>)</li><li style="margin: 0px 0px 0.25em; padding: 0px;">.....</li><li style="margin: 0px 0px 0.25em; padding: 0px;"><a href="https://qoppac.blogspot.com/2020/09/forecast-linearity-and-forecasting-mean.html" style="color: #2288bb; text-decoration-line: none;">Estimating vol using a partially mean reverting method</a></li></ul></div><p style="background-color: white; color: #222222; text-align: left;"><span style="font-family: inherit;"><br /></span></p><p style="background-color: white; color: #222222; text-align: left;">Basically I did a lot of stuff, but along the way I lost my risk overlay. But like I said above, I planned to reintroduce it once the dust had settled. Can you hear that noise? That's sound the sound of dust settling. Also note that I introduced a new method for estimating vol. That will be important later.</p><p style="background-color: white; color: #222222; text-align: left;">There will be some very specific references to my open source trading system <a href="https://github.com/robcarver17/pysystemtrade">pysystemtrade</a>, but the vast majority of this post should be of general interest to most people who are interested in risk management.</p><p style="background-color: white; color: #222222; text-align: left;"><br /></p><h2 style="background-color: white; color: #222222; text-align: left;">Where should the risk overlay go?</h2><p style="background-color: white; color: #222222; text-align: left;">This was a question that wasn't an issue before, but now I have my new fancy<a href="https://qoppac.blogspot.com/2021/10/mr-greedy-and-tale-of-minimum-tracking.html"> </a><i style="font-weight: bold;"><a href="https://qoppac.blogspot.com/2021/10/mr-greedy-and-tale-of-minimum-tracking.html">dynamic optimisation</a> </i>method, where should the risk overlay go? Should it go into the upstream methodology that calculates an optimal unrounded set of positions? Or should it go into the actual dynamic optimisation itself? Or should it go into a downstream process that runs after the dynamic optimisation?</p><p style="background-color: white; color: #222222; text-align: left;">On reflection I decided not to put the overlay into the dynamic optimisation. You can imagine how this would have worked; we would have added the risk limits as additional constraints on our optimisation, rather than just multipling every positions by some factor betwen 0 and 1. It's a nice idea, and if I was doing a full blown optimisation it would make sense. But I'm using a 'greedy algo' for my optimisation, which doesn't exhaustively search the available space. That makes it unsuitable for risk based constraints. </p><p style="background-color: white; color: #222222; text-align: left;">I also decided not to put the overlay into a downstream process. This was for a couple of reasons. Firstly, in production trading the dynamic optimisation is done seperately from the backtest, using the actual live production database to source current positions and position constraint + trade/no-trade information. I don't really want to add yet more logic to the post backtest trade generation process. Secondly - and more seriously - having gone to a lot of effort to get the optimal integer positions, applying a multiplier to these would most probably result in a lot of rounding going on, and the resulting set of contract positions would be far from optimal.</p><p style="background-color: white; color: #222222; text-align: left;">This leaves us with an upstream process; something that will change the value of <span style="font-family: courier;">system.portfolio.get_notional_positions(instrument_code)</span> - my optimal unrounded positions. </p><p style="background-color: white; color: #222222; text-align: left;"><br /></p><h2 style="background-color: white; color: #222222;">What risks am I concerned about?</h2><div><br /></div><p style="background-color: white; color: #222222; text-align: left;">Rather than just do a wholesale implementation of the old risk overlay, I thought it would be worthwhile considering from scratch what risks I am concerned about, and whether the original approach is the best way to avoid them. </p><p style="background-color: white; color: #222222; text-align: left;"></p><ol style="text-align: left;"><li>Expected risk being just too high. In the original risk overlay, I just calculated expected risk based on estimated correlations and standard deviations.</li><li>The risk that volatility will jump up. Specifically, the risk that it will jump to an extreme level. This risk was dealt with in the risk overlay by recalculating the expected risk, but replacing the current standard deviation with the '99' standard deviation: where % standard deviation would be for each instrument at the 99% percentile of it's distribution.</li><li>The risk that vol is too low compared to historic levels. I dealt with this previously in the 'endogenous' risk management eg within the system itself not the risk overlay, by not allowing a vol estimate to go below the 5% percentile of it's historic range.</li><li>A shock to correlations. For example, if we have positions on that look they are hedging, but correlations change to extreme values. This risk was dealt with in the risk overlay by recalculating the expected risk with a correlation matrix of +1,-1; whatever is worse. </li></ol><p></p><p style="background-color: white; color: #222222; text-align: left;">Here is what I decided to go with:</p><p style="background-color: white; color: #222222; text-align: left;"></p><ol style="text-align: left;"><li>Expected risk too high: I will use the original risk overlay method</li><li>Vol jump risk: I will use the original method, the '99' standard deviation.</li><li>Vol too low risk: I have slready modified my vol estimate, as I noted above, so that it's <b>a blend of historic and current vol.</b> This removes the need for a percentile vol floor.</li><li>Correlation shock: I replaced with the equivalent calculation, a limit on <span style="font-family: courier;">sum(abs(annualised risk % each position))</span>. This is quicker to calculate and more intuitive, but it's the same measure. Incidentally, capping the sum of absolute forecast values weighted by instrument weights would achieve a similar result, but I didn't want to use forecasts, to allow for this method being universal across different types of trading strategy.</li><li>Leverage risk (new): The risk of having positions whose notional exposure is an unreasonable amount of my capital. I deal with this by <b>using specific position limits on individual instruments</b>. </li><li>Leverage risk 2 (new): The implication of a leverage limit is that there is a minimum % annualised risk we can have for a specific instrument. I deal with this by<b> removing instruments whose risk is too low</b></li><li>Leverage risk 3: At an aggregate level in the risk overlay I also set a limit on <span style="font-family: courier;">sum(abs(notional exposure % each position))</span>. Basically this is a crude leverage limit. So if I have $1,000,000 in notional positions, and $100,000 in capital, this would be 10.</li></ol><p></p><p style="background-color: white;"><span style="color: #222222;">Hence we have the following risk control measures:</span></p><p style="background-color: white;"></p><ul style="text-align: left;"><li><span style="color: #222222;">Endogenous</span></li><ul><li><span style="color: #222222;"><a href="https://qoppac.blogspot.com/2020/09/forecast-linearity-and-forecasting-mean.html">Mixed vol estimate, including both long run and short run vol</a></span></li></ul><li><span style="color: #222222;">Risk overlay</span></li><ul><li><span style="color: #222222;">Normal: Estimated risk limit</span></li><li><span style="color: #222222;">Jump: Estimated risk with 99% vol</span></li><li><span style="color: #222222;">Correlation: Sum(abs(% annualised risk each position))</span></li><li><span style="color: #222222;">Leverage: Sum(abs(notional exposure % each position))</span></li></ul><li><span style="color: #222222;">Off-line </span></li><ul><li><span style="color: #222222;">Specific position limits to avoid any given instrument having a notional position that is too hight</span></li><li><span style="color: #222222;">Instrument selection to avoid instruments whose % risk is too low</span></li></ul></ul><p></p><p style="background-color: white;"><span style="color: #222222;"><br /></span></p><h2 style="background-color: white; text-align: left;"><span style="color: #222222;">Off line </span></h2><p style="background-color: white;"><span style="color: #222222;">Let's being by quickly talking about the 'off-line' risk controls: specific position limits, and minimum standard deviation.</span></p><p style="background-color: white;"><span style="color: #222222;">Firstly, we only select instruments to trade that have some minimum standard deviation. </span></p><p style="background-color: white;"><span style="color: #222222;">It can be shown (see my forthcoming book for proof!) that </span><span style="color: #222222;">there is a lower limit on the instrument risk (<i>s</i>), given a maximum resulting leverage ratio (size of notional position in that instrument divided by total capital) <i>L</i>, instrument weight <i>w</i>, annualised risk target (<i>t)</i>, and instrument diversification multiplier (<i>IDM</i>). Assuming the ratio of maximum forecast to average forecast is 2:</span></p><p style="background-color: white;"><span style="color: #222222; font-family: courier;">Minimum <i>s</i> = (2 </span><span style="color: #222222; font-family: courier;">× </span><span style="color: #222222; font-family: courier;">IDM × w × t) ÷ L</span></p><p style="background-color: white; color: #222222; text-align: left;">For example, if the instrument weight is 1%, the IDM is 2.5, the risk target is 25%, and we don't want more than 100% of our notional in a specific instrument (L=1) then the minimum standard deviation is 2 * 2.5 * 0.01 * 0.25 / 1 = 1.25%. </p><p style="background-color: white; color: #222222; text-align: left;">That's pretty low, but it would sweep up some short duration bonds. Here's the safest instruments in my data set right now:</p><pre style="background-color: white; color: #080808; font-family: 'JetBrains Mono',monospace; font-size: 13.8pt;">EURIBOR <span style="color: #1750eb;">0.287279 *<br /></span>SHATZ <span style="color: #1750eb;">0.553181</span> *<span style="color: #1750eb;"><br /></span>US2 <span style="color: #1750eb;">0.791563</span> *<span style="color: #1750eb;"><br /></span>EDOLLAR <span style="color: #1750eb;">0.801186</span> *<span style="color: #1750eb;"><br /></span>JGB <span style="color: #1750eb;">1.143264</span> *<span style="color: #1750eb;"><br /></span>JGB-SGX-mini <span style="color: #1750eb;">1.242098</span> *<span style="color: #1750eb;"><br /></span>US3 <span style="color: #1750eb;">1.423352<br /></span>BTP3 <span style="color: #1750eb;">1.622906<br /></span>KR3 <span style="color: #1750eb;">1.682838<br /></span>BOBL <span style="color: #1750eb;">2.146153<br /></span>CNH-onshore <span style="color: #1750eb;">2.490476<br /></span></pre><p style="background-color: white; color: #222222; text-align: left;">It looks like those marked with * ought to be excluded from trading. Incidentally, the Shatz and JGB mini are already excluded on the grounds of costs. </p><p style="background-color: white; color: #222222; text-align: left;">This will affect the main backtest, since we'll eithier remove such instruments entirely, or - more likely - mark them as 'bad markets' which means I come up with optimal positions for them, but then don't actually allow the dynamic optimisation to utilise them.</p><p style="background-color: white; color: #222222; text-align: left;">Note that it's still possible for instruments to exceed the leverage limit, but this is dealt with by the off line hard position limits. Again, from my forthcoming book:</p><p style="background-color: white; color: #222222; text-align: left;"><span style="font-family: courier;">Maximum N = L <span style="background-color: transparent; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: bold; text-align: justify; text-indent: 0.4cm;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">× </span></span></span></span></span><span style="background-color: transparent; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: bold; text-align: justify; text-indent: 0.4cm;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">Capital </span></span></span></span></span><span style="background-color: transparent; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: bold; text-align: justify; text-indent: 0.4cm;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">÷ </span></span></span></span></span><span style="background-color: transparent; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: bold; text-align: justify; text-indent: 0.4cm;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">Notional exposure per contract </span></span></span></span></span></span></p><p style="background-color: white; color: #222222; text-align: left;"><span style="font-family: courier;"><span style="background-color: transparent; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: bold; text-align: justify; text-indent: 0.4cm;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;"> </span></span></span></span></span></span></p><p style="background-color: white;"><span style="color: #222222;">Suppose for example we have capital of $100,000; and a notional exposure per contract of $10,000. We don’t want a leverage ratio above 1. This implies that our maximum position limit would be 10 contracts.</span></p><p style="background-color: white;"><span style="color: #222222;">We can check this is consistent with the minimum percentage risk imposed in the example above with a 1% instrument weight, IDM of 2.5, and 25% risk target. The number of contracts we would hold if volatility was 1.25% would be (again, formula from my latest book although hopefully familar):</span></p><p align="justify" class="equation-western" lang="en-US" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; direction: ltr; font-size: 11pt; font-weight: bold; line-height: 16.8667px; margin-bottom: 0.21cm; margin-left: 0.6cm; margin-right: 0.5cm; text-align: justify; text-indent: 0.4cm;"><span style="font-family: courier;"><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">N</span></span></span></span></span><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><sub><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">i</span></span></span></sub></span></span><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;"> = (Forecast ÷ 10) × Capital × IDM × weight</span></span></span></span></span><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><sub><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">i</span></span></span></sub></span></span><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;"> × </span></span></span></span></span><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">t</span></span></span></span></span><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><sub><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;"> </span></span></span></sub></span></span><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">÷ </span></span></span></span></span></span></p><p align="justify" class="equation-western" lang="en-US" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; direction: ltr; font-size: 11pt; font-weight: bold; line-height: 16.8667px; margin-bottom: 0.21cm; margin-left: 0.6cm; margin-right: 0.5cm; text-align: justify; text-indent: 0.4cm;"><span style="font-family: courier;"><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;"> (</span></span></span></span></span></span><span style="background-color: white; font-family: courier; font-weight: 400; text-indent: 15.1181px;">Notional exposure per contract </span><span style="font-family: courier;"><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;"> × </span></span></span></span></span><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">s</span></span></span></span></span><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><sub><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">%, i</span></span></span></sub></span></span><span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: black;"><span style="font-size: 11pt;"><span lang="en-US"><span style="font-weight: normal;">)</span></span></span></span></span></span></p><p style="background-color: white;"><span style="font-family: courier;"><span style="color: #222222;"> = </span><span style="color: #222222;">(20 ÷ 10) × 100000 × 2.5 × 0.01 × 0.25 ÷ (10,000 ×0.0125) </span></span></p><p style="background-color: white;"><span style="font-family: courier;"><span style="color: #222222;"> = 10 contracts</span></span></p><p style="background-color: white; color: #222222; text-align: left;"><span style="color: #222222;">Because the limits depend on the notional size of each contract they ought to be updated regularly. I have code that calculates them automatically, and sets them in my database. The limits are used in the dynamic optimisation; plus I have other code that ensures they aren't exceeded by blocking trades which would otherwise cause positions to increase.</span></p><p style="background-color: white; color: #222222; text-align: left;"><span style="color: #222222;">Note: These limits are not included in the main backtest code, and only affect production positions. </span>It's possible in theory to test the effect of imposing these constraints in a backtest, but we'd need to allow these to be historically scaled. This isn't impossible, but it's a lot of code to write for little benefit.</p><div><span style="color: #222222;"><br /></span></div><p style="background-color: white; color: #222222; text-align: left;"><br /></p><pre style="background-color: white; font-family: "JetBrains Mono", monospace; font-size: 13.8pt;"><div style="color: #080808;"><h2 style="font-family: "Times New Roman"; white-space: normal;"><span style="color: #222222;">Risk overlay</span></h2></div></pre><p style="background-color: white; color: #222222; text-align: left;">Once we've decided what to measure, we need to measure it, before we decide what limits to impose.</p><ul><ul><li><span style="color: #222222;">Normal: Estimated risk limit</span></li><li><span style="color: #222222;">Jump: Estimated risk with 99% vol</span></li><li><span style="color: #222222;">Correlation: Sum(abs(% annualised risk each position))</span></li><li><span style="color: #222222;">Leverage: Sum(abs(notional exposure % each position))</span></li></ul></ul><div>In my original post I noted that a way to set these limits without getting tempted to fit them, was to set them at some percentile of the distribution of each risk measure. I'm going to use the 99% percentile - the risk overlay is designed to kick in occasionally, not every other day.</div><div><br /></div><div>I ran my full trading system (discussed <a href="https://qoppac.blogspot.com/2021/12/my-trading-system.html">here</a>) to generate these plots; but as noted above the positions used for these calculations were unrounded positions before dynamic optimisation.</div><div><br /></div><div>Let's start with 'normal' risk</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhUZKG81d4B57VIz2AyiqFZulVsm82cQ65yx3sUKR39n0JaDQif4KQuD3vNv_8ktwlA90XV-RLRcYBAbkiaIjorrVX7hReeIyf85D_HE-u6veODKEg-3GvJEzMcQ9-4qEB3s14IeiTFG6-8Y7E0KWpwbKf25166EO7H2_4q-lx2bvW8iu_Ii88GzW_Ujg=s1920" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/a/AVvXsEhUZKG81d4B57VIz2AyiqFZulVsm82cQ65yx3sUKR39n0JaDQif4KQuD3vNv_8ktwlA90XV-RLRcYBAbkiaIjorrVX7hReeIyf85D_HE-u6veODKEg-3GvJEzMcQ9-4qEB3s14IeiTFG6-8Y7E0KWpwbKf25166EO7H2_4q-lx2bvW8iu_Ii88GzW_Ujg=w640-h322" width="640" /></a></div><br /><div>Median: 16.9%</div><div>99% percentile: 34.9%</div><div><br /></div><div>Notice we undershoot our risk target- 25% - and this is most likely because the IDM is capped at 2.5; so has more instruments are added we can't leverage up as much as is theoretically required.</div><div><br /></div><div>It seems reasonable to cap this at 50% - twice the annual risk target - since we can take on positions that are twice as big than the average, if the forecast is large enough. And indeed that's what I did in the previous iteration of my risk overlay. However this would require all of our instruments to hit double forecast at the same time: unlikely! So let's stick with the 99% percentile approach and set this to 34.9/25 = <b>1.4</b> times the long run risk target. This wouldn't have been triggered in a backtest since the early 1980s.</div><div><br /></div><div>It's quite interesting to also plot the realised risk:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEinQAgRWr3cIWn_h_Lh7dDwBQ8tlHzlUik64PN7YWLyAvuUn1rQYb_XfZ5VGaTWl-QdKRpq1m0tm_dxXH0Gp3-x28x90dwtlk-9JAutBF1SfAExbwZQPcvJ28MCcrvrPUTneueE8JrSxt7Jur1txn_KYuz9aBjfZfWBGSc222z613JsSplkU7I__cVmZQ=s1920" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/a/AVvXsEinQAgRWr3cIWn_h_Lh7dDwBQ8tlHzlUik64PN7YWLyAvuUn1rQYb_XfZ5VGaTWl-QdKRpq1m0tm_dxXH0Gp3-x28x90dwtlk-9JAutBF1SfAExbwZQPcvJ28MCcrvrPUTneueE8JrSxt7Jur1txn_KYuz9aBjfZfWBGSc222z613JsSplkU7I__cVmZQ=w640-h322" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>Here the expected risk is in orange, and the realised risk over the last 6 months is in blue. You can see that they follow each other to an extent, but we clearly realise more risk especially in the period after 2005. The median of the realised risk is much closer to target: 27%. Anyway, that's nothing to do with this post....<br /><div><br /></div><div><br /></div><div>Now for the 'jump' risk</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj0LLPrvwWiIK67pFTRRokV_fFLxvQ2w7yc49yVnFeYnRHZ57mKdEIcphJN2RGf-kAvnaWBoUnr2JUew-BoWyfz0QHxM6wUW0dB7cEqIZiXvf2nQpflgyuSzAbGBbt7aPEq3A5usltRtjpQ0U7kk8eSV3XM20_BeZkhoUgcMFFI0jGQwtvgW6v0QFPQ0A=s1920" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/a/AVvXsEj0LLPrvwWiIK67pFTRRokV_fFLxvQ2w7yc49yVnFeYnRHZ57mKdEIcphJN2RGf-kAvnaWBoUnr2JUew-BoWyfz0QHxM6wUW0dB7cEqIZiXvf2nQpflgyuSzAbGBbt7aPEq3A5usltRtjpQ0U7kk8eSV3XM20_BeZkhoUgcMFFI0jGQwtvgW6v0QFPQ0A=w640-h322" width="640" /></a></div><br /><div><div>Median: 36.8%</div><div>99% percentile: 89.5%</div><div><br /></div></div><div>This equates to a risk limit of 89.5/25 =<b> 3.6 </b>times normal risk. It's a bit lower than the 6 times I used before, probably reflecting a more diversified portfolio. This would have been triggered in the late 1970's and early 1980's, plus in 2011, 2014 and 2021.</div><div><br /></div><div><br /></div><div>Now, correlation risk:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj2UZYnLOyDptBLBH4WzqZdlosBdsQ6ovfjT8Ns817_WTpvRbdlk90kExb5Djq2LSMcxxkc9WxS48uiUGzOFdD3ALnzhNr_EOfB0IeVAUT3I0kAJmpIKhIctJfAggFxxINAv2N53xhz6CMxiOixaXGjiHcN0mkz7a6X8tT86-7rvthbFZlCHtaeXUR7Jg=s1920" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/a/AVvXsEj2UZYnLOyDptBLBH4WzqZdlosBdsQ6ovfjT8Ns817_WTpvRbdlk90kExb5Djq2LSMcxxkc9WxS48uiUGzOFdD3ALnzhNr_EOfB0IeVAUT3I0kAJmpIKhIctJfAggFxxINAv2N53xhz6CMxiOixaXGjiHcN0mkz7a6X8tT86-7rvthbFZlCHtaeXUR7Jg=w640-h322" width="640" /></a></div>Median: 60.3%<div>99% percentile: 84.6%<br /><div><br /></div><div>This equates to a risk limit of 84.6/25 =<b> 3.4 </b>times normal risk. This would have been trigerred, briefly, in 2014.</div><div><br /></div><div><br /></div><div>Finally, leverage:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEip-5EU8mW0HU0KUGKcZSo-bcte6E-fY-04D0djH2dHgb3mQ--mxqY2USO158h8131XZbaO7vCEC1yaOEMPl2-4rhpJH-grm9RAkPmMdRNNPjAuQq6A4dZ672dQgSbbBWXf64dHBqAOi83O1CPEV9hIWYQR7fzC0jnMagSWiHfejAjbRJnQZUgnk1Lf6Q=s1920" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="322" src="https://blogger.googleusercontent.com/img/a/AVvXsEip-5EU8mW0HU0KUGKcZSo-bcte6E-fY-04D0djH2dHgb3mQ--mxqY2USO158h8131XZbaO7vCEC1yaOEMPl2-4rhpJH-grm9RAkPmMdRNNPjAuQq6A4dZ672dQgSbbBWXf64dHBqAOi83O1CPEV9hIWYQR7fzC0jnMagSWiHfejAjbRJnQZUgnk1Lf6Q=w640-h322" width="640" /></a></div><br /><div>Remember the units here aren't % annualised risk, they are a ratio to capital.</div><div>Median 6.15</div><div>99% percentile: 13.9</div><div><br /></div><div>This is a tricky one, and if you're going to use this approach I would advise checking for yourself since the leverage will depend very much on the mixture of instruments you have. The leverage has clearly grown over time as more instruments have been added with lower risk. On the face of it, 13.9 times leverage sounds pretty flipping scary. </div><div><br /></div><div>But remember that the use of position limits in production, and the avoidance of instruments with very low risk, will probably mean the real leverage isn't as bad as all this. For example, the leverage I have on at this very moment with my actual production positions after dynamic optimisation is just 1.6 times.</div><div><br /></div><div>Anyway we have to use a number, so let's be a tiny bit more conservative than 99% percentile and go for lucky <b>13</b>.</div><div><br /></div><div>Here's the limits in the configuration in case you want to change them:</div><div><pre style="background-color: white; color: #080808; font-family: 'JetBrains Mono',monospace; font-size: 13.8pt;"><span style="color: #0033b3;">risk_overlay</span>:<br /> <span style="color: #0033b3;">max_risk_fraction_normal_risk</span>: 1.4<br /> <span style="color: #0033b3;">max_risk_fraction_stdev_risk</span>: 3.6<br /> <span style="color: #0033b3;">max_risk_limit_sum_abs_risk</span>: 3.4<br /> <span style="color: #0033b3;">max_risk_leverage</span>: 13.0<br /></pre></div><div><br /></div><div>Now, for each of the risk measures I calculate the following scalar:<span style="font-family: courier;"> Min(1, Limit / Risk measure)</span>. </div><div><br /></div><div>That will be equal to 1 most of the time, and lower than 1 if the risk measure has exceeded the limit.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj359JVdTKVaaep38sOeRHwagEiSShpV_R5b5dFm9HaqrLlsElDTxJlGrAGsxZPrdmSouYC89cTtfZvYOygOhaIcu_Oxs7VX-BBqaAVDr6sXlTdhB0w9RBB030MoPTKX8dtYrg3bUP_q74V3MB8mCD4lBHjemMQRdvolhwC3Yi6jSrk52n1ssohiMrWqQ=s1920" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="964" data-original-width="1920" height="321" src="https://blogger.googleusercontent.com/img/a/AVvXsEj359JVdTKVaaep38sOeRHwagEiSShpV_R5b5dFm9HaqrLlsElDTxJlGrAGsxZPrdmSouYC89cTtfZvYOygOhaIcu_Oxs7VX-BBqaAVDr6sXlTdhB0w9RBB030MoPTKX8dtYrg3bUP_q74V3MB8mCD4lBHjemMQRdvolhwC3Yi6jSrk52n1ssohiMrWqQ=w640-h321" width="640" /></a></div><br /><div>We'd then take the minimum value of these four ratios. Notice that different risk ratios are kicking in at different times, as different risk measures become problematic.</div><div><br /></div><div>The longest period the risk overlay is turned on is for about 6 months in late 2014. Mostly though it just kicks in for a few days. The minimum value is 0.77; so we'd reduced our position by almost a quarter. The overlay is on about 4% of time; this feels about right given we have four risk measures kicking in 1% of the time, so that's what we'd expect if they were uncorrelated.</div><div><br /></div><div>Finally I multiply the unrounded positions (pre dynamic optimisation) by this risk scaler value. </div><div><br /></div><div>There will be additional trading costs from implementing this; if I wasn't using the dynamic optimisation that provides a buffering service, I'd probably think about smoothing the risk overlay a little bit to reduce those costs.</div><div><br /></div><div>I won't be bothering to test the effect of running this risk overlay; it doesn't turn on enough to give meaningful results. </div><div><br /></div><div><br /></div><div><h2 style="background-color: white; color: #222222;">Summary</h2></div><div style="background-color: white;"><pre><span style="font-family: Times New Roman;"><span style="white-space: normal;">That's probably it in terms of modifying my flagship system for a while - probably a good thing after quite a few changes in a relatively short time!</span></span></pre><pre><span style="font-family: Times New Roman;"><span style="white-space: normal;"><br /></span></span></pre></div></div>Rob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.com0