Friday, 4 September 2026

Not another one! My fifth book...

Well yes, I am pleased to announce that as of this week I completed final proof reading of my new book "The Art And Science of Trading"(AAST). It joins the list of my existing books with their  own acronyms: Systematic Trading (ST), Smart Portfolios (SP), Leveraged Trading (LT) and Advanced Futures Trading Strategies (AFTS).

Due to the inherent delays involved in global dead tree supply chains the book won't actually be officially published until 1st December, although if you pre-order now you will probably get your copy a little earlier. 

I also approved the cover art, which looks like this:



Briefly, what is this book about?

This is effectively four books at once (I know, cool trick right?!). Firstly, it effectively forms a counterpart to my third book Leveraged Trading (LT). LT is an 'introductory' book to trading properly with leveraged instruments; things like futures or spreadbets. Essentially, AAST is the delta-one counterpart to LT. It's an introductory level to trading properly without leverage - so where you can't take on bigger positions than your account value, nor can you go short. It covers the classic delta one instruments used by retail traders: shares, ETFs and ..... crypto (I'll address that particular block chain sized elephant in a moment).

Note: Yes I did cover shares and ETFs in 'Smart Portfolios' (book#2) but from an investment rather than a trading perspective.

Secondly, it's the most introductory book I've ever written, and aimed at more of a mass market (is that because I'm trying to educate as many people as possible, or is it because I want to sell a gazillion copies rather than modest five figures.... well a little of both). So there is a lot more hand holding than there is even in Leveraged Trading; plus more careful explanations of why you can't trust 'gurus', and I've  also stripped back my usual introductory trend trading strategy to the simplest possible rule set it can be without being dangerous (essentially using Occams razor to the point where you are about to cut yourself with it, but not quite). For example, the trend rule - which you can have for free as loyal readers of this blog - is 'has the price gone up or down'?

Thirdly, and this is in the title, I think there is a bunch of 'science' that all traders need to know about, even retail traders - nay, especially retail traders. And actually I go into far more detail about explaining this intuitively than I have in any of my previous books. Familiar concepts like proper robust backtesting, judging outcomes by distributional uncertainty, and of course my old mate the Kelly criteria are all in here. These are all explained in an accessible way from first principles.

Finally, and this is also in the title, it's about the art and science of trading. I came up with the idea of semi-automatic trading in my 1st book, and I used it again in my 3rd. So if you are one of those gifted people who can intuitively predict price direction better than a systematic method, that's lovely, but you should still do that within a systematic framework for position sizing and risk management. Essentially by putting a set of science based guard rails around your trading methods, you will make the most of a good method, and protect yourself from the worst excesses of a bad one. This also means someone using a crap 'systematic' method like <insert obscure japanese sounding charting method name here> won't lose too much money, and if they're lucky enough might even make some.

The relationship between my 5 books is explained quite well on this web page https://www.systematicmoney.org/which-book-should-i-buy where you can find this neat diagram:



A brief aside: Crypto. Rob-seriously?

Let me quote from page 25 of AAST:

I should state my own prejudices up front: I am not a fan of cryptocurrencies, which are used primarily for gambling and criminal activities such as money laundering, and which consume a great deal of electrical power, with obvious implications for the climate crisis. In an ideal world I would ignore them completely. Although I am retained as a research advisor for a crypto hedge fund, and I trade Bitcoin and Ethereum futures, I do not hold any crypto in my personal portfolio.

But the point of this book is to guide traders into using certain scientific rules to reduce their chances of losing money, and nobody needs those rules more than those trading crypto. The message of this book as it pertains to crypto can be summarised as ‘I would not do this stupid thing if I were you, but if you insist, this is the least stupid way to do it.’

(is this because I'm trying to educate as many crypto people as possible, or is it because putting crypto on the cover will increase the sales by a factor of a gazillion.... well a little of both)


Do I need to buy it?

If you're reading this blog, there's a good chance you tick all of these boxes:

  • I consider myself something of a financial expert, actually
  • I only trade leveraged instruments, like futures
  • I'm a fully systematic trader, not interested in this 'intuitive trading' sounds like woke nonsense to me.
  • I've already read your other books and I have a firm grasp on the concepts, thanks very much
So if you tick all of these boxes then you probably don't need to buy this book. Of course you may still want to, because:
  • You have already derived $x000's or even $x,000,000's of benefit from my existing books and blog at minimal cost, and chucking me another $x0 seems only fair
  • My writing style is so awesome that people will happily read my books for fun
  • It's probably worth being reminded of certain basic concepts and ideas
  • You never know, there could even be some deep insight within the book that even you haven't thought of before. As one reviewer said "Despite being an experienced market practitioner, this book really gave me new ideas when it comes to trading". Thanks Saeed, the next burger is on me!
  • You have a friend or relative who doesn't tick all these boxes, but has an interest in trading. And... Christmas is coming!
However if you are someone who ticks one or more of these boxes:
  • Is a relative beginner at this trading nonsense;
  • Is unfamiliar with, or struggled to understand, books like Leveraged Trading, Systematic Trading and Advanced Futures Trading Strategies;
  • Trades non leveraged instruments like ETFs, stocks or crypto;
  • Trades in a non systematic way
... then I'd suggest that you should seriously consider a purchase of AAST. The worst outcome would be that you'd read it, decided trading isn't as easy as you thought, and then decide not to trade. You'd be out the price of a book rather than losing hundreds or thousands of <insert local currency unit here>. 

Of course if you do decide to trade, then owning a copy of AAST will seriously improve your chances of successful trading. Naturally, actually reading and doing what it suggests will help even more.

Has anyone read this nonsense, and liked it?

Five people! And only three of them are mates of mine! Here are some nice things they wrote without me having to give them money (or got AI to write, I didn't ask):


Saeed Amen, Author of Trading Thalesians; Co founder Turnleaf Analytics (ex Lehmans FX, ex Thalesians)

I’ve always enjoyed Rob’s trading books, because they’re always very practical. This new book is useful both for novice and experienced traders. I like the way he creates a framework in the book for managing risk that is applicable to both discretionary and systematic traders. Crucially he takes you through the whole lifecycle of a trade, from position sizing to execution and the broader question of how to manage different assets in a portfolio. Despite being an experienced market practitioner, the book really gave me new ideas when it comes to trading.

Andreas F. Clenow, Chief Investment Officer and author of multiple financial bestsellers (his words!)

Rob Carver is an outlier among financial authors. He has managed billions at tier one institutions and he is a world class quant professional. Seeing his name on the cover of a book should be enough to buy it. I have all his previous books in my office and reference them often in my own work. This time, Rob brings his institutional perspective to tackle equities, ETFs, and crypto in the same structured and well-researched manner as his previous work. In particular, I enjoyed his ruthless analysis of crypto returns, day trading, and the separation of internet hype from the brutal reality of real-world, professional trading. I am clearing space on my office shelf for another book which I will read and reference many times, and so should you.


Alex Spiroglou, CFTe, Dip(TA) ATAA Semi-systematic macro trader

A highly insightful and practical read for anyone looking to improve their trading. Rob Carver cuts through the noise and shares a thoughtful approach grounded in experience, discipline and real-world market understanding. The book offers plenty to reflect on, whatever your trading style or experience level.


Tony Guida, Head of Quant Research AtonRa Partners

In a few words: I really liked it. It reads well and fast, and you got the ordering right. In my world almost all the effort goes into the opening signal and almost all the P&L comes from what surrounds it. Very few authors are willing to say that out loud, because "here is how to size a position" sells fewer books than "here is how to pick winners". The costs chapter and the trade management rules are what I would hand to a junior on day one. A few other things I liked. Chapter 12, on adjusting positions and stops when risk changes, is the chapter almost nobody writes and everybody needs. The forecast-based stop losses in 13 are the right way round: the stop follows the conviction rather than a round number on a chart. And I appreciated that the diversification section treat it as an operational problem, instrument substitution, and portfolio construction, not as a slogan about not putting eggs in one basket.

I should declare my bias. I would have happily read another two hundred page of formulas and python. But I am clearly not the main target here, and that is the point. Putting it in spreadsheets is what makes the rules usable by the people who need them, and the rules do not get worse for being written in Excel.

My humble endorsement: “A discretionary trader and a systematic PM can read this book and end up agreeing with each other, which almost never happens unless the building is on fire or bonuses are at stake. Carver's argument is that you can keep your intuition for choosing what to trade, provided everything about how you trade it follows rules. Thirty years of experience compressed into procedures that fit in a spreadsheet, with no equations and no black boxes. He has written something a beginner can act on and a professional cannot argue with.”


Sam Beatson, PhD, EMBA, FRSA Lecturer in Finance, Risk and Banking Nottingham University Business School and CEO, MarketNous

Robert Carver has managed to combine a rigorous approach with accessibility, without pretending that trading in markets is anything other than demanding and challenging. The Art and Science of Trading is the perfect primer to the wider Carver canon, but also stands strongly in its own right as a practical and intellectually grounded guide to trading.

One of the book’s most useful contributions is the distinction between the art of finding trades and the science of managing them. Carver gives intuition, judgement and experience a legitimate place in trade-finding, while making a persuasive case that position sizing, costs, risk and trade management demand much stricter, rules-based discipline.

He shares his expertise on the less glamorous but essential aspects of trading: randomness, overfitting, transaction costs and the difficulty of distinguishing genuine skill from good fortune. Rather than looking for shortcuts, the reader is encouraged to question apparently impressive results, understand why a strategy should work, and think carefully about whether an edge is likely to survive beyond the historical data in which it was discovered.

In characteristic Carver style, you’ll find answers grounded in evidence, scepticism about any easy path to market profits, and an abundance of practical lessons for new and experienced traders alike.”

Seems appropriate to say thank you

Yes, I do have a list of thank yous:
  • The panel of Elite Traders who helped me pierce my Anglocentric bubble and get a better understanding of the international landscape for retail traders: Alexey Chursanov, ‘Elder’, ‘Kernfusion’, Matthijs Vákár, Professor Paul Calluzzo, Goran Peretin, Dr Sebastian Schmidt, and Vikram Mundkur.
  • A couple of key crypto people from Twitter/X: Crunchster and Scott Phillips. They didn't know they were contributing to a book but their posts were very helpful in my research process.
  • My sister Vicki and my 'sister' Debbie who forced me to write their names into the book despite me insisting it wasn't a novel. This isn't really a thank you, it's documentary evidence I will need for the police report.
  • The expert reading panel: Burak Yenigun (of Stylus Digital) and Riccardo Ronco (of recently retired). This is an unpaid position requiring many hours of reading the first draft of my prose. Which is awful. I can barely read it myself. And the only reward is a signed copy and passive aggressive responses from me ignoring nearly all their comments. Why do they do it? To get this brief mention in a blog post only 50 people will read? I guess.
  • Various random people from my publisher Harriman house: Myles, Victoria, both Charlottes, Sally, Lucy and Suzanne
  • Editors: Comissioning - Craig Pearce, Copy - Dominic Fenn, Proof - Amy Webber (who also as assistant editor has assidously guided this book on it's journey from concept to physical copies). This is a paid position requiring many hours of reading the 2nd, 3rd, 4th..... 89th drafts of my prose. And you can't get AI to do it. Because AI would be like "This is great! Just needs more em-dashes and it would be perfect".
  • The people who live in my house with me (some or all of the time) and put up with all my nonsense.

Is that it then? No more books? <slightly pleading voice>

Ha! If only. No, I'm currently in the early stages of thinking about book#6 which will provisionally be  a relatively advanced book about backtesting. And I'll probably stick AI on the cover to get some more sales.


Note: for those that don't understand the 'not another one' it's a UK political reference to 'Brenda from Bristol' 

https://www.reuters.com/article/world/us/not-another-one-brenda-from-bristol-speaks-for-britons-sick-of-elections-idUSKBN17L1FX/

To see Brenda live, watch the first 5 seconds of this video:




Friday, 3 July 2026

Jumping back in the pool(ing): testing pooling by asset class and portfolio weight distance

This is post #10 in my 2026 series on portfolio optimisation. Time for a quick recap. I'm not going to revisit every post but instead summarise what I now think one should be doing when optimising forecast weights before costs (I haven't yet incorporated costs, nor thought about instrument weights).

(I also confirmed in my very first post it was better to estimate forecast then instrument weights, rather than doing them jointly).

That doesn't seem like much value for the thousands of words I've written, and it's also not a million miles from what I would have down without all this research. A few things haven't worked out: random based methods (bayesian and monte carlo) which don't account for the reduced predictability of real returns compared to synthetic data; formal structural breaks on estimates; grouping and pooling instruments according to forecast SR; shorter EWM windows for SR estimates; and shrinking weights rather than inputs. 

I should probably move on now to looking at costs, and instrument returns, but like a dog with a particularly tasty bone or a cat pulling on an especially interesting piece of string; I can't quite let go of the idea that we should be able to improve on pooling everything.


Prior art

Let's run through the options we potentially have for pooling:

  1. We could cluster things together that have similar characteristics, such as by asset class. 
  2. We could do it on an estimate by estimate basis. We could compare the distribution of returns for say carry10 on US10 year bonds, and on US2 year bonds; and say "Well these distributions aren't significantly different. Let's pool the returns together". 
  3. Or we could look at the estimates of SR across different rules. You could have a vector of the SR for carry10, carry20 and so on. And you'd look at that vector of estimates, and calculate <some measure of> distance between them, and if the distance is low enough, then you'd pool the returns for all the rules for those two instruments.  I covered this in my previous post in this series. 
  4. Or we could do it on portfolio weights. We could for example fit the weights for 2 year bonds, and for 10 year bonds, and then see if they were significantly different. We could then pool the returns if they were not that different. I have also looked at this before.
  5. We don't pool at all, and fit each instrument individually. That sounds terrifying, but remember we're shrinking with our fitting.
  6. We pool everything. So far that seems to the best option, and the one I've used in the past. 

Note that we also have the option of:

  • A pooling the returns before estimating the statistics and then the weights
  • B not pooling the returns, and then pooling the weights
I'm not keen on B because it produces 'over robustness' when combined with a shrinkage methodology. Basically we throw away too much information and end up too close to equal weights.

So returning to the numbered list:

  1. By asset classes - is untried, although it resembles what we used to at AHL when we were organised into asset class teams, each of which fitted their own strategies.
  2. Grouping per estimate: I have objections to in terms of computational time and statistical unpleastness, discussed in the previous post.
  3. Grouping per vector of estimates: I tried this in the previous post. It wasn't effective, and also produced weird undesirable groups.
  4. Grouping by weights: I have tried before in a limited test with some success.

So that leaves us with 1 and 4 as candidates, along with the standard options of #6 full pooling and #5 no pooling at all - fitting each instrument's forecast weights purely on it's own data:

  • Unpooled
  • All instruments pooled
  • Asset class pooled
  • Grouping by portfolio weights


By asset classes - method

This is pretty trivial; the eight asset classes in my system are:

  • Stock indices (58 instruments in my dataset including duplicates and expired instruments like Eurodollar to avoid survivorship bias)
  • Sector stocks (eg 'EU oil companies') 36 instruments
  • Vol 4
  • FX 43
  • Bonds and STIR 39
  • Energies 20
  • Agricultural 39
  • Metals 21 (includes two crypto futures)

So for a given portfolio we fit those instruments in the same asset class together.


Grouping by weights

Well this is easy, as I already did this here and under the heading "get instrument groupings" it tells us we can use k-means clustering and there is even some code there for me to copy and paste. An important difference between this and the grouping by SR vector is that correlations will also be taken into account, at least in an implicit way.

One open question that remains is whether the grouping is done on portfolio weights that have been derived using a shrinkage method, or on weights that haven't (just using naive mean variance). I felt it was better to use 'purer' weights which hadn't used shrinkage so we don't end up discarding useful differences.

As I did in my prior post in this series, let's run the grouping exercise on my entire portfolio. Partly for laughs, and partly to see if the grouping makes sense. How many groups/clusters should we use? Well there are 7 substantive asset classes, excluding vol:

Cluster 0, length 16

BTP3, CANOLA, EU-FOOD, FED, GBPCHF, GOLD_micro, HIGHYIELD, LIVECOW, OMX, R1000, SILVER, SP500_micro, US-INDUSTRY, WHEAT, YENEUR, ZAR

Ags: 3, Metals: 2, Equity: 3, FX: 3, Sector: 2, Bond: 3


Cluster 1, length 29

BRENT_W, CNH, COAL-GEORDIE, COCOA, COFFEE, COTTON, ETHER-micro, EU-AUTO, EU-DJ-TELECOM, EU-DJ-UTIL, EU-MEDIA, EU-REALESTATE, EU-TECH, FTSETAIWAN, GBP, HEATOIL, KOSPI_mini, MILK, MSCIEAFA, MSCISING, OATIES, OJ, RUBBER, SEK, SMI, SONIA3, US-DISCRETE, US2, VNKI

OilGas: 3, Ags: 7, Metals: 1, Equity: 5, FX: 3, Sector: 7, Vol: 1, Bond: 2


Cluster 2, length 20

CAD10, CH10, CHF, CHFJPY, COPPER-micro, CZK, FTSECHINAA, FTSEINDO, IRON, JGB, JGB-SGX-mini, JP-REALESTATE, MUMMY, NIKKEI, SGX, SOYBEAN_mini, SOYOIL, TOPIX, US-ENERGY, US-HEALTH

Ags: 2, Metals: 2, Equity: 6, FX: 3, Sector: 3, Bond: 4


Cluster 3, length 12

AUD_micro, EU-INSURE, FTSE100, FTSECHINAH, GASOIL, HANG_mini, HOUSE-US, NASDAQ_micro, NOK, NZD, US-STAPLES, US-TECH

Sector: 4, Equity: 4, FX: 3, OilGas: 1


Cluster 4, length 16

ALUMINIUM, AUDJPY, BITCOIN, BOBL, BONO, BUND, BUXL, CORN, DOW, GBPJPY, MILKDRY, OAT, RICE, ROBUSTA, SHATZ, STEEL

Ags: 4, Metals: 3, Equity: 1, FX: 2, Bond: 6


Cluster 5, length 79

BB3M, BBCOMM, BRE, BTP, BUTTER, CAD, CHEESE, CHINAA-CON, COAL, COCOA_LDN, COPPER_LME, COTTON2, CRUDE_ICE, CRUDE_W_micro, DJSTX-SMALL, DX, EU-BANKS, EU-CHEM, EU-CONSTRUCTION, EU-MID, EU-OIL, EU-TRAVEL, EURCAD, EURCHF, EURIBOR-ICE, EUROSTX, EUROSTX-SMALL, EUR_micro, FANG, FEEDCOW, FTSE250, GAS-PEN, GASOILINE, GAS_US_mini, GICS, GILT, HANGENT_mini, IBEX_mini, IG, INR, IRS, JPY, KOSDAQ, KR10, KR3, LEAD_LME, LEANHOG, LUMBER-new, MIB, MILKWET, MILLWHEAT, MSCIEMASIA, MSCITAIWAN, MSCIWORLD, MXP, NICKEL_LME, PALLAD, PLAT, REDWHEAT, SARONA, SGD, SMI-MID, SOFR, SOYMEAL, SP400, SPI200, SUGAR11, SUGAR16, SUGAR_WHITE, TIN_LME, TWD, US10, US20, US5, V2X, VIX_mini, WHEAT_ICE, WHEY, ZINC_LME

OilGas: 6, Ags: 18, Metals: 7, Equity: 16, FX: 12, Sector: 6, Vol: 2, Bond: 12


Cluster 6, length 32

AEX, BOVESPA, BRENT-LAST, CAC, CAD2, CAD5, CLP, DAX, EU-BASIC, EU-DIV30, EU-HEALTH, EU-HOUSE, EU-RETAIL, EUA, EURAUD, EURO600, FTSEVIET, GBPEUR, HANGTECH, KRWUSD_mini, MSCIASIA, PLN, RUSSELL, SWISSLEAD, US-FINANCE, US-MATERIAL, US-PROPERTY, US-REALESTATE, US-UTILS, US10U, US3, US30

OilGas: 2, Equity: 11, FX: 5, Sector: 9, Bond: 5

There doesn't seem much congruency with asset classes there. Is this "the data speaking to us", or are we just data mining with a very sharp spade? Let's find out.


Testing

In my older post, here, I did a rather simplistic 'one shot' test on a subset of my available instruments and forecast rules (albeit on a rolling out of sample basis). But I have a rather more exhaustive way of doing things I've been using in this series. 

I cycle through different lengths of in sample (5 years, 10 years, 20 years) and out of sample (1 year and 5 years) lengths of time. For shorter time periods that will allow me to subsample different historic periods. For speed and to get some alternative paths I'm not going to consider all the instruments. Instead I will randomly subsample 50 instruments randomly out of the 214 available. 

Then for a given set of returns I will eithier use fully pooled, asset class pooled, portfolio weight pooled, or unpooled returns. Then I will optimise for each instrument based on the relevant returns, using the shrinkage method with SR shrinkage of 0.5 and correlation of 0.75. Finally I will take the equally weighted across instruments portfolio SR for the 50 instruments, out of sample. 

In previous posts I've discussed a more honest way of backtesting, where we include the opposite of a given trading rule to avoid implicit fitting; and then only bring positive SR rules into the optimisation. All the results here will use that methodology exclusively.


5 years in sample, 1 year out of sample

You should hopefully recognise this format from before. Each row is a fitting option. The first column shows the median SR across the many, many runs of random resampling. The second column shows the t-test p-value from comparing the best option with the others. NaN means this is the best option. A low number in this column, say below 0.01 or 0.05, indicates that the best option is statistically significantly better than the other option.

                           SR  pvalue

unpooled                 0.046     0.0

all pooled               0.425     0.0

asset class pooled       0.557     NaN

weight distanced pooled  0.184     0.0

That is ... pleasing. The least robust method is worse. More robust methods do better. And we get a significant improvement from pooling within asset classes. OK the portfolio weight distancing isn't so good, but we haven't got huge amounts of data to form our portfolio weights with so maybe they are a little unstable.


5 years in sample, 5 years out of sample

                            SR  pvalue
unpooled                 0.418     0.0
all pooled               0.391     0.0
asset class pooled       0.731     NaN
weight distanced pooled  0.376     0.0

Unpooled does a little better here, but asset classes are still the way to go.

10 years in sample, 1 year out of sample

                            SR      pvalue
unpooled                 0.664     NaN
all pooled               0.417   0.000
asset class pooled       0.635   0.127
weight distanced pooled  0.415   0.000

OK interestingly unpooled is making a comeback, but it still isn't significantly better than asset class pooled.

10 years in sample, 5 years out of sample

                            SR  pvalue
unpooled                 0.855     0.0
all pooled               0.575     0.0
asset class pooled       1.028     NaN
weight distanced pooled  0.559     0.0

Asset class is again asserting it's dominance with unpooled a close second.

20 years in sample, 1 year out of sample

                            SR  pvalue
unpooled                 0.571     0.0
all pooled               0.469     0.0
asset class pooled       1.127     NaN
weight distanced pooled  0.410     0.0

OK this is getting a bit silly. I feel like the dad whose kid at sports day is winning everything, proud but also getting a little embarrassed. "Now come on jonny, let one of the other kids win the next one". 

Interestingly it does seem with more data that unpooled is the way to go for a second option.


20 years in sample, 5 years out of sample

                            SR  pvalue
unpooled                 0.251     0.0
all pooled               0.569     NaN
asset class pooled       0.551     0.0
weight distanced pooled  0.553     0.0

"Well done Jonny. Everyone knows you could have won it if you wanted but it's good to show good sportmanship"

So all pooled finally gets it's day in the sun albeit with a slim advantage over the other two pooled methods. Bear in mind only 65 instruments have sufficient history here; with only 18 having two distinct blocks of 25 years so there won't be much genuine variation if we choose 50. So this could be a fluke. Jonny will tell you that it is.


But Rob, What about averaging?

At this point, given the choice between the complexity of weight distancing, and the simplicity and efficiency of asset class pooling; I'm inclined to go with the latter. And it's what we were doing at AHL all those years ago (not because of empirical evidence but because it suited the organisational structure...).

However there is another option which I talked about in the original asset class pooling post, using a blend. Here we take an average of the portfolio weights selected with different methodologies. So that would be an average of:

  • Unpooled
  • All pooled
  • Asset class pooled
Blending weights in this way is a way to improve robustness. It's arguably the correct thing to do, since otherwise we'd be making an in sample choice of methodology - 'meta implicit fitting' if you will. One of my favourite research shops, Resolve asset management, are very keen on doing this. One potential downside is it might be producing 'over robustness' given we're using weights that have already had shrinkage. But let's find out.


5 years in sample, 1 year out of sample

Note these numbers won't be exactly the same as those above, since they're a different set of random experiments. They would eventually converge but it would take millions of runs.

And also, just for fun, I've added an extra column. I started off this series of posts talking about the importance of considering other points of the distribution but I've quietly dropped that and only been quoting the median. For balance then, I've added the 25% SR point as well as the median. The pvalue is as before.

                    SR median  SR 25%  pvalue
unpooled                0.025  -0.569     0.0
all pooled              0.475  -0.147     0.0
asset class pooled      0.620   0.045     0.0
average                 0.650  -0.067     NaN

Averaging is the winner - just - but asset class is better at the more conservative point.

5 years in sample, 5 years out of sample

                    SR median  SR 25%  pvalue
unpooled                0.428   0.164     0.0
all pooled              0.430   0.243     0.0
asset class pooled      0.771   0.537     NaN
average                 0.664   0.430     0.0

A clear win for asset class pooled here. Averaging suffers from it's association with the less performative unpooled / all pooled.

10 years in sample, 1 year out of sample

                    SR median  SR 25%  pvalue
unpooled                0.681   0.034     0.0
all pooled              0.452   0.067     0.0
asset class pooled      0.664   0.167     0.0
average                 0.935   0.256     NaN

This time averaging takes the win, helped by the good performance of unpooled.

10 years in sample, 5 years out of sample

                    SR median  SR 25%  pvalue
unpooled                0.887   0.641     0.0
all pooled              0.570   0.406     0.0
asset class pooled      1.066   0.833     NaN
average                 1.005   0.780     0.0

Asset class pooled is still the winner, but averaging gives a good job.

20 years in sample, 1 year out of sample

                    SR median  SR 25%  pvalue
unpooled                0.538  -0.209     0.0
all pooled              0.515   0.154     0.0
asset class pooled      1.167   0.539     NaN
average                 0.809   0.252     0.0

Asset class pooled by more of a margin now.

20 years in sample, 5 years out of sample

                   SR median  SR 25%  pvalue
unpooled                0.243   0.084     0.0
all pooled              0.531   0.414     NaN
asset class pooled      0.513   0.391     0.0
average                 0.461   0.355     0.0

As before 'all pooled' is the winner, whilst average is dragged down by the poor performance of unpooled. But as I said above, with these longer periods it's hard to know if it's just down to flukey instrument selection.

What to do...

There is enough evidence above to justify asset class pooling as the dominant choice. But equally, I don't think there is enough to discard averaging. And there is something so neat about averaging. We combine three quite disparate source of data together, so we're protected if one of them doesn't work out. It's robustness writ large! It can be justified without any in sample fitting - whereas one could argue that the selection of asset class pooling is an implicit in sample 'meta parameter' choice.

I think we're now (finally) ready to fit our forecast weights, and with costs. This is exciting for me, as whatever comes out I will be using as my new weights. This will be more of a 'literature review' since I've talked about optimising with costs in some detail and at some length before.

Monday, 29 June 2026

Rolling, rolling, rolling.... updating statistical estimates yes or no

 The mega blog post series on portfolio optimisation continues!

A couple of posts ago, here, I looked at using the idea of formal testing for structural breaks in parameter estimates. Important parameters like Sharpe Ratio (SR). Because stuff like this happens:


This is the pre-cost performance of the momentum4 rule on CORN. The formal test found a structural break in 1989.

It's fair to say the structural break stuff didn't work that well. But there may be a much easier way of dealing with the non stationarity of these estimates, and that's to use rolling estimates. For example, if you were to use a 10 year rolling estimate of SR then by the mid 1990s we would conclude that this was a money losing rule. We could also use a rolling estimate for correlation, though as these are stable enough over periods of five years or more this wouldn't affect things much.

Of course I wouldn't be so crude as to use a mere rolling window, instead I'd use an exponential window. As usual I'm going to specify this using the span parameter of the pandas ewm function. A 10 year span has a 3.5 year half life; i.e. the 10 year EWM is roughly equivalent (same halflife) to a 7 year simple moving average.


The test

Regular readers will know exactly what to expect here, but for those that aren't regular here is how I test this procedure to be as sure as possible there is no luck involved.

  • Select 10,20,30 or 40 years of in sample data (shorter periods won't make sense to apply an exponentially weighted [EW] estimation)
  • Select 1 or 5 years of out of sample data
  • Pick a random instrument, ensuring there is enough history available (between 11 and 45 years). We will only choose from instruments with sufficient history for the time required. 
  • Randomly pick N=9 forecasting rules from those available (the same as in previous posts)

Then for each of those sumsamples:

  • Cycle through using an exponentially weighted [EW] span of 5,10,20,30 years; and no span (use all available history). For shorter in sample periods the EW results using longer spans will be very similar to those without EW estimation.
  • Estimate SR using the EW span.
  • Estimate correlation using all the in sample data (we could use an EW span here, but correlations are sufficiently stable that it won't unduly affect results).
  • Use fixed shrinkage levels (estimated here): SR shrinkage 0.5, correlation 0.75 (since we'll always have at least five years of in sample data we don't need to worry about the higher levels of shrinkage required when we have insufficent data). The results won't be much different with any vaguely similar shrinkage; you could argue we'd need more shrinkage with shorter EW spans but I am not going to test this.
  • Run in sample optimisation and out of sample optimisation on all the options above

Finally once we have all our subsamples:

  • Get the median SR from the distribution of subsamples
  • Find the optimal EWM span with the higest median SR
  • Test to see if that optimum is significantly higher than the others

As I also did in my last post I'm going to see if the figures are different without any implicit fitting. To achieve this I include the opposite of a given trading rule as a candidate; and then when I come to do optimisation I pick the version that has a positive SR (there are no costs, so the SR will be identical with a negative sign).


10 years in sample, one year out of sample

We only have five optionts to consider so we can do this in a simple table.

         SR  pvalue
5 0.026 0.065
10 0.021 0.026
20 0.033 NaN
30 0.030 0.042
999999 0.017 0.131

Each row is a different EW span. '99999' means the entire in sample period was used. The next column is the out of sample Sharpe Ratio for each option. In the second column is the p-value for a test of the optimal option against the relevant option. NaN is the optimal option, and lower values (say below 0.05) mean the optimal option is significantly better than the alternatives. We can see that a 20 year span is the optimal, and it's a little better than the other alternatives but not significantly better than the entire in sample period.

Do the results differ when we don't preselect only the 'correct' rules?


SR pvalue
5 0.076 0.188
10 0.093 NaN
20 0.085 0.186
30 0.087 0.169
999999 0.083 0.236

Nothing is really significant there.


10 years in sample, five years out of sample


SR pvalue
5 0.201 0.009
10 0.215 NaN
20 0.214 0.078
30 0.211 0.277
999999 0.199 0.271

SR pvalue 5 0.093 0.000 10 0.112 NaN 20 0.104 0.339 30 0.104 0.466 999999 0.110 0.533

Here we do get better performance with anything more than 5 years.

20 years in sample, one year out of sample

          SR  pvalue
5 -0.154 0.892
10 -0.170 0.687
20 -0.163 0.610
30 -0.164 0.647
999999 -0.138 NaN


          SR  pvalue
5 -0.202 0.006
10 -0.135 0.011
20 -0.110 0.029
30 -0.097 0.059
999999 -0.055 NaN

Longer estimates are better.

20 years in sample, five years out of sample


SR pvalue
5 0.093 0.000
10 0.119 0.000
20 0.134 0.026
30 0.132 0.043
999999 0.149 NaN
          SR  pvalue
5 0.061 0.000
10 0.111 0.003
20 0.129 0.070
30 0.131 0.071
999999 0.140 NaN

Yes, longer estimates are better.


30 years in sample, one year out of sample


SR pvalue
5 -0.073 0.0
10 -0.078 0.0
20 -0.031 0.0
30 -0.005 0.0
999999 0.042 NaN

SR pvalue 5 -0.132 0.007 10 -0.152 0.000 20 -0.156 0.000 30 -0.104 0.000 999999 0.000 NaN


Same story, slightly different numbers.

30 years in sample, five years out of sample

          SR  pvalue
5 -0.038 0.0
10 -0.031 0.0
20 -0.017 0.0
30 -0.006 0.0
999999 0.008 NaN


SR pvalue
5 -0.050 0.001
10 -0.046 0.003
20 -0.038 0.003
30 -0.029 0.003
999999 -0.017 NaN


40 years in sample, one year out of sample


SR pvalue
5 -0.135 0.145
10 -0.113 0.023
20 -0.110 0.001
30 -0.090 NaN
999999 -0.150 0.947

Again, we basically want a very long estimate.
          SR  pvalue
5 -0.159 NaN
10 -0.224 0.044
20 -0.236 0.028
30 -0.238 0.072
999999 -0.254 0.061

That was a little unexpected.

40 years in sample, five years out of sample


SR pvalue
5 -0.049 0.0
10 -0.040 0.0
20 -0.029 0.0
30 -0.021 0.0

999999 -0.015     NaN    


SR pvalue
5 -0.097 0.000
10 -0.064 0.000
20 -0.016 0.006
30 -0.006 NaN
999999 -0.029 0.703


Conclusion

I'm a big believer in publishing (well blogging) research even if it doesn't result in a positive result. And certainly it looks like you don't really gain anything from using exponentially weighted estimates of Sharpe Ratios for optimisation, versus the simpler alternative of using all the data. Still there is that nagging feeling that we should at least have the option of dropping something that hasn't worked for a while which implies a very slow EWM. A 30 year EWM span has a 10.3 year halflife, the same as a 20 year or so SMA; whilst a 40 year EWM span is equivalent to a 28 year SMA.