<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Quant Trading Rules]]></title><description><![CDATA[Quant trading strategies, insights, and ideas. ]]></description><link>https://www.quantitativo.com</link><image><url>https://www.quantitativo.com/img/substack.png</url><title>Quant Trading Rules</title><link>https://www.quantitativo.com</link></image><generator>Substack</generator><lastBuildDate>Wed, 29 Apr 2026 11:43:10 GMT</lastBuildDate><atom:link href="https://www.quantitativo.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Quantitativo]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[quantitativo@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[quantitativo@substack.com]]></itunes:email><itunes:name><![CDATA[Quantitativo]]></itunes:name></itunes:owner><itunes:author><![CDATA[Quantitativo]]></itunes:author><googleplay:owner><![CDATA[quantitativo@substack.com]]></googleplay:owner><googleplay:email><![CDATA[quantitativo@substack.com]]></googleplay:email><googleplay:author><![CDATA[Quantitativo]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Uncertainty]]></title><description><![CDATA[A probabilistic approach to momentum to deliver +1.7 Sharpe ratio]]></description><link>https://www.quantitativo.com/p/uncertainty</link><guid isPermaLink="false">https://www.quantitativo.com/p/uncertainty</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Sun, 05 Apr 2026 16:37:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!vjNm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vjNm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vjNm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png 424w, https://substackcdn.com/image/fetch/$s_!vjNm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png 848w, https://substackcdn.com/image/fetch/$s_!vjNm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png 1272w, https://substackcdn.com/image/fetch/$s_!vjNm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vjNm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png" width="1400" height="923" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:923,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2721843,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/193265385?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vjNm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png 424w, https://substackcdn.com/image/fetch/$s_!vjNm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png 848w, https://substackcdn.com/image/fetch/$s_!vjNm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png 1272w, https://substackcdn.com/image/fetch/$s_!vjNm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd707cd0e-a7cf-478e-9711-b0a6c24c1c9e_1400x923.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">In the Salon of Madame Geoffrin in 1755. Reading of Voltaire's tragedy, The Orphan of China</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;Doubt is not a pleasant condition, but certainty is a ridiculous one.&#8221; Voltaire</p></blockquote><p>Voltaire was arguably the most influential intellectual of 18th-century France. More than that, he was a provocateur. He spent his life as a one-man war against dogma, against anyone who claimed to know the truth with absolute certainty. The Age of Enlightenment didn&#8217;t begin with answers: it began with Voltaire&#8217;s refusal to accept false certainties.</p><p>After three articles on more original ideas, we return this week to paper implementations. In fact, this week we will discuss two papers with a simple yet powerful idea at their core: that embracing uncertainty (rather than fighting it) leads to better results.</p><p>We will investigate the ideas in the paper <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4452964">Bimodality Everywhere: International Evidence of Deep Momentum</a>, by Chulwoo Han and Chang Qin, published in December 2025. This paper is an extension of <a href="https://dl.acm.org/doi/abs/10.1287/mnsc.2021.4189">Bimodal Characteristic Returns and Predictability Enhancement via Machine Learning</a>, also by Chulwoo Han, published in October 2022.</p><p>Here&#8217;s our plan:</p><ol><li><p>First, we will quickly summarize the papers</p></li><li><p>Next, we will create a simple trading strategy based on this idea and show its strong results</p></li><li><p>Finally, we will wrap up with final thoughts and next steps</p></li></ol><div><hr></div><p><em>Before we start, two messages.</em></p><p><em>First, the 3rd cohort of the course is still open for enrollment for the next couple of days.</em></p><p><em>I created this to respond to a request I&#8217;ve received from hundreds of readers here: access to my codebase, step by step &#8212; for those who want to develop strategies using the same approach I share here. Enrollment also includes access to the private community and an ever-growing library of study groups. More information at the link below.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Course and Community&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Course and Community</span></a></p><p><em>Last day for enrollment in the 3rd cohort: Apr 7.</em></p><p><em>Second, this time it took me a bit longer than the usual 3-4 weeks to write and publish. There are a few reasons why:</em></p><ol><li><p><em>First and foremost, I implemented distinct papers, and their results came in significantly below what was reported. Instead of publishing subpar ideas, I prefer to keep searching for meaningful ones to share. That&#8217;s why I&#8217;ll never promise a rigid schedule &#8212; sometimes the search takes longer, but I&#8217;ll never compromise quality.</em></p></li><li><p><em>And, of course, just a lot of regular work :)</em></p></li></ol><p><em>Welcome to all new subscribers &#8212; and rest assured: even if it sometimes takes a little longer than the usual 3-4 weeks to publish, the work continues non-stop.</em></p><div><hr></div><h1>Paper summary</h1><h3>Core Idea</h3><p>Most investors who use momentum strategies assume a simple, intuitive relationship: past winners will likely continue to win, and past losers will likely continue to lose. If that were true, the return distribution of high-momentum stocks would look like a hill (i.e., most returns clustered around the high end).</p><p>But that&#8217;s not what the data shows.</p><p>Chulwoo Han&#8217;s paper documents a striking and uncomfortable fact: <strong>both high- and low-momentum stocks have bimodal return distributions</strong>. Past winners are most likely to yield high returns, <em>but their second most likely outcome is to yield very low returns</em>. The same is true, in reverse, for past losers.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BQho!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BQho!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png 424w, https://substackcdn.com/image/fetch/$s_!BQho!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png 848w, https://substackcdn.com/image/fetch/$s_!BQho!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png 1272w, https://substackcdn.com/image/fetch/$s_!BQho!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BQho!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png" width="1456" height="539" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:539,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:158446,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/193265385?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BQho!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png 424w, https://substackcdn.com/image/fetch/$s_!BQho!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png 848w, https://substackcdn.com/image/fetch/$s_!BQho!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png 1272w, https://substackcdn.com/image/fetch/$s_!BQho!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2722eab1-4821-4087-aef0-955c996a2b18_2048x758.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1: The cross-sectional distribution of momentum stocks: hypothetical vs. actual</figcaption></figure></div><p>This is not a hill. It&#8217;s a <strong>U-shape</strong>.</p><p>The implication is profound. The momentum strategy is not just risky in the conventional sense: it is <em>fundamentally</em> risky, because the stocks it bets on are precisely the ones most likely to deliver extreme outcomes in either direction.</p><p>And here&#8217;s what makes it even more interesting: <strong>this bimodality is not unique to momentum</strong>. It appears across virtually every major firm characteristic &#8212; beta, size, book-to-market, volatility, etc. It&#8217;s everywhere.</p><h3>The Problem with Standard Machine Learning</h3><p>Neural networks trained on momentum features do outperform the standard momentum strategy. This has already been shown by many different authors. But they don&#8217;t eliminate the bimodality. And here&#8217;s where the paper identifies a subtle but critical flaw in how machine learning is typically applied to finance.</p><p>A standard neural network predicts the <strong>most probable</strong> return class for each stock. But when return distributions are bimodal, the most probable class is not the same as the <strong>expected return</strong>.</p><blockquote><p>A stock with a 55% chance of winning and a 45% chance of losing will be labeled a winner. But would you rather own that, or a stock that is 95% likely to earn a modest, predictable return? The model can&#8217;t tell the difference. You can.</p></blockquote><p><strong>The model picks one answer and discards all the doubt. That, as Voltaire warned us, is the absurd part. There&#8217;s information in the uncertainty. Discarding that is discarding alpha.</strong></p><h3>Methodology</h3><p>The paper introduces the <strong>Deep Momentum (DM)</strong> framework, which fixes this in two steps:</p><ul><li><p><strong>Step 1: Estimate the full distribution.</strong> A deep neural network classifies each stock into return deciles and outputs a <em>probability for each decile</em>, not just a single predicted class. This gives a complete picture of each stock&#8217;s return uncertainty.</p></li><li><p><strong>Step 2: Reclassify based on financial performance.</strong> Rather than selecting stocks on the most probable class, the model reclassifies stocks using their <em>expected return</em>, computed as a probability-weighted average across all deciles. Five reclassification methods are proposed, ranging from simple ranking adjustments to Sharpe ratio optimization.</p></li></ul><p>The inputs are intentionally simple: normalized price momentum features over 1, 3, 6, 9, and 12 months, plus size dummies. No exotic data. No hundreds of factors. Models are tested on US stocks from 1975 to 2017, with all experiments repeated fifty times to account for randomness in neural network training.</p><h3>Main Findings</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EUL6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EUL6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png 424w, https://substackcdn.com/image/fetch/$s_!EUL6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png 848w, https://substackcdn.com/image/fetch/$s_!EUL6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png 1272w, https://substackcdn.com/image/fetch/$s_!EUL6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EUL6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png" width="1456" height="1194" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1194,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1309989,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/193265385?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EUL6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png 424w, https://substackcdn.com/image/fetch/$s_!EUL6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png 848w, https://substackcdn.com/image/fetch/$s_!EUL6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png 1272w, https://substackcdn.com/image/fetch/$s_!EUL6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d956abe-9884-4ba4-a8f3-13cddb8e1770_2048x1679.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Cumulative returns</figcaption></figure></div><p>The results presented in the paper are remarkable:</p><ul><li><p>A <strong>value-weighted long-short portfolio</strong> earns an <strong>annualized return of 35%</strong> and a <strong>Sharpe ratio above 1.6</strong>.</p></li><li><p>An <strong>equal-weighted</strong> version earns around <strong>50% annualized</strong> with a <strong>Sharpe ratio above 2.8</strong>.</p></li><li><p>The standard momentum strategy, for comparison, yields a Sharpe ratio of 0.61. The best-known improvement (Barroso and Santa-Clara, 2015) reaches 1.00. The DM strategy more than doubles it.</p></li><li><p>The <strong>monthly alpha is 2.4% (t-statistic = 6.63)</strong> after controlling for Fama-French five factors plus momentum and short-term reversal. The factors cannot explain the returns.</p></li><li><p><strong>No momentum crashes.</strong> The model appears to learn from past crash patterns and repositions accordingly.</p></li><li><p>The strategy survives transaction costs. Under 30 basis points, the value-weighted portfolio still earns 23% annualized with a Sharpe ratio of 1.09.</p></li></ul><h3>Conclusion</h3><p>The paper makes two contributions that stand on their own.</p><p>The first is empirical: the discovery that momentum stocks (and most characteristic-sorted stocks) have bimodal return distributions. A new way of understanding why these strategies are risky at the stock level, not just at the portfolio level.</p><p>The second is methodological: machine learning classifiers, when applied naively, optimize for the wrong objective. Predicting the most probable class is not the same as predicting the best financial outcome. The reclassification framework bridges that gap, and the performance improvement is dramatic.</p><p>The beauty of the result is in its simplicity. A small number of features. A clean methodology. Results that outperform models using hundreds of inputs.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h1>The second paper</h1><p>The first paper proved the concept in the US market. The latest one asks the harder question: Does it work everywhere else?</p><p>Han and Qin extend the Deep Momentum framework to <strong>45 countries</strong>, testing it against a wide range of markets &#8212; developed and emerging, deep and shallow, high-momentum and low-momentum. The results are striking.</p><h3>What&#8217;s new in this paper</h3><ul><li><p><strong>Scale.</strong> The original paper was US-only. This one covers 45 countries, using data from Refinitiv&#8217;s Datastream going back as far as 1965 for the US and UK.</p></li><li><p><strong>A new classifier.</strong> Instead of a deep neural network, this paper uses <strong>XGBoost</strong> (a gradient-boosted tree model). The reason is practical: training a neural network for 45 separate country models would be computationally expensive. XGBoost performs comparably with far less tuning.</p></li><li><p><strong>A new question: why does bimodality vary across countries?</strong> The paper doesn&#8217;t just document bimodality internationally: it tries to explain it. The key drivers turn out to be behavioral: <strong>individualism</strong> and the <strong>disposition effect</strong> (the tendency of investors to sell winners too early and hold losers too long).</p></li><li><p><strong>Joint learning.</strong> This is the most original methodological contribution. Instead of training one model per country, the paper trains a <strong>single global model</strong> on data from all 45 countries simultaneously. The global model outperforms country-specific models in most cases (including in the US).</p></li></ul><h3>Main Findings</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6sBh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6sBh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png 424w, https://substackcdn.com/image/fetch/$s_!6sBh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png 848w, https://substackcdn.com/image/fetch/$s_!6sBh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png 1272w, https://substackcdn.com/image/fetch/$s_!6sBh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6sBh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png" width="1456" height="1259" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1259,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:768792,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/193265385?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6sBh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png 424w, https://substackcdn.com/image/fetch/$s_!6sBh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png 848w, https://substackcdn.com/image/fetch/$s_!6sBh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png 1272w, https://substackcdn.com/image/fetch/$s_!6sBh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe4b03b7-f667-49be-835e-d2f3afb26827_2048x1771.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Cumulative returns</figcaption></figure></div><ul><li><p>Bimodality is <strong>widespread and persistent</strong> across all 45 countries. It is not a US quirk.</p></li><li><p>Bimodality is <strong>negatively correlated with momentum profits</strong>, meaning that where bimodality is highest, the standard momentum strategy works worst. This is especially visible in Asian markets like China, Japan, and Korea.</p></li><li><p>Deep Momentum (RET) <strong>doubles the return of standard momentum</strong> on average across countries. Equal-weighted annualized mean returns: MOM 20.9%, XGBoost 31.1%, RET 41.4%. Average Sharpe ratios: MOM 0.98, XGBoost 2.13, RET 2.49.</p></li><li><p>RET outperforms XGBoost in <strong>43 out of 45 countries</strong>. The reclassification step (translating probabilities into expected returns) is the dominant source of improvement.</p></li><li><p>In Asian markets where momentum historically fails, Deep Momentum shines. In China: MOM 2.0%, RET 31.5%. In Japan: MOM 2.2%, RET 22.2%. In Korea: MOM -0.2%, RET 46.1%.</p></li><li><p>The <strong>global model</strong> is exceptional. Equal-weighted, it earns an annualized return of 52.9% and a <strong>Sharpe ratio of 8.98</strong>. Value-weighted: 33.8% return and a Sharpe ratio of 2.81. The authors note that achieving such a high value-weighted Sharpe ratio is extremely rare in recent periods.</p></li><li><p>The global model also improves country-level portfolios in <strong>38 out of 43 countries</strong> (including the US) by learning patterns from markets that individual countries have not yet experienced.</p></li></ul><h3>Why does Deep Momentum work better in some countries than others?</h3><p>The paper finds that machine learning strategies outperform most in countries with:</p><ul><li><p>Higher bimodality</p></li><li><p>Larger stock universes (cross-sectional depth matters more than time-series length)</p></li><li><p>Higher volatility</p></li><li><p>Higher turnover</p></li></ul><p>In high-bimodality countries, one-year momentum loses predictive power, but short-term reversal becomes stronger (and the model learns to exploit that).</p><p><strong>The bottom line:</strong> bimodality is not a statistical curiosity confined to the US. It is a global phenomenon, rooted in investor behavior, and Deep Momentum is a robust framework for turning that uncertainty into alpha &#8212; across markets, across cultures, and across history.</p><div><hr></div><h1>Implementing the idea</h1><p>I will be honest: when I first read these papers, I thought the implementation would be straightforward. It wasn&#8217;t. Getting this to work required far more engineering than I thought. Detailing all of that would take an article longer than this one. </p><p>And frankly, I have been thinking for a while about shifting the format of these articles. Less &#8220;here is exactly how to replicate this,&#8221; more &#8220;here is the idea, here is the evidence, here is what I found.&#8221; The reasons for that are obvious. For those of you who want to go further, the papers are your starting point. The rest is yours to build.</p><p>Here&#8217;s what I was able to get:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!clfd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!clfd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!clfd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!clfd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!clfd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!clfd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:461625,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/193265385?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!clfd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!clfd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!clfd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!clfd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69339ea8-98df-4b78-a6da-387b6fd22a22_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mdor!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F665944bd-2c45-489b-aacb-f8011d743130_942x1136.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mdor!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F665944bd-2c45-489b-aacb-f8011d743130_942x1136.png 424w, https://substackcdn.com/image/fetch/$s_!mdor!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F665944bd-2c45-489b-aacb-f8011d743130_942x1136.png 848w, https://substackcdn.com/image/fetch/$s_!mdor!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F665944bd-2c45-489b-aacb-f8011d743130_942x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!mdor!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F665944bd-2c45-489b-aacb-f8011d743130_942x1136.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mdor!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F665944bd-2c45-489b-aacb-f8011d743130_942x1136.png" width="942" height="1136" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/665944bd-2c45-489b-aacb-f8011d743130_942x1136.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1136,&quot;width&quot;:942,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:210309,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/193265385?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F665944bd-2c45-489b-aacb-f8011d743130_942x1136.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mdor!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F665944bd-2c45-489b-aacb-f8011d743130_942x1136.png 424w, https://substackcdn.com/image/fetch/$s_!mdor!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F665944bd-2c45-489b-aacb-f8011d743130_942x1136.png 848w, https://substackcdn.com/image/fetch/$s_!mdor!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F665944bd-2c45-489b-aacb-f8011d743130_942x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!mdor!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F665944bd-2c45-489b-aacb-f8011d743130_942x1136.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><p>The numbers speak for themselves. But let&#8217;s spell them out anyway:</p><ul><li><p><strong>18.5% annualized return with half the volatility of the benchmark.</strong> 9.8% vs 19.1%. This strategy doesn&#8217;t just earn more. It does it with dramatically less risk.</p></li><li><p><strong>Sharpe ratio of 1.78.</strong> The benchmark sits at 0.51. More than three times the risk-adjusted return.</p></li><li><p><strong>Max drawdown of -32.8% vs -56.8% for the benchmark.</strong> In the worst moments, this strategy gave back roughly half of what buy-and-hold did.</p></li><li><p><strong>Worst month: -10.6%.</strong> The benchmark&#8217;s worst month was -16.9%. When things go wrong, they go less wrong here.</p></li><li><p><strong>76% positive months.</strong> Three out of every four months are winners. The benchmark manages 64%.</p></li><li><p><strong>Correlation to the benchmark: -0.22.</strong> Slightly negative. That&#8217;s not alpha on top of beta. That&#8217;s a genuinely different source of return.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!juMy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!juMy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png 424w, https://substackcdn.com/image/fetch/$s_!juMy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png 848w, https://substackcdn.com/image/fetch/$s_!juMy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png 1272w, https://substackcdn.com/image/fetch/$s_!juMy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!juMy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png" width="1456" height="933" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:933,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1655180,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/193265385?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!juMy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png 424w, https://substackcdn.com/image/fetch/$s_!juMy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png 848w, https://substackcdn.com/image/fetch/$s_!juMy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png 1272w, https://substackcdn.com/image/fetch/$s_!juMy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b210c95-c9da-4b4f-a811-21e460e31d96_2048x1313.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>If we had traded this strategy since 2005:</p><ul><li><p>We would have had <strong>only 1 negative year (2009);</strong></p></li><li><p>We would have seen <strong>76% of the months positive</strong>, with the best at +9.8% (Jul&#8217;21);</p></li><li><p>We would have seen <strong>24% of the months negative</strong>, with the worst at -10.6% (May&#8217;09);</p></li><li><p>The <strong>longest</strong> <strong>positive streak</strong> would have been <strong>15 months</strong>, from Jan&#8217;05 to Mar&#8217;06;</p></li><li><p>The <strong>longest negative streak</strong> would have been <strong>3 months</strong>, from Aug&#8217;09 to Oct&#8217;09.</p></li></ul><p>Looking at the Fama-French 3-Factor risk model:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9xtC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9xtC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png 424w, https://substackcdn.com/image/fetch/$s_!9xtC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png 848w, https://substackcdn.com/image/fetch/$s_!9xtC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png 1272w, https://substackcdn.com/image/fetch/$s_!9xtC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9xtC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png" width="1252" height="820" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:820,&quot;width&quot;:1252,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:241475,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/193265385?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9xtC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png 424w, https://substackcdn.com/image/fetch/$s_!9xtC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png 848w, https://substackcdn.com/image/fetch/$s_!9xtC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png 1272w, https://substackcdn.com/image/fetch/$s_!9xtC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc07aed59-90a3-46de-986f-b0501f2f3f48_1252x820.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p><strong>Alpha: 0.0668% per day &#8594; annualized &#8776; 16.8%, highly significant (t = 8.19, p &lt; 0.001).</strong> The strategy delivers strong abnormal returns that standard risk factors cannot explain.</p></li><li><p><strong>Market Beta (Mkt-RF): -0.111 &#8594; negative market exposure (t = &#8211;16.04, p &lt; 0.001).</strong> The strategy doesn&#8217;t just avoid market risk. It actively moves against it. This is what drives that -0.22 correlation to the benchmark.</p></li><li><p><strong>SMB (Size): -0.107, significant (t = -8.05, p &lt; 0.001).</strong> A tilt toward larger stocks. Consistent with an international strategy that avoids the smallest, least liquid names.</p></li><li><p><strong>HML (Value): +0.049, significant (t = 4.73, p &lt; 0.001).</strong> A modest value tilt. The strategy tends to favor cheaper stocks, which is consistent with the momentum reversal dynamics documented in the papers.</p></li><li><p><strong>R&#178; = 7.0% &#8594; only 7% of return variation explained by the three factors.</strong> The vast majority of performance is idiosyncratic. The Fama-French factors are nearly irrelevant here.</p></li></ul><p>You can&#8217;t ask for more from a market-neutral strategy.</p><div><hr></div><h1>Final thoughts</h1><p>Voltaire spent his life arguing that certainty is the enemy of truth. Two and a half centuries later, a finance paper proves him right in one of the most quantitatively rigorous ways imaginable.</p><p>The insight at the core of these papers is deceptively simple: the information is in the uncertainty. Not in the most probable outcome, but in the full distribution of possibilities. A model that collapses that distribution into a single predicted class is throwing away exactly the signal it needs. The reclassification framework is, at its heart, a way of respecting doubt.</p><p>The results speak to how much edge was being left on the table. Doubling the Sharpe ratio of the best-known momentum improvements. Surviving in markets where momentum historically fails. A global model that gets better by learning from countries it has never traded. None of that happens without embracing the full probability distribution.</p><p>There is plenty left to explore:</p><ul><li><p><strong>Expanding the feature set.</strong> The papers use only momentum and size. What happens when you add valuation, quality, or macro variables to the distribution estimation step?</p></li><li><p><strong>Combining with other strategies.</strong> A negative beta and near-zero correlation to the market makes this a natural diversifier. The obvious next step is blending it into a broader portfolio.</p></li><li><p><strong>Refining the global model.</strong> Joint learning across 45 countries is powerful, but the weighting of countries, the handling of data quality differences, and the retraining schedule all leave room for improvement.</p></li></ul><p>The canvas is wide open.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a> if you have questions, ideas, or feedback.</p><p>Cheers!</p><div><hr></div><p><em>The 3rd cohort of the course is still open for enrollment for the next couple of days.</em></p><p><em>I created this to respond to a request I&#8217;ve received from hundreds of readers here: access to my codebase, step by step &#8212; for those who want to develop strategies using the same approach I share here. Enrollment also includes access to the private community and an ever-growing library of study groups. More information at the link below.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Course and Community&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Course and Community</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5z7D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5z7D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5z7D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg" width="1456" height="1071" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1071,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5z7D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Last day for enrollment in the 3rd cohort: Apr 7.</em></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[More Bets, Better Bets]]></title><description><![CDATA[Expanding a 1.30 Sharpe strategy from the S&P 500 to the Russell 3000]]></description><link>https://www.quantitativo.com/p/more-bets-better-bets</link><guid isPermaLink="false">https://www.quantitativo.com/p/more-bets-better-bets</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Tue, 24 Feb 2026 13:03:20 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!zJCB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zJCB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zJCB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png 424w, https://substackcdn.com/image/fetch/$s_!zJCB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png 848w, https://substackcdn.com/image/fetch/$s_!zJCB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png 1272w, https://substackcdn.com/image/fetch/$s_!zJCB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zJCB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png" width="945" height="552" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c3375a19-4d4c-40ad-b062-f042b2226310_945x552.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:552,&quot;width&quot;:945,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:509874,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/188964115?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zJCB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png 424w, https://substackcdn.com/image/fetch/$s_!zJCB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png 848w, https://substackcdn.com/image/fetch/$s_!zJCB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png 1272w, https://substackcdn.com/image/fetch/$s_!zJCB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3375a19-4d4c-40ad-b062-f042b2226310_945x552.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Ed Thorp in 1964.&nbsp;|&nbsp;Leigh Weiner for Newsweek</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;Casino gambling with a system where you have the edge is a wonderful teacher for elementary money management.&#8221; <em>Ed Thorp</em></p></blockquote><p>Ed Thorp is the money manager I admire most. Many people have never heard of him. They should have. In 1961, with Claude Shannon &#8212; the father of information theory &#8212; he built the first wearable computer to beat roulette. He wrote <em>Beat the Dealer</em> and proved blackjack could be conquered with math. He derived the Black-Scholes options pricing formula years before Black and Scholes &#8212; but chose to trade on it instead of publishing. Then he founded the world&#8217;s first quant hedge fund, posting 227 winning months out of 230. Finally, as he decided to end his famous hedge fund, he passed some of his learnings to the young Ken Griffin and became Citadel&#8217;s first LP. And it all started at the blackjack table.</p><p>Casinos don&#8217;t gamble. They have an edge on every game, they let everyone play, and they let the math do the rest. Over thousands of bets, the law of large numbers turns a small edge into a certainty. Thorp saw this and turned it against them. Then he took the same logic to Wall Street.</p><p>The lesson is simple. <strong>If you have a proven edge, you don&#8217;t want bigger bets. You want more bets.</strong></p><p>This week, we take a proven mean reversion strategy &#8212; the one from <a href="https://www.quantitativo.com/p/murphys-law">Murphy&#8217;s Law</a> &#8212; and expand it from the S&amp;P 500 to the Russell 3000. More stocks. More signals. More bets. The challenge: doing it without diluting the edge. Here&#8217;s the plan:</p><ol><li><p>The trap: why expanding your universe naively destroys the edge</p></li><li><p>The filter: dynamically avoiding names with high blow-up risk</p></li><li><p>The test: Does it actually work?</p></li><li><p>The takeaway: final thoughts and next steps</p></li></ol><p>Let&#8217;s get started.</p><div><hr></div><h3>Course and Community: enrollments Open</h3><p><em>As many of you requested, the 3rd cohort of the course is <strong>now live and open for enrollment.</strong></em></p><p><em>It walks through my codebase step by step and is designed for readers who want to develop quant strategies using the same approach I&#8217;ve shared here.</em></p><p><em>You&#8217;ll find all the details&#8212;content, structure, pricing, and FAQs&#8212;at the link below. If you have any questions, feel free to reach out.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Course and Community&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Course and Community</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5z7D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5z7D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5z7D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg" width="1456" height="1071" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1071,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:485099,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/188964115?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5z7D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5z7D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0034122-95e0-4b3e-9896-2846615b66a9_2140x1574.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Enrollment also includes access to the private community and an ever-growing library of study groups.</em></p><div><hr></div><h1>The trap of more</h1><p>Our baseline is a mean reversion strategy on S&amp;P 500 stocks. When a name drops more than its own history says it should, we buy. When it snaps back, we sell. Simple entry, simple exit, solid edge &#8212; a +1.2 Sharpe with only one down year in twenty-two. For the full breakdown, check the original article: <a href="https://www.quantitativo.com/p/murphys-law">Murphy&#8217;s Law</a>.</p><p>Here&#8217;s what happens when we naively apply the same idea to the Russell 3000:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nYaA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nYaA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png 424w, https://substackcdn.com/image/fetch/$s_!nYaA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png 848w, https://substackcdn.com/image/fetch/$s_!nYaA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png 1272w, https://substackcdn.com/image/fetch/$s_!nYaA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nYaA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png" width="942" height="1068" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1068,&quot;width&quot;:942,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:130440,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/188964115?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nYaA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png 424w, https://substackcdn.com/image/fetch/$s_!nYaA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png 848w, https://substackcdn.com/image/fetch/$s_!nYaA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png 1272w, https://substackcdn.com/image/fetch/$s_!nYaA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb0233fb-d183-486f-8986-c1258a01c8d5_942x1068.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Comparison: S&amp;P 500 universe vs. Russell 3000 universe</figcaption></figure></div><p>The Russell 3000 is roughly 6x larger, so we scale accordingly: 60 maximum positions instead of 10. More bets, right? Yes &#8212; but worse ones:</p><ul><li><p>Total return cut nearly in half: 4,286% vs. 8,114%</p></li><li><p>Sharpe ratio dropped from 1.30 to 1.00</p></li><li><p>Max drawdown nearly doubled: -31.8% vs. -18.8%</p></li></ul><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h1>Same signal, different risk</h1><p>The signal is the same. The entry logic is the same. The exit is the same. The only thing that changed is the universe. So where did the edge go?</p><p>Our hypothesis: the edge didn&#8217;t disappear. It got noisier. The Russell 3000 includes thousands of smaller, less liquid names. These stocks may mean-revert just as often, but when they don&#8217;t, they blow up harder. If that&#8217;s true, the problem isn&#8217;t signal quality &#8212; it&#8217;s tail risk. And if it&#8217;s tail risk, we can filter it out.</p><p>To test this, we compare the trade-level statistics of both universes side by side &#8212; and look specifically at three tail-risk metrics, computed on a rolling basis. At the moment a trade is triggered, the stock already carries these numbers &#8212; they describe the name as it enters the position:</p><ul><li><p><strong>Skewness</strong> measures the asymmetry of the return distribution. Negative skew means the left tail is fatter &#8212; losses are larger and more frequent than gains. A stock that mean-reverts cleanly should have positive or near-zero skew.</p></li><li><p><strong>Semivariance ratio</strong> is the share of total variance that comes from below-zero returns. A ratio above 0.5 means most of the volatility lives on the downside. The higher the ratio, the more the risk is concentrated where it hurts.</p></li><li><p><strong>CVaR 5%</strong> (Conditional Value at Risk) is the average return in the worst 5% of trades. VaR tells you the door to the left tail. CVaR tells you what&#8217;s behind it.</p></li></ul><p>Let&#8217;s see the numbers:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U2G_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U2G_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png 424w, https://substackcdn.com/image/fetch/$s_!U2G_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png 848w, https://substackcdn.com/image/fetch/$s_!U2G_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png 1272w, https://substackcdn.com/image/fetch/$s_!U2G_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U2G_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png" width="930" height="956" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:956,&quot;width&quot;:930,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:100944,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/188964115?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U2G_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png 424w, https://substackcdn.com/image/fetch/$s_!U2G_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png 848w, https://substackcdn.com/image/fetch/$s_!U2G_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png 1272w, https://substackcdn.com/image/fetch/$s_!U2G_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575ab8f7-5c5e-407c-8880-5b91547bfeb2_930x956.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Trade statistics comparison</figcaption></figure></div><p>The edge is almost identical. Mean return per trade: 0.99% vs 0.98%. Win rate: 69% vs 68%. Median trade: 1.4% vs 1.5%. If you stopped here, you&#8217;d think expanding the universe is free money. It isn&#8217;t. Look at the risk:</p><ul><li><p><strong>Volatility per trade jumps 37%</strong>: 6.5% vs 4.7%. Same average, much wider dispersion.</p></li><li><p><strong>The worst trade gets worse</strong>: -91.4% vs -77.0%. The left tail extends further.</p></li><li><p><strong>CVaR 5% widens</strong>: -4.1% vs -3.4%. When things go wrong, they go more wrong.</p></li><li><p><strong>The right tail explodes too</strong>: max winner goes from +40.5% to +146.2%. These aren&#8217;t clean mean-reversion trades. They&#8217;re lottery tickets &#8212; and lotteries have losers.</p></li></ul><p>Interestingly, the median skewness and semivariance ratio are actually <em>better</em> in the Russell 3000. The typical name is fine. The problem isn&#8217;t the typical name.</p><p>The conclusion is clear. The signal works just as well in the broader universe. The edge per trade is virtually unchanged. But the distribution around that edge is far wilder &#8212; and in a portfolio of 60 positions, it only takes a few blow-ups to wreck the month. The fix isn&#8217;t a better signal. It&#8217;s a better filter. We need to identify the dangerous names <em>before</em> we enter the trade &#8212; and stay away.</p><div><hr></div><h1>Same signal, safer bets</h1><p>We know the edge survives in the Russell 3000. We also know the tails are wider and more dangerous. The fix sounds simple: <strong>don&#8217;t trade names with ugly tails</strong>.</p><p>Here&#8217;s what we do. Before entering any trade, <strong>we check the stock&#8217;s rolling CVaR 5%. If the left tail is too deep, we skip it</strong>. The signal might be screaming &#8220;buy.&#8221; We don&#8217;t care. A good entry into a bad name is still a bad trade.</p><p>But filtering alone isn&#8217;t enough.</p><p>The Russell 3000 has roughly 3,000 names. Even after removing the dangerous ones, hundreds of signals fire at any given time. Taking all of them &#8212; 60 positions, like before &#8212; means diluting the portfolio into mediocre setups. The best signals get the same weight as the barely-passing ones. That&#8217;s not &#8220;more bets.&#8221; That&#8217;s more noise.</p><p>The filter tells us <em>who not to trade</em>. The position cap tells us <em>how selective to be</em>. We want both. <strong>So we filter first, then concentrate: 15 positions, drawn only from names that pass the tail-risk screen</strong>.</p><p>Let&#8217;s see what this does. Below we compare the Russell 3000 strategy with 15 positions &#8212; without and with the CVaR filter (6% threshold):</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mbeK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mbeK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png 424w, https://substackcdn.com/image/fetch/$s_!mbeK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png 848w, https://substackcdn.com/image/fetch/$s_!mbeK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png 1272w, https://substackcdn.com/image/fetch/$s_!mbeK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mbeK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png" width="942" height="1060" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1060,&quot;width&quot;:942,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:132395,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/188964115?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mbeK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png 424w, https://substackcdn.com/image/fetch/$s_!mbeK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png 848w, https://substackcdn.com/image/fetch/$s_!mbeK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png 1272w, https://substackcdn.com/image/fetch/$s_!mbeK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb707f572-ed0b-4ac6-8a50-7de7e7c1acf4_942x1060.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Russell 3000 with 15 positions: unfiltered vs. CVaR 5% filter</figcaption></figure></div><p>The filter works. Across the board:</p><ul><li><p><strong>Total return jumps 57%</strong>: 13,946% vs 8,903%. Same universe, same signal, same number of positions. The only difference is which names we avoid.</p></li><li><p><strong>Sharpe ratio leaps from 0.99 to 1.30</strong>: not by increasing return alone, but by crushing volatility &#8212; from 22.2% down to 17.7%.</p></li><li><p><strong>Max drawdown improves</strong>: -32.8% vs -36.0%. The worst month shrinks from -14.8% to -10.9%.</p></li><li><p><strong>Best month gets smaller too</strong>: 16.4% vs 25.1%. That&#8217;s a feature, not a bug. Those +25% months were the flip side of the fat tails we just removed.</p></li><li><p><strong>More positive months</strong>: 69% vs 64%. The strategy wins more often when it stops stepping on landmines.</p></li></ul><p>The story is simple. We didn&#8217;t change the signal. We didn&#8217;t change the entry or the exit. We just asked one question before every trade: <em>does this name have a history of blowing up?</em> If yes, we walk away. That single filter turned a mediocre strategy into one that rivals our S&amp;P 500 baseline &#8212; with a 1.30 Sharpe on a completely different universe.</p><p>Which raises an obvious question. What happens when we stop choosing between the two &#8212; and combine them?</p><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/more-bets-better-bets?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/more-bets-better-bets?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/more-bets-better-bets?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h1>More bets, better bets</h1><p>We started with a question: can we trade more without trading worse? The answer is yes &#8212; but only if we&#8217;re selective. We take our S&amp;P 500 baseline &#8212; 10 positions, proven edge, 1.30 Sharpe &#8212; and add 15 filtered Russell 3000 names on top. Two universes. One signal. Twenty-five positions. No landmines. Here&#8217;s what that looks like:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CocA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CocA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png 424w, https://substackcdn.com/image/fetch/$s_!CocA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png 848w, https://substackcdn.com/image/fetch/$s_!CocA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!CocA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CocA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png" width="1456" height="1385" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1385,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:178990,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/188964115?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CocA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png 424w, https://substackcdn.com/image/fetch/$s_!CocA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png 848w, https://substackcdn.com/image/fetch/$s_!CocA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!CocA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F384f26f5-5807-42e2-860d-17173d317ffb_1547x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the backtest</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eQcY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eQcY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png 424w, https://substackcdn.com/image/fetch/$s_!eQcY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png 848w, https://substackcdn.com/image/fetch/$s_!eQcY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png 1272w, https://substackcdn.com/image/fetch/$s_!eQcY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eQcY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png" width="944" height="1128" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1128,&quot;width&quot;:944,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:133398,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/188964115?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eQcY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png 424w, https://substackcdn.com/image/fetch/$s_!eQcY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png 848w, https://substackcdn.com/image/fetch/$s_!eQcY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png 1272w, https://substackcdn.com/image/fetch/$s_!eQcY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5c8ca6-ad1c-4cb1-9d22-713722bcb5c4_944x1128.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest results</figcaption></figure></div><p>The numbers speak for themselves. But let&#8217;s spell them out anyway:</p><ul><li><p><strong>$100k became $12 million.</strong> The S&amp;P 500 turned the same $100k into $760k. That&#8217;s not a comparison. That&#8217;s a different universe.</p></li><li><p><strong>23.1% annualized return &#8212; with </strong><em><strong>lower</strong></em><strong> volatility than the benchmark.</strong> 16.0% vs 18.7%. More return, less risk. That&#8217;s the whole game.</p></li><li><p><strong>Sharpe ratio: 1.38.</strong> Up from 1.30 in our S&amp;P 500-only baseline. More bets didn&#8217;t dilute the edge. They improved it.</p></li><li><p><strong>Max drawdown cut to less than half the benchmark</strong>: -23.5% vs -56.8%. During the worst moments in markets, this strategy gave back less than a half of what buy-and-hold did.</p></li><li><p><strong>Worst month: -8.0%.</strong> Compare that to the benchmark&#8217;s -16.9% &#8212; or to the unfiltered Russell 3000&#8217;s -14.8%. The filter earned its keep.</p></li><li><p><strong>72% positive months.</strong> Nearly three out of four months are winners. The S&amp;P 500-only baseline posted 65%. The benchmark: 65%.</p></li></ul><p>Compared to where we started &#8212; the S&amp;P 500 baseline with a 1.30 Sharpe &#8212; we added 2 percentage points of annual return, improved the Sharpe, and kept drawdowns in a similar range.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wX1V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wX1V!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png 424w, https://substackcdn.com/image/fetch/$s_!wX1V!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png 848w, https://substackcdn.com/image/fetch/$s_!wX1V!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png 1272w, https://substackcdn.com/image/fetch/$s_!wX1V!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wX1V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png" width="1456" height="1048" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1048,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:917305,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/188964115?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wX1V!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png 424w, https://substackcdn.com/image/fetch/$s_!wX1V!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png 848w, https://substackcdn.com/image/fetch/$s_!wX1V!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png 1272w, https://substackcdn.com/image/fetch/$s_!wX1V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49c14f65-7459-4dda-bba5-c69e2a2833f8_2146x1544.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>If we had traded this strategy since 2003:</p><ul><li><p>We would have had <strong>only one negative year</strong> (2018)<strong>;</strong></p></li><li><p>We would have beaten the S&amp;P 500 in <strong>22 out of 24 years</strong>;</p></li><li><p>We would have seen <strong>72% of the months positive</strong>, with the best at +17.2% (Nov&#8217;20);</p></li><li><p>We would have seen <strong>28% of the months negative</strong>, with the worst at -8.0% (Jan&#8217;10);</p></li><li><p>The <strong>longest</strong> <strong>positive streak</strong> would have been <strong>12 months</strong>, from May&#8217;05 to Apr&#8217;06;</p></li><li><p>The <strong>longest negative streak</strong> would have been <strong>3 months</strong>, from Feb&#8217;25 to Apr&#8217;25.</p></li></ul><p>Looking at the Fama-French 3-Factor risk model:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JOGt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JOGt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png 424w, https://substackcdn.com/image/fetch/$s_!JOGt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png 848w, https://substackcdn.com/image/fetch/$s_!JOGt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png 1272w, https://substackcdn.com/image/fetch/$s_!JOGt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JOGt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png" width="1118" height="742" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:742,&quot;width&quot;:1118,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:146518,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/188964115?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JOGt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png 424w, https://substackcdn.com/image/fetch/$s_!JOGt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png 848w, https://substackcdn.com/image/fetch/$s_!JOGt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png 1272w, https://substackcdn.com/image/fetch/$s_!JOGt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef8fb0a7-809f-4cc4-8d81-f71173ab2ab8_1118x742.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p><strong>Daily alpha of 0.069%.</strong> That compounds to roughly <strong>17.5% annualized</strong> (&#215;252 trading days). The t-stat of 9.09 makes it statistically bulletproof.</p></li><li><p><strong>Market beta of 0.65.</strong> The strategy captures about two-thirds of market moves &#8212; meaningful exposure but far from fully correlated. Lower risk than buy-and-hold.</p></li><li><p><strong>Positive SMB loading (0.12, significant).</strong> The strategy tilts toward small caps, which makes sense for a Russell 3000 mean reversion approach &#8212; more of the universe is small.</p></li><li><p><strong>HML loading is essentially zero (-0.0005, p = 0.96).</strong> No value/growth tilt at all. The edge isn&#8217;t coming from a value factor in disguise.</p></li><li><p><strong>R&#178; of 0.58.</strong> The three factors explain about 58% of the strategy&#8217;s variance. The other 42% &#8212; including the alpha &#8212; is idiosyncratic. That&#8217;s the edge.</p></li></ul><div><hr></div><h1>Final thoughts</h1><p>We started with a simple idea from Ed Thorp: if you have an edge, you want more bets. We took a proven mean reversion strategy on the S&amp;P 500 &#8212; a 1.30 Sharpe with one down year in twenty-two &#8212; and asked whether we could expand it to the Russell 3000 without losing the edge.</p><p>The naive answer was no. More stocks meant more noise, fatter tails, and worse drawdowns. But the edge per trade was still there &#8212; buried under blow-ups from dangerous names. One filter changed everything. By checking each stock&#8217;s rolling CVaR 5% before entering, we removed the landmines and kept the signal. The result: a <strong>1.38 Sharpe</strong>, <strong>23.1% annualized return</strong>, and a <strong>max drawdown less than half the benchmark&#8217;s</strong>. Not by finding a better signal. By making better bets.</p><p>There&#8217;s more to explore:</p><ul><li><p><strong>Dynamic position sizing:</strong> scaling exposure based on volatility regimes or signal strength;</p></li><li><p><strong>Sector and liquidity constraints:</strong> stress-testing the filter under real-world execution limits;</p></li><li><p><strong>Hedging overlays:</strong> applying beta hedging to further compress drawdowns without giving up alpha.</p></li></ul><p>For those who want to know more about Ed Thorp, his book <em>A Man for All Markets</em> is essential reading. The podcast episode below is a great companion. Worth every minute:</p><p>&#127911; <a href="https://open.spotify.com/episode/22qcWWLSZheEysQEbjkUKs?si=1344172c841a4fd6">Listen on Spotify</a></p><p>Thorp&#8217;s life is the blueprint for anyone chasing more than just money.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a> if you have questions, ideas, or feedback.</p><p>Cheers!</p><div><hr></div><h3>Course and Community: enrollments Open</h3><p><em>As many of you requested, the 3rd cohort of the course is <strong>now live and open for enrollment.</strong></em></p><p><em>It walks through my codebase step by step and is designed for readers who want to develop quant strategies using the same approach I&#8217;ve shared here.</em></p><p><em>You&#8217;ll find all the details&#8212;content, structure, pricing, and FAQs&#8212;at the link below. If you have any questions, feel free to reach out.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Course and Community&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Course and Community</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!X6EF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!X6EF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg 424w, https://substackcdn.com/image/fetch/$s_!X6EF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg 848w, https://substackcdn.com/image/fetch/$s_!X6EF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!X6EF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!X6EF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg" width="1456" height="1071" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1071,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:485099,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/188964115?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!X6EF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg 424w, https://substackcdn.com/image/fetch/$s_!X6EF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg 848w, https://substackcdn.com/image/fetch/$s_!X6EF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!X6EF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb6495b4-fc2d-4258-8aec-4d62d30d2496_2140x1574.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Enrollment also includes access to the private community and an ever-growing library of study groups.</em></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Portfolio Optimization]]></title><description><![CDATA[Coding Mean-Variance Optimization to +1.7 Sharpe]]></description><link>https://www.quantitativo.com/p/portfolio-optimization</link><guid isPermaLink="false">https://www.quantitativo.com/p/portfolio-optimization</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Tue, 20 Jan 2026 13:03:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!k9Ks!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k9Ks!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k9Ks!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png 424w, https://substackcdn.com/image/fetch/$s_!k9Ks!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png 848w, https://substackcdn.com/image/fetch/$s_!k9Ks!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!k9Ks!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k9Ks!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png" width="1456" height="960" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:960,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2586806,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/185151364?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k9Ks!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png 424w, https://substackcdn.com/image/fetch/$s_!k9Ks!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png 848w, https://substackcdn.com/image/fetch/$s_!k9Ks!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png 1272w, https://substackcdn.com/image/fetch/$s_!k9Ks!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe66fc80f-8e96-4b2c-b532-1a4878847e4f_2048x1350.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Harry Markowitz, Nobel-Winning Pioneer of Modern Portfolio Theory</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;An investor who knew future returns with certainty would invest in only one security.&#8221; &#8212; Harry Markowitz</p></blockquote><p>We don&#8217;t know the future. This is why we intuitively spread our bets. Harry Markowitz turned that intuition into algebra. In 1952, he published a paper that gave diversification a rigorous mathematical foundation, proving not just that it works, but exactly how much of each asset to hold given your tolerance for risk. The Nobel committee caught up with him in 1990. His <a href="https://www.nobelprize.org/uploads/2018/06/markowitz-lecture.pdf">Nobel lecture</a> is worth reading.</p><p>The idea for this article came to me while I was reading a new paper titled &#8220;<a href="https://arxiv.org/abs/2504.06566">Diffusion Factor Models.</a>&#8221; The paper addresses one of the main problems of naive Mean-Variance Optimization: estimation error arising from unreliable sample means and covariances when the number of assets exceeds the number of available observations.</p><p>The authors&#8217; proposed solution is elegant. Rather than directly estimating moments from limited data, they <strong>train a diffusion model that learns the underlying factor structure of asset returns</strong>, then <strong>generate abundant synthetic samples</strong> to obtain <strong>more stable estimates</strong>. This approach effectively trades a small modeling bias for a substantial reduction in estimation variance, achieving Sharpe ratios nearly <strong>three times higher than equal-weight</strong> benchmarks (1.36 vs. 0.49) and dramatically <strong>outperforming traditional shrinkage methods</strong>, which produced negative returns in the same test period.</p><p>In fact, the paper provides direct evidence of an important insight in portfolio optimization: <strong>accurate covariance estimation matters more than accurate mean estimation for portfolio performance</strong>. Their hybrid methods reveal this clearly: combining naive sample means with diffusion-generated covariances achieves a Sharpe ratio of 1.09, while the reverse &#8212; diffusion-generated means with naive sample covariances &#8212; yields only 0.28.</p><p>But I&#8217;m not writing about that paper this week. I&#8217;m going to test their method first, then come back to it later this year. <strong>This week is about classic Mean-Variance Optimization</strong>. We have to crawl before we walk.</p><p>Our problem is simpler: <strong>allocating capital across a handful of substrategies rather than hundreds of individual assets</strong>. In our setting, estimating means and covariances won&#8217;t be a problem; we&#8217;ll have far more observations than parameters to estimate.</p><p>Here&#8217;s the plan:</p><ol><li><p>First, we&#8217;ll introduce the set of strategies we want to combine.</p></li><li><p>Next, we&#8217;ll establish a baseline using an equal-weight allocation.</p></li><li><p>Then, we&#8217;ll implement mean-variance optimization in Python.</p></li><li><p>Finally, we&#8217;ll evaluate the results and outline the next steps.</p></li></ol><div><hr></div><p><em>We&#8217;re building a private community for systematic traders. A place to explore ideas, exchange insights, and tackle the real technical and strategic challenges of building robust trading systems&#8230; from signal research to execution and risk.</em></p><p><em>Enrollment reopens at the end of this month. Join the waitlist below to be the first to know when new seats open:</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Waitlist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Waitlist</span></a></p><div><hr></div><p><em>Speaking of great reads, there&#8217;s a new Substack I&#8217;d recommend:</em></p><div class="embedded-publication-wrap" data-attrs="{&quot;id&quot;:7252718,&quot;name&quot;:&quot;Systematic Long Short&quot;,&quot;logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!NyAB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a8da33f-314a-469c-a2f3-246ce6814b86_400x400.png&quot;,&quot;base_url&quot;:&quot;https://www.systematiclongshort.com&quot;,&quot;hero_text&quot;:&quot;I&#8217;m an entrepreneur and systematic portfolio manager. I&#8217;ve sat in the PM seat at pod shops and managed real money at scale and seen how the sausage gets made. I want to help you understand how the game is played at the highest levels.&quot;,&quot;author_name&quot;:&quot;Systematic Long Short&quot;,&quot;show_subscribe&quot;:true,&quot;logo_bg_color&quot;:&quot;#171717&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPublicationToDOMWithSubscribe"><div class="embedded-publication show-subscribe"><a class="embedded-publication-link-part" native="true" href="https://www.systematiclongshort.com?utm_source=substack&amp;utm_campaign=publication_embed&amp;utm_medium=web"><img class="embedded-publication-logo" src="https://substackcdn.com/image/fetch/$s_!NyAB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a8da33f-314a-469c-a2f3-246ce6814b86_400x400.png" width="56" height="56" style="background-color: rgb(23, 23, 23);"><span class="embedded-publication-name">Systematic Long Short</span><div class="embedded-publication-hero-text">I&#8217;m an entrepreneur and systematic portfolio manager. I&#8217;ve sat in the PM seat at pod shops and managed real money at scale and seen how the sausage gets made. I want to help you understand how the game is played at the highest levels.</div></a><form class="embedded-publication-subscribe" method="GET" action="https://www.systematiclongshort.com/subscribe?"><input type="hidden" name="source" value="publication-embed"><input type="hidden" name="autoSubmit" value="true"><input type="email" class="email-input" name="email" placeholder="Type your email..."><input type="submit" class="button primary" value="Subscribe"></form></div></div><p><em>I&#8217;ve found several of his articles genuinely insightful. Hope you enjoy them as much as I do.</em></p><div><hr></div><h1>The portfolio we&#8217;re actually optimizing</h1><p>In our last article (<em><a href="https://www.quantitativo.com/p/murphys-law">Murphy&#8217;s Law</a></em>), we stress-tested a simple mean-reversion system and treated &#8220;anything that can go wrong will go wrong&#8221; as a design principle: assume failure modes exist, then engineer around them. Here&#8217;s the summary of what we did:</p><ul><li><p><strong>Base strategy (mean reversion in liquid equities):</strong> when a stock suffers a statistically extreme short-term drop, we buy the dislocation (with simple regime filters like &#8220;in an uptrend&#8221; and a low short-term QPI), then hold briefly for the rebound.</p></li><li><p><strong>Better entry timing:</strong> instead of waiting for the next open, we test entering at the <strong>close</strong> to capture the earliest part of the rebound and reduce &#8220;gap risk&#8221; around the entry.</p></li><li><p><strong>Signal refinements:</strong> we progressively tighten what qualifies as a &#8220;good&#8221; dislocation (stronger/cleaner setups, better regime constraints, fewer low-quality events).</p></li><li><p><strong>Walk-forward research loop:</strong> parameters are selected <strong>out-of-sample</strong> via rolling walk-forward tests (train &#8594; validate &#8594; deploy), rather than tuned once on the full history.</p></li><li><p><strong>Ensemble mindset:</strong> instead of betting on one &#8220;best&#8221; parameter set, we combine a <strong>small basket of strong variants</strong> to reduce overfitting and smooth performance.</p></li></ul><h2>Different universes</h2><p>An easy way to diversify this kind of system is to run the same playbook in other markets. Let&#8217;s see how it behaves across three universes:</p><ol><li><p><strong>US:</strong> S&amp;P 500 constituents (last week&#8217;s setup, max of 10 positions)</p></li><li><p><strong>Canada:</strong> S&amp;P/TSX Composite constituents (max of 5 positions)</p></li><li><p><strong>Australia:</strong> S&amp;P/ASX 200 constituents (max of 5 positions)</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3yL0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3yL0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png 424w, https://substackcdn.com/image/fetch/$s_!3yL0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png 848w, https://substackcdn.com/image/fetch/$s_!3yL0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png 1272w, https://substackcdn.com/image/fetch/$s_!3yL0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3yL0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png" width="1038" height="1068" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1068,&quot;width&quot;:1038,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:317919,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/185151364?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3yL0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png 424w, https://substackcdn.com/image/fetch/$s_!3yL0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png 848w, https://substackcdn.com/image/fetch/$s_!3yL0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png 1272w, https://substackcdn.com/image/fetch/$s_!3yL0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93e7cdc-a114-49db-8508-04a4c3baa97c_1038x1068.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary results of MR strategy from Murphy's Law article applied to 3 different geographies</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GDM5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GDM5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png 424w, https://substackcdn.com/image/fetch/$s_!GDM5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png 848w, https://substackcdn.com/image/fetch/$s_!GDM5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png 1272w, https://substackcdn.com/image/fetch/$s_!GDM5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GDM5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png" width="870" height="336" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:336,&quot;width&quot;:870,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:48000,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/185151364?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GDM5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png 424w, https://substackcdn.com/image/fetch/$s_!GDM5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png 848w, https://substackcdn.com/image/fetch/$s_!GDM5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png 1272w, https://substackcdn.com/image/fetch/$s_!GDM5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe69aa371-4623-413c-89d2-c97b17e0d87f_870x336.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Correlations across geographies</figcaption></figure></div><p>In summary:</p><ul><li><p><strong>The approach works in all three markets:</strong> ~<strong>17&#8211;21%</strong> annualized returns with <strong>~1.0&#8211;1.3 Sharpe</strong> across US/Canada/Australia (since 2010).</p></li><li><p><strong>The trade-off:</strong> outside the US we earn comparable performance, but with materially deeper drawdowns (<strong>~-33% to -35%</strong> vs <strong>-19%</strong> in the US).</p></li><li><p><strong>Diversification benefits will be strong:</strong> cross-geo correlations are <strong>very low</strong> &#8212; <strong>US-Canada 0.08</strong>, <strong>Canada-Australia 0.10</strong>, and even the highest pair (<strong>US-Australia</strong>) is only <strong>0.38</strong>.</p></li></ul><p>I&#8217;m starting the tests in 2010 (instead of 2003) because the strategy is <em>extremely</em> profitable pre-2010 in Canada and Australia, and I don&#8217;t want the results to be dominated by that unusual period.</p><div><hr></div><h1>Baseline: equal-weight portfolio</h1><p>Now let&#8217;s see what happens with the naive approach: equal weights across strategies, rebalanced annually:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jKsR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jKsR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!jKsR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!jKsR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!jKsR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jKsR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:680272,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/185151364?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jKsR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!jKsR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!jKsR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!jKsR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4df3db7-73b1-498a-aba9-609e23ad0083_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity &amp; drawdown curves for the baseline</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FMpb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FMpb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png 424w, https://substackcdn.com/image/fetch/$s_!FMpb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png 848w, https://substackcdn.com/image/fetch/$s_!FMpb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png 1272w, https://substackcdn.com/image/fetch/$s_!FMpb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FMpb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png" width="944" height="1132" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1132,&quot;width&quot;:944,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:269842,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/185151364?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FMpb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png 424w, https://substackcdn.com/image/fetch/$s_!FMpb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png 848w, https://substackcdn.com/image/fetch/$s_!FMpb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png 1272w, https://substackcdn.com/image/fetch/$s_!FMpb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34945c8e-8a44-4b12-81c3-14e083a1e939_944x1132.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest stats</figcaption></figure></div><ul><li><p><strong>Volatility collapses with diversification:</strong> the equal-weight portfolio runs at <strong>10.9% vol</strong>, versus <strong>13.8% (US)</strong>, <strong>16.8% (Canada)</strong>, and <strong>16.4% (Australia).</strong> This is a big drop in risk despite holding three &#8220;risky&#8221; sleeves.</p></li><li><p><strong>Sharpe jumps meaningfully:</strong> <strong>1.66</strong> for the equal-weight portfolio vs <strong>1.27 (US)</strong>, <strong>1.04 (Canada)</strong>, <strong>1.26 (Australia).</strong> &#8220;Same-ish returns, much lower variance&#8221; effect.</p></li><li><p><strong>Returns stay high while risk falls:</strong> annualized return is <strong>19.1%</strong>, right in the middle of the single-country range (<strong>17.4%-21.2%</strong>), but achieved with far less volatility.</p></li><li><p><strong>Drawdowns become much more manageable than the worst sleeves:</strong> max DD is -<strong>21.4%,</strong> close to the US (-<strong>19.4%</strong>) but dramatically better than <strong>Canada (-35.3%)</strong> and <strong>Australia (-32.5%)</strong>.</p></li><li><p><strong>More consistent month-to-month:</strong> <strong>70%</strong> positive months vs <strong>67% (US)</strong>, <strong>65% (Canada)</strong>, <strong>68% (Australia)</strong>, and the worst month improves to -<strong>8.5%</strong> (vs -<strong>12.8%</strong> Canada and -<strong>19.1%</strong> Australia).</p></li></ul><p>Now, let&#8217;s see how to implement Mean-Variance Optimization.</p><div><hr></div><h1>Mean-variance optimization</h1><h2>The Basics</h2><p>The goal of mean-variance optimization is to find the portfolio weights that maximize risk-adjusted returns. Markowitz framed this as a tradeoff: we want high expected returns, but we also want to avoid volatility. The question is how to balance the two.</p><p>The standard formulation maximizes a utility function:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\max_{\\omega} \\quad \\omega^\\top \\mu - \\frac{\\eta}{2} \\omega^\\top \\Sigma \\omega&quot;,&quot;id&quot;:&quot;CNZKBTTRZY&quot;}" data-component-name="LatexBlockToDOM"></div><p>where:</p><ul><li><p>$\omega$ is the vector of portfolio weights</p></li><li><p>$\mu$ is the vector of expected returns (annualized)</p></li><li><p>$\Sigma$ is the covariance matrix of returns (annualized)</p></li><li><p>$\eta$ is the risk aversion parameter</p></li></ul><p>The first term, $\omega^\top \mu$, is the portfolio&#8217;s expected return. The second term, $\omega^\top \Sigma \omega$, is the portfolio&#8217;s variance. The risk aversion parameter $\eta$ controls how aggressively we penalize volatility. A higher $\eta$ means we&#8217;re more conservative: we&#8217;ll accept lower returns to avoid risk. Typical values range from 2 to 5.</p><p>We also impose constraints. The weights must sum to one (we&#8217;re fully invested), and we can set minimum and maximum bounds on individual weights to prevent extreme concentrations:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\sum_i \\omega_i = 1, \\quad \\omega_{\\min} \\leq \\omega_i \\leq \\omega_{\\max}&quot;,&quot;id&quot;:&quot;VMCMHLDVLX&quot;}" data-component-name="LatexBlockToDOM"></div><p>The implementation below uses <code>scipy.optimize.minimize</code> to solve this problem numerically. It also includes two optional refinements: Ledoit-Wolf shrinkage for the covariance matrix, and mean shrinkage that pulls return estimates toward their cross-sectional average. These regularization techniques can help when estimation error is a concern (though in our case, with only a handful of substrategies and years of daily data, they&#8217;re more of a safeguard than a necessity).</p><h2>The code</h2><p>The code is pretty straightforward:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PHf-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PHf-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png 424w, https://substackcdn.com/image/fetch/$s_!PHf-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png 848w, https://substackcdn.com/image/fetch/$s_!PHf-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png 1272w, https://substackcdn.com/image/fetch/$s_!PHf-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PHf-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png" width="1004" height="3368" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3368,&quot;width&quot;:1004,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:649966,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/185151364?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PHf-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png 424w, https://substackcdn.com/image/fetch/$s_!PHf-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png 848w, https://substackcdn.com/image/fetch/$s_!PHf-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png 1272w, https://substackcdn.com/image/fetch/$s_!PHf-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F239a05cb-ae09-4896-958c-45e3ca2a2a8b_1004x3368.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Results</h2><p>Now we can put the code above into a simple walk-forward loop: each year, we look back over the previous four years of daily returns, estimate the optimal weights, and then hold those weights fixed for the next year. We repeat this process as we roll forward through time.</p><p>Here&#8217;s what we get with minimum weight 0, maximum weight 60%:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kMak!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kMak!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!kMak!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!kMak!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!kMak!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kMak!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:674830,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/185151364?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kMak!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!kMak!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!kMak!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!kMak!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd21e5145-78ce-4e96-b771-fad0f42e7af9_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity &amp; drawdown curves for the MVO portfolio</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!y0aH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!y0aH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png 424w, https://substackcdn.com/image/fetch/$s_!y0aH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png 848w, https://substackcdn.com/image/fetch/$s_!y0aH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!y0aH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!y0aH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png" width="942" height="1134" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1134,&quot;width&quot;:942,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:269248,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/185151364?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!y0aH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png 424w, https://substackcdn.com/image/fetch/$s_!y0aH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png 848w, https://substackcdn.com/image/fetch/$s_!y0aH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!y0aH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73ac2f20-2267-43df-a4c1-8de2627ab537_942x1134.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest stats</figcaption></figure></div><p>Highlights:</p><ul><li><p><strong>Higher return, same ballpark risk:</strong> MVO lifts annualized return to <strong>23.1%</strong> vs <strong>19.1%</strong> for equal-weights, while volatility stays low at <strong>12.2%</strong> (vs <strong>10.9%</strong>).</p></li><li><p><strong>Sharpe improves even with slightly higher vol:</strong> <strong>1.76</strong> for MVO vs <strong>1.66</strong> for equal-weights, i.e., we&#8217;re getting <em>more return per unit of risk</em> despite taking a bit more volatility.</p></li><li><p><strong>Much higher terminal wealth:</strong> $100k grows to <strong>$3.04M</strong> under MVO vs <strong>$1.75M</strong> under equal-weights (same 2010-2026 window).</p></li><li><p><strong>Drawdowns don&#8217;t get worse:</strong> max drawdown is essentially unchanged/slightly better at -<strong>20.7%</strong> vs -<strong>21.4%</strong> for equal-weights, so the return boost didn&#8217;t come from accepting materially larger drawdowns.</p></li><li><p><strong>Month-to-month consistency is the same:</strong> <strong>70%</strong> positive months for both. The edge shows up mainly in the <em>magnitude</em> of gains, not a higher hit rate.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UamQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UamQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png 424w, https://substackcdn.com/image/fetch/$s_!UamQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png 848w, https://substackcdn.com/image/fetch/$s_!UamQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png 1272w, https://substackcdn.com/image/fetch/$s_!UamQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UamQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png" width="1456" height="731" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:731,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1697236,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/185151364?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UamQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png 424w, https://substackcdn.com/image/fetch/$s_!UamQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png 848w, https://substackcdn.com/image/fetch/$s_!UamQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png 1272w, https://substackcdn.com/image/fetch/$s_!UamQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c452452-9c64-41d8-a340-c732d0127e1c_2048x1028.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Annual and monthly returns</figcaption></figure></div><p>If we look at the <strong>monthly return distribution</strong> (2010-2026, <strong>193 months</strong>):</p><ul><li><p><strong>70% of months were positive</strong>, with an average gain of <strong>+3.7%</strong>; <strong>30% were negative</strong>, averaging -<strong>2.5%</strong>.</p></li><li><p>The <strong>best month</strong> was <strong>+10.5%</strong> and the <strong>worst month</strong> was -<strong>9.0%</strong>.</p></li><li><p>The &#8220;typical&#8221; month is strong: <strong>median = +2.0%</strong>; the middle 50% of outcomes sits between -<strong>0.5% (25th pct)</strong> and <strong>+4.3% (75th pct)</strong>.</p></li><li><p>Volatility at the monthly level is moderate: <strong>std = 3.6%</strong>, with an overall <strong>mean = +1.85%</strong> per month.</p></li><li><p><strong>Streaks:</strong> the longest positive streak was <strong>21 months</strong> (<strong>Jun&#8217;12 &#8594; Feb&#8217;14</strong>); the longest negative streak was <strong>3 months</strong> (<strong>Feb&#8217;25 &#8594; Apr&#8217;25</strong>).</p></li><li><p>The distribution is mildly asymmetric: <strong>skew = -0.40</strong> (slightly more downside tail), with <strong>kurtosis = 0.22</strong> (not especially fat-tailed).</p></li></ul><p>Looking at the Fama-French 3-Factor risk model:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BjLE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BjLE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png 424w, https://substackcdn.com/image/fetch/$s_!BjLE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png 848w, https://substackcdn.com/image/fetch/$s_!BjLE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png 1272w, https://substackcdn.com/image/fetch/$s_!BjLE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BjLE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png" width="1118" height="738" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:738,&quot;width&quot;:1118,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:285476,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/185151364?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BjLE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png 424w, https://substackcdn.com/image/fetch/$s_!BjLE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png 848w, https://substackcdn.com/image/fetch/$s_!BjLE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png 1272w, https://substackcdn.com/image/fetch/$s_!BjLE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe24f6cc6-cf53-4cc7-9fb7-fe8578195e09_1118x738.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p><strong>Alpha:</strong> <strong>0.0605% per day</strong> &#8594; annualized &#8776; <strong>15%</strong>, <strong>highly significant</strong> (<strong>t = 5.70</strong>, <strong>p &lt; 0.001</strong>): strong abnormal returns not explained by FF3 factors.</p></li><li><p><strong>Market beta (Mkt&#8211;RF):</strong> <strong>0.346</strong>, <strong>highly significant</strong> (<strong>t = 35.19</strong>, <strong>p &lt; 0.001</strong>): meaningful, but not huge, exposure to the equity market (about one-third beta).</p></li><li><p><strong>SMB (Size):</strong> <strong>0.0215</strong>, <strong>insignificant</strong> (<strong>t = 1.21</strong>, <strong>p = 0.228</strong>): no reliable size tilt.</p></li><li><p><strong>HML (Value):</strong> <strong>0.0129</strong>, <strong>insignificant</strong> (<strong>t = 0.95</strong>, <strong>p = 0.343</strong>): no reliable value/growth tilt.</p></li><li><p><strong>Explained variation:</strong> <strong>R&#178; = 0.256</strong>: FF3 explains ~<strong>26%</strong> of daily return variation; the majority is still strategy-specific.</p></li></ul><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/portfolio-optimization?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/portfolio-optimization?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/portfolio-optimization?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h1>Final thoughts</h1><p>We started with Markowitz&#8217;s 70-year-old insight &#8212; that diversification isn&#8217;t just intuition, it&#8217;s algebra &#8212; and applied it to a simple problem: allocating capital across three geographic variants of a mean-reversion strategy.</p><p>The results speak for themselves. Even the naive equal-weight portfolio delivered a +1.6 Sharpe by exploiting the remarkably low correlations across markets. But mean-variance optimization pushed it further: 23.1% annualized returns, a +1.76 Sharpe, without increasing drawdowns. The Fama-French regression confirmed what we hoped: a highly significant annualized alpha, minimal factor exposure, and only 26% of returns explained by standard risk factors. The rest is ours.</p><p>This is just the beginning. There&#8217;s plenty of room to explore:</p><ul><li><p><strong>More sleeves:</strong> add new geographies, signals, or timeframes to increase diversification degrees of freedom.</p></li><li><p><strong>Smarter constraints:</strong> cap turnover, limit year-to-year weight changes, or impose risk budgets per sleeve to reduce allocation whiplash.</p></li><li><p><strong>Risk overlays:</strong> simple beta hedging or volatility targeting can further stabilize the equity curve.</p></li></ul><p>Markowitz was right: if we knew the future, we&#8217;d bet everything on one horse. We don&#8217;t, so we diversify, optimize, and let the math do the heavy lifting.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a> if you have questions, ideas, or feedback.</p><p>Cheers!</p><div><hr></div><p><em>We&#8217;re building a private community for systematic traders. A place to explore ideas, exchange insights, and tackle the real technical and strategic challenges of building robust trading systems&#8230; from signal research to execution and risk.</em></p><p><em>Enrollment reopens at the end of this month. Join the waitlist below to be the first to know when new seats open:</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Waitlist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Waitlist</span></a></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Murphy's Law]]></title><description><![CDATA[How a fragile mean-reversion idea became a +1.2 Sharpe strategy]]></description><link>https://www.quantitativo.com/p/murphys-law</link><guid isPermaLink="false">https://www.quantitativo.com/p/murphys-law</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Tue, 09 Dec 2025 16:31:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!PUut!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PUut!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PUut!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png 424w, https://substackcdn.com/image/fetch/$s_!PUut!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png 848w, https://substackcdn.com/image/fetch/$s_!PUut!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png 1272w, https://substackcdn.com/image/fetch/$s_!PUut!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PUut!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png" width="1200" height="797" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/99ce73a7-2481-40d6-9618-14124036035c_1200x797.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:797,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1581264,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PUut!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png 424w, https://substackcdn.com/image/fetch/$s_!PUut!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png 848w, https://substackcdn.com/image/fetch/$s_!PUut!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png 1272w, https://substackcdn.com/image/fetch/$s_!PUut!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F99ce73a7-2481-40d6-9618-14124036035c_1200x797.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">MQ-1 Predator multi-role UAV</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;Anything that can go wrong, will go wrong.&#8221;</p><p>&#8212; Major Edward A. Murphy Jr., aerospace engineer</p></blockquote><p>A few days ago in Abu Dhabi, I met an old friend I hadn&#8217;t seen since our graduation. We were among the very few aerospace engineers trained in our home country that year. After a few years serving in the Air Force (I went straight into civilian life, he didn&#8217;t), he eventually moved on: first into quantitative hedge funds, and later back into hardcore engineering &#8212; his true passion. Today, he&#8217;s developing defense drones in the UAE.</p><p><em>&#8220;Why do aerospace engineers adapt well to quantitative hedge funds?&#8221;</em> one of us asked.</p><p>For an airplane to fly, it isn&#8217;t enough to get one or two big things right: you need a thousand details to line up. A quantitative strategy is no different: profitability comes from getting a thousand details right. We settled on this hypothesis (five years of nonstop hardcore math and coding might have helped a bit, too :)).</p><p>Last week reminded me of one of the most famous aerospace engineers: Major Edward A. Murphy Jr. The man built safety-critical systems&#8230; and gifted the world the immortal line (which later became <em>Murphy&#8217;s Law</em>), <em>&#8220;Anything that can go wrong, will go wrong.&#8221;</em> One of the first strategies I wrote about here decided to take that literally &#8212; November was brutal for it.</p><p>Many people mistake him for a cosmic pessimist or a fatalist. But when he taught his students, <em>&#8220;If something can go wrong, it will,&#8221;</em> he meant that <strong>you should identify everything that could go wrong and fix it so that nothing does go wrong.</strong></p><p>This week, instead of dissecting yet another research paper (my last three implementations were so far off from what the authors claimed that I&#8217;m starting to wonder who is writing these papers&#8230;), let&#8217;s talk about how to fix a strategy by getting a thousand details right. Well, maybe not a thousand, but certainly more than a few.</p><p>Here&#8217;s the plan:</p><ol><li><p>A quick review of the base strategy and a look at what went wrong</p></li><li><p>A tour through the &#8220;more-than-a-few&#8221; improvements</p></li><li><p>Results &#8212; because that&#8217;s what matters in the end</p></li><li><p>And as always, a few closing thoughts and the next steps</p></li></ol><p>Let&#8217;s get to it.</p><div><hr></div><h2>Study Group</h2><p><em>Our last study group was a success. Thank you to all community members who joined live! For those who couldn&#8217;t, I will post the code and the recording on <a href="http://learn.quantitativo.com">learn.quantitativo.com</a>, as usual, in the next few days. The TAA strategy we reviewed is up almost 40% this year.</em></p><p><em>Lately, our community has shown interest in a wide range of topics on the forum. As usual, I&#8217;ll post a survey on <a href="http://connect.quantitativo.com/">connect.quantitativo.com</a> so everyone can vote on the topic for the next study group.</em></p><p><em>I know I said I would reopen enrollments in December&#8230; but I am completely swamped with work, so I&#8217;ll reopen enrollments in January 2026. The waitlist already has a few hundred people. Join it below to be the first to know when new seats open:</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Waitlist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Waitlist</span></a></p><div><hr></div><h1>What is wrong with this strategy</h1><p>The strategy we&#8217;re about to improve is the one described in the article <em><a href="https://www.quantitativo.com/p/a-mean-reversion-strategy-from-first">A Mean Reversion Strategy from First Principles Thinking</a></em> (using only the long-only version for simplicity).</p><p>The idea is straightforward: the strategy aims to capture short-term price dislocations in S&amp;P 500 constituents. Whenever a stock experiences a drop that is statistically unlikely (below a certain quantile of its own 5-year return distribution), we open a long position. The trade is closed once the stock reverts.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7FcN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7FcN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png 424w, https://substackcdn.com/image/fetch/$s_!7FcN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png 848w, https://substackcdn.com/image/fetch/$s_!7FcN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png 1272w, https://substackcdn.com/image/fetch/$s_!7FcN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7FcN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png" width="1456" height="841" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:841,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:154108,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7FcN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png 424w, https://substackcdn.com/image/fetch/$s_!7FcN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png 848w, https://substackcdn.com/image/fetch/$s_!7FcN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png 1272w, https://substackcdn.com/image/fetch/$s_!7FcN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143eab61-7ccb-41ab-b952-e5ccc862900d_2000x1155.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">3-day returns distribution of Apple, looking back 5 years on Jan-21st 2022</figcaption></figure></div><p>Here&#8217;s the performance of the backtest + live since November last year, up-to-date:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3DxH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3DxH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!3DxH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!3DxH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!3DxH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3DxH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:668785,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3DxH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!3DxH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!3DxH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!3DxH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0788b2-aea4-481c-9f4f-fb19f47266e9_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves from the original strategy</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7efb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7efb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png 424w, https://substackcdn.com/image/fetch/$s_!7efb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png 848w, https://substackcdn.com/image/fetch/$s_!7efb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png 1272w, https://substackcdn.com/image/fetch/$s_!7efb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7efb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png" width="958" height="1142" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1142,&quot;width&quot;:958,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:277534,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7efb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png 424w, https://substackcdn.com/image/fetch/$s_!7efb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png 848w, https://substackcdn.com/image/fetch/$s_!7efb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png 1272w, https://substackcdn.com/image/fetch/$s_!7efb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9fd2fc-d6bd-47f4-8738-c6c0cd15e8ff_958x1142.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Strategy overall results</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e3w-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e3w-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png 424w, https://substackcdn.com/image/fetch/$s_!e3w-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png 848w, https://substackcdn.com/image/fetch/$s_!e3w-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png 1272w, https://substackcdn.com/image/fetch/$s_!e3w-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e3w-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png" width="1456" height="929" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:929,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2452456,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!e3w-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png 424w, https://substackcdn.com/image/fetch/$s_!e3w-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png 848w, https://substackcdn.com/image/fetch/$s_!e3w-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png 1272w, https://substackcdn.com/image/fetch/$s_!e3w-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29bad6be-232e-4749-b24a-46229f7f4dc7_2048x1307.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns from the original strategy</figcaption></figure></div><p>Even at first glance, the strategy has several undesirable characteristics:</p><ul><li><p>Yes, it outperforms the S&amp;P 500, but the Sharpe ratio isn&#8217;t even 1.0</p></li><li><p>The maximum drawdown is less than half of the benchmark, but at 27% it&#8217;s still too high</p></li><li><p>The average annual drawdown is 15.1% &#8212; actually higher than the S&amp;P 500&#8217;s 14.6%</p></li><li><p>The strategy&#8217;s volatility is 21.6%, higher than the benchmark</p></li><li><p>The strategy has a high correlation to the market at 0.64</p></li></ul><p>And November was rough: the strategy returned &#8211;7.7% while the market was essentially flat.</p><h2>Why did this happen in November?</h2><p>Looking at the individual trades, several were AI-related names (AMD -13%, DELL -12%, ORCL -9%). With only ~20 trades in November, these outsized losses dominated the month&#8217;s results.</p><p>It&#8217;s important to remember that this strategy is designed to profit from short-term statistical dislocations. When a stock undergoes a <strong>fundamental</strong> repricing, the signal may not mean-revert &#8212; because the price change is justified. The system cannot distinguish between:<br>i) non-fundamental dislocations, and<br>ii) fundamentally-driven moves.</p><p>It captures all statistically significant drops, regardless of their cause.</p><p>In November, we saw an unusually high share of fundamental-driven declines, which explains the deviation in performance.</p><h2>What can we do to fix?</h2><p>In essence, there are four levers we can pull:</p><ol><li><p><strong>Signal quality</strong> &#8594; Improve predictive power by separating noise-driven drops from fundamental repricings</p></li><li><p><strong>Execution logic</strong> &#8594; Sharpen timing, sizing, and exit rules</p></li><li><p><strong>Breadth / Diversification</strong> &#8594; Increase the number of independent bets (more slots)</p></li><li><p><strong>Risk overlay</strong> &#8594; Hedge unwanted factor exposures (&#946;, size, momentum, sector, etc.)</p></li></ol><p>In this article, we will focus primarily on (1) and (2). We&#8217;ll go deeper on (1), and address (3) and (4) in subsequent pieces. <strong>Our goal is to reach a Sharpe ratio of at least 1.5 and cut the maximum drawdown in half.</strong></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h1>Improving the edge</h1><h2>A) Baseline</h2><p>Let&#8217;s start by improving the edge &#8212; and for that, we need a baseline to compare our experiments against. What would have happened if we had simply bought every event where a stock had:</p><ul><li><p>a <strong>price drop</strong>,</p></li><li><p>a 3-day QPI <strong>below 15</strong>,</p></li><li><p>a <strong>closing price above its 200-day simple moving average</strong> (i.e., the stock was in an uptrend),</p></li><li><p>and then <strong>held the position for 5 days</strong>?</p></li></ul><p>This is exactly how we measured the edge in the original article. Here are the stats:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Jeta!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jeta!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png 424w, https://substackcdn.com/image/fetch/$s_!Jeta!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png 848w, https://substackcdn.com/image/fetch/$s_!Jeta!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png 1272w, https://substackcdn.com/image/fetch/$s_!Jeta!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jeta!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png" width="1292" height="726" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:726,&quot;width&quot;:1292,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:168979,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Jeta!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png 424w, https://substackcdn.com/image/fetch/$s_!Jeta!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png 848w, https://substackcdn.com/image/fetch/$s_!Jeta!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png 1272w, https://substackcdn.com/image/fetch/$s_!Jeta!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce83e564-f6f9-463e-bace-bac120d45d49_1292x726.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Statistics of buying all events when a stock drops its price, its QP drops below 15, and holding for 5 days</figcaption></figure></div><p>In summary:</p><ul><li><p><strong>Win rate:</strong> 57% of the ~95,000 trades were winners (the sample includes only S&amp;P 500 constituents at each point in time to avoid survivorship bias).</p></li><li><p><strong>Expected return per trade:</strong> +0.56% overall (winners averaged +3.6%, losers averaged &#8211;3.4%).</p></li><li><p><strong>Distribution:</strong> The median trade was +0.6%, with fairly balanced upside/downside tails (max +69.7%, min &#8211;58.7%).</p></li></ul><h2>B) Trading at the close</h2><p>The first improvement was actually proposed by someone in the community a while ago: <strong>entering trades at the close instead of at the next day&#8217;s open.</strong></p><p>This can make sense because many mean-reversion signals are strongest <em>at the moment of the dislocation.</em> By the next morning, part of the move may have already reverted, reducing the available edge. Here&#8217;s the data:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!widw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!widw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png 424w, https://substackcdn.com/image/fetch/$s_!widw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png 848w, https://substackcdn.com/image/fetch/$s_!widw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png 1272w, https://substackcdn.com/image/fetch/$s_!widw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!widw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png" width="1290" height="734" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:734,&quot;width&quot;:1290,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:170858,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!widw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png 424w, https://substackcdn.com/image/fetch/$s_!widw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png 848w, https://substackcdn.com/image/fetch/$s_!widw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png 1272w, https://substackcdn.com/image/fetch/$s_!widw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4852a127-77ba-4d0b-b749-ddf291f8d64b_1290x734.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">First improvement: trading at the close</figcaption></figure></div><ul><li><p><strong>Win rate improved:</strong> 57% winners (vs. 57% before, but with a slightly better distribution of outcomes).</p></li><li><p><strong>Expected return per trade increased:</strong> +0.64% per trade (vs. +0.60% in the baseline).</p></li><li><p><strong>Winners were slightly stronger:</strong> average winner now +3.70% (vs. +3.60%), while losers remained roughly the same (&#8211;3.49%).</p></li><li><p><strong>Statistically significant improvement:</strong> a statistical test shows the new return distribution differs from the baseline (t-stat = <strong>3.37</strong>, p = <strong>0.00062</strong>).</p></li></ul><h2>C) Improving the entry</h2><p>The next improvement targets the entry signal itself. In addition to the existing conditions (a statistically significant price drop and the stock trading above its 200-day SMA), we now add one more filter: <strong>IBS (Internal Bar Strength)</strong>. Specifically, we require <strong>IBS &lt; 0.10</strong>, meaning the stock closed in the bottom 10% of its intraday range.</p><p>To keep the strategy supplied with enough trading opportunities, we also <strong>relax the QPI threshold</strong> from <strong>0.15 to 0.30</strong>. After adding the stricter IBS filter, using the old QPI cutoff would make signals too scarce; widening it ensures we still capture a meaningful number of setups.</p><p>Why might this help? Because a large daily drop isn&#8217;t always enough to guarantee a good mean-reversion setup. Sometimes a stock bounces intraday, signaling buyers have already stepped in, which weakens the edge. By requiring IBS to be low, we target days where the stock was sold off <em>all the way into the close</em>, indicating persistent intraday pressure. These events tend to produce cleaner, more reliable snap-back behavior in the following days.</p><p>Let&#8217;s look at the data:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3GZc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3GZc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png 424w, https://substackcdn.com/image/fetch/$s_!3GZc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png 848w, https://substackcdn.com/image/fetch/$s_!3GZc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png 1272w, https://substackcdn.com/image/fetch/$s_!3GZc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3GZc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png" width="1292" height="724" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:724,&quot;width&quot;:1292,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:168316,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3GZc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png 424w, https://substackcdn.com/image/fetch/$s_!3GZc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png 848w, https://substackcdn.com/image/fetch/$s_!3GZc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png 1272w, https://substackcdn.com/image/fetch/$s_!3GZc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7577efb1-43ae-4b98-9f0f-d812d1c08ebf_1292x724.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Second improvement: entry with IBS</figcaption></figure></div><ul><li><p><strong>Win rate increased:</strong> 59% winners (up from 57% in the baseline).</p></li><li><p><strong>Expected return per trade improved:</strong> +0.77% (vs. +0.60% in the baseline).</p></li><li><p><strong>Winners stayed strong:</strong> average winner +3.45%, while losers averaged &#8211;3.14% (similar loss profile but with better selectivity).</p></li><li><p><strong>Statistically significant improvement:</strong> a statistical test confirms the distribution is different from the baseline (t-stat = <strong>8.32</strong>, p-value = <strong>0.0</strong>).</p></li></ul><h2>D) Improving the exit</h2><p>So far, we&#8217;ve been analyzing this signal using a <strong>time-based exit</strong>, holding each trade for exactly 5 days. But the actual strategy exits a trade <strong>as soon as today&#8217;s close is higher than yesterday&#8217;s high</strong>.</p><p>This makes intuitive sense: if you&#8217;re trading short-term mean reversion, the moment the stock snaps back above the prior day&#8217;s high, the &#8220;bounce&#8221; you were waiting for has already happened&#8212;there&#8217;s no reason to keep holding and expose yourself to further noise or new downside risk.</p><p>These are the stats with all improvements applied so far, using this exit logic:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ptq9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ptq9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png 424w, https://substackcdn.com/image/fetch/$s_!Ptq9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png 848w, https://substackcdn.com/image/fetch/$s_!Ptq9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png 1272w, https://substackcdn.com/image/fetch/$s_!Ptq9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ptq9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png" width="1292" height="730" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:730,&quot;width&quot;:1292,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:168261,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ptq9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png 424w, https://substackcdn.com/image/fetch/$s_!Ptq9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png 848w, https://substackcdn.com/image/fetch/$s_!Ptq9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png 1272w, https://substackcdn.com/image/fetch/$s_!Ptq9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ecc83c-f458-4792-b0c6-7c0dcc232e34_1292x730.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Third improvement: exit logic v1</figcaption></figure></div><ul><li><p><strong>Win rate jumped significantly:</strong> 71% winners (up from 57% in the baseline).</p></li><li><p><strong>Expected return per trade increased further:</strong> +0.90% (vs. +0.60% in the baseline).</p></li><li><p><strong>Loss profile remained controlled:</strong> losers averaged &#8211;3.44%, while winners averaged +2.65% &#8212; a much healthier distribution.</p></li><li><p><strong>Statistically significant improvement:</strong> a statistical test confirms this distribution is different from the baseline (t-stat = <strong>14.38</strong>, p-value = <strong>0.0</strong>).</p></li></ul><p>But we can actually do better with exits. Instead of waiting for the price to break above yesterday&#8217;s high, we can test a more dynamic idea: <strong>closing the trade whenever IBS &gt; 0.9 or RSI2 &gt; 90</strong>.</p><p>Why might this work? Because both conditions signal <strong>exhaustion to the upside</strong> &#8212; when a stock surges into the top of its intraday range (IBS &gt; 0.9) or becomes extremely short-term overbought (RSI2 &gt; 90), the mean-reversion burst we were targeting has likely already played out. At that point, staying in the trade just adds noise and downside risk.</p><p>Let&#8217;s look at the data:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ntnc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ntnc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png 424w, https://substackcdn.com/image/fetch/$s_!Ntnc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png 848w, https://substackcdn.com/image/fetch/$s_!Ntnc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png 1272w, https://substackcdn.com/image/fetch/$s_!Ntnc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ntnc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png" width="1290" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1290,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:165238,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ntnc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png 424w, https://substackcdn.com/image/fetch/$s_!Ntnc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png 848w, https://substackcdn.com/image/fetch/$s_!Ntnc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png 1272w, https://substackcdn.com/image/fetch/$s_!Ntnc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e09636-fe3a-499f-b9e4-b1e7e67aa669_1290x728.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Fourth improvement: exit logic v2</figcaption></figure></div><ul><li><p><strong>Expected return per trade improved further:</strong> +1.04% (up from +0.90% with the previous exit rule).</p></li><li><p><strong>Win rate remained strong:</strong> 70% winners, with winners averaging +3.11% and losers averaging &#8211;3.76%.</p></li><li><p><strong>Distribution remains healthy:</strong> median trade at +1.4%, with similar tail behavior but slightly better upside capture.</p></li><li><p><strong>Statistically significant improvement:</strong> the distribution differs from the previous exit logic (t-stat = <strong>5.37</strong>, p-value = <strong>0.0</strong>).</p></li></ul><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/murphys-law?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/murphys-law?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/murphys-law?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h1>Robustness</h1><p>Before we move into walk-forward optimization, we first need to check whether the strategy is <strong>robust to reasonable parameter variation</strong>. To do that, we&#8217;ll test all <strong>625 combinations</strong> from the following grid:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RuxB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RuxB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png 424w, https://substackcdn.com/image/fetch/$s_!RuxB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png 848w, https://substackcdn.com/image/fetch/$s_!RuxB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png 1272w, https://substackcdn.com/image/fetch/$s_!RuxB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RuxB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png" width="888" height="298" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:298,&quot;width&quot;:888,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:54869,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RuxB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png 424w, https://substackcdn.com/image/fetch/$s_!RuxB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png 848w, https://substackcdn.com/image/fetch/$s_!RuxB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png 1272w, https://substackcdn.com/image/fetch/$s_!RuxB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9208d90-297b-4148-856f-ddcb111c6f1a_888x298.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>These ranges cover a wide and sensible portion of the parameter space&#8212;roughly <strong>30&#8211;50% variation</strong> around each baseline value. Then,</p><ul><li><p>If the strategy is truly robust, we should see <strong>stable performance across the grid</strong>&#8212;Sharpe ratios, annual returns, and drawdowns remaining positive and reasonably consistent across all 625 parameter sets.</p></li><li><p>If the strategy only performs well for a tiny handful of cherry-picked combinations, that&#8217;s a clear sign of fragility.</p></li></ul><p>Before showing the results, it&#8217;s important to clarify the <strong>backtesting assumptions</strong> used throughout this robustness test (and in the walk-forward analysis that follows):</p><ol><li><p><strong>Increased diversification:</strong> we expand the maximum number of simultaneous positions from 4 to <strong>10</strong>, as we previously discussed the importance of diversification.</p></li><li><p><strong>Trading costs:</strong> each trade includes a <strong>2 bps</strong> round-trip cost.</p></li><li><p><strong>Equal-weighting:</strong> all trades are <strong>equal-weighted</strong> for simplicity and consistency across the 625 simulations.</p></li></ol><p>Let&#8217;s see the data:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HrlB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HrlB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png 424w, https://substackcdn.com/image/fetch/$s_!HrlB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png 848w, https://substackcdn.com/image/fetch/$s_!HrlB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png 1272w, https://substackcdn.com/image/fetch/$s_!HrlB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HrlB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png" width="1186" height="586" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:586,&quot;width&quot;:1186,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:132263,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HrlB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png 424w, https://substackcdn.com/image/fetch/$s_!HrlB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png 848w, https://substackcdn.com/image/fetch/$s_!HrlB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png 1272w, https://substackcdn.com/image/fetch/$s_!HrlB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe151fe9-7541-4274-958f-ecd4bd11126e_1186x586.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Robustness test</figcaption></figure></div><h3>Robustness Results (2003&#8211;2025)</h3><ul><li><p><strong>Annual returns are tightly clustered</strong>: median &#8776; <strong>18.2%</strong>, with most parameter sets between <strong>16.3% and 19.5%</strong>.</p></li><li><p><strong>Sharpe ratios remain consistently high</strong>: median &#8776; <strong>1.13</strong>, with 50% of all runs falling between <strong>1.03 and 1.22</strong>.</p></li><li><p><strong>Drawdowns are stable and controlled</strong>: median max drawdown &#8776; <strong>&#8211;20%</strong>, with most runs between <strong>&#8211;24% and &#8211;18%</strong>.</p></li><li><p><strong>No catastrophic parameter sets</strong>: even the worst combinations produce <strong>positive annual returns</strong>, Sharpe &#8776; <strong>0.70</strong>, and manageable drawdowns.</p></li></ul><h3>Is this a strong sign of robustness?</h3><p>Yes. A strategy is robust when performance remains stable across a wide and reasonable part of the parameter space. Here, we tested <strong>625 combinations</strong>, spanning roughly <strong>&#177;30&#8211;50% variation</strong> around each parameter. The results show:</p><ul><li><p><strong>No dependence on a narrow, cherry-picked parameter set</strong></p></li><li><p><strong>No sharp peaks or isolated &#8220;lucky&#8221; regions</strong></p></li><li><p><strong>A broad plateau of strong performance</strong></p></li><li><p><strong>Consistently attractive risk-adjusted returns (Sharpe ~1+) across the grid</strong></p></li><li><p><strong>Drawdowns that remain in a tight and acceptable range</strong></p></li></ul><p>This pattern &#8212; a large plateau of good solutions rather than a single spike &#8212; is exactly what we want to see in a strategy that is <strong>truly signal-driven rather than curve-fit</strong>.</p><div><hr></div><h1>Walk-forward optimization</h1><p>Now that we&#8217;ve confirmed the strategy is robust across a wide range of parameter values, we face the next challenge: <strong>choosing which parameter combination to actually trade</strong>. If we simply pick the one that performed best on the full 2003&#8211;2025 dataset, we&#8217;d almost certainly be overfitting&#8212;rewarding parameters that benefited from historical noise rather than true predictive power.</p><p>This is where <strong>walk-forward optimization (WFO)</strong> comes in. Instead of optimizing on the entire dataset at once, WFO repeatedly trains the strategy on a rolling window of <strong>past</strong> data and immediately tests it on the <strong>next, unseen</strong> period. If a parameter set survives this sequence of &#8220;train &#8594; test &#8594; roll forward&#8221; cycles, it&#8217;s far more likely to capture a genuine, persistent edge that generalizes to real trading.</p><h2>Walk-Forward Procedure</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lG19!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lG19!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png 424w, https://substackcdn.com/image/fetch/$s_!lG19!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png 848w, https://substackcdn.com/image/fetch/$s_!lG19!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png 1272w, https://substackcdn.com/image/fetch/$s_!lG19!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lG19!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png" width="1456" height="425" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:425,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:128173,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lG19!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png 424w, https://substackcdn.com/image/fetch/$s_!lG19!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png 848w, https://substackcdn.com/image/fetch/$s_!lG19!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png 1272w, https://substackcdn.com/image/fetch/$s_!lG19!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49e19880-e530-4f7b-902b-7734c6d154d9_1794x524.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Walk-forward optimization</figcaption></figure></div><p>In our walk-forward framework, we use the following process:</p><ul><li><p><strong>3-year training windows:</strong></p><p>For each step, we evaluate all <strong>625 parameter combinations</strong> using only the previous 3 years of data.</p></li><li><p><strong>Rank by Sharpe ratio:</strong></p><p>Within each training window, we rank all parameter sets by their Sharpe ratio to identify the most stable performers.</p></li><li><p><strong>Select the top 5 sets:</strong></p><p>We take the <strong>five best-performing parameter sets</strong> and <strong>equal-weight</strong> them, effectively trading five independent portfolios as an ensemble.</p></li><li><p><strong>Trade for the next year:</strong></p><p>These five selected parameter sets are used to trade the <strong>following year</strong>, which serves as the out-of-sample test.</p></li><li><p><strong>Roll forward one year:</strong></p><p>After that year completes, we shift the entire window forward by one year and repeat the process:</p><p>train &#8594; rank &#8594; select &#8594; trade &#8594; roll.</p></li><li><p><strong>Continue until 2025:</strong></p><p>This rolling sequence continues until we reach the end of the sample, producing a full walk-forward performance series.</p></li></ul><div><hr></div><h1>Results</h1><p>With the walk-forward framework in place, we can now look at how the strategy performs out-of-sample:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5omv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5omv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!5omv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!5omv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!5omv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5omv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:626642,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5omv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!5omv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!5omv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!5omv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc53f04e-a9c2-4725-ae8e-1a5c2ed5fd8b_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the OOS backest</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!u8fZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!u8fZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png 424w, https://substackcdn.com/image/fetch/$s_!u8fZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png 848w, https://substackcdn.com/image/fetch/$s_!u8fZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png 1272w, https://substackcdn.com/image/fetch/$s_!u8fZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!u8fZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png" width="946" height="1132" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1132,&quot;width&quot;:946,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:273073,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!u8fZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png 424w, https://substackcdn.com/image/fetch/$s_!u8fZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png 848w, https://substackcdn.com/image/fetch/$s_!u8fZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png 1272w, https://substackcdn.com/image/fetch/$s_!u8fZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb7a20fd-c16c-44a6-afe5-88de310ca29a_946x1132.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><p>Final Strategy (after all improvements) vs. S&amp;P 500:</p><ul><li><p><strong>Annual returns more than double the benchmark: 19.0%</strong> vs. <strong>9.2%</strong> per year.</p></li><li><p><strong>Sharpe ratio more than 2&#215; higher: 1.27</strong> vs. <strong>0.56</strong>, despite slightly <em>lower</em> volatility (14.6% vs. 18.8%).</p></li><li><p><strong>Significantly smaller drawdowns: 17.6%</strong> max drawdown vs. <strong>56.8%</strong> for the S&amp;P 500.</p></li><li><p><strong>Smoother month-to-month performance:</strong> 69% positive months vs. 66% for the index.</p></li></ul><p>Final Strategy vs. Original Flawed Strategy:</p><ul><li><p><strong>Sharpe ratio improved dramatically:</strong> from <strong>0.90 &#8594; 1.27</strong> (a <strong>41% increase</strong> in risk-adjusted performance).</p></li><li><p><strong>Volatility materially reduced: 14.6%</strong> vs. <strong>21.6%</strong> &#8212; the improved version is <em>much</em> smoother.</p></li><li><p><strong>Max drawdown cut from 26.8% to 17.6%</strong></p></li><li><p><strong>Better consistency:</strong> 69% positive months (final) vs. 62% (original).</p></li><li><p><strong>About the same annual returns with less risk: 19.0%</strong> vs. <strong>18.7%</strong>, but achieved with far lower volatility and far better drawdown behavior.</p></li></ul><p>Now, let&#8217;s look at monthly and annual returns:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Yiq-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yiq-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png 424w, https://substackcdn.com/image/fetch/$s_!Yiq-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png 848w, https://substackcdn.com/image/fetch/$s_!Yiq-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png 1272w, https://substackcdn.com/image/fetch/$s_!Yiq-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yiq-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png" width="1456" height="968" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:968,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2475889,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Yiq-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png 424w, https://substackcdn.com/image/fetch/$s_!Yiq-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png 848w, https://substackcdn.com/image/fetch/$s_!Yiq-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png 1272w, https://substackcdn.com/image/fetch/$s_!Yiq-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f6e8ab2-aede-442e-bd29-0a68242eeee8_2048x1362.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>If we had traded this strategy since 2003:</p><ul><li><p>We would have had only <strong>1 down year in 22 years</strong> (2012);</p></li><li><p>We would have seen <strong>69% of the months positive</strong>, with the best at +12.1% (Mar&#8217;20);</p></li><li><p>We would have seen <strong>31% of the months negative</strong>, with the worst at -9.0% (Oct&#8217;08);</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8rRz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8rRz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png 424w, https://substackcdn.com/image/fetch/$s_!8rRz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png 848w, https://substackcdn.com/image/fetch/$s_!8rRz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png 1272w, https://substackcdn.com/image/fetch/$s_!8rRz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8rRz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png" width="1178" height="724" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:724,&quot;width&quot;:1178,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:204686,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/181152443?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8rRz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png 424w, https://substackcdn.com/image/fetch/$s_!8rRz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png 848w, https://substackcdn.com/image/fetch/$s_!8rRz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png 1272w, https://substackcdn.com/image/fetch/$s_!8rRz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ecd9e66-ad24-4677-b8c5-8476f01de6e9_1178x724.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Comparing the distributions of daily returns</figcaption></figure></div><p>The table above compares the daily return distribution, and clearly shows what actually improved:</p><ul><li><p><strong>Volatility dropped by ~32%</strong> in the improved strategy (0.92% vs. 1.36%), producing a dramatically smoother day-to-day P&amp;L profile than the original system (and even smoother than the S&amp;P 500 (1.18%)).</p></li><li><p><strong>Tail risk improved substantially:</strong> the worst daily loss shrank from <strong>-13.84% &#8594; -7.45%</strong>, a ~46% reduction. This is one of the clearest signs that the new entry/exit logic and walk-forward ensemble are filtering out dangerous setups.</p></li><li><p><strong>Typical losing days are much smaller:</strong> the 25th percentile improved from <strong>-0.53% &#8594; -0.28%</strong>, cutting the size of routine down days nearly in half.</p></li><li><p><strong>Extreme outcomes (both good and bad) were reduced:</strong> max daily gain fell (16.5% &#8594; 9.1%), but so did extreme losses. The improved strategy trades &#8220;hero days&#8221; for far better stability &#8212; exactly what long-term compounding prefers.</p></li><li><p><strong>Kurtosis dropped sharply (12.2 &#8594; 8.7):</strong> the distribution became significantly less fat-tailed, meaning fewer outliers and far more predictable behavior.</p></li><li><p><strong>Slightly lower skewness (0.4 &#8594; 0.3)</strong> supports the same point: fewer wild upside days and far fewer wild downside days.</p></li><li><p><strong>Despite all the risk reduction, mean daily return remained essentially the same</strong> (&#8776;0.07% vs. 0.08%). The improved strategy delivers similar drift with meaningfully lower risk &#8212; the formula for a higher Sharpe.</p></li></ul><div><hr></div><h1>Final thoughts</h1><p>Murphy&#8217;s line &#8212; <em>&#8220;Anything that can go wrong, will go wrong&#8221;</em> &#8212; felt brutally accurate for this particular system in November. A handful of AI-related names went against it at the worst possible time, and a strategy that looked fine on paper suddenly felt fragile.</p><p>But that month also did us a favor: it forced us to look again into this system and ask a better question:</p><blockquote><p>If this can fail, where will it fail, and how do we design it so it doesn&#8217;t?</p></blockquote><p>The answer wasn&#8217;t a single clever trick. It was a list of small, unglamorous improvements: tighter entries (IBS + relaxed QPI), more intelligent exits, trading at the close, parameter robustness checks, and a walk-forward process that refuses to lock in one lucky configuration. None of these changes is spectacular on its own. Together, they turned a decent but jumpy strategy into one that doubles the S&amp;P&#8217;s return, cuts drawdowns by two-thirds, and delivers a much cleaner return distribution.</p><p>The main lesson for me is that robustness is something we build deliberately. What worked better here was treating the idea as a prototype and then pushing on it from all sides: testing hundreds of parameter sets, forcing it through walk-forward OOS, and quietly hardening all the places where Murphy could attack &#8212; entries, exits, sizing, and risk.</p><p>There&#8217;s still plenty to do. We haven&#8217;t yet touched the other two levers we identified:</p><ol><li><p><strong>Breadth/diversification</strong> &#8212; scaling to more slots and possibly more universes;</p></li><li><p><strong>Risk overlay</strong> &#8212; hedging factor exposures (&#946;, size, momentum, sector) so we&#8217;re less exposed to the kind of &#8220;AI repricing month&#8221; that triggered this whole review. I also want to explore ways of explicitly separating fundamental repricings from noise-driven dislocations, so we can avoid stepping in front of real information shocks.</p></li></ol><p>If there&#8217;s a broader takeaway, it&#8217;s this: Murphy&#8217;s Law doesn&#8217;t have to be a curse. Treated correctly, it&#8217;s a design principle. Assume things will go wrong, and then build systems that still behave well when they do.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a> if you have questions, ideas, or feedback.</p><p>Cheers!</p><div><hr></div><h2>Study Group</h2><p><em>Our last study group was a success. Thank you to all community members who joined live! For those who couldn&#8217;t, I will post the code and the recording on <a href="http://learn.quantitativo.com">learn.quantitativo.com</a>, as usual, in the next few days. The TAA strategy we reviewed is up almost 40% this year.</em></p><p><em>Lately, our community has shown interest in a wide range of topics on the forum. As usual, I&#8217;ll post a survey on <a href="http://connect.quantitativo.com/">connect.quantitativo.com</a> so everyone can vote on the topic for the next study group.</em></p><p><em>I know I said I would reopen enrollments in December&#8230; but I am completely swamped with work, so I&#8217;ll reopen enrollments in January 2026. The waitlist already has a few hundred people. Join it below to be the first to know when new seats open:</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Waitlist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Waitlist</span></a></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Asset Embeddings]]></title><description><![CDATA[Turning portfolio co-holdings into alpha: a +2 Sharpe market-neutral strategy]]></description><link>https://www.quantitativo.com/p/asset-embeddings</link><guid isPermaLink="false">https://www.quantitativo.com/p/asset-embeddings</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Sun, 12 Oct 2025 12:07:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!H4AQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H4AQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H4AQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png 424w, https://substackcdn.com/image/fetch/$s_!H4AQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png 848w, https://substackcdn.com/image/fetch/$s_!H4AQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png 1272w, https://substackcdn.com/image/fetch/$s_!H4AQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H4AQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png" width="1200" height="750" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/40dc89b9-b444-4def-884d-2385332af703_1200x750.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:750,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:347457,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H4AQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png 424w, https://substackcdn.com/image/fetch/$s_!H4AQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png 848w, https://substackcdn.com/image/fetch/$s_!H4AQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png 1272w, https://substackcdn.com/image/fetch/$s_!H4AQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40dc89b9-b444-4def-884d-2385332af703_1200x750.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Tom&#225;&#353; Mikolov in a conversation with Rich Sutton</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;You shall know a word by the company it keeps.&#8221; John Rupert Firth.</p></blockquote><p>John Rupert Firth was a British linguist and one of the pioneers of modern semantics. In the 1950s, he proposed a simple yet revolutionary idea: <em>&#8220;You shall know a word by the company it keeps.&#8221;</em> More than half a century later, this insight became the foundation for a breakthrough at Google, where Tomas Mikolov and his colleagues developed the <strong><a href="https://arxiv.org/abs/1310.4546">Word2Vec</a></strong> model in 2013.</p><p>Before Word2Vec, computers treated words as isolated symbols&#8212;mere sequences of characters with no inherent meaning or relationship to one another. Mikolov&#8217;s model changed that. By mapping words into a <strong>continuous vector space</strong>, where proximity reflected contextual similarity, Word2Vec allowed machines to <em>grasp meaning through relationships</em>. The model revealed that linguistic structure could be learned directly from data. This marked a <strong>paradigm shift</strong> in how machines process language&#8212;from counting words to <em>understanding</em> them&#8212;and laid the foundation for today&#8217;s large language models and the broader <strong>AI revolution</strong> built on distributed representations and deep learning. (Not coincidentally, Ilya Sutskever, a co-author of the original Word2Vec papers, later became the co-founder and Chief Scientist of OpenAI.)</p><p>This week, we will investigate the paper <em><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4507511">Asset Embeddings</a></em> by Xavier Gabaix (Harvard), Ralph S. J. Koijen (Chicago Booth), Robert Richmond (NYU Stern), and Motohiro Yogo (Princeton), published in April 2025.</p><p>After that, we will implement an original strategy to demonstrate the power of the authors&#8217; idea. It&#8217;s a true paradigm shift.</p><p>Here&#8217;s our plan:</p><ol><li><p>First, we will quickly summarize the paper</p></li><li><p>Then, we will demonstrate the power of asset embeddings with simple experiments</p></li><li><p>Next, we will create a trading strategy that uses asset embeddings and show its strong results</p></li><li><p>Finally, we will wrap up with final thoughts and next steps</p></li></ol><div><hr></div><p><em>Before we start, two messages.</em></p><p><em>First, the 2nd cohort of the course is still open for enrollment for the next couple of days.</em></p><p><em>I created this to respond to a request I&#8217;ve received from hundreds of readers here: access to my codebase, step by step &#8212; for those who want to develop strategies using the same approach I share here. Enrollment also includes access to the private community and an ever-growing library of study groups. More information at the link below.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Course and Community&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Course and Community</span></a></p><p><em>Last day for enrollment in the 2nd cohort: Oct 14.</em></p><p><em>Second, this time it took me a bit longer than the usual 3&#8211;4 weeks to write and publish. There are a few reasons why:</em></p><ol><li><p><em>First and foremost, I implemented three distinct papers, and their results came in significantly below what was reported. Instead of publishing subpar ideas, I prefer to keep searching for meaningful ones to share. That&#8217;s why I&#8217;ll never promise a rigid schedule &#8212; sometimes the search takes longer, but I&#8217;ll never compromise quality.</em></p></li><li><p><em>And, of course, just a lot of regular work :)</em></p></li></ol><p><em>Welcome to all new subscribers &#8212; and rest assured: even if it sometimes takes a little longer than the usual 3&#8211;4 weeks to publish, the work continues non-stop.</em></p><div><hr></div><h1>Paper Summary</h1><h3>Core Idea</h3><p>The paper introduces the concept of <strong>asset embeddings</strong>, inspired by advances in artificial intelligence such as Word2Vec and BERT. Instead of representing words by their co-occurrence in text, the authors represent <strong>assets by the portfolios that hold them</strong>.</p><p>Their central theoretical claim is that <strong>portfolio holdings contain all relevant information for asset pricing</strong> &#8212; far more than traditional firm characteristics (like book-to-market or profitability). In other words, the collective portfolio decisions of investors implicitly encode all the information used in the market to price assets.</p><p><em>Pause. Read that again. It is a bold paradigm shift. I loved it when I first read it a few months ago. I will repeat:</em></p><blockquote><p>Portfolio holdings contain all relevant information for asset pricing &#8212; far more than traditional firm characteristics.</p></blockquote><h3>Methodology</h3><p>The authors apply <strong>embedding models</strong>&#8212;recommender systems, Word2Vec-style shallow neural networks, and transformer architectures (BERT)&#8212;to financial data from 2005Q1 to 2022Q4.</p><p>Each firm and investor is represented as a point in a <strong>high-dimensional latent vector space</strong>, derived from institutional holdings data (13F filings, mutual funds, ETFs, hedge funds, etc.).</p><p>They also introduce <strong>investor embeddings</strong>, representing investors and their strategies in the same latent space.</p><p>Three empirical <strong>benchmarks</strong> test the usefulness of these embeddings:</p><ol><li><p><strong>Predicting relative valuations</strong> across firms.</p></li><li><p><strong>Explaining stock return comovements.</strong></p></li><li><p><strong>Predicting institutional portfolio choices</strong> (the &#8220;masked portfolio&#8221; task).</p></li></ol><h3>Main Findings</h3><ul><li><p>Asset embeddings <strong>strongly outperform firm characteristics</strong> in predicting valuation, return comovement, and investor behavior.</p><ul><li><p>A simple 4-dimensional embedding explains over <strong>50% of the variation</strong> in relative valuations, compared to just <strong>15%</strong> for standard firm characteristics.</p></li><li><p>Larger embeddings (e.g., 128 dimensions) explain <strong>over 70%</strong> of variation.</p></li></ul></li><li><p><strong>Transformer-based (BERT) embeddings</strong> achieve particularly high accuracy when predicting institutional portfolio decisions&#8212;showing that <strong>contextualized embeddings</strong> capture investor behavior far better than linear models or firm fundamentals.</p></li><li><p>Text-based embeddings (from OpenAI and Cohere) perform worse, as they reflect semantic similarity rather than investor-perceived relationships.</p></li></ul><h3>Interpretability</h3><p>To interpret these latent embeddings, the authors use <strong>large language models (LLMs)</strong> (e.g., GPT-4) to analyze earnings-call transcripts of firms that appear close in embedding space. This allows the generation of <strong>economic narratives</strong> about why investors group certain firms together&#8212;shared risks, growth prospects, ESG features, etc.</p><h3>Applications</h3><p>The paper proposes wide-ranging uses:</p><ul><li><p><strong>Asset pricing and factor discovery:</strong> uncovering hidden dimensions of risk and return.</p></li><li><p><strong>Generative portfolios:</strong> building synthetic portfolios (e.g., &#8220;COVID exposure&#8221;) without explicit return data.</p></li><li><p><strong>Risk management and stress testing:</strong> simulating shocks by shifting embeddings.</p></li><li><p><strong>Investor analytics:</strong> classifying investor styles, detecting crowded trades, and evaluating performance.</p></li></ul><h3>Conclusion</h3><p>The authors argue that <strong>portfolio holdings are the most information-rich data source in finance</strong>, analogous to text corpora in NLP.</p><p>Just as word embeddings revolutionized natural language processing by revealing structure in unstructured data, <strong>asset embeddings may transform finance</strong> by revealing the latent structure of markets.</p><p>This bridges modern AI representation learning and asset pricing&#8212;potentially redefining how we understand, forecast, and manage financial markets.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h1>The Power of Asset Embeddings</h1><p>Before we jump into a trading strategy, let&#8217;s first see how <strong>powerful asset embeddings</strong> really are&#8212;much like word embeddings in NLP.</p><p>The paper explores several models, but here we&#8217;ll focus on <strong>Word2Vec</strong>. Libraries such as <a href="https://radimrehurek.com/gensim/models/word2vec.html">Gensim</a> make it straightforward to implement.</p><p>Before that, we need data. In this exercise, we&#8217;ll use <strong>13F filings</strong> from the <strong>Nasdaq Sharadar SF3 dataset</strong>, though many other data vendors can provide similar information.</p><p>Our first step is to build a <strong>holdings matrix</strong>, with institutional investors as rows and assets as columns:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XRGA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XRGA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png 424w, https://substackcdn.com/image/fetch/$s_!XRGA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png 848w, https://substackcdn.com/image/fetch/$s_!XRGA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png 1272w, https://substackcdn.com/image/fetch/$s_!XRGA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XRGA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png" width="1376" height="222" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:222,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:94129,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XRGA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png 424w, https://substackcdn.com/image/fetch/$s_!XRGA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png 848w, https://substackcdn.com/image/fetch/$s_!XRGA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png 1272w, https://substackcdn.com/image/fetch/$s_!XRGA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c37c81e-e0ab-4b9a-90a2-9435a0cb8566_1376x222.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The <code>extract_holdings</code> method is a helper function that retrieves the holdings table described above, after applying the necessary filters. Institutional investors with less than $10 million in AUM are ignored, and stocks appearing in fewer than 20 portfolios are also excluded. The final result should look like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LZcu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LZcu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png 424w, https://substackcdn.com/image/fetch/$s_!LZcu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png 848w, https://substackcdn.com/image/fetch/$s_!LZcu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png 1272w, https://substackcdn.com/image/fetch/$s_!LZcu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LZcu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png" width="1456" height="545" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:545,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:378298,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LZcu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png 424w, https://substackcdn.com/image/fetch/$s_!LZcu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png 848w, https://substackcdn.com/image/fetch/$s_!LZcu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png 1272w, https://substackcdn.com/image/fetch/$s_!LZcu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2effee6-522f-4c63-9e2c-1e8ba1e49bb8_2048x766.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now, let&#8217;s see how to train Word2Vec on institutional portfolios to generate asset embeddings based on co-holding relationships, as described in the paper:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2D7H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2D7H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png 424w, https://substackcdn.com/image/fetch/$s_!2D7H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png 848w, https://substackcdn.com/image/fetch/$s_!2D7H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png 1272w, https://substackcdn.com/image/fetch/$s_!2D7H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2D7H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png" width="1384" height="1284" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1284,&quot;width&quot;:1384,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:623928,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2D7H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png 424w, https://substackcdn.com/image/fetch/$s_!2D7H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png 848w, https://substackcdn.com/image/fetch/$s_!2D7H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png 1272w, https://substackcdn.com/image/fetch/$s_!2D7H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bce1f0e-aa89-47ae-bfab-adc9097f01e7_1384x1284.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The code builds portfolios from the holdings, trains a Word2Vec model where each &#8220;sentence&#8221; is an investor&#8217;s portfolio, and then extracts and normalizes the resulting embedding vectors for each ticker. The final DataFrame <code>embeddings</code> contains the L2-normalized representation of every stock in the latent vector space:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mDGC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mDGC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png 424w, https://substackcdn.com/image/fetch/$s_!mDGC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png 848w, https://substackcdn.com/image/fetch/$s_!mDGC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png 1272w, https://substackcdn.com/image/fetch/$s_!mDGC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mDGC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png" width="1456" height="695" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:695,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:409290,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mDGC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png 424w, https://substackcdn.com/image/fetch/$s_!mDGC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png 848w, https://substackcdn.com/image/fetch/$s_!mDGC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png 1272w, https://substackcdn.com/image/fetch/$s_!mDGC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F680e65c2-f00d-411b-a2b0-91cd3071fcdb_1692x808.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>That&#8217;s all there is to it. You can create clusters with just a few additional lines using Scikit-learn&#8217;s <strong>KMeans</strong> module or any other clustering method. Now, let&#8217;s see how powerful these representations really are with a few examples.</p><h2>First Demo: Semantic Similarity</h2><p>Let&#8217;s start by computing the <strong>top 10 most similar stocks to NU</strong>, using <strong>cosine similarity</strong> on the asset embeddings we just created:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sAJR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sAJR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png 424w, https://substackcdn.com/image/fetch/$s_!sAJR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png 848w, https://substackcdn.com/image/fetch/$s_!sAJR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png 1272w, https://substackcdn.com/image/fetch/$s_!sAJR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sAJR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png" width="1378" height="446" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:446,&quot;width&quot;:1378,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:271669,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sAJR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png 424w, https://substackcdn.com/image/fetch/$s_!sAJR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png 848w, https://substackcdn.com/image/fetch/$s_!sAJR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png 1272w, https://substackcdn.com/image/fetch/$s_!sAJR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0f1354d-f577-40a9-b704-aee4028e4e3f_1378x446.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P1hY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P1hY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png 424w, https://substackcdn.com/image/fetch/$s_!P1hY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png 848w, https://substackcdn.com/image/fetch/$s_!P1hY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png 1272w, https://substackcdn.com/image/fetch/$s_!P1hY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P1hY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png" width="1036" height="690" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:690,&quot;width&quot;:1036,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:204238,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!P1hY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png 424w, https://substackcdn.com/image/fetch/$s_!P1hY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png 848w, https://substackcdn.com/image/fetch/$s_!P1hY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png 1272w, https://substackcdn.com/image/fetch/$s_!P1hY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fd0c1f6-6435-414e-92b0-80c53e48504f_1036x690.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Even though the companies above come from completely different sectors, the <strong>cosine similarity in their embeddings</strong> reflects how <strong>institutional portfolios</strong> tend to <em>group them together</em>.</p><p>So, the similarity doesn&#8217;t come from fundamentals or business models, but from <em>investor behavior</em>.</p><p>Here&#8217;s a table summarizing what they have in common:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kIBJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kIBJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png 424w, https://substackcdn.com/image/fetch/$s_!kIBJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png 848w, https://substackcdn.com/image/fetch/$s_!kIBJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png 1272w, https://substackcdn.com/image/fetch/$s_!kIBJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kIBJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png" width="1260" height="620" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:620,&quot;width&quot;:1260,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:150757,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kIBJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png 424w, https://substackcdn.com/image/fetch/$s_!kIBJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png 848w, https://substackcdn.com/image/fetch/$s_!kIBJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png 1272w, https://substackcdn.com/image/fetch/$s_!kIBJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1806068f-b91f-4c11-84f2-8911f464b74d_1260x620.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In short, these firms cluster not because they <em>do</em> the same thing, but because they are held by the same type of investors &#8212; global growth, EM tech, and crossover funds chasing the digitization theme.</p><p>And what&#8217;s really cool about it is that our model discovered this pattern from millions of 13F data points and just a few lines of code in a completely automatic process. <strong>Unsupervised machine learning at its best!</strong></p><h2>Second Demo: Vector Operations</h2><p>If you ever find yourself in a computer science master&#8217;s or PhD program and decide to take an NLP class, I bet the first example you&#8217;ll see about Word2Vec will be the famous:</p><p><code>vector(&#8221;King&#8221;) &#8722; vector(&#8221;Man&#8221;) + vector(&#8221;Woman&#8221;) &#8776; vector(&#8221;Queen&#8221;)</code></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!J1oP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!J1oP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png 424w, https://substackcdn.com/image/fetch/$s_!J1oP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png 848w, https://substackcdn.com/image/fetch/$s_!J1oP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png 1272w, https://substackcdn.com/image/fetch/$s_!J1oP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!J1oP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png" width="662" height="223" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:223,&quot;width&quot;:662,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:94645,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!J1oP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png 424w, https://substackcdn.com/image/fetch/$s_!J1oP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png 848w, https://substackcdn.com/image/fetch/$s_!J1oP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png 1272w, https://substackcdn.com/image/fetch/$s_!J1oP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F068880bd-6a66-40e9-afc2-22276942e4bf_662x223.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>There&#8217;s a reason why they teach you this: that&#8217;s <em>exactly</em> the kind of demonstration that makes embeddings &#8220;click&#8221; for people. You see that the latent space encodes <strong>meaning</strong>, not just statistical co-occurrence.</p><p>Could we do the same for asset embeddings? You bet! Let&#8217;s try the following operation:</p><p><code>vector(&#8221;AMZN&#8221;) &#8722; vector(&#8221;WMT&#8221;) + vector(&#8221;BABA&#8221;) &#8776; ?</code></p><p>Intuitively means:</p><blockquote><p>&#8220;Take the concept of Amazon (a tech-driven online retailer), remove what makes it a traditional U.S. retailer (Walmart), and add what makes it Chinese (Alibaba).&#8221;</p></blockquote><p>So we&#8217;d expect the resulting vector to point toward <strong>emerging-market e-commerce / digital consumer platforms</strong> &#8212; the <em>BABA equivalents</em> around the world. Here are the results:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3m_6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3m_6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png 424w, https://substackcdn.com/image/fetch/$s_!3m_6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png 848w, https://substackcdn.com/image/fetch/$s_!3m_6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png 1272w, https://substackcdn.com/image/fetch/$s_!3m_6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3m_6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png" width="1390" height="230" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:230,&quot;width&quot;:1390,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:130354,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3m_6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png 424w, https://substackcdn.com/image/fetch/$s_!3m_6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png 848w, https://substackcdn.com/image/fetch/$s_!3m_6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png 1272w, https://substackcdn.com/image/fetch/$s_!3m_6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b30de9-f724-4f24-a6b8-68060b746900_1390x230.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hEY3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hEY3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png 424w, https://substackcdn.com/image/fetch/$s_!hEY3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png 848w, https://substackcdn.com/image/fetch/$s_!hEY3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png 1272w, https://substackcdn.com/image/fetch/$s_!hEY3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hEY3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png" width="270" height="684" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:684,&quot;width&quot;:270,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:69270,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hEY3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png 424w, https://substackcdn.com/image/fetch/$s_!hEY3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png 848w, https://substackcdn.com/image/fetch/$s_!hEY3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png 1272w, https://substackcdn.com/image/fetch/$s_!hEY3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b964400-1987-4d8b-809b-0abcf4cb054b_270x684.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This embedding arithmetic perfectly captured the <strong>latent theme</strong>:</p><blockquote><p>&#8220;Tech-driven consumer platforms in emerging markets.&#8221;</p></blockquote><p>We basically told the embedding:</p><blockquote><p>&#8220;Find me the Amazon equivalent, but outside the U.S., in markets like China.&#8221;</p></blockquote><p>And it delivered:</p><ul><li><p>China &#8594; PDD, JD, BABA, TCOM, YMM</p></li><li><p>Southeast Asia &#8594; SE</p></li><li><p>Latin America &#8594; MELI, NU</p></li><li><p>India &#8594; IBN</p></li></ul><p>That&#8217;s remarkably structured.</p><p>Even the slight outlier (CCJ) likely reflects <strong>shared institutional exposure</strong> through EM ETFs or crossover funds with a macro &#8220;growth + commodity exposure&#8221; tilt.</p><p>Alright&#8230; but how can we turn this into a <em>profitable trading strategy</em>? Let&#8217;s look at an example next.</p><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/asset-embeddings?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/asset-embeddings?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/asset-embeddings?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h1>A Strategy Example</h1><p>Let&#8217;s review a strategy that demonstrates the power of this paradigm shift, using asset embeddings. The goal is to illustrate just one of many ways asset embeddings can be applied to build innovative systematic strategies.</p><p>I know some institutions may want to take this further and need help doing so. In that case, feel free to reach out at <strong><a href="mailto:cs@quantitativo.com">cs@quantitativo.com</a></strong>.</p><h2>Important considerations</h2><p>First, some important notes to keep in mind before devising a strategy:</p><ol><li><p><strong>Asset embeddings are learned from 13F data</strong>, which is released with a <strong>45-day delay</strong>. For example:</p><ol><li><p>Embeddings from <strong>Q4&#8217;24</strong> can be extracted and used from ~<strong>Feb 15 to May 15, 2025</strong>.</p></li><li><p>Embeddings from <strong>Q1&#8217;25</strong> can be extracted and used from ~<strong>May 15 to Aug 15, 2025</strong>.</p></li><li><p>Embeddings from <strong>Q2&#8217;25</strong> can be extracted and used from ~<strong>Aug 15 to Nov 15, 2025</strong>.</p><p>And so on.</p></li></ol></li><li><p>As such, <strong>any idea that aims to use asset embeddings to directly predict short-term price movements will likely not work</strong>, because we are always working with the <strong>previous quarter&#8217;s embeddings</strong> (which <em>do</em> change from quarter to quarter) and with a 45-day delay.</p></li><li><p>Nevertheless, <strong>any idea that profits from using asset embeddings to cluster assets and find inefficiencies within those clusters is more likely to work</strong>, because <strong>institutional portfolio structures and co-holding patterns tend to evolve slowly over time</strong>, making intra-cluster relationships relatively persistent.</p></li><li><p>The paper explores both <strong>linear (PCA)</strong> and <strong>nonlinear (Word2Vec, BERT, etc.)</strong> asset embeddings. I personally tested PCA and Word2Vec (which is a shallow neural network), and here&#8217;s what I found:</p><ol><li><p><strong>Word2Vec yields superior results.</strong></p></li><li><p>However, this comes with a drawback: the <strong>coordinate system of the multidimensional vector space is not stable</strong> &#8212; it changes from quarter to quarter. For instance, imagine you trained Word2Vec models with 10 dimensions. <strong>Dimension 3 in Q1&#8217;25 is not directly comparable to Dimension 3 in Q2&#8217;25.</strong></p></li><li><p>We can use ML techniques to align or stabilize coordinate systems for <strong>linear models like PCA</strong>, but <strong>not for nonlinear embeddings</strong>.</p></li><li><p>As such, this rules out any strategy that depends on <strong>inter-quarter relationships between nonlinear embeddings</strong>. For linear embeddings, however, that&#8217;s feasible.</p></li></ol></li></ol><p>Ok, Carlos&#8230; but what does all this mean in practice?</p><p>It means that <strong>ideas based on finding inefficiencies within groups are likely to work very well</strong>. You know all those strategies that use industries, sectors (or even pairs) to identify relative-value opportunities and trade them?</p><p><strong>Those kinds of ideas.</strong></p><h2>Idea</h2><p>We define a <strong>trading period</strong> as the ~90 days from the middle of one quarter to the middle of the next. For example:</p><ul><li><p><strong>Feb 15 to May 15, 2025</strong> &#8594; uses embeddings from <strong>Q4&#8217;24</strong></p></li><li><p><strong>May 15 to Aug 15, 2025</strong> &#8594; uses embeddings from <strong>Q1&#8217;25</strong></p></li></ul><p>At the beginning of each trading period:</p><ul><li><p>Use asset embeddings to <strong>cluster all assets into 50 groups</strong>.</p></li><li><p><strong>Select the top 10 groups</strong> based on predictive power (*).</p></li><li><p>Each day, form <strong>long&#8211;short portfolios</strong> within each group using the <strong>volatility-adjusted residuals</strong> of daily returns relative to the return of the cluster (using quintiles).</p></li><li><p><strong>Rebalance daily.</strong></p></li></ul><p><em>(*</em>) How are the top 10 groups selected? We assess <strong>predictive power</strong> by running an OLS regression where each group&#8217;s residuals serve as predictors of next-day returns, using the current clusters and the previous quarter&#8217;s returns. We then <strong>rank the groups by their t-statistics</strong> and select the top 10.</p><p><strong>Friction Assumptions:</strong></p><ul><li><p><strong>Commissions / Costs:</strong> $0.0010 per share in trading costs.</p></li><li><p><strong>Shorts:</strong> Since the backtest starts in 2020, we have access to short-availability data. The model assumes that <strong>only stocks with sufficient borrow availability were shorted</strong>.</p></li></ul><p>I think that&#8217;s good enough to illustrate the power of asset embeddings in a simple strategy. Let&#8217;s see the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HBSH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HBSH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!HBSH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!HBSH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!HBSH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HBSH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png" width="1456" height="1410" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1410,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:572741,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HBSH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!HBSH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!HBSH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!HBSH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e3aaea-f578-4a3e-8d24-c7330c8ef696_1520x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the strategy</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2eiG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2eiG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png 424w, https://substackcdn.com/image/fetch/$s_!2eiG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png 848w, https://substackcdn.com/image/fetch/$s_!2eiG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!2eiG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2eiG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png" width="952" height="1134" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1134,&quot;width&quot;:952,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:265817,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2eiG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png 424w, https://substackcdn.com/image/fetch/$s_!2eiG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png 848w, https://substackcdn.com/image/fetch/$s_!2eiG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!2eiG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18bf3a8b-328d-45b0-86e5-925d405606b7_952x1134.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Strategy main stats</figcaption></figure></div><p>The results are not bad at all:</p><ul><li><p><strong>Annualized return</strong> is 18.5%, almost 2x the S&amp;P 500;</p></li><li><p><strong>Sharpe Ratio</strong> is 2.59, nearly 4x higher than the benchmark&#8217;s 0.72;</p></li><li><p><strong>Volatility</strong> comes in at 6.6%, almost 1/3 of the S&amp;P 500;</p></li><li><p><strong>Maximum drawdown</strong> is -5.3%, considerably smaller than the S&amp;P 500&#8217;s -25.4%;</p></li><li><p><strong>Correlation</strong> to the S&amp;P 500 is effectively zero, offering diversification benefits;</p></li><li><p>The strategy also delivered <strong>78% positive months</strong>, with a worst month of only -2.6% &#8212; versus the benchmark&#8217;s -9.3%.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RORq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RORq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png 424w, https://substackcdn.com/image/fetch/$s_!RORq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png 848w, https://substackcdn.com/image/fetch/$s_!RORq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png 1272w, https://substackcdn.com/image/fetch/$s_!RORq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RORq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png" width="1456" height="286" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:286,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:406467,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RORq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png 424w, https://substackcdn.com/image/fetch/$s_!RORq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png 848w, https://substackcdn.com/image/fetch/$s_!RORq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png 1272w, https://substackcdn.com/image/fetch/$s_!RORq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bb1b22f-a36d-4c80-924e-fecf873d685f_1982x390.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>If we had traded this strategy since 2021:</p><ul><li><p>We would have had <strong>only positive years;</strong></p></li><li><p>We would have seen <strong>78% of the months positive</strong>, with the best at +7.5% (Apr&#8217;25);</p></li><li><p>We would have seen <strong>22% of the months negative</strong>, with the worst at -2.6% (Dec&#8217;23);</p></li><li><p>The <strong>longest</strong> <strong>positive streak</strong> would have been <strong>12 months</strong>, from Dec&#8217;22 to Nov&#8217;23;</p></li><li><p>The <strong>longest negative streak</strong> would have been <strong>3 months</strong>, from Jan&#8217;25 to Mar&#8217;25.</p></li></ul><p>Looking at Fama-French 3-Factor risk model:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L3C8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L3C8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png 424w, https://substackcdn.com/image/fetch/$s_!L3C8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png 848w, https://substackcdn.com/image/fetch/$s_!L3C8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png 1272w, https://substackcdn.com/image/fetch/$s_!L3C8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L3C8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png" width="1262" height="840" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:840,&quot;width&quot;:1262,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:317587,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/175944609?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L3C8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png 424w, https://substackcdn.com/image/fetch/$s_!L3C8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png 848w, https://substackcdn.com/image/fetch/$s_!L3C8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png 1272w, https://substackcdn.com/image/fetch/$s_!L3C8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd14972e-3f31-4efd-ab43-91aa8ca70ea6_1262x840.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p><strong>Alpha: 0.0533% per day &#8594; annualized &#8776; 14%, highly significant (t = 4.19, p &lt; 0.001)</strong> &#8212; the strategy delivers strong abnormal returns not explained by standard risk factors.</p></li><li><p><strong>Market Beta (Mkt&#8211;RF): 0.041 &#8594; very low market exposure (t = 3.27, p = 0.001)</strong> &#8212; the strategy&#8217;s returns are largely independent from overall market movements.</p></li><li><p><strong>SMB (Size): 0.014, insignificant (t = 0.73, p = 0.46)</strong> &#8212; no systematic bias toward small or large caps.</p></li><li><p><strong>HML (Value): &#8211;0.009, insignificant (t = &#8211;0.58, p = 0.56)</strong> &#8212; no clear tilt between value and growth stocks.</p></li><li><p><strong>R&#178; = 0.017 &#8594; only 1.7% of return variation explained</strong> &#8212; factor exposures are minimal; performance is almost entirely idiosyncratic.</p></li></ul><p>This is what we want from a market-neutral strategy.</p><div><hr></div><h1>Final Thoughts</h1><p>What we&#8217;ve seen here is not just another backtest or statistical curiosity &#8212; it&#8217;s a <strong>glimpse of the power of asset embeddings</strong>.</p><p>By reframing how we represent assets&#8212;not through accounting ratios or static fundamentals, but through <strong>the collective behavior of investors</strong>&#8212;we move closer to a model of markets that actually mirrors reality: adaptive, relational, and dynamic.</p><p>In essence, <strong>asset embeddings turn holdings into language</strong>. Each portfolio is a &#8220;sentence,&#8221; each stock a &#8220;word,&#8221; and meaning emerges from co-occurrence. From that simple shift, an entire new toolkit becomes available: clustering, similarity search, latent factor extraction, and&#8212;eventually&#8212;prediction.</p><p>Our strategy example only scratches the surface. It shows that embeddings can generate <strong>robust, market-neutral alpha</strong>, even with basic clustering and residual sorting. But the real potential lies beyond this first layer:</p><ul><li><p><strong>Dynamic embeddings:</strong> tracking how relationships between assets evolve over time;</p></li><li><p><strong>Cross-domain embeddings:</strong> combining holdings, news, and price data into shared representations;</p></li><li><p><strong>Generative portfolios:</strong> constructing exposure to abstract concepts (&#8220;AI boom,&#8221; &#8220;energy transition&#8221;) directly from latent space.</p></li></ul><p>Finance has always been about <strong>representation</strong> &#8212; how we compress the complexity of the world into variables we can reason about. Moving from firm characteristics to embeddings doesn&#8217;t replace traditional approaches, but <strong>adds a new layer of understanding</strong> &#8212; one that captures relationships, context, and behavior directly from the data. It&#8217;s an early step toward a richer, more relational way of modeling markets. And we&#8217;re just getting started.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a> if you have questions, ideas, or feedback.</p><p>Cheers!</p><div><hr></div><p><em>The 2nd cohort of the course is still open for enrollment for the next couple of days.</em></p><p><em>I created this to respond to a request I&#8217;ve received from hundreds of readers here: access to my codebase, step by step &#8212; for those who want to develop strategies using the same approach I share here. Enrollment also includes access to the private community and an ever-growing library of study groups. More information at the link below.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Course and Community&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://quantitativo.carrd.co/"><span>Join the Course and Community</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RBAg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RBAg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 424w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 848w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1272w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RBAg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png" width="1456" height="1133" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1133,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RBAg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 424w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 848w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1272w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Last day for enrollment in the 2nd cohort: Oct 14.</em></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Volume Shocks and Overnight Returns]]></title><description><![CDATA[Can a +1.5 Sharpe strategy survive real-world frictions?]]></description><link>https://www.quantitativo.com/p/volume-shocks-and-overnight-returns</link><guid isPermaLink="false">https://www.quantitativo.com/p/volume-shocks-and-overnight-returns</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Sat, 30 Aug 2025 22:35:41 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!U77Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U77Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U77Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png 424w, https://substackcdn.com/image/fetch/$s_!U77Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png 848w, https://substackcdn.com/image/fetch/$s_!U77Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png 1272w, https://substackcdn.com/image/fetch/$s_!U77Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U77Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png" width="1456" height="1144" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/06665055-0e62-4bbe-9113-71c161187073_1920x1509.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1144,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3578879,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U77Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png 424w, https://substackcdn.com/image/fetch/$s_!U77Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png 848w, https://substackcdn.com/image/fetch/$s_!U77Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png 1272w, https://substackcdn.com/image/fetch/$s_!U77Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06665055-0e62-4bbe-9113-71c161187073_1920x1509.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Albert Einstein giving a lecture at Lincoln University in 1946</figcaption></figure></div><h1>The idea</h1><blockquote><p>"Everything should be made as simple as possible, but no simpler." Albert Einstein.</p></blockquote><p>Albert Einstein had a way of capturing deep truths in simple words. His quote is a reminder, especially relevant to us when building models. Stripping away unnecessary complexity is vital, but going too far risks oversimplification: a model that looks neat but fails to capture reality.</p><p>This week, we will implement the idea from the paper <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5156605">Volume Shocks and Overnight Returns</a>, by &#193;lvaro Cartea, Mihai Cucuringu, Qi Jin, and Mungo Ivor Wilson (2025, all from Oxford).</p><p><em>(By the way, sorry for taking so long to publish this piece&#8230; I&#8217;m in Bali for a 3-week blockchain conference for hardcore protocol engineers. I thought it&#8217;d be a good way to finally start dipping into crypto properly&#8230; It&#8217;s been a steep but rewarding learning curve&#8230; More on that soon!)</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ekAZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ekAZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png 424w, https://substackcdn.com/image/fetch/$s_!ekAZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png 848w, https://substackcdn.com/image/fetch/$s_!ekAZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png 1272w, https://substackcdn.com/image/fetch/$s_!ekAZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ekAZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png" width="1456" height="410" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:410,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:248979,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ekAZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png 424w, https://substackcdn.com/image/fetch/$s_!ekAZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png 848w, https://substackcdn.com/image/fetch/$s_!ekAZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png 1272w, https://substackcdn.com/image/fetch/$s_!ekAZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c476395-bece-4800-8559-9cd6bce787b8_1648x464.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Table 1, panel A from the paper: Performance of sorted volume shocks oracle portfolios</figcaption></figure></div><p>In practice, we&#8217;ll adapt the paper&#8217;s core insight rather than copy it wholesale. On one hand, we&#8217;ll <strong>simplify a key element of their setup</strong> that we believe can be expressed more cleanly without losing its essence. On the other, we&#8217;ll <strong>add back an important piece they left out &#8212; trading frictions and costs</strong> &#8212; because ignoring these can turn an elegant academic signal into an unrealistic strategy. The goal is to strike the right balance: simple enough to be practical, but rich enough to hold up in the real world. Or, as Einstein might put it if he were a quant: make it simple, just not &#8220;fantasy-backtest simple.&#8221;</p><p>Here's the plan:</p><ol><li><p>First, we will quickly summarize the paper</p></li><li><p>Then, we will run the naive, simplified implementation</p></li><li><p>Next, we will model friction &amp; trading costs and compare</p></li><li><p>Finally, after breaking the strategy, we will make it work again</p></li><li><p>As usual, we will wrap up with final thoughts and next steps</p></li></ol><div><hr></div><h3>Course and Community: enrollments Open</h3><p><em>As many of you requested, the 2nd cohort of the course is <strong>now live and open for enrollment.</strong></em></p><p><em>It walks through my codebase step by step and is designed for readers who want to develop quant strategies using the same approach I&#8217;ve shared here.</em></p><p><em>You&#8217;ll find all the details&#8212;content, structure, pricing, and FAQs&#8212;at the link below. If you have any questions, feel free to reach out.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Course and Community&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Course and Community</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RBAg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RBAg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 424w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 848w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1272w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RBAg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png" width="1456" height="1133" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1133,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1382189,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RBAg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 424w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 848w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1272w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Enrollment also includes access to the private community and an ever-growing library of study groups. The code and full recording of the latest session (&#8220;Execution details of Intraday Momentum for ES &amp; NQ&#8221;) are already available.</em></p><div><hr></div><h1>Paper summary</h1><h2>Core Idea</h2><p>The paper shows that <strong>unexpected spikes in trading volume (&#8220;volume shocks&#8221;) during the day predict positive returns overnight &#8212; but not during the next trading session</strong>.</p><ul><li><p>Stocks with large volume shocks earn significantly higher close-to-open returns.</p></li><li><p>This relationship is robust across firm sizes and persists after controlling for standard risk factors (market, size, momentum, reversal).</p></li><li><p>Importantly, intraday returns (open-to-close) show no such effect, highlighting a unique overnight premium linked to volume shocks.</p></li></ul><h2>Why Does This Happen?</h2><p>The usual explanation &#8212; that high volume reflects investor attention, lowers cost of capital, and should boost returns &#8212; doesn&#8217;t fit. If it did, the effect would show up during the next trading day, not just overnight.</p><p>Instead, the authors argue:</p><ul><li><p><strong>Market frictions and constraints</strong> (liquidity, noise trading, institutional execution) delay full incorporation of information until the next morning.</p></li><li><p><strong>Information flow after hours</strong> (e.g., earnings, news releases, sentiment shifts) interacts with the signal from volume shocks, amplifying the overnight effect.</p></li><li><p><strong>Overnight risk premia</strong>: investors may demand compensation for holding positions across the less liquid, higher-risk non-trading period.</p></li></ul><h2>How to Exploit It</h2><p>The trading challenge is that true volume shocks are only known after the close auction. The authors tackle this by <strong>predicting volume shocks during the day</strong> using linear and machine learning models (LightGBM, TabNet, etc.):</p><ul><li><p>Predicted volume shocks can be used to build long-only overnight portfolios.</p></li><li><p>Even simple models capture ~90% of the &#8220;oracle&#8221; (perfect foresight) strategy&#8217;s Sharpe ratio.</p></li><li><p>Best ML models (TabNet) achieve ~97% of the oracle&#8217;s performance, with Sharpe ratios around <strong>1.1</strong> and annualized returns near <strong>18%</strong>.</p></li><li><p>Crucially, trading only the high-volume side avoids liquidity traps, since low-volume stocks are harder to execute.</p></li></ul><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h1>Naive simplified version</h1><p>Instead of building complex ML models to forecast volume shocks, we&#8217;ll start with a stripped-down version that&#8217;s simple and actionable. The setup:</p><ul><li><p><strong>Signal timing</strong>: use trading volume information up to <strong>3:45 pm</strong>, so trades can be placed with <strong>MOC orders</strong> (data from <a href="http://Polygon.io">Polygon.io</a>)</p></li><li><p><strong>Portfolio construction</strong>: begin with a <strong>naive equal-weight implementation</strong></p></li><li><p><strong>Universe</strong>: run the strategy across the <strong>Russell 3000 stocks</strong> (data from Norgate)</p></li><li><p><strong>Positioning</strong>: keep it <strong>long-only</strong>, consistent with the paper</p></li><li><p><strong>Sorting</strong>: classify volume shocks into <strong>10 quantiles</strong> (instead of 5) and trade only the <strong>top decile</strong></p></li></ul><p>We will start with <strong>zero cost or friction. This is obviously unrealistic</strong>. But that's just to see what an unrealistic test looks like. Let's check the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iOjm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iOjm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png 424w, https://substackcdn.com/image/fetch/$s_!iOjm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png 848w, https://substackcdn.com/image/fetch/$s_!iOjm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!iOjm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iOjm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png" width="1456" height="1385" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1385,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:586732,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iOjm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png 424w, https://substackcdn.com/image/fetch/$s_!iOjm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png 848w, https://substackcdn.com/image/fetch/$s_!iOjm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!iOjm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52153dd1-ef32-4dd5-a2c0-e8814d37b68a_1547x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the first experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!60_0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!60_0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png 424w, https://substackcdn.com/image/fetch/$s_!60_0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png 848w, https://substackcdn.com/image/fetch/$s_!60_0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png 1272w, https://substackcdn.com/image/fetch/$s_!60_0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!60_0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png" width="950" height="1146" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1146,&quot;width&quot;:950,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:276926,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!60_0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png 424w, https://substackcdn.com/image/fetch/$s_!60_0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png 848w, https://substackcdn.com/image/fetch/$s_!60_0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png 1272w, https://substackcdn.com/image/fetch/$s_!60_0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedfad08-f2bb-48d3-9afc-2712e985a46b_950x1146.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest statistics</figcaption></figure></div><p>The backtest looks stellar, but only because it relies on two unrealistic assumptions: <strong>no trading costs</strong> and the ability to <strong>buy unlimited size in any stock, regardless of liquidity</strong>. Trading costs are not negligible here (especially for a strategy that rebalances <strong>every single day</strong>), and market impact in less liquid names would quickly eat into performance. The result is an equity curve that looks great on paper but <strong>overstates what a tradable strategy could actually deliver</strong>.</p><p>And that&#8217;s not unusual. Academic papers often skip over these implementation details (costs, liquidity, capacity) because their focus is on documenting the signal itself. It&#8217;s our job as practitioners to stress-test those assumptions, adjust for reality, and see whether the idea survives outside the lab.</p><div><hr></div><h1>Modeling friction and trading costs</h1><p>There are many different ways to model friction. As it was famously said:</p><blockquote><p>&#8220;All models are wrong, but some are useful.&#8221; George E. P. Box.</p></blockquote><p>To bring the strategy closer to reality, we&#8217;ll model two critical frictions using the following rules:</p><h3>Commissions</h3><p>We will implement Interactive Brokers&#8217; tiered model:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kCGC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kCGC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png 424w, https://substackcdn.com/image/fetch/$s_!kCGC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png 848w, https://substackcdn.com/image/fetch/$s_!kCGC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png 1272w, https://substackcdn.com/image/fetch/$s_!kCGC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kCGC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png" width="1262" height="946" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:946,&quot;width&quot;:1262,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:198223,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kCGC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png 424w, https://substackcdn.com/image/fetch/$s_!kCGC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png 848w, https://substackcdn.com/image/fetch/$s_!kCGC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png 1272w, https://substackcdn.com/image/fetch/$s_!kCGC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb95c97d3-6fa4-4934-a8a0-866617ac3759_1262x946.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p>Monthly volume shares are computed using the unadjusted closed prices of all names traded</p></li><li><p>We consider <strong>+$0.0020</strong> in third-party fees (approx. 2x the values in every tier)</p></li><li><p>We will consider these dollar values fixed throughout the simulation (which is a conservative estimate, as these numbers were lower 20 years ago)</p></li></ul><h3>Liquidity constraints</h3><p>If the required order size exceeds <strong>10% of a stock&#8217;s daily volume</strong>, we assume the trade cannot be executed and skip it entirely.</p><p>Together, these adjustments transform the &#8220;too good to be true&#8221; backtest into something that better reflects what can actually be achieved.</p><p>Let's see how they impact the strategy:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VWDB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VWDB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!VWDB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!VWDB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!VWDB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VWDB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png" width="1456" height="1410" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1410,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:609748,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VWDB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!VWDB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!VWDB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!VWDB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c522c42-8ec7-49b8-b4b0-929830c626a7_1520x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the second experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!58L-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!58L-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png 424w, https://substackcdn.com/image/fetch/$s_!58L-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png 848w, https://substackcdn.com/image/fetch/$s_!58L-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png 1272w, https://substackcdn.com/image/fetch/$s_!58L-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!58L-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png" width="946" height="1130" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1130,&quot;width&quot;:946,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:272466,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!58L-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png 424w, https://substackcdn.com/image/fetch/$s_!58L-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png 848w, https://substackcdn.com/image/fetch/$s_!58L-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png 1272w, https://substackcdn.com/image/fetch/$s_!58L-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8e6a6fa-dba0-4fd6-83c6-fab1df9563dc_946x1130.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest statistics</figcaption></figure></div><p>With trading costs and liquidity frictions modeled, the picture becomes more realistic. The strategy still outperforms the S&amp;P 500 benchmark in terms of annualized return and Sharpe ratio, proving that the overnight volume-shock effect is economically meaningful. But the performance is <strong>nowhere near the &#8220;frictionless&#8221; backtest</strong>, exactly as expected. Once we factor in commissions and the inability to size up in illiquid names, a good chunk of the edge gets eaten away, leaving behind a strategy that doesn't meet our standards to go into production.</p><p>What can we do to fix that?</p><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/volume-shocks-and-overnight-returns?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/volume-shocks-and-overnight-returns?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/volume-shocks-and-overnight-returns?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h1>Changing the universe</h1><p>At this point, many people would throw in the towel. They&#8217;d look at the results, dismiss the strategy as untradable, maybe even blame the academics for skipping frictions, and then move on to the next shiny idea. And that&#8217;s fair &#8212; everyone can do as they please.</p><p>But as a fan of Janis Joplin, I prefer to <em>&#8220;<a href="https://www.youtube.com/watch?v=jjHw_FJySg4">try, just a little bit harder</a>.&#8221;</em></p><p>This strategy is all about overnight returns &#8212; and if you&#8217;ve spent any time watching the markets, you know there&#8217;s a special corner of it that lives and breathes overnight moves: <strong>biotech stocks</strong>. They&#8217;re notorious for sharp gaps up or down, often tied to drug trial results, FDA decisions, or corporate announcements that tend to hit after hours. Big overnight moves, weak intraday drifts &#8212; it&#8217;s almost textbook for our setup.</p><p>Thanks to Norgate data, we have survivorship-bias-free constituents of the <strong>Nasdaq Biotechnology Index</strong> going back decades. So let&#8217;s narrow our focus to that universe and see whether the strategy becomes not just academically interesting, but practically powerful.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VNlj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VNlj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png 424w, https://substackcdn.com/image/fetch/$s_!VNlj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png 848w, https://substackcdn.com/image/fetch/$s_!VNlj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!VNlj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VNlj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png" width="1456" height="1386" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1386,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:637490,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VNlj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png 424w, https://substackcdn.com/image/fetch/$s_!VNlj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png 848w, https://substackcdn.com/image/fetch/$s_!VNlj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!VNlj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff463351c-52a2-4a28-b50b-d28136b9f311_1546x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the third experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6XJd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6XJd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png 424w, https://substackcdn.com/image/fetch/$s_!6XJd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png 848w, https://substackcdn.com/image/fetch/$s_!6XJd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!6XJd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6XJd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png" width="950" height="1136" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1136,&quot;width&quot;:950,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:276363,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6XJd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png 424w, https://substackcdn.com/image/fetch/$s_!6XJd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png 848w, https://substackcdn.com/image/fetch/$s_!6XJd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!6XJd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37884cd6-b972-4d79-bac3-d3aa7b08ad4a_950x1136.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest statistics</figcaption></figure></div><p>The results are striking:</p><ul><li><p><strong>Annualized return</strong> is 36.1%, more than four times the S&amp;P 500&#8217;s 8.4%;</p></li><li><p><strong>Sharpe Ratio</strong> is 1.52, nearly three times higher than the benchmark&#8217;s 0.52, showing much stronger risk-adjusted performance;</p></li><li><p><strong>Volatility</strong> comes in at 21.7%, slightly higher than the S&amp;P 500&#8217;s 19.0%, but well compensated by the excess return;</p></li><li><p><strong>Maximum drawdown</strong> is -36.6%, considerably smaller than the S&amp;P 500&#8217;s -56.8% (but still high for most investors);</p></li><li><p><strong>Correlation</strong> to the S&amp;P 500 is effectively zero, offering diversification benefits;</p></li><li><p>The strategy also delivered <strong>68% positive months</strong>, with a best month of +51.9% &#8212; versus the benchmark&#8217;s +12.7%.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cGmB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cGmB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png 424w, https://substackcdn.com/image/fetch/$s_!cGmB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png 848w, https://substackcdn.com/image/fetch/$s_!cGmB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png 1272w, https://substackcdn.com/image/fetch/$s_!cGmB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cGmB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png" width="1456" height="1016" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1016,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2004342,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cGmB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png 424w, https://substackcdn.com/image/fetch/$s_!cGmB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png 848w, https://substackcdn.com/image/fetch/$s_!cGmB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png 1272w, https://substackcdn.com/image/fetch/$s_!cGmB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a43bf2-473d-4dae-aeed-80d6f27b625e_1974x1378.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>This is the distribution of monthly returns. Here are some interesting highlights after computing the key descriptive statistics measures:</p><ul><li><p><strong>Mean (2.8% per month):</strong> That compounds to ~36% annualized, in line with the backtest table. Strong absolute performance.</p></li><li><p><strong>Std (6.8%):</strong> Moderate monthly volatility.</p></li><li><p><strong>Min (-14.4%) vs. Max (+51.9%):</strong> Extreme dispersion. While the downside is capped at about -14%, the upside tails are very fat (a +52% month!), likely driven by biotech gap-ups.</p></li><li><p><strong>Median (1.9%) vs. Mean (2.8%):</strong> Mean &gt; Median indicates the distribution is positively skewed &#8212; the occasional explosive winners pull the average up.</p></li><li><p><strong>Skew (2.1):</strong> Strongly right-skewed. This is exactly what you&#8217;d hope for in a strategy: more frequent modest gains, with rare huge wins.</p></li><li><p><strong>Kurtosis (11.6):</strong> Very heavy tails compared to a normal distribution (which has kurtosis of 3). This means more extreme outliers &#8212; both positive and negative &#8212; though the skew suggests the extreme positives dominate.</p></li></ul><div><hr></div><h1>Final thoughts</h1><p>As it stands, the strategy is powerful but not for the faint of heart. Volatility runs higher than the benchmark, and while that risk is handsomely rewarded (a <strong>1.5 Sharpe ratio</strong> is good), most investors don&#8217;t have the stomach for drawdowns north of 15&#8211;20%.</p><p>How to fix that? The naive solution is simple: <strong>don&#8217;t deploy all your capital here.</strong> Allocate a smaller slice and let the high Sharpe ratio do the compounding work. A second approach is to treat it as a <strong>component within a larger portfolio of strategies</strong> &#8212; its near-zero correlation to the market makes it an attractive diversifier. And of course, we could explore <strong>hedging overlays</strong> (like the beta hedging framework we discussed in earlier articles) to dampen volatility without giving up much alpha.</p><p>And this is only the start. Now that we&#8217;ve established a strong baseline, there&#8217;s plenty of room to push further. We could train models to <strong>predict the sign of the overnight return</strong>, using volume shock as a feature but expanding the set with price action, volatility, or news-driven variables. Both linear and non-linear methods could be tested, from simple regressions to richer ML frameworks. In short, the canvas is wide open &#8212; there&#8217;s much more we can do.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to reach out via Twitter or email if you have questions, ideas, or feedback. And if you&#8217;re looking to bring a strategy like this into production, let me know &#8212; especially if you&#8217;re running at scale, where low execution costs can make all the difference.</p><p>Cheers!</p><div><hr></div><h3>Course and Community: enrollments Open</h3><p><em>As many of you requested, the 2nd cohort of the course is <strong>now live and open for enrollment.</strong></em></p><p><em>It walks through my codebase step by step and is designed for readers who want to develop quant strategies using the same approach I&#8217;ve shared here.</em></p><p><em>You&#8217;ll find all the details&#8212;content, structure, pricing, and FAQs&#8212;at the link below. If you have any questions, feel free to reach out.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Course and Community&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://quantitativo.carrd.co/"><span>Join the Course and Community</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RBAg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RBAg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 424w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 848w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1272w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RBAg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png" width="1456" height="1133" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1133,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1382189,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/172366567?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!RBAg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 424w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 848w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1272w, https://substackcdn.com/image/fetch/$s_!RBAg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b936744-5dbc-4af9-993c-137c09fe6184_2048x1594.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Enrollment also includes access to the private community and an ever-growing library of study groups. The code and full recording of the latest session (&#8220;Execution details of Intraday Momentum for ES &amp; NQ&#8221;) are already available.</em></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[From Defense to Offense: A Tactical Model for All Seasons]]></title><description><![CDATA[How to get a +1.40 Sharpe ratio from adjusting a simple TAA model]]></description><link>https://www.quantitativo.com/p/from-defense-to-offense-a-tactical</link><guid isPermaLink="false">https://www.quantitativo.com/p/from-defense-to-offense-a-tactical</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Sat, 26 Jul 2025 15:51:26 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dt0c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dt0c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dt0c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png 424w, https://substackcdn.com/image/fetch/$s_!dt0c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png 848w, https://substackcdn.com/image/fetch/$s_!dt0c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png 1272w, https://substackcdn.com/image/fetch/$s_!dt0c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dt0c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png" width="1456" height="1049" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1049,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2326683,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dt0c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png 424w, https://substackcdn.com/image/fetch/$s_!dt0c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png 848w, https://substackcdn.com/image/fetch/$s_!dt0c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png 1272w, https://substackcdn.com/image/fetch/$s_!dt0c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa172300f-4c7f-4725-a8a5-fcd1b249b1e8_1576x1135.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Legendary coach Bob Knight talking to his players during a time-out in 1973</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;Basketball is a game of adjustments.&#8221; Bob Knight.</p></blockquote><p>Bob Knight was the last coach to lead an NCAA team to a <strong>perfect season</strong>: 32 wins, <strong>zero losses</strong>. That record still stands nearly <strong>half a century later</strong>.</p><p>His secret? He was a <strong>masterful tactician</strong>. Obsessed with preparation, relentless on fundamentals, and <strong>unmatched in making in-game adjustments</strong>. Knight believed basketball wasn&#8217;t about memorizing plays, but about reading the moment and <strong>adapting faster than the opponent</strong>. This philosophy made him one of the greatest coaches of all time.</p><div><hr></div><p>This week, we will implement the idea from the paper <em><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5334772">Defense First: A Multi-Asset Tactical Model for Adaptive Downside Protection</a></em>, by Thomas Carlson (2025). (You can find more about Tom here: <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Tom Carlson&quot;,&quot;id&quot;:45976008,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9408d6a3-80dc-45ec-bb7c-739a198ee3e0_237x237.jpeg&quot;,&quot;uuid&quot;:&quot;b8f3aa54-fbae-4de9-9b89-42633b933dda&quot;}" data-component-name="MentionToDOM"></span>.)</p><p><strong>Tactical Asset Allocation (TAA)</strong> takes the same principle of adaptability and applies it to investing. While <strong>Strategic Asset Allocation</strong> sets a long-term baseline mix (e.g., 60% stocks, 40% bonds), TAA introduces <strong>short- to medium-term adjustments</strong> based on market conditions. The goal? Exploit opportunities or mitigate risk by <strong>shifting weights dynamically</strong>, adding offense in favorable environments and defense when risks rise.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZmYj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZmYj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png 424w, https://substackcdn.com/image/fetch/$s_!ZmYj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png 848w, https://substackcdn.com/image/fetch/$s_!ZmYj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png 1272w, https://substackcdn.com/image/fetch/$s_!ZmYj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZmYj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png" width="1456" height="723" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:723,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:288417,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZmYj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png 424w, https://substackcdn.com/image/fetch/$s_!ZmYj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png 848w, https://substackcdn.com/image/fetch/$s_!ZmYj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png 1272w, https://substackcdn.com/image/fetch/$s_!ZmYj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe7a22fe-3444-42b4-9d2f-9ddb2d9f6df9_2048x1017.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Portfolio growth reported in the paper</figcaption></figure></div><p>Lately, I&#8217;ve leaned toward more advanced ideas, which might explain why so many readers are now coming from places like Morgan Stanley, Goldman Sachs, Deutsche Bank, Citigroup, Millennium Management, Point72, Wellington Management, Man Group, Millburn, Trexquant, IMC Trading&#8230; to name a few. (As well as students from schools like MIT, Columbia, Cornell, UPenn/Wharton, Carnegie Mellon, Duke, NYU, Berkeley, Georgia Tech, Imperial College London, etc.)</p><p>That said, I often get requests to <strong>cover simple ideas</strong>. This week&#8217;s idea is exactly that&#8230; so simple that you can <strong>code it in under 40 lines</strong>.</p><p>Here's our plan:</p><ol><li><p>First, we will summarize the paper</p></li><li><p>Then, we will discuss why it works and verify the edge quantitatively</p></li><li><p>Next, we will improve the original idea</p></li><li><p>Finally, we will discuss next steps</p></li></ol><p>Let's get to it.</p><div><hr></div><h2>Study Group</h2><p>Our next session will be on <strong>Saturday, August 9th at 11 AM ET</strong> (33% of the votes) and will focus on execution details from the <em>Intraday Momentum for ES &amp; NQ</em> article (57% of the votes). Connection details will be available at <a href="http://connect.quantitativo.com/">connect.quantitativo.com</a>.</p><p><em>We&#8217;re building a private community for systematic traders. A place to explore ideas, exchange insights, and tackle the real technical and strategic challenges of building robust trading systems&#8230; from signal research to execution and risk.</em></p><p><em>Enrollment reopens in August. Join the waitlist below to be the first to know when new seats open:</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Waitlist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Waitlist</span></a></p><div><hr></div><h1>Paper Summary</h1><p>Traditional &#8220;safe haven&#8221; strategies often fail during crises because correlations rise and static allocations break down. <strong>Defense First</strong> introduces a <strong>rules-based Tactical Asset Allocation</strong> model that dynamically rotates among <strong>four defensive assets</strong>&#8212;long-term U.S. Treasuries (TLT), gold (GLD), commodities (DBC), and the U.S. dollar (UUP)&#8212;with U.S. equities (SPY) as a fallback when defenses weaken. The objective: <strong>adaptive downside protection with positive long-term returns.</strong></p><h2>How It Works</h2><p>Each month, the strategy ranks four defensive assets based on multi-timeframe momentum (1, 3, 6, 12 months):</p><ul><li><p><strong>TLT</strong> (Long-term Treasuries) &#8212; deflation hedge</p></li><li><p><strong>GLD</strong> (Gold) &#8212; monetary instability hedge</p></li><li><p><strong>DBC</strong> (Commodities) &#8212; inflation hedge</p></li><li><p><strong>UUP</strong> (USD Index) &#8212; liquidity crisis hedge</p></li></ul><p>Allocations are 40/30/20/10 across the ranked assets <strong>if they outperform cash (T-bills)</strong>. Assets that fail this screen are replaced with <strong>SPY (U.S. equities)</strong> as a fallback (not for growth, but as the &#8220;least weak&#8221; option).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1Rv4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1Rv4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png 424w, https://substackcdn.com/image/fetch/$s_!1Rv4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png 848w, https://substackcdn.com/image/fetch/$s_!1Rv4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png 1272w, https://substackcdn.com/image/fetch/$s_!1Rv4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1Rv4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png" width="1284" height="494" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:494,&quot;width&quot;:1284,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:72963,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1Rv4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png 424w, https://substackcdn.com/image/fetch/$s_!1Rv4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png 848w, https://substackcdn.com/image/fetch/$s_!1Rv4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png 1272w, https://substackcdn.com/image/fetch/$s_!1Rv4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2bc58e94-c530-40f7-a4c8-fae8edb4b3e5_1284x494.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Results from the paper</figcaption></figure></div><p>It significantly reduced drawdowns during every major crash (1987, GFC, COVID, 2022), and generated <strong>65% profitable months</strong> across decades.</p><h2>Why It Works</h2><ul><li><p><strong>Multi-Asset Defense:</strong> Each asset hedges a different macro risk (deflation, inflation, currency stress, monetary instability).</p></li><li><p><strong>Momentum Edge:</strong> Builds on well-documented trend persistence across asset classes.</p></li><li><p><strong>Adaptive Risk Control:</strong> Absolute momentum filter avoids weak assets; equity fallback prevents idle cash.</p></li></ul><h2>Practical Perks</h2><ul><li><p>All instruments are <strong>liquid ETFs</strong>.</p></li><li><p>Simple <strong>monthly rebalancing</strong>.</p></li><li><p>No reliance on exotic data or proprietary tools.</p></li><li><p>Easily scalable for institutional or retail portfolios.</p></li></ul><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h1>The Edge</h1><p>Before running full backtests, let&#8217;s first examine whether the signal has a real edge. There are two ways to do this.</p><p>First, we can observe the edge by <strong>looking at the average next-month return of assets ranked by their momentum score</strong>. Each month, we rank the four defensive assets from <strong>1 (highest momentum)</strong> to <strong>4 (lowest momentum)</strong>, then compute the average return for the following month.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_uYb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_uYb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png 424w, https://substackcdn.com/image/fetch/$s_!_uYb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png 848w, https://substackcdn.com/image/fetch/$s_!_uYb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png 1272w, https://substackcdn.com/image/fetch/$s_!_uYb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_uYb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png" width="1456" height="884" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:884,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116525,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_uYb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png 424w, https://substackcdn.com/image/fetch/$s_!_uYb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png 848w, https://substackcdn.com/image/fetch/$s_!_uYb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png 1272w, https://substackcdn.com/image/fetch/$s_!_uYb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf946071-7eba-415d-b4b1-7ed461ed75ad_1676x1018.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Average Next-Month Return by Momentum Rank</figcaption></figure></div><p>When we average this across 34 years of data, the relationship is clear:</p><ul><li><p><strong>Rank 4 (weakest momentum)</strong> delivers the lowest next-month return,</p></li><li><p><strong>Rank 1 (strongest momentum)</strong> delivers the highest,</p><p>and the increase is monotonic from left to right.</p></li></ul><p>This means momentum isn&#8217;t just a theory here: it shows up in the numbers.</p><p>The second way is through a <strong>Fama-MacBeth regression</strong>, a standard approach in asset pricing to test if a characteristic predicts future returns across assets and time.</p><p>Here&#8217;s how it works:</p><ul><li><p>Each month, we run a <strong>cross-sectional regression</strong> of next month&#8217;s return on the momentum score for the four defensive assets.</p></li><li><p>We then average the slopes across all months and compute robust standard errors (Newey-West) to account for autocorrelation.</p></li></ul><p>The result?</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s9-Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s9-Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png 424w, https://substackcdn.com/image/fetch/$s_!s9-Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png 848w, https://substackcdn.com/image/fetch/$s_!s9-Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png 1272w, https://substackcdn.com/image/fetch/$s_!s9-Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!s9-Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png" width="754" height="92" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:92,&quot;width&quot;:754,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:18443,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!s9-Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png 424w, https://substackcdn.com/image/fetch/$s_!s9-Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png 848w, https://substackcdn.com/image/fetch/$s_!s9-Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png 1272w, https://substackcdn.com/image/fetch/$s_!s9-Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd05df983-e513-4aa3-9faf-32aa6f55501c_754x92.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>This means that a one-unit increase in the momentum score is associated with an <strong>8.5% higher next-month return</strong> on average. Statistically significant at the 1% level, this confirms that the momentum ranking carries real predictive power.</p><div><hr></div><h1>Experiments</h1><p>Wherever possible, ETF data was used. For periods prior to ETF inception, we filled the gaps with Vanguard mutual funds, asset class indices, or futures proxies, mirroring the methodology in the paper. This approach provides a <strong>consistent return history from early 1990s through 2025</strong>.</p><p>Here&#8217;s what the backtest looks like when we implement the strategy exactly as described in the paper:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L8NH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L8NH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!L8NH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!L8NH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!L8NH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L8NH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:696132,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L8NH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!L8NH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!L8NH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!L8NH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a9bbb-6446-4d45-87a0-d169b31cee03_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity curve for the first experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6Cyh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6Cyh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png 424w, https://substackcdn.com/image/fetch/$s_!6Cyh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png 848w, https://substackcdn.com/image/fetch/$s_!6Cyh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!6Cyh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6Cyh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png" width="944" height="1134" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1134,&quot;width&quot;:944,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:275514,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6Cyh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png 424w, https://substackcdn.com/image/fetch/$s_!6Cyh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png 848w, https://substackcdn.com/image/fetch/$s_!6Cyh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!6Cyh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00fd6e94-8c5d-4b74-b8f5-08b5fd5e8b0e_944x1134.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9PlE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9PlE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png 424w, https://substackcdn.com/image/fetch/$s_!9PlE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png 848w, https://substackcdn.com/image/fetch/$s_!9PlE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png 1272w, https://substackcdn.com/image/fetch/$s_!9PlE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9PlE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png" width="1456" height="1570" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1570,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2976708,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9PlE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png 424w, https://substackcdn.com/image/fetch/$s_!9PlE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png 848w, https://substackcdn.com/image/fetch/$s_!9PlE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png 1272w, https://substackcdn.com/image/fetch/$s_!9PlE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aaaef8c-ff44-4012-a552-341a598c00d9_1972x2126.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>The results are not bad:</p><ul><li><p>Annualized return is <strong>10.4%</strong>, very close to the S&amp;P 500&#8217;s 10.6%, but with much lower risk;</p></li><li><p>Sharpe Ratio is <strong>0.95</strong>, 50% higher than the benchmark&#8217;s 0.64, signaling far better risk-adjusted performance;</p></li><li><p>Volatility is just <strong>11.1%</strong> vs. <strong>18.5%</strong> for the benchmark, a significant reduction;</p></li><li><p>Maximum drawdown is only <strong>19.4%</strong>, compared to a crushing <strong>55.2%</strong> for the S&amp;P 500;</p></li><li><p>Correlation to equities is modest at <strong>0.27</strong>, adding diversification benefits;</p></li></ul><p>The results are also pretty close to what was presented in the paper.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qPLb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qPLb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png 424w, https://substackcdn.com/image/fetch/$s_!qPLb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png 848w, https://substackcdn.com/image/fetch/$s_!qPLb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png 1272w, https://substackcdn.com/image/fetch/$s_!qPLb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qPLb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png" width="1006" height="672" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:672,&quot;width&quot;:1006,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:244581,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qPLb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png 424w, https://substackcdn.com/image/fetch/$s_!qPLb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png 848w, https://substackcdn.com/image/fetch/$s_!qPLb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png 1272w, https://substackcdn.com/image/fetch/$s_!qPLb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F824d3637-c74b-4045-b888-bf6e6f22196b_1006x672.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">OLS regression on the portfolio excess returns using Fama-French factors</figcaption></figure></div><p>And here are the key takeaways from the <strong>Fama-French 3-Factor regression:</strong></p><ul><li><p><strong>Alpha:</strong> 0.0262% per day &#8594; annualized &#8776; <strong>6.8%</strong>, statistically significant (t = 3.58, p &lt; 0.001), confirming strong abnormal returns not explained by Fama-French factors;</p></li><li><p><strong>Market Beta (Mkt-RF):</strong> 0.16 &#8594; very low equity exposure, yet strong absolute returns;</p></li><li><p><strong>SMB (Size):</strong> -0.006, not significant &#8594; no clear size tilt;</p></li><li><p><strong>HML (Value):</strong> -0.039, significant negative &#8594; slight tilt toward growth;</p></li><li><p><strong>R&#178;:</strong> 0.072 &#8594; factors explain only ~7% of variance, most return comes from strategy itself.</p></li></ul><p>So, the system works: we see a good downside protection.</p><p>Now, what can we do to improve the system and go from defense to offense?</p><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/from-defense-to-offense-a-tactical?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/from-defense-to-offense-a-tactical?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/from-defense-to-offense-a-tactical?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h1>Adding leverage</h1><p>The first idea is simple: add leverage&#8230; but not across the board. We&#8217;ll apply <strong>3x leverage only to the equity portion</strong> by using the UPRO ETF. Why 3x? Because it brings the portfolio&#8217;s risk closer to that of the benchmark. See:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-Kun!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-Kun!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png 424w, https://substackcdn.com/image/fetch/$s_!-Kun!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png 848w, https://substackcdn.com/image/fetch/$s_!-Kun!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!-Kun!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-Kun!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png" width="1456" height="1385" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1385,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:732054,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-Kun!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png 424w, https://substackcdn.com/image/fetch/$s_!-Kun!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png 848w, https://substackcdn.com/image/fetch/$s_!-Kun!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!-Kun!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12e1cd0f-90ed-4ba8-aaee-d32b8ad16f37_1547x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity curve for the second experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Om_S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821071e5-e840-4397-bd27-10a3231b9133_944x1136.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Om_S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821071e5-e840-4397-bd27-10a3231b9133_944x1136.png 424w, https://substackcdn.com/image/fetch/$s_!Om_S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821071e5-e840-4397-bd27-10a3231b9133_944x1136.png 848w, https://substackcdn.com/image/fetch/$s_!Om_S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821071e5-e840-4397-bd27-10a3231b9133_944x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!Om_S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821071e5-e840-4397-bd27-10a3231b9133_944x1136.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Om_S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821071e5-e840-4397-bd27-10a3231b9133_944x1136.png" width="944" height="1136" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/821071e5-e840-4397-bd27-10a3231b9133_944x1136.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1136,&quot;width&quot;:944,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:279589,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821071e5-e840-4397-bd27-10a3231b9133_944x1136.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Om_S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821071e5-e840-4397-bd27-10a3231b9133_944x1136.png 424w, https://substackcdn.com/image/fetch/$s_!Om_S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821071e5-e840-4397-bd27-10a3231b9133_944x1136.png 848w, https://substackcdn.com/image/fetch/$s_!Om_S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821071e5-e840-4397-bd27-10a3231b9133_944x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!Om_S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821071e5-e840-4397-bd27-10a3231b9133_944x1136.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zF6A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zF6A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png 424w, https://substackcdn.com/image/fetch/$s_!zF6A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png 848w, https://substackcdn.com/image/fetch/$s_!zF6A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png 1272w, https://substackcdn.com/image/fetch/$s_!zF6A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zF6A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png" width="1456" height="1569" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1569,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3516063,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zF6A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png 424w, https://substackcdn.com/image/fetch/$s_!zF6A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png 848w, https://substackcdn.com/image/fetch/$s_!zF6A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png 1272w, https://substackcdn.com/image/fetch/$s_!zF6A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2d0ac59-3305-434a-b883-d120c5d9c555_1976x2130.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>In summary:</p><ul><li><p><strong>Annualized return jumps to 16.2%</strong>, a big increase from <strong>10.4% in the unleveraged strategy</strong>, and far ahead of the S&amp;P 500&#8217;s 10.6%;</p></li><li><p><strong>Sharpe Ratio remains good at 0.97</strong>, slightly above 0.95 from before, and still much better than the S&amp;P 500&#8217;s 0.64;</p></li><li><p><strong>Volatility rises to 17.0%</strong>, up from 11.1%, but still slightly below the S&amp;P 500&#8217;s 18.5%;</p></li><li><p><strong>Max drawdown increases to -33.9%</strong>, compared to -19.4% before, but it&#8217;s still significantly better than the S&amp;P 500&#8217;s -55.2%;</p></li><li><p><strong>Average max drawdown</strong> remains controlled at -12.6% vs. -13.8% for the S&amp;P 500;</p></li><li><p><strong>Correlation with the S&amp;P 500 rises to 0.58</strong>, which is expected since we&#8217;ve leveraged the equity sleeve;</p></li></ul><p>With roughly the same level of volatility as the S&amp;P 500, the strategy now delivers significantly higher returns (16.2% vs. 10.6%) while maintaining a superior Sharpe ratio and much smaller drawdowns.</p><p>What else can we do to improve?</p><div><hr></div><h1>Portfolio of Strategies</h1><p>The idea here is simple: add this strategy to a broader portfolio. Which portfolio? For example: 40% this strategy, 40% the rebalancing strategy we reviewed in the previous article, and 20% our classic mean-reversion portfolio.</p><p>This is what we get:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lHB8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lHB8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!lHB8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!lHB8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!lHB8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lHB8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:591926,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lHB8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!lHB8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!lHB8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!lHB8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cd640ef-ee58-42b5-b419-5c39b925ecca_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity curve for the third experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HkY6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HkY6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png 424w, https://substackcdn.com/image/fetch/$s_!HkY6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png 848w, https://substackcdn.com/image/fetch/$s_!HkY6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png 1272w, https://substackcdn.com/image/fetch/$s_!HkY6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HkY6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png" width="944" height="1132" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1132,&quot;width&quot;:944,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:270605,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HkY6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png 424w, https://substackcdn.com/image/fetch/$s_!HkY6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png 848w, https://substackcdn.com/image/fetch/$s_!HkY6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png 1272w, https://substackcdn.com/image/fetch/$s_!HkY6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfe1875b-7f33-4092-a4ba-a63a10465041_944x1132.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P5ZB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P5ZB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png 424w, https://substackcdn.com/image/fetch/$s_!P5ZB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png 848w, https://substackcdn.com/image/fetch/$s_!P5ZB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png 1272w, https://substackcdn.com/image/fetch/$s_!P5ZB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P5ZB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png" width="1456" height="1017" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1017,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1879880,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!P5ZB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png 424w, https://substackcdn.com/image/fetch/$s_!P5ZB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png 848w, https://substackcdn.com/image/fetch/$s_!P5ZB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png 1272w, https://substackcdn.com/image/fetch/$s_!P5ZB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b69763f-75c8-4087-aa07-508b1227bef6_1970x1376.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>Those results are not bad at all:</p><ul><li><p><strong>Annualized return climbs to 16.8%</strong>, slightly higher than the leveraged version (16.2%) and double the S&amp;P 500&#8217;s 8.3%;</p></li><li><p><strong>Sharpe Ratio jumps to 1.43</strong>, a huge improvement over 0.97 in the leveraged strategy and nearly 3x better than the S&amp;P 500&#8217;s 0.51;</p></li><li><p><strong>Volatility drops to 11.3%</strong>, far below both the leveraged version (17.0%) and the S&amp;P 500 (19.0%), showing the power of diversification;</p></li><li><p><strong>Max drawdown improves dramatically to -14.7%</strong>, from -33.9% with leverage and -56.8% for the S&amp;P 500;</p></li><li><p><strong>Average max drawdown shrinks to -7.0%</strong>, about half the S&amp;P 500&#8217;s -14.6%;</p></li><li><p><strong>% of positive months rises to 73%</strong>, higher than both previous setups (65%) and the benchmark (65%);</p></li><li><p>Best and worst month performance also improves, with the worst month limited to -6.4% vs. -16.9% for the S&amp;P 500.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!m2ie!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!m2ie!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png 424w, https://substackcdn.com/image/fetch/$s_!m2ie!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png 848w, https://substackcdn.com/image/fetch/$s_!m2ie!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png 1272w, https://substackcdn.com/image/fetch/$s_!m2ie!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!m2ie!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png" width="996" height="658" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:658,&quot;width&quot;:996,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:249744,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/169311686?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!m2ie!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png 424w, https://substackcdn.com/image/fetch/$s_!m2ie!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png 848w, https://substackcdn.com/image/fetch/$s_!m2ie!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png 1272w, https://substackcdn.com/image/fetch/$s_!m2ie!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb054924a-aa37-46f5-9a75-7be5d3d8ad36_996x658.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">OLS regression on the portfolio excess returns using Fama-French factors</figcaption></figure></div><p>Here are the key takeaways from this <strong>Fama-French 3-Factor regression</strong>:</p><ul><li><p><strong>Alpha:</strong> 0.0419% per day &#8594; annualized &#8776; <strong>11.1%</strong>, highly significant (t = 5.52, p &lt; 0.001), confirming strong abnormal returns unexplained by the factors;</p></li><li><p><strong>Market Beta (Mkt-RF):</strong> 0.37 &#8594; moderate equity exposure, much higher than the previous strategy&#8217;s 0.16 but still well below 1, meaning returns are not just market-driven;</p></li><li><p><strong>SMB (Size):</strong> -0.078, significant negative &#8594; tilt toward large-cap assets;</p></li><li><p><strong>HML (Value):</strong> -0.108, strongly significant negative &#8594; strong preference for growth over value;</p></li><li><p><strong>R&#178;:</strong> 0.386 &#8594; about 39% of variance explained by the model, leaving most performance driven by the strategy&#8217;s design.</p></li></ul><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/from-defense-to-offense-a-tactical?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/from-defense-to-offense-a-tactical?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/from-defense-to-offense-a-tactical?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h1>Final Thoughts</h1><p>What started as a <strong>defensive allocation model</strong> turned out to be a remarkably flexible building block. Out of the box, it offered <strong>equity-like returns with bond-like drawdowns</strong>, proving that simple rules (momentum screens, absolute thresholds, and macro diversification) can go a long way.</p><p>Then we pushed it further. By <strong>adding selective leverage</strong>, we matched the benchmark&#8217;s volatility and delivered a massive return boost without losing control of risk. Finally, by <strong>blending this strategy into a portfolio with others</strong>, we unlocked more alpha: a <strong>1.43 Sharpe ratio</strong>, lower drawdowns, and over 70% positive months.</p><p>Does this mean the work is done? Not at all. There&#8217;s plenty of room to explore:</p><ul><li><p><strong>Smarter leverage:</strong> dynamic sizing based on volatility or market regimes;</p></li><li><p><strong>Expanded asset set:</strong> more macro hedges, or even crypto for an uncorrelated sleeve;</p></li><li><p><strong>Adaptive weights:</strong> machine-learning or Bayesian methods for ranking confidence.</p></li></ul><p>The takeaway? <strong>Defense First</strong> might be more than a crash-protection tool: a foundation for building <strong>robust, adaptive portfolios</strong> that thrive across regimes.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a> if you have questions, ideas, or feedback.</p><p>Cheers!</p><div><hr></div><p><em>The first cohort of the course was a great success. Thank you to everyone who joined! Enrollment is now closed. The next cohort opens in <strong>August</strong>, with 50 more seats. Course participants also get exclusive access to our <strong>Community</strong> and <strong>Study Group</strong>. Join the waitlist below to be notified when enrollment reopens:</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Waitlist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Waitlist</span></a></p><p><em>(I know, I need to update this landing page&#8230; as soon as I find time I will add more details about the course, the community, reviews from the 50 first users, etc :))</em></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[The Unintended Consequences of Rebalancing]]></title><description><![CDATA[How a simple rebalancing strategy boosts Sharpe from 1.0 to 1.30]]></description><link>https://www.quantitativo.com/p/the-unintended-consequences-of-rebalancing</link><guid isPermaLink="false">https://www.quantitativo.com/p/the-unintended-consequences-of-rebalancing</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Mon, 14 Jul 2025 12:02:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!g9ey!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!g9ey!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!g9ey!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png 424w, https://substackcdn.com/image/fetch/$s_!g9ey!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png 848w, https://substackcdn.com/image/fetch/$s_!g9ey!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png 1272w, https://substackcdn.com/image/fetch/$s_!g9ey!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!g9ey!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png" width="750" height="499" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3140bb62-15cd-4313-b847-f538527d93ec_750x499.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:499,&quot;width&quot;:750,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:570113,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/168254425?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!g9ey!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png 424w, https://substackcdn.com/image/fetch/$s_!g9ey!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png 848w, https://substackcdn.com/image/fetch/$s_!g9ey!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png 1272w, https://substackcdn.com/image/fetch/$s_!g9ey!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3140bb62-15cd-4313-b847-f538527d93ec_750x499.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The California Gold Rush</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;I picked up one or two pieces and examined them attentively... I then collected four or five pieces and went to Mr. Scott... I said, &#8216;I believe this is gold.&#8217;&#8221; <em>James W. Marshall.</em></p></blockquote><p>He found gold&#8230; and died broke.</p><p>James W. Marshall unintentionally sparked one of the greatest migrations in American history. In 1848, while building a sawmill on the American River, he noticed a few glimmers in the water, triggering the California Gold Rush and forever altering the American West.</p><p>Back then, finding gold was easy. With little more than basic tools, everyday people could strike it rich. Some did (Marshall wasn&#8217;t one of them). But as more prospectors arrived, the easy gold disappeared. The shallow deposits anyone could reach with a pan were quickly depleted.</p><p>Still, despite the surge in miners and competition, gold production didn&#8217;t stop&#8230; it soared. Why? <strong>Technological advances, global exploration, and industrialization.</strong></p><p>I find the analogy between gold mining and alpha research fascinating. Like gold, early alpha could be extracted using simple models. But as more participants entered the market, the obvious opportunities vanished. Today, finding alpha with a basic model in a crowded market is as unlikely as finding gold in the American River with a tin pan. If something glitters, it's probably pyrite&#8230; <strong>fool&#8217;s gold</strong>.</p><p>Yet alpha production has never been higher. Why? Again: <strong>technology, globalization, and industrial scale</strong>. The biggest quant firms and hedge funds have made more money in the past decade than ever before.</p><div><hr></div><p>This week, we&#8217;ll implement the paper <strong>&#8220;<a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5122748">The Unintended Consequences of Rebalancing</a>&#8221;</strong> by Campbell Harvey, Michele Mazzoleni, and Alessandro Melone.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!etkq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!etkq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png 424w, https://substackcdn.com/image/fetch/$s_!etkq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png 848w, https://substackcdn.com/image/fetch/$s_!etkq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png 1272w, https://substackcdn.com/image/fetch/$s_!etkq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!etkq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png" width="1154" height="986" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:986,&quot;width&quot;:1154,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:220704,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/168254425?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!etkq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png 424w, https://substackcdn.com/image/fetch/$s_!etkq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png 848w, https://substackcdn.com/image/fetch/$s_!etkq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png 1272w, https://substackcdn.com/image/fetch/$s_!etkq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae5b20c8-95fe-4d41-ac35-dc1d131c62ee_1154x986.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Front-Running Strategy Performance Over Time, as reported by the authors</figcaption></figure></div><p>The paper explores how institutional investors are forced to rebalance frequently, and how these predictable flows create arbitrage opportunities for those willing to front-run them. The strategy is surprisingly simple.</p><p>In fact, the model is so simple it made me picture someone striking gold today with nothing but a shovel. I know, I'm very skeptical. Possible? Maybe. Likely? Well, read on and decide for yourself.</p><h3>Here&#8217;s the plan:</h3><ol><li><p>We&#8217;ll begin with a quick summary of the paper</p></li><li><p>Then, we&#8217;ll show the results from replicating their approach</p></li><li><p>Next, we&#8217;ll combine this strategy with a base portfolio of mean-reversion strategies to highlight diversification benefits</p></li><li><p>Finally, we&#8217;ll discuss next steps</p></li></ol><p>If you know basic Python and Pandas, you can replicate this paper in a few hours. It&#8217;s a great warm-up if you're thinking about joining the <strong>second cohort of the course</strong>, which opens again in <strong>August</strong>. We've had lots of interest lately&#8230; more details soon.</p><div><hr></div><p><em>We&#8217;re building a private community for systematic traders. A place to explore ideas, exchange insights, and tackle the real technical and strategic challenges of building robust trading systems&#8230; from signal research to execution and risk.</em></p><p><em>Enrollment reopens in August. Join the waitlist below to be the first to know when new seats open:</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join The Waitlist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join The Waitlist</span></a></p><div><hr></div><h1>Paper Summary</h1><p><strong>&#8220;The Unintended Consequences of Rebalancing&#8221;</strong> explores how mechanical portfolio rebalancing by institutional investors, often done at predictable intervals, creates systematic, exploitable price distortions in equity and bond markets. The paper shows that these flows not only move prices but also impose hidden costs on long-term investors while offering short-term profit opportunities to arbitrageurs.</p><h3>Core Idea</h3><p>Institutional investors (like pension and mutual funds) regularly rebalance portfolios, selling stocks and buying bonds when equities outperform, and vice versa. This activity, often driven by either <strong>Calendar rules</strong> (e.g., monthly rebalancing) or <strong>Threshold triggers</strong> (e.g., when allocations drift by a set %), creates <strong>predictable and recurring trading patterns</strong>.</p><p>The authors construct two signals:</p><ul><li><p><strong>Threshold Signal</strong>: Measures when equity/bond weights deviate from targets</p></li><li><p><strong>Calendar Signal</strong>: Captures end-of-month rebalancing pressures</p></li></ul><p>Both signals significantly predict <strong>next-day cross-asset returns</strong> (S&amp;P 500 vs. 10-year Treasuries). For example, a one standard deviation increase in these signals (indicating equities are overweight) predicts a <strong>~17 bps decline in equities the next day</strong>.</p><h3>Why Does This Happen?</h3><p>Large funds must rebalance due to internal mandates, even when doing so imposes costs. These trades are:</p><ul><li><p><strong>Mechanical</strong>, not information-driven</p></li><li><p><strong>Predictable</strong>, especially near month- and quarter-end</p></li><li><p><strong>Unavoidable</strong>, due to structural portfolio rules</p></li></ul><p>This creates <strong>price pressure</strong>, which <strong>reverts within ~2 weeks</strong>, suggesting temporary inefficiencies.</p><p>The cost? Estimated at <strong>~8 basis points per year</strong>&#8212;which adds up to <strong>$16 billion annually</strong>, or roughly <strong>$200 per U.S. household</strong>. This is <strong>more than the annual fee of passive investing</strong>.</p><h3>How to Exploit It</h3><p>The authors build a <strong>simple long-short strategy</strong> that front-runs rebalancers:</p><ul><li><p>If signals show equities are overweight &#8594; short S&amp;P futures, long bonds</p></li><li><p>If signals show equities are underweight &#8594; long S&amp;P, short bonds</p></li></ul><p>The strategy achieves a <strong>Sharpe ratio &gt; 1</strong> over 1997&#8211;2023. Returns are statistically significant and robust to controls for momentum, macro conditions, sentiment, and volatility.</p><p>This is one of the rare papers that documents a <strong>market-wide return anomaly caused not by alpha-seeking traders</strong>, but by the <strong>systematic behavior of the institutions themselves</strong>.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/the-unintended-consequences-of-rebalancing?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/the-unintended-consequences-of-rebalancing?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/the-unintended-consequences-of-rebalancing?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h1>Replicating the paper</h1><p>Both the <strong>Threshold Signal</strong> and the <strong>Calendar Signal</strong> are derived from the weights of a balanced equity/bond portfolio (60/40).</p><p>Over time, returns from the <strong>S&amp;P 500</strong> and <strong>10-year U.S. Treasury note futures</strong> cause these weights to drift away from the target 60/40 allocation.</p><ul><li><p>In the <strong>Threshold Signal</strong>, the portfolio is rebalanced back to 60/40 <strong>whenever the drift exceeds a specified threshold (&#948;)</strong>.</p></li><li><p>In the <strong>Calendar Signal</strong>, the portfolio is rebalanced back to 60/40 <strong>on the last business day of each month</strong>, regardless of the drift.</p></li></ul><p>Both signals are computed <strong>iteratively</strong>, tracking how portfolio weights evolve and trigger rebalancing over time:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;w^T_{t+1}= \n\\begin{cases} \n60\\% &amp; \\text{if } |w^T_t-60\\%|\\ge\\delta \\\\\nw^T_{t+1}(w^T_t; R^{SP}_{t+1}; R^{10Y}_{t+1}) &amp; \\text{otherwise}\n\\end{cases}       &quot;,&quot;id&quot;:&quot;ACINRWKJCY&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;w^C_{t+1}= \n\\begin{cases} \n60\\% &amp; \\text{if } t \\text{ is the last day of the month} \\\\\nw^C_{t+1}(w^C_t; R^{SP}_{t+1}; R^{10Y}_{t+1}) &amp; \\text{otherwise}\n\\end{cases}       &quot;,&quot;id&quot;:&quot;MCDRUAOGUQ&quot;}" data-component-name="LatexBlockToDOM"></div><p>Here, w^C_t denotes the weights for the Calendar Signal, while w^T_t denotes the weights for the Threshold Signal. The formula that updates the weights as a function of previous weights and returns is:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;w^j_{t+1}(w^j_t; R^{SP}_{t+1}; R^{10Y}_{t+1})= \n\\frac{w^j_t(1 + R^{SP}_{t+1})}\n{w^j_t(1 + R^{SP}_{t+1}) + (1 - w^j_t)(1 + R^{10Y}_{t+1})}&quot;,&quot;id&quot;:&quot;YUSHCXVCTD&quot;}" data-component-name="LatexBlockToDOM"></div><p>Coding these signals is fairly straightforward. Two questions remain:</p><ul><li><p><strong>What threshold values (&#948;) should we use for the Threshold Signal?</strong></p></li><li><p><strong>How many days before month-end does the Calendar effect typically materialize?</strong></p></li></ul><p>Both questions are addressed through <strong>predictive regressions</strong> using different values of <strong>&#948;</strong> (for the Threshold Signal) and <strong>N</strong> (the number of days before month-end for the Calendar Signal):</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cK7Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cK7Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png 424w, https://substackcdn.com/image/fetch/$s_!cK7Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png 848w, https://substackcdn.com/image/fetch/$s_!cK7Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png 1272w, https://substackcdn.com/image/fetch/$s_!cK7Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cK7Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png" width="1456" height="595" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:595,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:340012,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/168254425?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cK7Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png 424w, https://substackcdn.com/image/fetch/$s_!cK7Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png 848w, https://substackcdn.com/image/fetch/$s_!cK7Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png 1272w, https://substackcdn.com/image/fetch/$s_!cK7Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce39dfe6-5692-4b61-98db-bdb13c6c365d_1782x728.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Signal Calibrations</figcaption></figure></div><p>The calibration results guide two key modeling choices. For the <strong>Calendar Signal</strong>, we observe that the predictive power (t-stat) becomes statistically significant about <strong>5 days before month-end</strong>, justifying the use of <strong>N = 5</strong>. For the <strong>Threshold Signal</strong>, predictability weakens beyond <strong>&#948; = 2.5%</strong>, so we average signals across <strong>all &#948; values from 0% to 2.5% in 0.1% increments</strong> to capture a representative rebalancer behavior without overfitting to a single threshold.</p><h2>The strategy</h2><p>The trading strategy takes a position in a S&amp;P 500 futures contract and an opposite position in a 10-year Treasury note futures contract as follows:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;R^{\\text{Strategy}}_t=(R^{SP}_t-R^{10T}_t) \\cdot w^{\\text{Strategy}}_t&quot;,&quot;id&quot;:&quot;DJBMQZQRXG&quot;}" data-component-name="LatexBlockToDOM"></div><p>where the portfolio weight $w^{\text{Strategy}}_t$ is defined as the average of modified versions of the Threshold and Calendar signals. The modifications primarily involve rescaling, inverting the signal, and averaging, among other adjustments. See the paper for full details.</p><p>Running that leads to an equity curve pretty similar to what was reported:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_V3h!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_V3h!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png 424w, https://substackcdn.com/image/fetch/$s_!_V3h!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png 848w, https://substackcdn.com/image/fetch/$s_!_V3h!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png 1272w, https://substackcdn.com/image/fetch/$s_!_V3h!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_V3h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png" width="1318" height="770" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:770,&quot;width&quot;:1318,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:206712,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/168254425?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_V3h!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png 424w, https://substackcdn.com/image/fetch/$s_!_V3h!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png 848w, https://substackcdn.com/image/fetch/$s_!_V3h!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png 1272w, https://substackcdn.com/image/fetch/$s_!_V3h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8642781c-8822-4906-8d74-85d069ac0a2c_1318x770.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Front-Running Strategy Performance Over Time (benchmark is rescaled to the same volatility, as done by the authors)</figcaption></figure></div><p>The Sharpe ratio we obtained was 0.94, which is close enough to the value reported in the paper. Tweaking the rescaling parameters and other small details might improve the results slightly. But that's not what we want to do next.</p><div><hr></div><h1>Adding the strategy to a portfolio</h1><p>Now let&#8217;s assess the benefits of adding this strategy to a broader portfolio.</p><p>We'll use as a baseline the <strong>mean reversion strategy portfolio</strong> we've been trading (based on ideas we've shared here) for nearly a year.</p><p>Below are the baseline results <strong>before adding the new strategy</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!X98p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!X98p!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!X98p!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!X98p!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!X98p!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!X98p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:641839,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/168254425?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!X98p!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!X98p!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!X98p!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!X98p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f0cac13-ef59-4438-b524-48af4a03d8bc_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves of the portfolio of MR strategies (baseline)</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!USd9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!USd9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png 424w, https://substackcdn.com/image/fetch/$s_!USd9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png 848w, https://substackcdn.com/image/fetch/$s_!USd9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!USd9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!USd9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png" width="1076" height="1334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1334,&quot;width&quot;:1076,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:323209,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/168254425?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!USd9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png 424w, https://substackcdn.com/image/fetch/$s_!USd9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png 848w, https://substackcdn.com/image/fetch/$s_!USd9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!USd9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73f15be8-4921-4755-b5c7-7f36518765ad_1076x1334.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of portfolio statistics (baseline)</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!m83n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!m83n!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png 424w, https://substackcdn.com/image/fetch/$s_!m83n!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png 848w, https://substackcdn.com/image/fetch/$s_!m83n!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png 1272w, https://substackcdn.com/image/fetch/$s_!m83n!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!m83n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png" width="1456" height="1005" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1005,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1580888,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/168254425?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!m83n!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png 424w, https://substackcdn.com/image/fetch/$s_!m83n!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png 848w, https://substackcdn.com/image/fetch/$s_!m83n!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png 1272w, https://substackcdn.com/image/fetch/$s_!m83n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faacf401d-66c1-4caf-b8db-e965a6877849_1652x1140.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns (baseline)</figcaption></figure></div><p>As we've mentioned in previous articles, this is a strong portfolio, delivering more than <strong>twice the risk-adjusted returns</strong> of the S&amp;P 500.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/the-unintended-consequences-of-rebalancing?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/the-unintended-consequences-of-rebalancing?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/the-unintended-consequences-of-rebalancing?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><p>Now, let&#8217;s see how performance improves when we blend it <strong>50/50</strong> with the <strong>Front-Running strategy</strong> we just replicated:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GuZM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GuZM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!GuZM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!GuZM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!GuZM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GuZM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:605747,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/168254425?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GuZM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!GuZM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!GuZM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!GuZM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03ef99ac-0c02-464c-b355-a6a61f5c4826_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves of the portfolio of MR strategies (hedged portfolio)</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_X2m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_X2m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png 424w, https://substackcdn.com/image/fetch/$s_!_X2m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png 848w, https://substackcdn.com/image/fetch/$s_!_X2m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png 1272w, https://substackcdn.com/image/fetch/$s_!_X2m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_X2m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png" width="1074" height="1328" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1328,&quot;width&quot;:1074,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:323397,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/168254425?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_X2m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png 424w, https://substackcdn.com/image/fetch/$s_!_X2m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png 848w, https://substackcdn.com/image/fetch/$s_!_X2m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png 1272w, https://substackcdn.com/image/fetch/$s_!_X2m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62eb90ca-cb20-42ac-a8cb-f04ca5880e88_1074x1328.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of portfolio statistics (hedged portfolio)</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dy34!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dy34!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png 424w, https://substackcdn.com/image/fetch/$s_!dy34!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png 848w, https://substackcdn.com/image/fetch/$s_!dy34!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!dy34!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dy34!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png" width="1456" height="1007" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1007,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1467710,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/168254425?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dy34!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png 424w, https://substackcdn.com/image/fetch/$s_!dy34!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png 848w, https://substackcdn.com/image/fetch/$s_!dy34!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!dy34!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a1ef719-9dae-4719-842a-58c6cb46102c_1640x1134.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns (hedged portfolio)</figcaption></figure></div><p>Here are some key highlights:</p><ul><li><p>By adding the strategy to our portfolio, we increased the <strong>Sharpe ratio from 1.08 to 1.30</strong></p></li><li><p><strong>Annual volatility dropped</strong> from 19% to 14%</p></li><li><p><strong>Maximum drawdown improved</strong> from 24% to 15%</p></li><li><p>The <strong>average annual maximum drawdown</strong> fell from 13% to 8%</p></li><li><p>The <strong>percentage of positive months</strong> rose from 66% to 71%</p></li></ul><p>We gave up <strong>2.5% in annual returns</strong> (from 20.6% to 18.1%) in exchange for significantly better downside protection and lower volatility.</p><p>Seems like a good trade-off. ;)</p><div><hr></div><h1>Final Thoughts</h1><p>What started as a simple idea, <strong>front-running mechanical rebalancing flows,</strong> turned out to be surprisingly effective. The strategy alone delivers solid performance. But when paired with our mean reversion portfolio, it adds something even more valuable: <strong>resilience</strong>. Sharpe goes up, volatility drops, and drawdowns become shallower and shorter.</p><p>This is exactly the kind of research we like: <strong>economically intuitive, data-driven, simple to implement, and additive in a portfolio</strong>.</p><p>There&#8217;s still more to mine here. This idea could be extended across asset classes, refined with smarter execution, or combined with other signals. But even in its basic form, <strong>it looks like a real nugget of gold</strong>.</p><p>We&#8217;ll keep digging, both in future posts and in more depth inside the private community when <strong>Cohort 2 opens this August</strong>.</p><p>As always, I&#8217;d love to hear your thoughts. Questions, comments, feedback&#8212;just reach out via Twitter or email.</p><p>Cheers!</p><div><hr></div><p><em>The first cohort of the course was a great success. Thank you to everyone who joined!Enrollment is now closed. The next cohort opens in <strong>August</strong>, with 50 more seats.Course participants also get exclusive access to our <strong>Community</strong> and <strong>Study Group</strong>.Join the waitlist below to be notified when enrollment reopens:</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join The Waitlist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join The Waitlist</span></a></p><p><em>(I know, I need to update this landing page&#8230; as soon as I find time I will add more details about the course, the community, reviews from the 50 first users, etc :))</em></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div>]]></content:encoded></item><item><title><![CDATA[The Derivative Payoff Bias]]></title><description><![CDATA[A +2 Sharpe idea. Does it still work after going public?]]></description><link>https://www.quantitativo.com/p/the-derivative-payoff-bias</link><guid isPermaLink="false">https://www.quantitativo.com/p/the-derivative-payoff-bias</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Sat, 28 Jun 2025 12:30:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hU76!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hU76!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hU76!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png 424w, https://substackcdn.com/image/fetch/$s_!hU76!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png 848w, https://substackcdn.com/image/fetch/$s_!hU76!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png 1272w, https://substackcdn.com/image/fetch/$s_!hU76!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hU76!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2305633,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hU76!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png 424w, https://substackcdn.com/image/fetch/$s_!hU76!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png 848w, https://substackcdn.com/image/fetch/$s_!hU76!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png 1272w, https://substackcdn.com/image/fetch/$s_!hU76!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63d391fa-ab85-478e-9b49-f52c40358525_1806x1008.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Alice down the rabbit hole</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;You're nothing but a pack of cards!&#8221; Alice, standing up to the Queen of Hearts.</p></blockquote><p>I used to think <em>Alice in Wonderland</em> was just a goofy kids&#8217; story.</p><p>After re-reading it as an adult, I actually think it&#8217;s brilliant.</p><p>It&#8217;s satire dressed up as nonsense. A dream disguised as a joke. A mirror hiding in plain sight.</p><p>The White Rabbit? That&#8217;s obsession and urgency. The Queen of Hearts? Power and chaos. Every character says something about the world, and about us.</p><p>That&#8217;s why I&#8217;m kicking off this week&#8217;s piece with Lewis Carroll&#8217;s trip down the rabbit hole. Because two of those symbols tie directly into what you&#8217;re about to read. You will see in a moment.</p><p>This week, I decided to implement and share my code for the paper <em>&#8220;<a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4562800">The Derivative Payoff Bias</a>&#8221;</em> by Guido Baltussen, Julian Terstegge, and Paul Whelan.</p><p>To be honest, I almost skipped it. A few smart people (people I respect) said the strategy stopped working after the paper came out. One trader even posted a backtest showing the edge had vanished. I thought, <em>Maybe he&#8217;s right. Who am I to question it?</em></p><p>But then I remembered something: even the sharpest minds can be wrong. Maybe his implementation <em>was</em> just a pack of cards. So I dug in and ran it myself.</p><p>In fact, <strong>I&#8217;m sharing my code so </strong><em><strong>you</strong></em><strong> can run it too</strong>. If I made a mistake, someone will call it out. One of the perks of working in public.</p><p>Following the White Rabbit is one of the most powerful ideas in <em>Alice in Wonderland</em>. This means chasing curiosity down uncomfortable paths. If you're reading this, I know that instinct lives in you, too.</p><p>So consider this your invitation to follow the rabbit.</p><p>Now, let's be specific. Our curiosity demands answers to these simple questions:</p><blockquote><p>Is this paper legit? <br>Did this anomaly stop working after publication? <br>Should we trade this anomaly?</p></blockquote><p>Here&#8217;s the path down the hole:</p><ol><li><p>First, we&#8217;ll summarize the paper</p></li><li><p>Then, we&#8217;ll replicate the chart that reveals the anomaly</p></li><li><p>Next, we&#8217;ll statistically compare how the market evolved after publication</p></li><li><p>Then, we&#8217;ll implement the strategy and share the results</p></li><li><p>Finally, we&#8217;ll discuss possible next steps</p></li></ol><p>Let&#8217;s get to it.</p><div><hr></div><p><em>We&#8217;re building a private community for systematic traders. A place to explore ideas, exchange insights, and tackle the real technical and strategic challenges of building robust trading systems&#8230; from signal research to execution and risk.</em></p><p><em>Enrollment reopens in August. Join the waitlist below to be the first to know when new seats open:</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Waitlist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Waitlist</span></a></p><div><hr></div><h1>Paper Summary</h1><p><em>&#8220;The Derivative Payoff Bias&#8221;</em> uncovers a persistent and predictable price distortion in U.S. equity index derivatives. It shows that the way certain derivatives are settled, using the opening price on the 3rd Friday of each month, creates a systematic bias that favors some traders and penalizes others.</p><h2>Core Idea</h2><ul><li><p>Many index options and futures on the S&amp;P 500 expire using the <strong>Special Opening Quotation (SOQ)</strong>, based on the opening prices of the index components on the 3rd Friday of each month.</p></li><li><p>Since around <strong>2003</strong>, the SOQ tends to be <strong>systematically higher</strong> than the prior day&#8217;s close, leading to inflated payoffs for certain derivative holders.</p></li><li><p>This effect, called the <strong>&#8220;Third Friday Price Spike&#8221; (3FPS)</strong>, shows prices drifting up overnight into the SOQ window, then reversing intraday.</p></li><li><p>The result:</p><ul><li><p><strong>Call buyers win</strong> (higher-than-expected payoffs)</p></li><li><p><strong>Put buyers lose</strong> (lower-than-expected payoffs)</p></li></ul></li><li><p>The estimated annual wealth transfer is <strong>~$3.5 billion</strong> in favor of call buyers and against put buyers and call writers.</p></li></ul><h2>Why Does This Happen?</h2><ul><li><p>The effect is <strong>not explained</strong> by news, earnings, macro events, or pinning to strike prices.</p></li><li><p>The most plausible cause is <strong>dealer hedging behavior</strong>, specifically driven by a Greek called <strong>Charm</strong> (the rate of change of delta over time).</p></li><li><p>As expiration approaches, dealers adjust their hedges <strong>based on Charm,</strong> which creates <strong>buying pressure overnight</strong> and pushes prices up into the SOQ.</p></li><li><p>This demand imbalance is strongest on <strong>Triple Witching days</strong> and <strong>off-quarterly expirations</strong>, when hedging activity is heaviest.</p></li><li><p>Evidence shows that the <strong>more negative dealers&#8217; Charm</strong>, the <strong>more positive</strong> the price drift overnight.</p></li></ul><h2>How to Exploit It</h2><ul><li><p>The pattern is highly consistent and tradable:</p><ul><li><p>Go <strong>long at Thursday close</strong></p></li><li><p>Reverse to <strong>short at Friday open</strong></p></li><li><p>Close the short <strong>before Friday noon</strong></p></li></ul></li><li><p>This creates a <strong>tent-shaped return pattern</strong> that captures the overnight drift and avoids the intraday reversal.</p></li><li><p>The strategy produces <strong>statistically significant returns</strong>, even <strong>after transaction costs</strong>.</p></li><li><p>The effect is <strong>isolated to a.m.-settled contracts</strong> &#8212; p.m.-settled options show no such bias.</p></li><li><p>Traders can monitor <strong>net Charm positioning</strong> from market maker data to anticipate when the price spike is strongest.</p></li></ul><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/the-derivative-payoff-bias?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/the-derivative-payoff-bias?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/the-derivative-payoff-bias?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h1>Down the Rabbit Hole</h1><p>I love insightful charts. They often say more than words ever could.</p><p>In fact, I believe that truly powerful ideas can often be captured in a single, well-crafted chart. In the case of the paper we&#8217;re exploring, that chart is the very first one on page 2:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Dy5p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44275404-6873-4873-9385-9f1714e48285_1820x1234.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Dy5p!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44275404-6873-4873-9385-9f1714e48285_1820x1234.png 424w, https://substackcdn.com/image/fetch/$s_!Dy5p!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44275404-6873-4873-9385-9f1714e48285_1820x1234.png 848w, https://substackcdn.com/image/fetch/$s_!Dy5p!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44275404-6873-4873-9385-9f1714e48285_1820x1234.png 1272w, https://substackcdn.com/image/fetch/$s_!Dy5p!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44275404-6873-4873-9385-9f1714e48285_1820x1234.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Dy5p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44275404-6873-4873-9385-9f1714e48285_1820x1234.png" width="1456" height="987" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/44275404-6873-4873-9385-9f1714e48285_1820x1234.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:987,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:407003,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44275404-6873-4873-9385-9f1714e48285_1820x1234.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Dy5p!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44275404-6873-4873-9385-9f1714e48285_1820x1234.png 424w, https://substackcdn.com/image/fetch/$s_!Dy5p!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44275404-6873-4873-9385-9f1714e48285_1820x1234.png 848w, https://substackcdn.com/image/fetch/$s_!Dy5p!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44275404-6873-4873-9385-9f1714e48285_1820x1234.png 1272w, https://substackcdn.com/image/fetch/$s_!Dy5p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44275404-6873-4873-9385-9f1714e48285_1820x1234.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The 3rd Friday Price Spike in S&amp;P 500 E-mini Futures</figcaption></figure></div><p>This chart shows how S&amp;P 500 E-mini futures behave overnight. On regular days (red line), prices move slightly. But on 3rd Fridays (black line), prices spike up overnight, and drop sharply right after the market opens at 9:30 a.m. (blue line). The pattern is clear, consistent, and striking.</p><p>I thought: <em>what an elegant, simple, and powerful way to explain the paper&#8217;s core idea.</em></p><p><em>Can I replicate it?</em> I wondered. That chart was my White Rabbit &#8212; and down the hole I went, chasing the anomaly. :)</p><h2>Data</h2><p>To replicate the chart above, we need OHLC minute-level data.</p><p>Databento is a cost-effective source. Downloading NQ and ES price data (first and second continuous contracts since 2010) costs less than $50.</p><p>But Carlos, why bother getting data with such granularity? Doesn&#8217;t the paper use open and close prices to compute the strategy&#8217;s performance? For that, isn&#8217;t end-of-day data enough?</p><p>Ah&#8230; First, it&#8217;s impossible to replicate the chart above using daily data.</p><p>But more importantly, what if trading at 9:20 a.m. turns out to be more profitable than trading at 9:30?</p><p>I can imagine less curious people settling for end-of-day data, skipping the effort of replicating the chart, and just running the strategy on low-granularity inputs. I can also imagine that path leading to inferior results.</p><p>But we&#8217;re down the rabbit hole now. And that usually means going after high-quality data. Doing things most people aren&#8217;t willing to do.</p><p>As they say, garbage in, garbage out.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0-Tf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F408883b1-2285-4e52-8eb9-33562834c266_1562x682.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0-Tf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F408883b1-2285-4e52-8eb9-33562834c266_1562x682.png 424w, https://substackcdn.com/image/fetch/$s_!0-Tf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F408883b1-2285-4e52-8eb9-33562834c266_1562x682.png 848w, https://substackcdn.com/image/fetch/$s_!0-Tf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F408883b1-2285-4e52-8eb9-33562834c266_1562x682.png 1272w, https://substackcdn.com/image/fetch/$s_!0-Tf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F408883b1-2285-4e52-8eb9-33562834c266_1562x682.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0-Tf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F408883b1-2285-4e52-8eb9-33562834c266_1562x682.png" width="1456" height="636" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/408883b1-2285-4e52-8eb9-33562834c266_1562x682.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:636,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:530223,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F408883b1-2285-4e52-8eb9-33562834c266_1562x682.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0-Tf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F408883b1-2285-4e52-8eb9-33562834c266_1562x682.png 424w, https://substackcdn.com/image/fetch/$s_!0-Tf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F408883b1-2285-4e52-8eb9-33562834c266_1562x682.png 848w, https://substackcdn.com/image/fetch/$s_!0-Tf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F408883b1-2285-4e52-8eb9-33562834c266_1562x682.png 1272w, https://substackcdn.com/image/fetch/$s_!0-Tf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F408883b1-2285-4e52-8eb9-33562834c266_1562x682.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This code loads and processes 1-minute OHLC data for the first and second E-mini S&amp;P 500 futures contracts from Zstandard-compressed files stored locally. It reads the data using Databento&#8217;s Python API, concatenates it into a single DataFrame, and sorts it by symbol and timestamp.</p><p>Next, we need to decide when to use the first- or second-month contract.</p><p>We&#8217;ll use the first-month contract whenever there are <strong>more than 5 days left until expiration</strong>.</p><p>Otherwise, we&#8217;ll switch to the second-month contract.</p><p>To do this, we need the expiration date of each specific contract.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TQTP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TQTP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png 424w, https://substackcdn.com/image/fetch/$s_!TQTP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png 848w, https://substackcdn.com/image/fetch/$s_!TQTP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png 1272w, https://substackcdn.com/image/fetch/$s_!TQTP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TQTP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png" width="1456" height="1002" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1002,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:679961,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TQTP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png 424w, https://substackcdn.com/image/fetch/$s_!TQTP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png 848w, https://substackcdn.com/image/fetch/$s_!TQTP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png 1272w, https://substackcdn.com/image/fetch/$s_!TQTP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe26239f3-3777-4501-956f-fa6014bb9138_1566x1078.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This code retrieves the expiration dates for each futures contract in the dataset. First, it identifies the start date of each unique instrument_id (i.e., when each contract first appears in the data). Then, using the Databento API client, it queries contract metadata &#8212; including the symbol and expiration date &#8212; from the GLBX.MDP3 dataset, starting from each contract&#8217;s first appearance. All responses are combined into a single DataFrame, and only the relevant columns (instrument_id, raw_symbol, and expiration) are kept for later use in determining which contract to use based on time to expiration.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-Gl1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-Gl1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png 424w, https://substackcdn.com/image/fetch/$s_!-Gl1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png 848w, https://substackcdn.com/image/fetch/$s_!-Gl1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png 1272w, https://substackcdn.com/image/fetch/$s_!-Gl1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-Gl1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png" width="1456" height="851" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:851,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:611432,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-Gl1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png 424w, https://substackcdn.com/image/fetch/$s_!-Gl1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png 848w, https://substackcdn.com/image/fetch/$s_!-Gl1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png 1272w, https://substackcdn.com/image/fetch/$s_!-Gl1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e50b486-48b4-472e-b622-dd60e56878d1_1564x914.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The snippet above finally constructs a continuous minute-bar price series by selecting the appropriate futures contract based on time to expiration.</p><p>The result is something like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!p0PI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd33b3751-e815-469d-9747-902d439d7510_976x652.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p0PI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd33b3751-e815-469d-9747-902d439d7510_976x652.png 424w, https://substackcdn.com/image/fetch/$s_!p0PI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd33b3751-e815-469d-9747-902d439d7510_976x652.png 848w, https://substackcdn.com/image/fetch/$s_!p0PI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd33b3751-e815-469d-9747-902d439d7510_976x652.png 1272w, https://substackcdn.com/image/fetch/$s_!p0PI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd33b3751-e815-469d-9747-902d439d7510_976x652.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!p0PI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd33b3751-e815-469d-9747-902d439d7510_976x652.png" width="976" height="652" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d33b3751-e815-469d-9747-902d439d7510_976x652.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:652,&quot;width&quot;:976,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:240956,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd33b3751-e815-469d-9747-902d439d7510_976x652.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!p0PI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd33b3751-e815-469d-9747-902d439d7510_976x652.png 424w, https://substackcdn.com/image/fetch/$s_!p0PI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd33b3751-e815-469d-9747-902d439d7510_976x652.png 848w, https://substackcdn.com/image/fetch/$s_!p0PI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd33b3751-e815-469d-9747-902d439d7510_976x652.png 1272w, https://substackcdn.com/image/fetch/$s_!p0PI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd33b3751-e815-469d-9747-902d439d7510_976x652.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Next, we need to pre-process this DataFrame. What are we aiming for?</p><p>Simple: we want a table where:</p><ul><li><p>Each row represents a 5-minute interval from 4:00 p.m. ET on one day to 4:00 p.m. ET the next day;</p></li><li><p>Each column represents a different date.</p></li><li><p>The values are the log-returns from that moment to the first row.</p></li></ul><p>Then, we&#8217;ll extract a subset of that table containing only the 3rd Thursday-to-Friday periods.</p><p>Let's do that.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xJzN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xJzN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png 424w, https://substackcdn.com/image/fetch/$s_!xJzN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png 848w, https://substackcdn.com/image/fetch/$s_!xJzN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png 1272w, https://substackcdn.com/image/fetch/$s_!xJzN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xJzN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png" width="1456" height="552" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:552,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:347165,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xJzN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png 424w, https://substackcdn.com/image/fetch/$s_!xJzN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png 848w, https://substackcdn.com/image/fetch/$s_!xJzN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png 1272w, https://substackcdn.com/image/fetch/$s_!xJzN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc73265c1-c9c9-4436-99a4-4d36622f2326_1572x596.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The snippet above prepares the groundwork for identifying specific day-pairs and calendar-based filters. First, it creates two aligned date series: <code>d0</code>, a list of all unique trading days in the dataset, and <code>d1</code>, the next day for each <code>d0</code> (i.e., the day-pair). Then, it builds a list of all <strong>3rd Thursdays</strong> in the calendar range covered by the data.</p><p>Now, the most important code of the article:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7E3W!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7E3W!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png 424w, https://substackcdn.com/image/fetch/$s_!7E3W!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png 848w, https://substackcdn.com/image/fetch/$s_!7E3W!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png 1272w, https://substackcdn.com/image/fetch/$s_!7E3W!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7E3W!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png" width="1412" height="2070" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2070,&quot;width&quot;:1412,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1040003,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7E3W!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png 424w, https://substackcdn.com/image/fetch/$s_!7E3W!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png 848w, https://substackcdn.com/image/fetch/$s_!7E3W!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png 1272w, https://substackcdn.com/image/fetch/$s_!7E3W!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d16423-9ca4-417f-85ed-a2b2215b1cd3_1412x2070.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This code builds two return matrices: one for <strong>all trading days</strong> and another for <strong>3rd Thursday-to-Friday sessions</strong> only.</p><p>For each day-pair, it constructs a 5-minute interval time series from 4:00 p.m. ET to 4:00 p.m. the next day. It then calculates the log-returns from the start of that window and stores them in a standardized format where each column is a date and each row is a 5-minute offset from the start. Days with too much missing data are skipped.</p><p>The result is a clean, uniform dataset of intraday return curves, ready for comparing anomalies across regular days vs. 3rd Fridays.</p><h2>Visualizing</h2><p>We can now plot Figure 1. First mission accomplished.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U0yi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U0yi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png 424w, https://substackcdn.com/image/fetch/$s_!U0yi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png 848w, https://substackcdn.com/image/fetch/$s_!U0yi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png 1272w, https://substackcdn.com/image/fetch/$s_!U0yi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U0yi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png" width="1408" height="1552" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1552,&quot;width&quot;:1408,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:971198,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U0yi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png 424w, https://substackcdn.com/image/fetch/$s_!U0yi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png 848w, https://substackcdn.com/image/fetch/$s_!U0yi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png 1272w, https://substackcdn.com/image/fetch/$s_!U0yi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ea24153-f433-4280-8da5-61f7add293a1_1408x1552.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PAWG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PAWG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png 424w, https://substackcdn.com/image/fetch/$s_!PAWG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png 848w, https://substackcdn.com/image/fetch/$s_!PAWG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png 1272w, https://substackcdn.com/image/fetch/$s_!PAWG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PAWG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png" width="1456" height="874" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:874,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:513941,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PAWG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png 424w, https://substackcdn.com/image/fetch/$s_!PAWG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png 848w, https://substackcdn.com/image/fetch/$s_!PAWG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png 1272w, https://substackcdn.com/image/fetch/$s_!PAWG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7464dd06-c25b-475e-8efd-2356c58dc687_1766x1060.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The chart has approximately the same shape as the one presented by the authors.</p><p>As <a href="https://www.youtube.com/@statquest">Josh Starmer</a> would say, bam!</p><h2>Statistical significance</h2><p>Careful readers will notice a small (but important) detail:</p><p>Instead of using 9:30 a.m. as the cut-off time, I&#8217;ve chosen 9:20 a.m.</p><p>As my intuition suggested, there&#8217;s actually a better time to trade this anomaly.</p><p>Now, let&#8217;s check how many basis points we earn by being <strong>long from 4:00 p.m. to 9:20 a.m.</strong>, and <strong>short from 9:20 a.m. to 4:00 p.m.</strong></p><p>And most importantly, let&#8217;s test whether these returns are statistically different from zero.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0d1J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0d1J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png 424w, https://substackcdn.com/image/fetch/$s_!0d1J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png 848w, https://substackcdn.com/image/fetch/$s_!0d1J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png 1272w, https://substackcdn.com/image/fetch/$s_!0d1J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0d1J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png" width="1412" height="1592" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1592,&quot;width&quot;:1412,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1037496,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0d1J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png 424w, https://substackcdn.com/image/fetch/$s_!0d1J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png 848w, https://substackcdn.com/image/fetch/$s_!0d1J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png 1272w, https://substackcdn.com/image/fetch/$s_!0d1J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd5bb4e9-5c9e-49d3-8c80-1c533d9799ae_1412x1592.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OZhS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OZhS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png 424w, https://substackcdn.com/image/fetch/$s_!OZhS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png 848w, https://substackcdn.com/image/fetch/$s_!OZhS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png 1272w, https://substackcdn.com/image/fetch/$s_!OZhS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OZhS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png" width="962" height="236" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:236,&quot;width&quot;:962,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:57934,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OZhS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png 424w, https://substackcdn.com/image/fetch/$s_!OZhS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png 848w, https://substackcdn.com/image/fetch/$s_!OZhS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png 1272w, https://substackcdn.com/image/fetch/$s_!OZhS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffdbed284-c150-4a00-833e-e4e20bed3f84_962x236.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Returns around 3rd Fridays are meaningful. <em>Double-bam!</em></p><p>There&#8217;s just one small wrinkle: the t-stat on the long leg is 1.7, a bit below the threshold of 2 that we typically look for when assessing statistical significance.</p><p>I&#8217;d say that&#8217;s a minor issue, especially considering we&#8217;re analyzing data from 2010 onward, while the authors used more than twice as much data. (More data = lower standard error.)</p><p>With that said, we can confidently say that yes, the paper is legit.</p><p>Now, let&#8217;s go further down the hole and answer the second question:</p><p><strong>Did this anomaly stop working after publication?</strong></p><div><hr></div><h1>Before and After Publication</h1><p>The paper was first published on September 20, 2023.</p><p>First, let&#8217;s visualize the intraday return patterns around the 3rd Fridays of each month:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!71uM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!71uM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png 424w, https://substackcdn.com/image/fetch/$s_!71uM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png 848w, https://substackcdn.com/image/fetch/$s_!71uM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png 1272w, https://substackcdn.com/image/fetch/$s_!71uM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!71uM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png" width="1456" height="477" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:477,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:273959,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!71uM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png 424w, https://substackcdn.com/image/fetch/$s_!71uM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png 848w, https://substackcdn.com/image/fetch/$s_!71uM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png 1272w, https://substackcdn.com/image/fetch/$s_!71uM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f909992-3101-455e-8fd7-5cc74a8d1894_1564x512.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dUeC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dUeC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png 424w, https://substackcdn.com/image/fetch/$s_!dUeC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png 848w, https://substackcdn.com/image/fetch/$s_!dUeC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png 1272w, https://substackcdn.com/image/fetch/$s_!dUeC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dUeC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png" width="1456" height="880" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:880,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:538578,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dUeC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png 424w, https://substackcdn.com/image/fetch/$s_!dUeC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png 848w, https://substackcdn.com/image/fetch/$s_!dUeC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png 1272w, https://substackcdn.com/image/fetch/$s_!dUeC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F529fa07e-7e22-47dc-b386-afaaf70f60a9_1748x1056.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">ES returns around 3rd Fridays before publication</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oaRe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oaRe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png 424w, https://substackcdn.com/image/fetch/$s_!oaRe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png 848w, https://substackcdn.com/image/fetch/$s_!oaRe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png 1272w, https://substackcdn.com/image/fetch/$s_!oaRe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oaRe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png" width="1456" height="876" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/adacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:876,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:572882,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oaRe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png 424w, https://substackcdn.com/image/fetch/$s_!oaRe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png 848w, https://substackcdn.com/image/fetch/$s_!oaRe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png 1272w, https://substackcdn.com/image/fetch/$s_!oaRe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadacbf51-04e6-4fc8-a733-ed21a8a0badd_1756x1056.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">ES returns around 3rd Fridays after publication</figcaption></figure></div><p>As expected, <strong>before publication</strong>, the returns are consistent with what we&#8217;ve seen so far. </p><p>However, <strong>after publication</strong>, the return profile looks quite different.</p><p>Adjusting the cut-off time to 9:15 improved the results slightly&#8230; but it didn&#8217;t fix the problem.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!373n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!373n!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png 424w, https://substackcdn.com/image/fetch/$s_!373n!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png 848w, https://substackcdn.com/image/fetch/$s_!373n!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png 1272w, https://substackcdn.com/image/fetch/$s_!373n!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!373n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png" width="1456" height="1147" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1147,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:848596,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!373n!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png 424w, https://substackcdn.com/image/fetch/$s_!373n!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png 848w, https://substackcdn.com/image/fetch/$s_!373n!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png 1272w, https://substackcdn.com/image/fetch/$s_!373n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dde74dc-5c26-436a-9654-e3f25b1d958b_1566x1234.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h8wA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h8wA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png 424w, https://substackcdn.com/image/fetch/$s_!h8wA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png 848w, https://substackcdn.com/image/fetch/$s_!h8wA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png 1272w, https://substackcdn.com/image/fetch/$s_!h8wA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h8wA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png" width="966" height="232" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:232,&quot;width&quot;:966,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:58172,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h8wA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png 424w, https://substackcdn.com/image/fetch/$s_!h8wA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png 848w, https://substackcdn.com/image/fetch/$s_!h8wA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png 1272w, https://substackcdn.com/image/fetch/$s_!h8wA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc50ac43-fc19-4433-a26c-3a49d2957b1a_966x232.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">ES returns around 3rd Fridays before publication</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gCW3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gCW3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png 424w, https://substackcdn.com/image/fetch/$s_!gCW3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png 848w, https://substackcdn.com/image/fetch/$s_!gCW3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png 1272w, https://substackcdn.com/image/fetch/$s_!gCW3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gCW3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png" width="966" height="236" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:236,&quot;width&quot;:966,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:54788,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gCW3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png 424w, https://substackcdn.com/image/fetch/$s_!gCW3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png 848w, https://substackcdn.com/image/fetch/$s_!gCW3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png 1272w, https://substackcdn.com/image/fetch/$s_!gCW3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3237ed9b-b180-4e16-ad2e-aa2a9b27010e_966x236.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">ES returns around 3rd Fridays after publication</figcaption></figure></div><p>The tables confirm the bad news.</p><p>After publication, the mean return on the long leg is 0.7 bps, while the mean return on the short leg is -2.6 bps. Both minimal.</p><p>The t-stats, close to zero, show that these returns are statistically indistinguishable from zero.</p><p>So, that's it. The anomaly stopped working after publication. The Queen of Hearts wins&#8230; right?</p><div><hr></div><h1>NQ to the rescue</h1><p>Not so fast. The paper mentions that the anomaly also appears in other index options and futures using the Special Opening Quotation (SOQ).</p><p>Before we call it a day, let's check the numbers for NQ.</p><p>After all, we are compulsively curious. Down the rabbit hole we go.</p><h2>Before publication</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uN_5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uN_5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png 424w, https://substackcdn.com/image/fetch/$s_!uN_5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png 848w, https://substackcdn.com/image/fetch/$s_!uN_5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png 1272w, https://substackcdn.com/image/fetch/$s_!uN_5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uN_5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png" width="1456" height="875" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:875,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:456770,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uN_5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png 424w, https://substackcdn.com/image/fetch/$s_!uN_5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png 848w, https://substackcdn.com/image/fetch/$s_!uN_5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png 1272w, https://substackcdn.com/image/fetch/$s_!uN_5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09116223-7a4e-4355-8596-c6f02e3f2e10_1764x1060.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">NQ returns around 3rd Fridays before publication</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eUEa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eUEa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png 424w, https://substackcdn.com/image/fetch/$s_!eUEa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png 848w, https://substackcdn.com/image/fetch/$s_!eUEa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png 1272w, https://substackcdn.com/image/fetch/$s_!eUEa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eUEa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png" width="966" height="234" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:234,&quot;width&quot;:966,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:57144,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eUEa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png 424w, https://substackcdn.com/image/fetch/$s_!eUEa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png 848w, https://substackcdn.com/image/fetch/$s_!eUEa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png 1272w, https://substackcdn.com/image/fetch/$s_!eUEa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a3a560-4d6a-4bf3-8803-7c2a334cee12_966x234.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">NQ returns around 3rd Fridays before publication</figcaption></figure></div><p>Here, we get a better picture than with ES: returns are stronger on both the long and short legs.</p><p>And the t-stats confirm that they&#8217;re all statistically different from zero. <em>Double-bam!</em></p><h2>After publication</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Frqa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Frqa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png 424w, https://substackcdn.com/image/fetch/$s_!Frqa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png 848w, https://substackcdn.com/image/fetch/$s_!Frqa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png 1272w, https://substackcdn.com/image/fetch/$s_!Frqa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Frqa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png" width="1456" height="873" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:873,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:611495,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Frqa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png 424w, https://substackcdn.com/image/fetch/$s_!Frqa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png 848w, https://substackcdn.com/image/fetch/$s_!Frqa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png 1272w, https://substackcdn.com/image/fetch/$s_!Frqa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6284303-6ee0-4090-98b2-75c8aae60632_1764x1058.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">NQ returns around 3rd Fridays after publication</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9iyI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9iyI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png 424w, https://substackcdn.com/image/fetch/$s_!9iyI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png 848w, https://substackcdn.com/image/fetch/$s_!9iyI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png 1272w, https://substackcdn.com/image/fetch/$s_!9iyI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9iyI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png" width="964" height="238" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:238,&quot;width&quot;:964,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:57861,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9iyI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png 424w, https://substackcdn.com/image/fetch/$s_!9iyI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png 848w, https://substackcdn.com/image/fetch/$s_!9iyI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png 1272w, https://substackcdn.com/image/fetch/$s_!9iyI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecc7e0ea-0ec7-4f5a-8228-799c59b93e53_964x238.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">NQ returns around 3rd Fridays after publication</figcaption></figure></div><p>But this is where our curiosity pays off:</p><p>Although the return chart looks odd, the mean returns are clearly different from zero on both the long and short legs: 7.8 bps and -15.1 bps, respectively.</p><p>I know, the t-stats aren&#8217;t above 2.</p><p>But here&#8217;s the key: we only have 20 samples post-publication.</p><p>So, this <strong>non-significant result may simply be due to insufficient data. Not because the edge has disappeared</strong>.</p><p>There's even another test we can run: compare the strategy's returns before and after publication.</p><div><hr></div><h1>Strategy returns</h1><p>Getting the strategy's daily returns is pretty straightforward:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Z6e0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Z6e0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png 424w, https://substackcdn.com/image/fetch/$s_!Z6e0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png 848w, https://substackcdn.com/image/fetch/$s_!Z6e0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png 1272w, https://substackcdn.com/image/fetch/$s_!Z6e0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Z6e0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png" width="1456" height="776" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:776,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:478322,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Z6e0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png 424w, https://substackcdn.com/image/fetch/$s_!Z6e0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png 848w, https://substackcdn.com/image/fetch/$s_!Z6e0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png 1272w, https://substackcdn.com/image/fetch/$s_!Z6e0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe36f067d-2a10-4fde-a331-f9de45c378b0_1562x832.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I am using the same 3 bps of trading cost as assumed by the authors.</p><p>Now we can check the return distributions, expected returns, win rates, and more &#8212; for all trades since 2010, before and after the publication date.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yPtN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yPtN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png 424w, https://substackcdn.com/image/fetch/$s_!yPtN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png 848w, https://substackcdn.com/image/fetch/$s_!yPtN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png 1272w, https://substackcdn.com/image/fetch/$s_!yPtN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yPtN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png" width="1292" height="742" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:742,&quot;width&quot;:1292,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:154200,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yPtN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png 424w, https://substackcdn.com/image/fetch/$s_!yPtN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png 848w, https://substackcdn.com/image/fetch/$s_!yPtN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png 1272w, https://substackcdn.com/image/fetch/$s_!yPtN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e7438ab-3d8e-43c2-9f30-3c1bd95b74b2_1292x742.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Trade statistics for the full period</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aIcx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aIcx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png 424w, https://substackcdn.com/image/fetch/$s_!aIcx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png 848w, https://substackcdn.com/image/fetch/$s_!aIcx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png 1272w, https://substackcdn.com/image/fetch/$s_!aIcx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aIcx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png" width="1294" height="748" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:748,&quot;width&quot;:1294,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:157266,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aIcx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png 424w, https://substackcdn.com/image/fetch/$s_!aIcx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png 848w, https://substackcdn.com/image/fetch/$s_!aIcx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png 1272w, https://substackcdn.com/image/fetch/$s_!aIcx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9175458-4cf2-4944-8222-a66e1f3e2cb9_1294x748.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Trade statistics before publication</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!a7ls!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!a7ls!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png 424w, https://substackcdn.com/image/fetch/$s_!a7ls!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png 848w, https://substackcdn.com/image/fetch/$s_!a7ls!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png 1272w, https://substackcdn.com/image/fetch/$s_!a7ls!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!a7ls!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png" width="1292" height="750" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:750,&quot;width&quot;:1292,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:154519,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!a7ls!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png 424w, https://substackcdn.com/image/fetch/$s_!a7ls!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png 848w, https://substackcdn.com/image/fetch/$s_!a7ls!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png 1272w, https://substackcdn.com/image/fetch/$s_!a7ls!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff87c0b94-6c03-4470-b40b-83dd3c75e5d2_1292x750.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Trade statistics after publication</figcaption></figure></div><p>In summary:</p><ul><li><p>The strategy performed <strong>consistently well before publication</strong>, with strong average returns and good win/loss dynamics.</p></li><li><p><strong>After publication</strong>, results weakened, but <strong>small sample size</strong> limits our ability to draw hard conclusions.</p></li><li><p>The edge may have decayed a little, or we may simply need more post-publication data to confirm if it&#8217;s still alive.</p></li></ul><p>As a final test, we want to compare the returns <strong>before and after the paper&#8217;s publication</strong> to see if there&#8217;s a statistically significant difference between the two periods. To do that, we run a two-sample t-test with unequal variances (<code>equal_var=False</code>) using the returns from each period.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!g_R-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!g_R-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png 424w, https://substackcdn.com/image/fetch/$s_!g_R-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png 848w, https://substackcdn.com/image/fetch/$s_!g_R-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png 1272w, https://substackcdn.com/image/fetch/$s_!g_R-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!g_R-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png" width="1456" height="115" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:115,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:51792,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!g_R-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png 424w, https://substackcdn.com/image/fetch/$s_!g_R-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png 848w, https://substackcdn.com/image/fetch/$s_!g_R-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png 1272w, https://substackcdn.com/image/fetch/$s_!g_R-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44f91d3e-d512-4a34-9fad-87ca0211b50e_1570x124.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The result: <strong>t-stat = 0.51</strong> and <strong>p-value = 0.61</strong>.</p><p>This high p-value indicates that we <strong>cannot reject the null hypothesis:</strong> the returns before and after publication are statistically indistinguishable.</p><p>In other words, while the post-publication performance looks weaker, the difference could simply be due to <strong>random variation</strong>, especially given the small number of trades after publication.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sen6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sen6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png 424w, https://substackcdn.com/image/fetch/$s_!sen6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png 848w, https://substackcdn.com/image/fetch/$s_!sen6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png 1272w, https://substackcdn.com/image/fetch/$s_!sen6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sen6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png" width="1456" height="1424" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1424,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:349719,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sen6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png 424w, https://substackcdn.com/image/fetch/$s_!sen6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png 848w, https://substackcdn.com/image/fetch/$s_!sen6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png 1272w, https://substackcdn.com/image/fetch/$s_!sen6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04f3731-807c-4c35-a991-bfcf2b871bc1_1510x1477.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the strategy</figcaption></figure></div><p>This strategy, unleveraged, generated a total return of 81% over the full period, or about 4.1% per year. The maximum drawdown was 6.0%.</p><p>Those numbers may not seem like much. But they&#8217;re actually quite impressive when you remember they&#8217;re achieved by trading only 12 times per year.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xr07!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xr07!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png 424w, https://substackcdn.com/image/fetch/$s_!xr07!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png 848w, https://substackcdn.com/image/fetch/$s_!xr07!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png 1272w, https://substackcdn.com/image/fetch/$s_!xr07!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xr07!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png" width="1456" height="833" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:833,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:964120,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xr07!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png 424w, https://substackcdn.com/image/fetch/$s_!xr07!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png 848w, https://substackcdn.com/image/fetch/$s_!xr07!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png 1272w, https://substackcdn.com/image/fetch/$s_!xr07!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144bab9e-0b19-447b-a08e-cf3e05274c39_1566x896.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>If we had traded this strategy since 2010:</p><ul><li><p>We would have had <strong>2 negative years;</strong></p></li><li><p>We would have seen <strong>61% of the months positive</strong>, with the best at +9.1% (Mar'20);</p></li><li><p>We would have seen <strong>39% of the months negative</strong>, with the worst at -3.7% (Mar'22);</p></li><li><p>The <strong>longest</strong> <strong>positive streak</strong> would have been <strong>10 months</strong>, from Jul'19 to Apr'20;</p></li><li><p>The <strong>longest negative streak</strong> would have been <strong>4 months</strong>, from Jul'16 to Oct'16.</p></li></ul><h2>Sharpe ratio</h2><p>We compute the annual Sharpe ratio by scaling the daily excess return to volatility ratio by 12 trading periods, just as the authors did in the paper:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e2ZT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e2ZT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png 424w, https://substackcdn.com/image/fetch/$s_!e2ZT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png 848w, https://substackcdn.com/image/fetch/$s_!e2ZT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png 1272w, https://substackcdn.com/image/fetch/$s_!e2ZT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e2ZT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png" width="1456" height="640" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:640,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:237629,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/167008657?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!e2ZT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png 424w, https://substackcdn.com/image/fetch/$s_!e2ZT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png 848w, https://substackcdn.com/image/fetch/$s_!e2ZT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png 1272w, https://substackcdn.com/image/fetch/$s_!e2ZT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e27b487-885f-4e08-81ff-be1b62017d9d_1778x782.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Annual Sharpe Ratios</figcaption></figure></div><p>However, although we have Sharpe ratios above 1.5 in 4 out of the 16 years analyzed, our full-period Sharpe is 0.9.</p><p>This is less than half of what the authors reported in the paper.</p><p>Why? Because our sample covers only the post-2010 period, while the authors use data starting in 2003. This gives them more trades, lower estimation error, and stronger average returns.</p><div><hr></div><h1>Final Thoughts</h1><p>So, did this anomaly stop working after publication? Not quite. But it clearly <strong>weakened</strong>. The performance dropped, t-stats shrank, and the beautiful pattern seen in the pre-publication charts became noisier.</p><p>Still, with such a small post-publication sample, it&#8217;s hard to say the edge is truly gone. What we <em>can</em> say is that it&#8217;s no longer the clean, obvious trade it once was. The crowd may have caught on.</p><p><strong>Should we trade this anomaly?</strong> Not by itself. The edge has weakened since the paper was published. But the results don&#8217;t argue against including it as part of a broader system, alongside other strategies in a well-diversified portfolio.</p><p>We opened with Alice standing up to the Queen of Hearts&#8230; and for good reason. The internet is full of Queens of Hearts: bold claims, confident charts, and loud opinions that go unchallenged.</p><p>But sometimes, they&#8217;re just a deck of cards.</p><p>It&#8217;s our job to question, to test, and to reason for ourselves. And to do that, we have to follow our curiosity. Follow the White Rabbit.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a> if you have questions, ideas, or feedback.</p><p>Cheers!</p><div><hr></div><p><em>The first cohort of the course was a great success. Thank you to everyone who joined!Enrollment is now closed. The next cohort opens in <strong>August</strong>, with 50 more seats.Course participants also get exclusive access to our <strong>Community</strong> and <strong>Study Group</strong>.Join the waitlist below to be notified when enrollment reopens:</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Waitlist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Waitlist</span></a></p><p><em>(I know, I need to update this landing page&#8230; as soon as I find time I will add more details about the course, the community, reviews from the 50 first users, etc :))</em></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Short-Term Basis Reversal]]></title><description><![CDATA[An anomaly that delivers a 1.45 Sharpe ratio and 19.2% annual returns]]></description><link>https://www.quantitativo.com/p/short-term-basis-reversal</link><guid isPermaLink="false">https://www.quantitativo.com/p/short-term-basis-reversal</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Tue, 10 Jun 2025 12:16:12 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!L1Us!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L1Us!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L1Us!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png 424w, https://substackcdn.com/image/fetch/$s_!L1Us!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png 848w, https://substackcdn.com/image/fetch/$s_!L1Us!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png 1272w, https://substackcdn.com/image/fetch/$s_!L1Us!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L1Us!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png" width="800" height="587" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:587,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:814788,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/165599029?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L1Us!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png 424w, https://substackcdn.com/image/fetch/$s_!L1Us!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png 848w, https://substackcdn.com/image/fetch/$s_!L1Us!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png 1272w, https://substackcdn.com/image/fetch/$s_!L1Us!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cfa32d0-b158-45c4-9be6-0934321a4c8d_800x587.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">An Alchemist, by David Teniers the Younger</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;A single hair from the head of a woman is worth more than all the books of Galen and Avicenna.&#8221; Paracelsus.</p></blockquote><p>Paracelsus (1493&#8211;1541) was one of the most radical and influential physicians and philosophers of the Renaissance. A restless traveler, alchemist, and fierce critic of medical orthodoxy, he believed that <strong>true knowledge came not from ancient books</strong> but from direct <strong>observation of nature</strong> and <strong>practical experience</strong>.</p><p>Paracelsus helped shift medicine from being a theoretical, bookish discipline toward an <strong>experimental, empirical one</strong>.</p><p>I want to start by mentioning Paracelsus for two reasons. First, on a very personal note, I&#8217;m thrilled that <strong>my little brother just got into medical school</strong>! He&#8217;s going to be the first doctor in our family, and I couldn&#8217;t be prouder.</p><p>Second, I still remember my German chemistry professor in engineering school speaking of Paracelsus with great respect. As someone who valued <strong>experiment over theory</strong>, and <strong>real-world observation over books</strong>. In my view, that&#8217;s the heart of science: <strong>we trust what we test.</strong></p><p>This week, we will implement the paper <em><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5250499">Short-Term Basis Reversal</a></em>, by Alberto G. Rossi, Yingguang Zhang, and Yandi Zhu. In the paper, the authors devised a <strong>strategy that delivered 18% annual returns</strong> over several decades, with a <strong>Sharpe ratio of 1.42.</strong></p><p>Can we replicate that? Let&#8217;s find out&#8230; because, as Paracelsus taught us, the true value of any idea lies not in how good it looks on paper, but in <strong>whether it holds up in practice.</strong></p><p>Here&#8217;s the plan we will follow:</p><ol><li><p>First, we will <strong>review the paper</strong> and summarize its main points.</p></li><li><p>Then, we will <strong>implement</strong> the strategy for a <strong>single market</strong> (time-series).</p></li><li><p>Next, we will <strong>implement</strong> the <strong>market-neutral strategy across all markets</strong> (cross-sectional).</p></li><li><p>Finally, we will discuss the next steps on how to execute.</p></li></ol><h2>Study Group</h2><p>As mentioned in the <a href="https://www.quantitativo.com/p/one-year-of-quantitativo">article celebrating 1 year of Quantitativo</a>, we are starting a <strong>Study Group via Zoom</strong> to <strong>review in-depth paper implementations</strong>. The first session will take place <strong>this Wednesday, June 11th, at 11 AM ET</strong>, and will be focused on this paper. I will share the connection details at <a href="http://connect.quantitativo.com/">connect.quantitativo.com</a>.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1>Paper Summary</h1><p>The paper discovers a <strong>new and significant anomaly in commodity futures markets</strong>: the <strong>short-term basis reversal:</strong> the return spread between adjacent futures contracts (e.g., front month vs. second month) shows <strong>strong negative autocorrelation week to week</strong>.</p><p>When the <strong>first-minus-second nearby contract return</strong> is high one week, it tends to <strong>reverse the next</strong>.</p><h2>Core idea</h2><ul><li><p>In markets with a <strong>term structure</strong> (like futures curves), the <strong>front-month (F1)</strong> and <strong>second-month (F2)</strong> futures contracts often move together (but not perfectly).</p></li><li><p><strong>Each week</strong>, the <strong>spread return</strong> between F1 and F2 (i.e., Return(F1) - Return(F2)) shows a <strong>strong tendency to reverse</strong> the following week.</p><ul><li><p>If the spread was <strong>positive</strong> this week &#8594; likely <strong>negative</strong> next week (and vice versa).</p></li></ul></li><li><p>This is called <strong>Short-Term Basis Reversal</strong>.</p></li></ul><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;SRet_t^{F_1-F_2}=Ret_t^{F_1}-Ret_t^{F_2}&quot;,&quot;id&quot;:&quot;UNRGMEFERX&quot;}" data-component-name="LatexBlockToDOM"></div><h2>Why Does This Happen?</h2><ul><li><p><strong>Front-month contracts (F1)</strong> are more liquid and adjust faster to new information.</p></li><li><p><strong>Second-month contracts (F2)</strong> adjust more slowly (due to lower liquidity, less trading, preferred habitat of some market participants).</p></li><li><p>This creates <strong>temporary mispricings</strong> between F1 and F2.</p></li><li><p>Arbitrage capital is <strong>slow-moving</strong> &#8594; mispricings persist 1-2 weeks &#8594; predictable reversals.</p></li></ul><h2>How to Exploit It</h2><ul><li><p>Each week, look at the <strong>previous week&#8217;s spread return</strong> (Return(F1) - Return(F2)):</p><ul><li><p>If spread was <strong>strong positive</strong> &#8594; expect reversal &#8594; next week spread likely <strong>negative</strong></p></li><li><p>If spread was <strong>strong negative</strong> &#8594; expect reversal &#8594; next week spread likely <strong>positive</strong></p></li></ul></li></ul><p>There are <strong>two ways to trade this effect</strong>:</p><h3>1. Time-Series Strategy (Single Market)</h3><ul><li><p>For each commodity <strong>individually</strong>:</p><ul><li><p>If its spread return was positive last week &#8594; trade short spread this week</p></li><li><p>If its spread return was negative last week &#8594; trade long spread this week</p></li></ul></li><li><p>Works in <strong>18 of 22 commodities</strong> &#8594; high Sharpe, robust</p></li></ul><h3>2. Cross-Sectional Strategy (Multiple Markets)</h3><ul><li><p>Each week, <strong>rank all 22 commodities</strong> based on their prior-week spread return</p></li><li><p>Go:</p><ul><li><p><strong>Long spreads</strong> of the <strong>4 commodities with most negative prior spread return</strong> (expect reversal up)</p></li><li><p><strong>Short spreads</strong> of the <strong>4 commodities with most positive prior spread return</strong> (expect reversal down)</p></li></ul></li><li><p>Portfolio holds <strong>8 spreads (16 contracts total)</strong></p></li><li><p>Delivers even higher Sharpe (up to <strong>1.42</strong>) &#8212; scalable and more diversified</p></li></ul><p>This is the gist of the paper. I strongly recommend reading it, especially for those participating in the study group. Now, let&#8217;s look at the implementation results for a single market.</p><h1>Time-Series Strategy Results (Single Market)</h1><p>We use <a href="https://norgatedata.com/">Norgate Data</a>, which is a different data source from the one the authors used in the paper.</p><p>Norgate provides daily data for <strong>39 different commodity markets</strong>, across <strong>Agriculture</strong> (26), <strong>Energy</strong> (8), and <strong>Metals</strong> (5).</p><p>To test the simpler strategy (time-series in a single market), we will focus on <strong>Feeder Cattle futures</strong> (GF).</p><p>I will share the code and detailed implementation in the study group. But it is straightforward. The key is to create a table that, for each week, show the exact first-month and second-month contracts. Then, retrieving the prices, computing returns and the spread is pretty simple.</p><p>IMPORTANT: When the authors define <strong>first-nearby contract</strong>, it is the <strong>first eligible contract</strong> with <strong>at least 1 month to expiration,</strong> not simply the calendar first-month contract.</p><p>Here are the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PUgs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PUgs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!PUgs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!PUgs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!PUgs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PUgs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:770610,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/165599029?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PUgs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!PUgs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!PUgs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!PUgs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2b466f3-f4c0-46bf-939a-0be1c48494c1_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the time-series strategy (GF)</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JJ2H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JJ2H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png 424w, https://substackcdn.com/image/fetch/$s_!JJ2H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png 848w, https://substackcdn.com/image/fetch/$s_!JJ2H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png 1272w, https://substackcdn.com/image/fetch/$s_!JJ2H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JJ2H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png" width="1074" height="1004" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1004,&quot;width&quot;:1074,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:235439,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/165599029?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JJ2H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png 424w, https://substackcdn.com/image/fetch/$s_!JJ2H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png 848w, https://substackcdn.com/image/fetch/$s_!JJ2H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png 1272w, https://substackcdn.com/image/fetch/$s_!JJ2H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01501005-c6e8-46bb-be2f-abbde4a477dc_1074x1004.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest statistics</figcaption></figure></div><p>Quite a strong result. This would have outperformed Buy &amp; Hold convincingly:</p><ul><li><p><strong>Annual return</strong> is <strong>+5.6%</strong> vs. 2.8% Buy &amp; Hold;</p></li><li><p><strong>Sharpe ratio</strong> is <strong>0.91</strong>, more than <strong>3x</strong> better than Buy &amp; Hold&#8217;s 0.25;</p></li><li><p><strong>Max drawdown</strong> is very controlled at <strong>-13.7%</strong> vs. a painful -55.1% for Buy &amp; Hold;</p></li><li><p><strong>Volatility</strong> is also much lower: 6.2% vs. 16.4%;</p></li><li><p>Finally, note the almost <strong>no correlation to Buy &amp; Hold</strong> (0.03).</p></li></ul><p>Now, let's look at the cross-sectional strategy.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/short-term-basis-reversal?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/short-term-basis-reversal?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/short-term-basis-reversal?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1>Cross-Sectional Strategy Results (Multiple Markets)</h1><p>Now that we've tested the strategy in a single market, we move to the full <strong>cross-sectional version</strong>. In this step, we apply the strategy across all 39 commodity markets available in Norgate Data, spanning Agriculture, Energy, and Metals. The table below lists the full set of markets considered in our implementation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3y3U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3y3U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png 424w, https://substackcdn.com/image/fetch/$s_!3y3U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png 848w, https://substackcdn.com/image/fetch/$s_!3y3U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png 1272w, https://substackcdn.com/image/fetch/$s_!3y3U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3y3U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png" width="1456" height="1379" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1379,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:567326,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/165599029?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3y3U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png 424w, https://substackcdn.com/image/fetch/$s_!3y3U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png 848w, https://substackcdn.com/image/fetch/$s_!3y3U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png 1272w, https://substackcdn.com/image/fetch/$s_!3y3U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa443d9f-b0fa-4122-aa49-8577fe402a0a_1628x1542.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Commodities markets used</figcaption></figure></div><h2>Visualizing the edge</h2><p>As a simple diagnostic, before looking into the strategy backtest, let's check whether the strategy correctly predicts the direction of the spread return from week to week. The confusion matrix below shows the results (1 for positive/long weeks, 0 for negative/short weeks). The overall accuracy is <strong>53.6%</strong>, above the 50% baseline expected from random guessing.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3mnb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3mnb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png 424w, https://substackcdn.com/image/fetch/$s_!3mnb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png 848w, https://substackcdn.com/image/fetch/$s_!3mnb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png 1272w, https://substackcdn.com/image/fetch/$s_!3mnb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3mnb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png" width="1126" height="960" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:960,&quot;width&quot;:1126,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:137568,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/165599029?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3mnb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png 424w, https://substackcdn.com/image/fetch/$s_!3mnb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png 848w, https://substackcdn.com/image/fetch/$s_!3mnb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png 1272w, https://substackcdn.com/image/fetch/$s_!3mnb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6a0275-7e8c-47db-99ac-a4ec41ee9ba9_1126x960.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Predictive power of the direction of returns</figcaption></figure></div><p>To visualize the edge more clearly, we classified the spread returns into quintiles based on the predicted signal and aggregated the realized returns for each group. The chart below shows the <strong>annualized mean return for each quintile</strong>. As we can see, the results display a <strong>clear monotonic pattern</strong>. The most extreme predicted spreads (Q1 and Q5) show the <strong>strongest directional returns</strong>, which highlights the predictive power of the signal.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lLR5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lLR5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png 424w, https://substackcdn.com/image/fetch/$s_!lLR5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png 848w, https://substackcdn.com/image/fetch/$s_!lLR5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png 1272w, https://substackcdn.com/image/fetch/$s_!lLR5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lLR5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png" width="1456" height="921" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:921,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:130896,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/165599029?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lLR5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png 424w, https://substackcdn.com/image/fetch/$s_!lLR5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png 848w, https://substackcdn.com/image/fetch/$s_!lLR5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png 1272w, https://substackcdn.com/image/fetch/$s_!lLR5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4678ef60-eb72-4b09-901d-6eb9f9534fd3_2048x1296.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Predictive power of the signal</figcaption></figure></div><h2>Backtesting the strategy</h2><p>Now, let&#8217;s backtest the long&amp;short market neutral strategy. The core idea is straightforward:</p><ul><li><p>Each week, we <strong>rank all 39 commodities</strong> based on their spread return from the previous week.</p></li><li><p>We then take positions as follows:</p><ul><li><p><strong>Go long</strong> the spreads of the <strong>4 commodities with the largest negative spread returns</strong> (anticipating a rebound).</p></li><li><p><strong>Go short</strong> the spreads of the <strong>4 commodities with the largest positive spread returns</strong> (anticipating a reversal lower).</p></li></ul></li></ul><p>Here are the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bDa7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bDa7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png 424w, https://substackcdn.com/image/fetch/$s_!bDa7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png 848w, https://substackcdn.com/image/fetch/$s_!bDa7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!bDa7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bDa7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png" width="1456" height="1377" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1377,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:795928,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/165599029?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bDa7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png 424w, https://substackcdn.com/image/fetch/$s_!bDa7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png 848w, https://substackcdn.com/image/fetch/$s_!bDa7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!bDa7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20c69d26-204b-4147-b396-a22e984f8680_1557x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the cross-sectional strategy (4 spreads long and 4 short)</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!blvD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!blvD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png 424w, https://substackcdn.com/image/fetch/$s_!blvD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png 848w, https://substackcdn.com/image/fetch/$s_!blvD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png 1272w, https://substackcdn.com/image/fetch/$s_!blvD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!blvD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png" width="1078" height="1002" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1002,&quot;width&quot;:1078,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:228358,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/165599029?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!blvD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png 424w, https://substackcdn.com/image/fetch/$s_!blvD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png 848w, https://substackcdn.com/image/fetch/$s_!blvD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png 1272w, https://substackcdn.com/image/fetch/$s_!blvD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed0038c1-66fe-40c1-b6f8-fde761390fe1_1078x1002.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest statistics</figcaption></figure></div><p>We can see a strong performance for the cross-sectional strategy:</p><ul><li><p><strong>Annual return</strong> is <strong>19.2%</strong>, more than 2x the S&amp;P 500&#8217;s 9.1%;</p></li><li><p><strong>Sharpe ratio</strong> is good at <strong>1.45</strong>, vs. 0.62 for the benchmark;</p></li><li><p><strong>Max drawdown</strong> is well controlled at <strong>-24.4%</strong>, while the benchmark suffers a brutal -56.2%;</p></li><li><p><strong>Volatility</strong> is also <strong>lower</strong> than S&amp;P 500: 12.6% vs. 16.6%;</p></li><li><p>And (as expected for a market-neutral approach) the strategy has <strong>virtually zero correlation</strong> with the S&amp;P 500 (0.01).</p></li></ul><p>Now, let's see how the trading costs impact the strategy.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/short-term-basis-reversal?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/short-term-basis-reversal?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/short-term-basis-reversal?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1>Impact of Trading Costs</h1><p>We have assumed 10 bps of trading costs, deducted weekly. Let&#8217;s now examine how different levels of trading costs affect the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dOm3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dOm3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png 424w, https://substackcdn.com/image/fetch/$s_!dOm3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png 848w, https://substackcdn.com/image/fetch/$s_!dOm3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png 1272w, https://substackcdn.com/image/fetch/$s_!dOm3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dOm3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png" width="1340" height="874" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:874,&quot;width&quot;:1340,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:289967,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/165599029?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dOm3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png 424w, https://substackcdn.com/image/fetch/$s_!dOm3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png 848w, https://substackcdn.com/image/fetch/$s_!dOm3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png 1272w, https://substackcdn.com/image/fetch/$s_!dOm3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41a8a07a-7723-4f93-b055-c2d5fdcc12cd_1340x874.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Performance metrics for different levels of trading costs</figcaption></figure></div><p>As expected, trading costs have a significant impact on the strategy's performance. However, the edge remains robust even with higher cost assumptions:</p><ul><li><p>With 5 bps of costs, the strategy delivers an excellent <strong>22.3% annual return</strong> and a <strong>1.66 Sharpe</strong>;</p></li><li><p>At 10 bps (our base case), results are still very strong: <strong>19.2% annual return</strong> and <strong>1.45 Sharpe</strong>;</p></li><li><p>Even at 15 bps and 20 bps, the strategy remains profitable (Sharpe stays above 1), though returns naturally compress: <strong>16.1%</strong> and <strong>13.1%</strong> annual returns, respectively;</p></li><li><p>Importantly, max drawdown remains stable across cost levels (around -22% to -28%), indicating the strategy does not become more fragile as costs rise.</p></li></ul><h1>Impact of Number of Spreads</h1><p>In our base case, we traded 8 spreads (4 long, 4 short). Let&#8217;s now examine how changing the number of spreads affects the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5uhZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5uhZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png 424w, https://substackcdn.com/image/fetch/$s_!5uhZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png 848w, https://substackcdn.com/image/fetch/$s_!5uhZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png 1272w, https://substackcdn.com/image/fetch/$s_!5uhZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5uhZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png" width="1390" height="876" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:876,&quot;width&quot;:1390,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:299709,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/165599029?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5uhZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png 424w, https://substackcdn.com/image/fetch/$s_!5uhZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png 848w, https://substackcdn.com/image/fetch/$s_!5uhZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png 1272w, https://substackcdn.com/image/fetch/$s_!5uhZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51863d3b-0d65-4859-afc6-722d269d8bd0_1390x876.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Performance metrics for different numbers of spreads</figcaption></figure></div><p>As we vary the number of spreads, we observe a clear trade-off between <strong>return</strong> and <strong>risk concentration</strong>:</p><ul><li><p>Using only 4 spreads maximizes returns (<strong>27.7% annually</strong>) but comes with very high volatility (<strong>21%</strong>) and large drawdowns (<strong>34.8%</strong>);</p></li><li><p>Increasing to 6 spreads improves Sharpe (1.40) while reducing risk somewhat, though returns drop to <strong>23.2% annually</strong>;</p></li><li><p>The base case (8 spreads) shows the best <strong>risk-adjusted profile</strong>: Sharpe <strong>1.45</strong>, volatility <strong>12.6%</strong>, max drawdown <strong>24.4%</strong>, with a still strong <strong>19.2% return</strong>;</p></li><li><p>Adding more spreads (10) further stabilizes the strategy (lowest volatility, lowest drawdown), but at the cost of reduced returns (<strong>16.2%</strong>), possibly due to diluting edge across weaker-ranked markets.</p></li></ul><p>In short: the 8-spread configuration appears to offer the <strong>best balance</strong> between performance and robustness.</p><h1>Final Thoughts</h1><p>The implementation of this paper will be a great way to kick off our <strong>Quantitativo Study Group</strong> this Wednesday. It&#8217;s a clean example of how a simple empirical anomaly, when rigorously tested and thoughtfully implemented, can translate into a potentially robust trading strategy.</p><p>The <strong>Short-Term Basis Reversal</strong> strategy not only held up out-of-sample, but also performed better than in the original paper, especially when implemented as a cross-sectional market-neutral portfolio.</p><p>Starting from a simple empirical observation about spread reversals in commodity term structures, we built a scalable and robust trading strategy. Even after factoring in trading costs and varying the number of spreads, the edge remained strong: <strong>Sharpe ratios above 1</strong>, <strong>strong annual returns</strong>, and <strong>controlled drawdowns</strong>.</p><p>A few takeaways stood out:</p><ul><li><p>The edge is surprisingly consistent across markets and over time;</p></li><li><p>The cross-sectional version offers the best risk-adjusted profile, while also being more scalable;</p></li><li><p>The signal shows a clear monotonic relationship with realized returns, suggesting it captures a real and persistent structural inefficiency.</p></li></ul><p>Of course, this was still a baseline test. There is plenty of room for further exploration:</p><ul><li><p>Should we dynamically adjust the number of spreads traded based on market conditions?</p></li><li><p>Could we optimize the selection and sizing of spreads (e.g., using advanced ranking, volatility scaling, or ensemble signals)?</p></li><li><p>How well does this edge hold up with intraday data or shorter rebalancing cycles?</p></li></ul><p>This is the spirit of <strong>Paracelsus</strong>: trust what you test, and always experiment further. The results so far are very encouraging.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a> if you have questions, ideas, or feedback.</p><p>Cheers!</p><div><hr></div><p><em>The first cohort of the course was a great success. Thank you to everyone who joined!<br>Enrollment is now closed. The next cohort opens in <strong>August</strong>, with 50 more seats.<br>Course participants also get exclusive access to our<strong> Community</strong> and <strong>Study Group</strong>.<br>Join the waitlist below to be notified when enrollment reopens:</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Waitlist&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Waitlist</span></a></p><p><em>(I know, I need to update this landing page&#8230; as soon as I find time I will add more details about the course, the community, reviews from the 50 first users, etc :))</em></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[One year of Quantitativo]]></title><description><![CDATA[From sharing strategies to building a community: how ~5,000 readers, ~30 strategies, and one big idea shaped our first year]]></description><link>https://www.quantitativo.com/p/one-year-of-quantitativo</link><guid isPermaLink="false">https://www.quantitativo.com/p/one-year-of-quantitativo</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Sat, 24 May 2025 19:50:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!0g87!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0g87!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0g87!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png 424w, https://substackcdn.com/image/fetch/$s_!0g87!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png 848w, https://substackcdn.com/image/fetch/$s_!0g87!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png 1272w, https://substackcdn.com/image/fetch/$s_!0g87!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0g87!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png" width="790" height="527" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:527,&quot;width&quot;:790,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:814041,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0g87!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png 424w, https://substackcdn.com/image/fetch/$s_!0g87!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png 848w, https://substackcdn.com/image/fetch/$s_!0g87!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png 1272w, https://substackcdn.com/image/fetch/$s_!0g87!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28cc2474-d595-4dc5-b9d7-bb86596404a4_790x527.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Benjamin Franklin (1706&#8211;1790): Inventor, writer, and Founding Father who shaped America through reason, science, and civic action</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;Either write something worth reading or do something worth writing&#8221;. Benjamin Franklin</p></blockquote><p>Benjamin Franklin was a printer, inventor, diplomat, and my favorite Founding Father. But more than that, he was a lifelong student of self-improvement. He believed in the power of ideas, disciplined action, and sharing knowledge to make the world better.</p><p><strong>This week, we celebrate one year of Quantitativo!</strong> I chose to open with Franklin because, as we enter our second year, we're introducing a few innovations that reminded me of his spirit of learning and experimentation. These include:</p><ol><li><p>Study Group via Zoom</p></li><li><p>Sharing what&#8217;s next on the implementation roadmap</p></li><li><p>Sharing live performance data from strategies in production</p></li></ol><h1>1. Study Group via Zoom</h1><p>As many of you requested, a few weeks ago I launched a course that walks through some of my codebase step by step. It's designed for readers who want to develop quant strategies using the same approach I&#8217;ve shared here.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!z3Lr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!z3Lr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png 424w, https://substackcdn.com/image/fetch/$s_!z3Lr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png 848w, https://substackcdn.com/image/fetch/$s_!z3Lr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png 1272w, https://substackcdn.com/image/fetch/$s_!z3Lr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!z3Lr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png" width="1456" height="1250" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1250,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1278431,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!z3Lr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png 424w, https://substackcdn.com/image/fetch/$s_!z3Lr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png 848w, https://substackcdn.com/image/fetch/$s_!z3Lr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png 1272w, https://substackcdn.com/image/fetch/$s_!z3Lr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80d0aeb9-9f09-4861-8b08-d05752dbc835_2048x1758.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Screenshot of the course</figcaption></figure></div><p>The feedback has been overwhelmingly positive. Thank you! I've added some spontaneous testimonials at the end of this message so everyone can get a sense of the response &#128578;</p><p>The final 10 seats are still available. The cohort already has 40 students, and I&#8217;ll be closing enrollment this Monday. So if you're interested, now&#8217;s the time to check it out:</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Course&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Course</span></a></p><p>One of the main requests from the first students was to <strong>create a community space.</strong></p><blockquote><p>A private community for systematic traders to explore ideas, exchange insights, and discuss the technical and strategic challenges of building real trading systems.</p></blockquote><p>So, we launched the community&#8230; and it&#8217;s flourishing!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xTmX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xTmX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png 424w, https://substackcdn.com/image/fetch/$s_!xTmX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png 848w, https://substackcdn.com/image/fetch/$s_!xTmX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png 1272w, https://substackcdn.com/image/fetch/$s_!xTmX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xTmX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png" width="1456" height="932" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:932,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:784546,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xTmX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png 424w, https://substackcdn.com/image/fetch/$s_!xTmX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png 848w, https://substackcdn.com/image/fetch/$s_!xTmX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png 1272w, https://substackcdn.com/image/fetch/$s_!xTmX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ab3cdf-9f72-41ea-8949-da60908bfaae_2048x1311.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Screenshot of the community</figcaption></figure></div><p>It&#8217;s become a space for daily conversations about alpha research, deeper technical implementation, infrastructure design, and more. One of the first ideas that emerged was to start a <strong>Study Group via Zoom</strong>.</p><p>The idea is simple: each week (or every other week), one person reads a paper, prepares a short presentation (15 minutes max), and shares it with the group. Then we discuss how to implement it in practice.</p><p>For the kickoff session, I&#8217;ll present the paper <strong>&#8220;Short-Term Basis Reversal&#8221; by Rossi, Zhang, and Zhu (2025)</strong>. The session will happen in the second week of June. I&#8217;ll share both the paper summary and my own implementation so we can discuss the practical side together.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BtIh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BtIh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png 424w, https://substackcdn.com/image/fetch/$s_!BtIh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png 848w, https://substackcdn.com/image/fetch/$s_!BtIh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png 1272w, https://substackcdn.com/image/fetch/$s_!BtIh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BtIh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png" width="1076" height="896" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:896,&quot;width&quot;:1076,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:318399,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BtIh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png 424w, https://substackcdn.com/image/fetch/$s_!BtIh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png 848w, https://substackcdn.com/image/fetch/$s_!BtIh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png 1272w, https://substackcdn.com/image/fetch/$s_!BtIh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ce3838-a598-4a16-8d9b-a268fd34e849_1076x896.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From the paper Short-Term Basis Reversal</figcaption></figure></div><p>The vision is to grow this community from the current 40 students into a broader group of people who are serious about <strong>studying, developing, and implementing quantitative trading strategies</strong>. Let&#8217;s see where this leads.</p><p>This initiative reminded me of Ben Franklin&#8217;s <strong>Junto</strong> (also known as the Leather Apron Club). In 1727, at the age of 20, Franklin founded the Junto, a club for mutual improvement. It brought together a small group of artisans and tradesmen who shared a desire for self-education, civic responsibility, and intellectual exchange. They met weekly to discuss moral, political, scientific, and economic questions.</p><p>But the Junto wasn&#8217;t just academic. It was about <strong>practical wisdom</strong> and <strong>intellectual humility</strong>. And the community he started lasted nearly half a century.</p><h1>2. Sharing what&#8217;s next on the implementation roadmap</h1><p>Over the past year, I&#8217;ve shared nearly 30 strategy implementations here. These started as blog posts and gradually shifted toward academic paper implementations, which have become a clear favorite within the community.</p><p>So, I&#8217;ll continue to implement and share interesting papers, along with my take on them.</p><p>I have the habit of reading 1-2 papers per week. I choose them from my personal collection, which I curate by skimming 5-10 new research papers each day and selecting up to 3 to add to the library.</p><p>Recently, someone in the community asked how I decide which papers to test. After explaining my process, I began sharing a few of my selected papers, and, to my surprise, the response was highly positive.</p><p>I&#8217;ll continue writing my implementations (&#8220;do something worth writing,&#8221; as Ben Franklin would say). And starting with today&#8217;s piece, I&#8217;ll also begin <strong>periodically sharing research ideas from my library that are currently on the implementation roadmap</strong> (&#8220;write something worth reading,&#8221; as Ben would put it).</p><p>Here are the new additions I have gathered over the past few weeks:</p><h3>2.5 million headlines. A Sharpe ratio of 2.80.</h3><p>A new paper just dropped that integrates pretrained language model embeddings into a stochastic discount factor (SDF) framework using adversarial networks.</p><p>The result? A model that outperforms CAPM by 471%, reduces pricing errors by 74% compared to Fama-French 5-factor, and shows that financial news holds more predictive power than macro data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!paSM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!paSM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png 424w, https://substackcdn.com/image/fetch/$s_!paSM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png 848w, https://substackcdn.com/image/fetch/$s_!paSM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png 1272w, https://substackcdn.com/image/fetch/$s_!paSM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!paSM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png" width="922" height="630" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:630,&quot;width&quot;:922,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:354171,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!paSM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png 424w, https://substackcdn.com/image/fetch/$s_!paSM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png 848w, https://substackcdn.com/image/fetch/$s_!paSM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png 1272w, https://substackcdn.com/image/fetch/$s_!paSM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F534a3d46-d5dc-454f-ada9-91f31b6eac0b_922x630.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Text embeddings extracted from news lead returns by 2-3 weeks, and rank among the most important features in asset pricing.</p><p><em><a href="https://arxiv.org/abs/2505.06864">NewsNet-SDF: Stochastic Discount Factor Estimation with Pretrained Language Model News Embeddings via Adversarial Networks, by Shunyao Wang, Ming Cheng, Christina Dan Wang.</a></em></p><h3>High attention is a warning sign.</h3><p>A new interesting study finds that daily investor sentiment and attention on StockTwits, Twitter, and Seeking Alpha move markets in opposite ways: <strong>high attention predicts continued losses</strong>, while <strong>high sentiment signals mean-reverting optimism</strong>. A trading strategy based on these two signals delivered a <strong>Sharpe ratio of 1.2</strong> and outperformed traditional attention metrics.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EhxU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EhxU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png 424w, https://substackcdn.com/image/fetch/$s_!EhxU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png 848w, https://substackcdn.com/image/fetch/$s_!EhxU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png 1272w, https://substackcdn.com/image/fetch/$s_!EhxU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EhxU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png" width="614" height="330" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:330,&quot;width&quot;:614,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:67929,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EhxU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png 424w, https://substackcdn.com/image/fetch/$s_!EhxU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png 848w, https://substackcdn.com/image/fetch/$s_!EhxU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png 1272w, https://substackcdn.com/image/fetch/$s_!EhxU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af29aa3-dbc0-499f-887a-5773006c2f1a_614x330.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5187350">Market Signals from Social Media</a></em><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5187350"> (Cookson et al., 2025)</a></p><h3>One-week holding. 17.6% annual returns and 1.42 Sharpe. Zero exposure to known risk factors.</h3><p>A new paper reveals that the spread between front- and second-month futures <em>reverses week to week</em>. This &#8220;short-term basis reversal&#8221; is:</p><ul><li><p>Predictable,</p></li><li><p>Unexplained by carry or momentum,</p></li><li><p>Strongest when volatility is high.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PHq6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PHq6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png 424w, https://substackcdn.com/image/fetch/$s_!PHq6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png 848w, https://substackcdn.com/image/fetch/$s_!PHq6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png 1272w, https://substackcdn.com/image/fetch/$s_!PHq6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PHq6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png" width="1076" height="896" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:896,&quot;width&quot;:1076,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:318399,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PHq6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png 424w, https://substackcdn.com/image/fetch/$s_!PHq6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png 848w, https://substackcdn.com/image/fetch/$s_!PHq6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png 1272w, https://substackcdn.com/image/fetch/$s_!PHq6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F473ae99f-1ed1-4812-9e9c-7e6ba56e5d9a_1076x896.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The strategy? Go <em>against</em> last week&#8217;s spread. It works across commodities, bonds, and even stock index futures.</p><p><em><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5250499">Short-Term Basis Reversal</a></em><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5250499"> by Rossi, Zhang, and Zhu (2025)</a></p><p>This paper is the focus of our first Study Group via Zoom.</p><h3>4.82 Sharpe. 42% better than CNNs built for stocks.</h3><p>This new paper drops a clever insight: financial time series (like stocks or loans) should be treated as <em><strong>sets</strong></em><strong>, not fixed sequences.</strong></p><p>The proposed <strong>Set-Sequence model</strong> learns cross-sectional dependencies <em>without</em> handcrafted features. It crushes benchmarks on:</p><ul><li><p>Stock return prediction (36,600 equities),</p></li><li><p>Mortgage risk (5M loan-months),</p></li><li><p>Synthetic contagion (1,000-unit default simulation).</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!27Ei!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!27Ei!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png 424w, https://substackcdn.com/image/fetch/$s_!27Ei!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png 848w, https://substackcdn.com/image/fetch/$s_!27Ei!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png 1272w, https://substackcdn.com/image/fetch/$s_!27Ei!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!27Ei!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png" width="1456" height="977" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:977,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:682352,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!27Ei!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png 424w, https://substackcdn.com/image/fetch/$s_!27Ei!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png 848w, https://substackcdn.com/image/fetch/$s_!27Ei!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png 1272w, https://substackcdn.com/image/fetch/$s_!27Ei!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a958812-0709-47cd-8df0-41b9756fb8a3_1482x994.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Efficient. Interpretable. Exchangeable. The future of multi-series forecasting might look like this.</p><p><em><a href="https://arxiv.org/abs/2505.11243">A Set-Sequence Model for Time Series, by Elliot L. Epstein, Apaar Sadhwani, and Kay Giesecke.</a></em></p><h3>A simple word count model beats BERT and sentiment dictionaries. 1.86 Sharpe. Long Lasso, short LLMs.</h3><p>This new paper builds a bottom-up dictionary, selecting the <em>most predictive</em> words in 10-Ks using lasso regressions.</p><p>The result? A factor portfolio with:</p><ul><li><p>1% monthly returns,</p></li><li><p>1.86 Sharpe (equal-weight),</p></li><li><p>Minimal overlap with Fama-French 5.</p></li></ul><p>Outperforms:</p><ul><li><p>Top-down sentiment models,</p></li><li><p>Large language model embeddings (BERT),</p></li><li><p>Even neural nets with the same input.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gSVS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gSVS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png 424w, https://substackcdn.com/image/fetch/$s_!gSVS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png 848w, https://substackcdn.com/image/fetch/$s_!gSVS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png 1272w, https://substackcdn.com/image/fetch/$s_!gSVS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gSVS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png" width="1456" height="1153" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1153,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:596371,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gSVS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png 424w, https://substackcdn.com/image/fetch/$s_!gSVS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png 848w, https://substackcdn.com/image/fetch/$s_!gSVS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png 1272w, https://substackcdn.com/image/fetch/$s_!gSVS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1aca0c7c-abcf-463c-8466-c825a4a04cc5_1604x1270.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The winning signal? Words like <em>currency</em>, <em>oil</em>, <em>restructuring</em>, and <em>research</em>.</p><p><em><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4747519">Bottom Up vs Top Down: What Does Firm 10-K Tell Us?, by Landon J. Ross, Jim Horn, Mert Pilanci, Kaihong Luo, and Guofu Zhou.</a></em></p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/one-year-of-quantitativo?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/one-year-of-quantitativo?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/one-year-of-quantitativo?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1>3. Sharing live performance data from strategies in production</h1><p>If I had to summarize the strategy development process I follow, it would look like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G1WE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G1WE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png 424w, https://substackcdn.com/image/fetch/$s_!G1WE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png 848w, https://substackcdn.com/image/fetch/$s_!G1WE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png 1272w, https://substackcdn.com/image/fetch/$s_!G1WE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G1WE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png" width="1456" height="742" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:742,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1018608,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!G1WE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png 424w, https://substackcdn.com/image/fetch/$s_!G1WE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png 848w, https://substackcdn.com/image/fetch/$s_!G1WE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png 1272w, https://substackcdn.com/image/fetch/$s_!G1WE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6bd4843-caec-41dd-9821-9ba4b75ed980_2048x1043.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>After a year of testing, only a handful of strategies made it through. These are now in production, with a few million dollars allocated to them.</p><p>Starting this year, I also plan to begin sharing live performance data for these strategies. This will roll out later in the year.</p><h1>Final thoughts</h1><p>It&#8217;s been an incredible first year.</p><p>Since launching Quantitativo, we&#8217;ve connected with nearly <strong>5,000 people:</strong> readers, students, and fellow traders from all over the world. More important than any strategy I&#8217;ve shared, what truly stood out were the <strong>relationships</strong> built along the way: new friends, thoughtful conversations, and meaningful collaborations that helped shape many of the ideas shared.</p><p>What began as a simple idea (sharing the process of developing trading strategies) has evolved into a growing community of people who are serious about building conviction through research, iteration, and implementation.</p><p>At the core of Quantitativo is a simple belief:</p><blockquote><p>The more strategies we test, the higher our odds of achieving above-average returns.</p></blockquote><p>Our goal isn&#8217;t to hand out plug-and-play systems. It&#8217;s to <strong>spark curiosity</strong>, <strong>build skill</strong>, and help each of us become the kind of person who&#8217;s always learning, questioning, and creating.</p><p>Because strategies come and go. But the habit of developing and testing ideas, and the relationships we build along the way, are what truly endure.</p><p>Thank you for being part of this journey.</p><p>I'm excited for what&#8217;s ahead, and I look forward to <strong>meeting more of you, exchanging ideas, and continuing to build great things together.</strong></p><p>Cheers,</p><p>Carlos</p><p>P.S. As mentioned earlier, here are a few spontaneous testimonials from early users:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HF6P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HF6P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png 424w, https://substackcdn.com/image/fetch/$s_!HF6P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png 848w, https://substackcdn.com/image/fetch/$s_!HF6P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png 1272w, https://substackcdn.com/image/fetch/$s_!HF6P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HF6P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png" width="1230" height="448" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:448,&quot;width&quot;:1230,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:140003,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HF6P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png 424w, https://substackcdn.com/image/fetch/$s_!HF6P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png 848w, https://substackcdn.com/image/fetch/$s_!HF6P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png 1272w, https://substackcdn.com/image/fetch/$s_!HF6P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18b51897-216a-4012-b12d-2c4e8b6bf946_1230x448.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yglK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yglK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png 424w, https://substackcdn.com/image/fetch/$s_!yglK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png 848w, https://substackcdn.com/image/fetch/$s_!yglK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png 1272w, https://substackcdn.com/image/fetch/$s_!yglK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yglK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png" width="1224" height="438" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:438,&quot;width&quot;:1224,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:128010,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yglK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png 424w, https://substackcdn.com/image/fetch/$s_!yglK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png 848w, https://substackcdn.com/image/fetch/$s_!yglK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png 1272w, https://substackcdn.com/image/fetch/$s_!yglK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4d90bfa-2b73-432e-ae46-3c8a6b476941_1224x438.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!52nr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!52nr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png 424w, https://substackcdn.com/image/fetch/$s_!52nr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png 848w, https://substackcdn.com/image/fetch/$s_!52nr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png 1272w, https://substackcdn.com/image/fetch/$s_!52nr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!52nr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png" width="1230" height="318" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:318,&quot;width&quot;:1230,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:69933,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/164372370?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!52nr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png 424w, https://substackcdn.com/image/fetch/$s_!52nr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png 848w, https://substackcdn.com/image/fetch/$s_!52nr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png 1272w, https://substackcdn.com/image/fetch/$s_!52nr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F430f121b-28f9-4fe6-a96c-dfd11942cf92_1230x318.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Thanks again for the incredible feedback! It really makes my day. :)</p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Beta hedging]]></title><description><![CDATA[A practical implementation that halves market exposure while preserving alpha]]></description><link>https://www.quantitativo.com/p/beta-hedging</link><guid isPermaLink="false">https://www.quantitativo.com/p/beta-hedging</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Sun, 11 May 2025 13:16:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!gDog!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gDog!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gDog!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png 424w, https://substackcdn.com/image/fetch/$s_!gDog!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png 848w, https://substackcdn.com/image/fetch/$s_!gDog!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png 1272w, https://substackcdn.com/image/fetch/$s_!gDog!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gDog!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png" width="1456" height="853" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:853,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2196199,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gDog!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png 424w, https://substackcdn.com/image/fetch/$s_!gDog!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png 848w, https://substackcdn.com/image/fetch/$s_!gDog!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png 1272w, https://substackcdn.com/image/fetch/$s_!gDog!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0784517a-cdea-4d3a-880f-ea0f55760fac_1630x955.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">William Sharpe, Nobel laureate and pioneer of modern portfolio theory</figcaption></figure></div><h1>The idea</h1><blockquote><p>"If you're not thinking about risk, then you're not thinking." William Sharpe.</p></blockquote><p>William Sharpe is a Nobel Prize-winning economist renowned for his work on the Capital Asset Pricing Model (CAPM) and the Sharpe Ratio, both of which highlight the central role of risk in pricing and evaluating assets. While the quote &#8220;If you're not thinking about risk, then you're not thinking&#8221; may not be his exact words, it captures the essence of his legacy: that <strong>risk must be understood, measured, and deliberately managed</strong>.</p><p>This week, we&#8217;ll show how to <strong>systematically hedge</strong> a long-biased portfolio of strategies to <strong>reduce its market exposure to near zero</strong>. It will be a simple yet practical example, with <strong>code included</strong>. The basic model can be further extended or refined as needed.</p><p>Here's the plan:</p><ol><li><p>First, we&#8217;ll review a portfolio of strategies, examine its performance, and highlight the <strong>issue of having a moderately high beta</strong>.</p></li><li><p>Then, we&#8217;ll outline a <strong>hedging approach</strong> designed to bring the <strong>portfolio&#8217;s overall beta close to zero</strong>.</p></li><li><p>Next, we&#8217;ll run experiments to evaluate how this hedging impacts the portfolio&#8217;s overall returns.</p></li><li><p>Finally, we&#8217;ll share some concluding thoughts and discuss possible next steps.</p></li></ol><p>Let's get to it.</p><div><hr></div><p><em>As many of you requested, the course is <strong>now live and open for enrollment.</strong></em></p><p><em>It walks through my codebase step by step and is designed for readers who want to develop quant strategies using the same approach I&#8217;ve shared here.</em></p><p><em>You&#8217;ll find all the details&#8212;content, structure, pricing, and FAQs&#8212;at the link below. If you have any questions, feel free to reach out.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Course&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Join the Course</span></a></p><div><hr></div><p>Now, to the article!</p><h1>The problem</h1><p>We&#8217;ve been trading a portfolio of mean reversion strategies&#8212;based on ideas we&#8217;ve shared here&#8212;for over six months. The live results are promising: a return of +10.1% versus -2.8% for the S&amp;P 500. Here&#8217;s an overview of the portfolio&#8217;s performance:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HcHJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HcHJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!HcHJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!HcHJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!HcHJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HcHJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:646037,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HcHJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!HcHJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!HcHJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!HcHJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5518b2f3-5b59-42d8-ad49-f8d01c9ab9e5_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves of the portfolio of MR strategies</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NgFx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NgFx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png 424w, https://substackcdn.com/image/fetch/$s_!NgFx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png 848w, https://substackcdn.com/image/fetch/$s_!NgFx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!NgFx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NgFx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png" width="1070" height="1332" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1332,&quot;width&quot;:1070,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:323171,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NgFx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png 424w, https://substackcdn.com/image/fetch/$s_!NgFx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png 848w, https://substackcdn.com/image/fetch/$s_!NgFx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!NgFx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d6264bd-ee85-4fae-a6cd-9223b775f083_1070x1332.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the portfolio statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nrrw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nrrw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png 424w, https://substackcdn.com/image/fetch/$s_!nrrw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png 848w, https://substackcdn.com/image/fetch/$s_!nrrw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png 1272w, https://substackcdn.com/image/fetch/$s_!nrrw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nrrw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png" width="1456" height="1011" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1011,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1613380,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nrrw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png 424w, https://substackcdn.com/image/fetch/$s_!nrrw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png 848w, https://substackcdn.com/image/fetch/$s_!nrrw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png 1272w, https://substackcdn.com/image/fetch/$s_!nrrw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F220a6fd2-606b-4f37-a01f-121445fd2ff4_1644x1142.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>A portfolio with a 1.1 Sharpe Ratio is what I&#8217;d consider <em>OK</em>. Someone asked me over email what I consider a good Sharpe ratio, and here&#8217;s the heuristic I use:</p><ul><li><p><strong>&lt; 1.0</strong>: Subpar or not investable</p></li><li><p><strong>1.0&#8211;1.5</strong>: OK strategy/portfolio</p></li><li><p><strong>1.5&#8211;2.0</strong>: Good strategy/portfolio</p></li><li><p><strong>2.0&#8211;3.0</strong>: Great strategy/portfolio</p></li><li><p><strong>&gt; 3.0</strong>: Amazing or outlier strategy/portfolio</p></li></ul><p>I always interpret these numbers in the context of capacity. For niche or capacity-constrained strategies, higher Sharpe ratios may be possible&#8212;but they&#8217;re typically not scalable. Since this portfolio trades only S&amp;P 500 constituents and therefore has very high capacity, a 1.1 Sharpe is reasonable. It's over twice the S&amp;P 500.</p><p>The correlation to the S&amp;P 500 is 0.57, which I consider moderately high.</p><p>Now, let's use the Fama-French 3-Factor Model to <strong>analyze how much of the strategy's performance can be attributed to common risk factors</strong> like the market, size, and value. By running an OLS regression on the strategy's excess returns using the Fama-French factors, we can break down the sources of performance into:</p><ol><li><p><strong>Market Risk (Mkt-RF)</strong>: The sensitivity of the portfolio to market movements, which reflects general market exposure.</p></li><li><p><strong>Size (SMB)</strong>: The sensitivity of the portfolio to the size factor, indicating whether it leans towards small or large-cap stocks.</p></li><li><p><strong>Value (HML)</strong>: The sensitivity to the value factor, showing whether it favors value or growth stocks.</p></li></ol><p>Here are the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IWkb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IWkb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png 424w, https://substackcdn.com/image/fetch/$s_!IWkb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png 848w, https://substackcdn.com/image/fetch/$s_!IWkb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png 1272w, https://substackcdn.com/image/fetch/$s_!IWkb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IWkb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png" width="994" height="654" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:654,&quot;width&quot;:994,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:245882,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IWkb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png 424w, https://substackcdn.com/image/fetch/$s_!IWkb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png 848w, https://substackcdn.com/image/fetch/$s_!IWkb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png 1272w, https://substackcdn.com/image/fetch/$s_!IWkb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc74d82b-b3e0-4099-aeca-7be779c5f9fe_994x654.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">OLS regression on the strategy's excess returns using Fama-French factors</figcaption></figure></div><p>The OLS regression on the strategy&#8217;s excess returns using Fama-French factors shows a statistically significant alpha of 0.0534, alongside a <strong>market beta (Mkt-RF) of 0.57</strong>, which is moderately high. Exposure to SMB is small but positive, while the negative HML loading suggests a tilt away from value stocks.</p><p>While the positive alpha is encouraging (annualizes to 14.4%), the <strong>moderately high beta indicates that a large portion of the returns is explained by general market movements</strong>, rather than pure strategy edge. This is not ideal&#8212;especially in a multi-strategy or market-neutral framework&#8212;because it means the portfolio is still exposed to systematic market risk. <strong>Our goal is to hedge this market exposure to isolate the strategy&#8217;s true performance and reduce drawdowns during broader market downturns.</strong></p><p>This is the problem we are solving. Let's see how.</p><h1>Beta hedging</h1><p><strong>Beta hedging</strong> is the process of <strong>neutralizing a portfolio&#8217;s exposure to broad market movements</strong> by taking an <strong>offsetting position in a market index</strong>, typically using <strong>futures</strong> or <strong>ETFs</strong>. The goal is to <strong>isolate the strategy&#8217;s alpha</strong> by removing the influence of <strong>systematic risk</strong>.</p><p>In our case, the portfolio has a <strong>market beta of 0.57</strong>, meaning it tends to move 0.57% for every 1% move in the <strong>S&amp;P 500</strong>. To offset this exposure, we&#8217;ll <strong>short S&amp;P 500 futures (ES contracts)</strong> in proportion to the portfolio&#8217;s <strong>beta</strong> and <strong>current notional value</strong>. This allows us to bring the <strong>net beta close to zero</strong>, reducing sensitivity to <strong>market direction</strong>.</p><p>We&#8217;re not attempting to hedge other factors like <strong>SMB</strong> or <strong>HML</strong> (their betas are not as high). Our focus here is purely on <strong>market exposure</strong>. Because <strong>beta</strong> and <strong>portfolio value</strong> can fluctuate daily, we&#8217;ll <strong>recalculate the hedge each day</strong> and adjust the number of <strong>ES contracts</strong> accordingly. This ensures the portfolio stays close to <strong>beta-neutral</strong> over time.</p><p>This is meant to be a <strong>simple, focused example</strong> to demonstrate the concept. <strong>Extending the approach</strong> to hedge exposure to other <strong>risk factors</strong>&#8212;such as <strong>size (SMB)</strong> or <strong>value (HML)</strong>&#8212;follows the same logic: <strong>estimate the factor loading</strong>, identify a <strong>tradable proxy</strong>, and <strong>size the hedge accordingly</strong>.</p><p>We start with a DataFrame containing three columns:</p><ul><li><p><code>daily_rets_pre_hedge</code> &#8211; the portfolio&#8217;s daily returns before applying the hedge</p></li><li><p><code>total_value_pre_hedge</code> &#8211; the portfolio&#8217;s total dollar value each day</p></li><li><p><code>es_close</code> &#8211; the daily closing price of the S&amp;P 500 futures (ES)</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DYsL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DYsL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png 424w, https://substackcdn.com/image/fetch/$s_!DYsL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png 848w, https://substackcdn.com/image/fetch/$s_!DYsL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png 1272w, https://substackcdn.com/image/fetch/$s_!DYsL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DYsL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png" width="786" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&quot;width&quot;:786,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:150710,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DYsL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png 424w, https://substackcdn.com/image/fetch/$s_!DYsL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png 848w, https://substackcdn.com/image/fetch/$s_!DYsL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png 1272w, https://substackcdn.com/image/fetch/$s_!DYsL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26457771-c793-44b7-a8e2-aa949cf5f9e7_786x600.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Initial data</figcaption></figure></div><p>Now, we need to compute the rolling beta of this portfolio:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AskV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AskV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png 424w, https://substackcdn.com/image/fetch/$s_!AskV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png 848w, https://substackcdn.com/image/fetch/$s_!AskV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png 1272w, https://substackcdn.com/image/fetch/$s_!AskV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AskV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png" width="1404" height="518" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:518,&quot;width&quot;:1404,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:294985,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AskV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png 424w, https://substackcdn.com/image/fetch/$s_!AskV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png 848w, https://substackcdn.com/image/fetch/$s_!AskV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png 1272w, https://substackcdn.com/image/fetch/$s_!AskV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdd3a2bb-30ab-47d6-baa4-a64b4d49c83d_1404x518.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The code above estimates the portfolio&#8217;s <strong>rolling beta to the market</strong> using a 63-day window. For each window, it applies the <code>get_alpha_and_betas</code> function to compute the <strong>market beta (</strong><code>Mkt-RF</code><strong>)</strong>, which is then forward-filled to handle any initial NaNs. To smooth short-term fluctuations, the resulting beta series is further filtered using an <strong>exponential moving average (EMA) with a 20-day span</strong>. Additionally, the portfolio&#8217;s daily notional value is scaled to an <strong>initial capital of $1,000,000</strong>, and rows with missing values are dropped to prepare the data for hedging calculations.</p><p>The method <code>get_alpha_and_betas</code> is something like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ILro!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ILro!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png 424w, https://substackcdn.com/image/fetch/$s_!ILro!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png 848w, https://substackcdn.com/image/fetch/$s_!ILro!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png 1272w, https://substackcdn.com/image/fetch/$s_!ILro!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ILro!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png" width="1412" height="1852" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1852,&quot;width&quot;:1412,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:911686,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ILro!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png 424w, https://substackcdn.com/image/fetch/$s_!ILro!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png 848w, https://substackcdn.com/image/fetch/$s_!ILro!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png 1272w, https://substackcdn.com/image/fetch/$s_!ILro!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b6784b8-9e33-4ac2-83bb-56b3790797d7_1412x1852.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The <code>get_alpha_and_betas</code> function runs an OLS regression of a strategy&#8217;s <strong>excess returns</strong> against the <strong>Fama-French factors</strong> (either 3 or 5), in order to estimate the strategy&#8217;s <strong>alpha and factor loadings (betas)</strong>. It first downloads and preprocesses the relevant factor data using the external helper <code>get_ff_factor_model</code>, which pulls data directly from <strong>Kenneth French&#8217;s website</strong> (<a href="https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/">https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/</a>) and returns it ready for regression (this helper is included in the course but not shown here for brevity). The strategy returns are joined with the factor dataset, and if there are enough data points (default: 42), a regression is run using <code>statsmodels.OLS</code>.</p><p>Then, we can see the rolling beta with the following snippet:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AGrp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AGrp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png 424w, https://substackcdn.com/image/fetch/$s_!AGrp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png 848w, https://substackcdn.com/image/fetch/$s_!AGrp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png 1272w, https://substackcdn.com/image/fetch/$s_!AGrp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AGrp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png" width="1456" height="1067" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1067,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:724868,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AGrp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png 424w, https://substackcdn.com/image/fetch/$s_!AGrp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png 848w, https://substackcdn.com/image/fetch/$s_!AGrp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png 1272w, https://substackcdn.com/image/fetch/$s_!AGrp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cc10ab7-807e-4053-bad9-94ca5a621ae4_1556x1140.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WW3n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WW3n!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png 424w, https://substackcdn.com/image/fetch/$s_!WW3n!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png 848w, https://substackcdn.com/image/fetch/$s_!WW3n!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png 1272w, https://substackcdn.com/image/fetch/$s_!WW3n!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WW3n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png" width="1456" height="947" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:947,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:612416,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WW3n!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png 424w, https://substackcdn.com/image/fetch/$s_!WW3n!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png 848w, https://substackcdn.com/image/fetch/$s_!WW3n!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png 1272w, https://substackcdn.com/image/fetch/$s_!WW3n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff54705a5-976b-43f2-b22f-5215547ec7b9_1774x1154.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Rolling beta</figcaption></figure></div><p>Now that we&#8217;ve estimated the portfolio&#8217;s rolling beta, we can compute the number of ES contracts to hold each day and track the impact of the hedge on both PnL and overall portfolio returns:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xDjM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xDjM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png 424w, https://substackcdn.com/image/fetch/$s_!xDjM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png 848w, https://substackcdn.com/image/fetch/$s_!xDjM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png 1272w, https://substackcdn.com/image/fetch/$s_!xDjM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xDjM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png" width="1456" height="916" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:916,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:743617,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xDjM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png 424w, https://substackcdn.com/image/fetch/$s_!xDjM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png 848w, https://substackcdn.com/image/fetch/$s_!xDjM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png 1272w, https://substackcdn.com/image/fetch/$s_!xDjM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F499a6b09-c966-4cdd-ba06-89992933ce4f_1552x976.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Here's what the code above is doing, step-by-step:</p><ol><li><p><strong>Hedge Sizing</strong>:</p><p>The number of ES futures contracts to short is calculated based on the portfolio&#8217;s dollar value, its rolling beta, and a dampening <code>beta_factor</code> (set to 0.5). The hedge is not fully sized to neutralize all beta&#8212;this allows for some market exposure to remain, which may improve Sharpe or reduce over-hedging. The hedge is scaled by the ES contract multiplier (50), and the result is rounded to an integer and negated to reflect a <strong>short position</strong>.</p></li><li><p><strong>Futures PnL Calculation</strong>:</p><p>The PnL from holding the ES futures is computed as the change in futures price multiplied by the previous day&#8217;s position size and the contract multiplier. This simulates <strong>daily rebalancing</strong>, where the position is adjusted at each step based on the updated beta.</p></li><li><p><strong>Post-Hedge Portfolio Value</strong>:</p><p>The PnL from the futures hedge is added to the original (pre-hedge) portfolio value to compute the total value of the <strong>post-hedge portfolio</strong>. This reflects how the hedge offsets market-driven moves in the unhedged portfolio.</p></li><li><p><strong>Post-Hedge Returns</strong>:</p><p>Finally, the <strong>daily returns of the post-hedge portfolio</strong> are calculated as the percentage change in total value. The first day's return is manually set to match the pre-hedge return to avoid a missing value at the start of the series.</p></li></ol><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/beta-hedging?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/beta-hedging?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/beta-hedging?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h1>Results</h1><p>Now, we can see the new results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!179g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!179g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!179g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!179g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!179g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!179g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:642956,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!179g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!179g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!179g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!179g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc767312e-75dd-4fa3-a518-fe68234d263a_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves post-hedging</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bIRO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bIRO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png 424w, https://substackcdn.com/image/fetch/$s_!bIRO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png 848w, https://substackcdn.com/image/fetch/$s_!bIRO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!bIRO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bIRO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png" width="1072" height="1334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1334,&quot;width&quot;:1072,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:330213,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bIRO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png 424w, https://substackcdn.com/image/fetch/$s_!bIRO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png 848w, https://substackcdn.com/image/fetch/$s_!bIRO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!bIRO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e630cb3-3a5b-4d4b-847c-477018442770_1072x1334.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the portfolio statistics post-hedge</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!J1-c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!J1-c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png 424w, https://substackcdn.com/image/fetch/$s_!J1-c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png 848w, https://substackcdn.com/image/fetch/$s_!J1-c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png 1272w, https://substackcdn.com/image/fetch/$s_!J1-c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!J1-c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png" width="1456" height="1010" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1010,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1525433,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!J1-c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png 424w, https://substackcdn.com/image/fetch/$s_!J1-c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png 848w, https://substackcdn.com/image/fetch/$s_!J1-c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png 1272w, https://substackcdn.com/image/fetch/$s_!J1-c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c2f4fd5-5afb-4b23-b90a-be421fbca817_1652x1146.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns of the post-hedged portfolio</figcaption></figure></div><p>Here are the main highlights and conclusions from the pre- and post-hedge performance comparison:</p><ul><li><p><strong>Market exposure was significantly reduced</strong>:</p><p>Correlation to the S&amp;P 500 dropped from <strong>0.57 pre-hedge to 0.29 post-hedge</strong>, indicating effective removal of systematic market risk.</p></li><li><p><strong>Sharpe ratio remained stable</strong>:</p><p>The Sharpe ratio stayed nearly unchanged (<strong>1.09 &#8594; 1.08</strong>), suggesting that the hedge did not dilute the portfolio's risk-adjusted performance.</p></li><li><p><strong>Return and volatility slightly decreased</strong>:</p><p>Annualized return decreased marginally (<strong>21.0% &#8594; 19.8%</strong>) along with volatility (<strong>19.1% &#8594; 18.2%</strong>), consistent with a dampened beta.</p></li><li><p><strong>Max drawdown slightly increased</strong>:</p><p>Maximum drawdown worsened slightly (<strong>-24.4% &#8594; -26.0%</strong>), which may reflect the cost of daily rebalancing or increased short-term fluctuations introduced by the hedge.</p></li><li><p><strong>Reduced dependence on market direction</strong>:</p><p>Despite lower beta, the strategy preserved almost all of its long-term return, which reinforces the presence of true alpha.</p></li></ul><p>Re-running the Fama-French 3-Factor Model allows us to assess how much of the strategy&#8217;s performance can be explained by common risk factors. The results are as follows:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6Wza!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6Wza!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png 424w, https://substackcdn.com/image/fetch/$s_!6Wza!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png 848w, https://substackcdn.com/image/fetch/$s_!6Wza!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png 1272w, https://substackcdn.com/image/fetch/$s_!6Wza!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6Wza!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png" width="992" height="652" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:652,&quot;width&quot;:992,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:246869,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6Wza!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png 424w, https://substackcdn.com/image/fetch/$s_!6Wza!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png 848w, https://substackcdn.com/image/fetch/$s_!6Wza!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png 1272w, https://substackcdn.com/image/fetch/$s_!6Wza!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9997b0d4-2d64-409f-a339-08049c6513a7_992x652.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">OLS regression on the post-hedged portfolio excess returns using Fama-French factors</figcaption></figure></div><p>Highlights:</p><ul><li><p><strong>Market beta dropped substantially</strong>:</p><p>The loading on <strong>Mkt-RF</strong> fell from <strong>0.57 pre-hedge to 0.27 post-hedge</strong>, confirming that the hedge significantly reduced market exposure.</p></li><li><p><strong>Alpha increased after hedging</strong>:</p><p>The <strong>annualized alpha rose from 14.4% to 16.4%</strong>, suggesting that isolating the portfolio from market movements revealed even stronger idiosyncratic performance.</p></li><li><p><strong>Model explanatory power decreased</strong>:</p><p>The <strong>R-squared dropped from 0.33 to 0.09</strong>, indicating that a much smaller portion of the portfolio&#8217;s returns is now explained by the Fama-French factors&#8212;consistent with a more market-neutral profile.</p></li><li><p><strong>Alpha remained statistically significant</strong> in both cases (p-value &lt; 0.001), reinforcing the robustness of the strategy&#8217;s non-factor-driven edge.</p></li></ul><p>These results validate that the hedge effectively reduced systematic risk while preserving the portfolio&#8217;s alpha characteristics.</p><p>To wrap up the analysis, the chart below offers a visual comparison of the portfolio&#8217;s daily returns versus the S&amp;P 500 <strong>before and after hedging:</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zLKI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zLKI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png 424w, https://substackcdn.com/image/fetch/$s_!zLKI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png 848w, https://substackcdn.com/image/fetch/$s_!zLKI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png 1272w, https://substackcdn.com/image/fetch/$s_!zLKI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zLKI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png" width="1456" height="831" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:831,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:575213,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/163326128?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zLKI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png 424w, https://substackcdn.com/image/fetch/$s_!zLKI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png 848w, https://substackcdn.com/image/fetch/$s_!zLKI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png 1272w, https://substackcdn.com/image/fetch/$s_!zLKI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd78c292e-f718-44d7-8792-88599b4e8d43_1790x1022.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Portfolio vs. S&amp;P 500: Beta drops from 0.57 to 0.27 after hedging</figcaption></figure></div><p>The left panel shows a clear positive relationship between the portfolio and the market, with a beta of approximately <strong>0.57</strong>. After applying the hedge (right panel), the slope of the linear fit drops to <strong>0.27</strong>, confirming that the <strong>portfolio&#8217;s sensitivity to market movements has been significantly reduced</strong>. The post-hedge cloud is more centered and less tilted, illustrating how the hedge successfully dampened systematic exposure while retaining the core return profile.</p><h1>Final thoughts</h1><p>This was a simple but effective demonstration of how to implement beta hedging in practice. Starting from a long-biased portfolio of strategies with a moderately high market beta, we systematically reduced its exposure by shorting S&amp;P 500 futures, recalibrating the hedge daily. The results were encouraging: we cut the beta nearly in half, maintained the Sharpe ratio, and preserved nearly all of the original alpha&#8212;while significantly lowering the portfolio's correlation to the market.</p><p>While the model we used was intentionally simple, the core concept generalizes well. Hedging other factor exposures&#8212;such as size or value&#8212;follows the exact same playbook. The point wasn&#8217;t to overfit, but to show that a practical, transparent beta hedge can be built with just a few lines of code and some clean assumptions.</p><p>There&#8217;s room to explore further. One direction is to turn this static hedge into a more dynamic framework, where the dampening factor or even the hedge asset itself adjusts based on regime shifts or higher-order factor interactions. Another is to combine beta hedging with volatility targeting or cross-asset overlays to create a fully adaptive market-neutral engine.</p><p>But that&#8217;s a topic for another day.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a> if you have questions, ideas, or feedback.</p><p>Cheers!</p><div><hr></div><p><em>As many of you requested, the course is <strong>now live and open for enrollment.</strong></em></p><p><em>It walks through my codebase step by step and is designed for readers who want to develop quant strategies using the same approach I&#8217;ve shared here.</em></p><p><em>You&#8217;ll find all the details&#8212;content, structure, pricing, and FAQs&#8212;at the link below. If you have any questions, feel free to reach out.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Join the Course&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://quantitativo.carrd.co/"><span>Join the Course</span></a></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The Bitter Lesson]]></title><description><![CDATA[Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks]]></description><link>https://www.quantitativo.com/p/the-bitter-lesson</link><guid isPermaLink="false">https://www.quantitativo.com/p/the-bitter-lesson</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Wed, 23 Apr 2025 12:02:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!FIwD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FIwD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FIwD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png 424w, https://substackcdn.com/image/fetch/$s_!FIwD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png 848w, https://substackcdn.com/image/fetch/$s_!FIwD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png 1272w, https://substackcdn.com/image/fetch/$s_!FIwD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FIwD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png" width="1128" height="846" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:846,&quot;width&quot;:1128,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1376596,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FIwD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png 424w, https://substackcdn.com/image/fetch/$s_!FIwD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png 848w, https://substackcdn.com/image/fetch/$s_!FIwD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png 1272w, https://substackcdn.com/image/fetch/$s_!FIwD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3147083b-4cf5-42a1-b7ff-10280863f537_1128x846.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Richard Sutton, pioneer of reinforcement learning and a founding figure in modern AI.</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;The biggest lesson that can be read from 70 years of AI research is that general methods that leverage computation are ultimately the most effective, and by a large margin.&#8221; Richard Sutton.</p></blockquote><p>Richard Sutton is one of the greatest minds of our time. He is a founding figure in modern AI and a pioneer of reinforcement learning, the framework behind many of today&#8217;s most advanced intelligent systems. His work laid the foundations for agents that learn not from instruction, but from experience. A recipient of the Turing Award (the &#8220;Nobel Prize of Computing&#8221;), Sutton's influence is profound, reshaping how we think about learning, intelligence, and progress in AI.</p><p>In his landmark 2019 essay <em><a href="http://www.incompleteideas.net/IncIdeas/BitterLesson.html">The Bitter Lesson</a></em>, Sutton delivers a hard truth distilled from 70 years of AI research: methods that scale with computation, like search and learning, consistently outperform approaches that rely on built-in human knowledge. While it may be tempting to design systems that reflect how we think we think, history has shown that progress comes instead from <strong>embracing general-purpose algorithms and the exponential growth in computing power</strong>. It's a lesson many resist&#8230; until reality beats them over the head with it.</p><blockquote><p>Human intuition may offer short-term gains, but brute-force computation ultimately wins.</p></blockquote><p>This week, I&#8217;m going to write about this idea&#8212;and a failed experiment. But don&#8217;t be misled: the absence of a successful first result doesn&#8217;t mean the idea should be dismissed. On the contrary, this is the most important concept I&#8217;ve shared here so far. In fact, the core of <em>The Bitter Lesson</em> is one of the most important ideas in the history of computer science.</p><p>You&#8217;re probably already seeing where this line of reasoning leads. Many quantitative systems are built around rule sets that mimic human thinking. But Sutton&#8217;s core argument is that, in the long run, general-purpose algorithms that scale with compute will always outperform hand-crafted, human-informed approaches. He&#8217;s essentially saying that trying to manually craft trading rules is a waste of time. It might have worked in the past, but it won&#8217;t keep working much longer.</p><p>It&#8217;s a controversial point, I know. Let&#8217;s dive in.</p><blockquote><p>As many of you have requested, I&#8217;ll be sharing some of my codebase in a course. It&#8217;s almost ready and should be finished in the next week or so. I&#8217;ve created the page below to explain the course content, who it&#8217;s for, and to answer the main questions about it. If you have any additional questions, feel free to send me an <a href="mailto:cs@quantitativo.com">email</a>.</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Course Content&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Course Content</span></a></p><p>Now, to the article!</p><h1>Thoughts from an ex-Senior Quant from Citadel</h1><p>Richard Sutton is also a personal hero. I devoured his <em><a href="http://www.incompleteideas.net/book/RLbook2020.pdf">Reinforcement Learning</a></em> book&#8212;the definitive guide in the field&#8212;while taking the <em>Reinforcement Learning and Decision Making</em> class in grad school. In that class, under the guidance of the great professors Charles Isbell and Michael Littman, I developed the habit of reimplementing influential academic papers to deepen my understanding. It was my favorite course during my Master&#8217;s.</p><p>A few weeks ago, while watching the presentation <em>"Deep Order Flow Imbalance: Extracting Alpha at Multiple Horizons from the Limit Order Book&#8221;</em>, three minutes in, I started listening to Nicholas Westray make Sutton's Bitter Lesson point.</p><div id="youtube2-ExOCRH-aXMM" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;ExOCRH-aXMM&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/ExOCRH-aXMM?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>Westray, an ex-Senior Quant at Citadel (now at Point72, I think), explains Sutton's article and states the idea of his research: to forecast returns directly from raw limit order book (LOB) data, leveraging <strong>computation over domain knowledge.</strong></p><p>His research shows that yes, using order flow data derived from raw limit order book data, a massive dataset, and a lot of compute power can indeed result in a model that can predict short-term returns.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FS-L!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FS-L!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png 424w, https://substackcdn.com/image/fetch/$s_!FS-L!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png 848w, https://substackcdn.com/image/fetch/$s_!FS-L!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png 1272w, https://substackcdn.com/image/fetch/$s_!FS-L!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FS-L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png" width="978" height="844" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:844,&quot;width&quot;:978,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:344138,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FS-L!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png 424w, https://substackcdn.com/image/fetch/$s_!FS-L!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png 848w, https://substackcdn.com/image/fetch/$s_!FS-L!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png 1272w, https://substackcdn.com/image/fetch/$s_!FS-L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7bebc885-7847-4d4b-a2d1-3628de9eb3fc_978x844.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It's a great talk worth listening to. Here are <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3900141">the paper and the slide</a><a href="https://www.northinfo.com/documents/1087.pdf">s</a> for those who are more curious.</p><p>My first thought was to reimplement Westray&#8217;s paper as a learning exercise&#8212;something I picked up from Isbell and Littman in my Reinforcement Learning class. (Coincidence or not, one of the first papers I ever reimplemented was Sutton&#8217;s seminal work on temporal difference learning.)</p><p>I also wondered whether a simpler version of the idea might have profitable applications in less competitive corners of the market. There's only one way to find out: test it.</p><p>But as I read the paper more carefully, I realized this is a much larger project. Unfortunately, I don&#8217;t have the free time to tackle it in just a few weeks. It&#8217;ll take longer.</p><p>That led to my second thought: can we build a <strong>toy project instead</strong>? The idea is the same: throw a lot of data and compute at a return prediction problem to put Sutton&#8217;s Bitter Lesson to the test. Toy problems are also great learning tools.</p><p>Back in the day when OpenAI was still non-profit, I spent my fair share of time solving OpenAI Gym environments to learn deep reinforcement learning. I know the value of implementing toy projects.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1>Choosing a paper</h1><p>If not Nicholas Westray's paper, which paper should I put to test? That was the next question. I have a library with over 100 papers I want to implement. It will take me many years, and I don't believe I will ever finish, because the library keeps growing.</p><p>Navigating through the library is hard, so I turned to Google and searched for &#8220;deep learning momentum stocks&#8221;. Why these terms? Simple: &#8220;deep learning&#8221; accounts for the lots of compute power &amp; learning algorithms from Sutton's Bitter Lesson, and &#8220;momentum&#8221; is one of the most persistent anomalies in &#8220;stocks&#8221;. The top three results:</p><ol><li><p><a href="https://www.pm-research.com/content/iijjfds/4/1/111.full.pdf">Slow Momentum with Fast Reversion: A Trading Strategy Using Deep Learning and Changepoint Detection</a>, from Kieran Wood, Stephen Roberts, and Stefan Zohren</p></li><li><p><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3424793">Dissecting Momentum: We Need to Go Deeper</a>, from Dmitry Borisenko</p></li><li><p><a href="https://cs229.stanford.edu/proj2013/TakeuchiLee-ApplyingDeepLearningToEnhanceMomentumTradingStrategiesInStocks.pdf">Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks</a>, from Lawrence Takeuchi and Yu-Ying (Albert) Lee</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3mc0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3mc0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png 424w, https://substackcdn.com/image/fetch/$s_!3mc0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png 848w, https://substackcdn.com/image/fetch/$s_!3mc0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png 1272w, https://substackcdn.com/image/fetch/$s_!3mc0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3mc0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png" width="1314" height="670" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:670,&quot;width&quot;:1314,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:373690,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3mc0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png 424w, https://substackcdn.com/image/fetch/$s_!3mc0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png 848w, https://substackcdn.com/image/fetch/$s_!3mc0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png 1272w, https://substackcdn.com/image/fetch/$s_!3mc0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00a18ec4-907f-47b8-bb7b-306bee9c742f_1314x670.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Strategy performance from Slow Momentum with Fast Revision paper</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3PTD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3PTD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png 424w, https://substackcdn.com/image/fetch/$s_!3PTD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png 848w, https://substackcdn.com/image/fetch/$s_!3PTD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png 1272w, https://substackcdn.com/image/fetch/$s_!3PTD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3PTD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png" width="1456" height="644" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:644,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:344472,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3PTD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png 424w, https://substackcdn.com/image/fetch/$s_!3PTD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png 848w, https://substackcdn.com/image/fetch/$s_!3PTD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png 1272w, https://substackcdn.com/image/fetch/$s_!3PTD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e932952-e97f-41e5-b6ed-5b2b8505fa6f_1574x696.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Strategy performance from Dissecting Momentum paper</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U0Qn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U0Qn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png 424w, https://substackcdn.com/image/fetch/$s_!U0Qn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png 848w, https://substackcdn.com/image/fetch/$s_!U0Qn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png 1272w, https://substackcdn.com/image/fetch/$s_!U0Qn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U0Qn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png" width="546" height="314" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:314,&quot;width&quot;:546,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:71268,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U0Qn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png 424w, https://substackcdn.com/image/fetch/$s_!U0Qn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png 848w, https://substackcdn.com/image/fetch/$s_!U0Qn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png 1272w, https://substackcdn.com/image/fetch/$s_!U0Qn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1abc8686-7ff3-4c9f-aa69-e06b8fa0d6e1_546x314.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Strategy performance from Applying Deep Learning to Enhance Momentum paper</figcaption></figure></div><p>The first two papers look far more interesting, but are also longer-term projects to implement. On top of that, they involve too much feature engineering for my taste, especially Borisenko&#8217;s work, which somewhat defeats the purpose of using deep learning. Feature engineering depends heavily on human expertise, which contradicts the very lesson Sutton emphasized.</p><p>Now, the third paper has a different issue in my view: it seems too simple, almost too good to be true. The dataset is straightforward, the features are easy to derive&#8230; so where&#8217;s the catch? Still, simplicity means speed, so let&#8217;s start by testing this one.</p><h1>The paper</h1><p>Here are the key points for implementing the paper. For all details, check the original.</p><h2>Data</h2><p><strong>Sample Selection</strong></p><ul><li><p><strong>Universe</strong>: U.S. stocks on NYSE, AMEX, NASDAQ.</p></li><li><p>Exclude stocks priced below $5 to avoid microstructure noise.</p></li><li><p><strong>Training</strong>: 1965&#8211;1989 (848,000 samples), <strong>Testing</strong>: 1990&#8211;2009 (924,300 samples).</p></li></ul><p><strong>Input Variables and Preprocessing</strong></p><ul><li><p><strong>Input (33 features)</strong>:</p><ul><li><p>12 <strong>monthly returns</strong> from months <em>t&#8722;13 to t&#8722;2</em>.</p></li><li><p>20 <strong>daily returns</strong> from month <em>t</em>.</p></li><li><p>1 <strong>January dummy variable</strong>.</p></li></ul></li><li><p>Convert returns into <strong>cumulative returns</strong> and <strong>z-scores</strong> for cross-sectional normalization.</p></li><li><p><strong>Target labels</strong>:</p><ul><li><p>Class 1: returns below the monthly median.</p></li><li><p>Class 2: returns above the monthly median.</p></li></ul></li></ul><h2>The model</h2><p><strong>Model and Training</strong></p><ul><li><p>Use <strong>stacked RBMs</strong> to form an <strong>autoencoder</strong>, pretrained layer-wise.</p></li><li><p>Compresses input to a low-dimensional feature space, then passes it to a <strong>feedforward neural network (FFNN)</strong> for classification.</p></li><li><p>Final model is fine-tuned using backpropagation.</p></li></ul><p><strong>Architecture Specification</strong></p><ul><li><p>Conducted grid search with <strong>hold-out validation</strong> (1965&#8211;1982 train / 1983&#8211;1989 validation).</p></li><li><p>Final architecture: <code>33-40-4-50-2</code>:</p><ul><li><p>33 inputs &#8594; compressed to 4 &#8594; classified into 2 classes.</p></li></ul></li><li><p>Justification: balance performance and complexity. No gain from deeper models.</p></li></ul><h1>Implementation</h1><p>The full implementation is also available on <a href="https://tutorials.quantitativo.com/">GitBook</a> for a better code browsing experience.</p><h2>1. Data</h2><p>In our replication, we will use daily stock prices from January 1, 1990, to today, obtained from Norgate data. Norgate provides a high-quality survivorship bias-free daily data for the US stock market that is very affordable. For more information on how to acquire a Norgate data subscription, please check <a href="https://norgatedata.com/">Norgate website</a>.</p><p>The first step is to retrieve the data for a given symbol:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HoIi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HoIi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png 424w, https://substackcdn.com/image/fetch/$s_!HoIi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png 848w, https://substackcdn.com/image/fetch/$s_!HoIi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png 1272w, https://substackcdn.com/image/fetch/$s_!HoIi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HoIi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png" width="1240" height="1640" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1640,&quot;width&quot;:1240,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:430152,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HoIi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png 424w, https://substackcdn.com/image/fetch/$s_!HoIi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png 848w, https://substackcdn.com/image/fetch/$s_!HoIi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png 1272w, https://substackcdn.com/image/fetch/$s_!HoIi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fad4c131c-bef1-415b-9969-fec569b3bc7d_1240x1640.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The function <code>get_data(symbol)</code> retrieves <strong>daily price data</strong> for a given stock symbol using Norgate, then constructs a <strong>feature-rich DataFrame</strong> indexed by <code>(date, symbol)</code> for use in predictive models. It calculates <strong>monthly cumulative returns</strong> (<code>ret-m1</code> to <code>ret-m12</code>) based on end-of-month closes and <strong>daily cumulative returns</strong> (<code>ret-d1</code> to <code>ret-d20</code>) over the last 20 trading days. It also includes the <strong>unadjusted close price</strong>, a binary flag <code>is_next_jan</code> indicating if the next month is January, and the <strong>forward return</strong> for the next month (<code>next_month_ret</code>). The function ensures no missing or infinite values and returns a clean, multi-indexed dataset ready for modeling.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/the-bitter-lesson?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/the-bitter-lesson?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/the-bitter-lesson?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><p>We can check it with a call like <code>get_data('AAPL')</code>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hMZp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F587ed10d-fd48-4483-ba8f-aceb4b77d23a_1806x938.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hMZp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F587ed10d-fd48-4483-ba8f-aceb4b77d23a_1806x938.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hMZp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F587ed10d-fd48-4483-ba8f-aceb4b77d23a_1806x938.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hMZp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F587ed10d-fd48-4483-ba8f-aceb4b77d23a_1806x938.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hMZp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F587ed10d-fd48-4483-ba8f-aceb4b77d23a_1806x938.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hMZp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F587ed10d-fd48-4483-ba8f-aceb4b77d23a_1806x938.jpeg" width="1456" height="756" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/587ed10d-fd48-4483-ba8f-aceb4b77d23a_1806x938.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:756,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hMZp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F587ed10d-fd48-4483-ba8f-aceb4b77d23a_1806x938.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hMZp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F587ed10d-fd48-4483-ba8f-aceb4b77d23a_1806x938.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hMZp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F587ed10d-fd48-4483-ba8f-aceb4b77d23a_1806x938.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hMZp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F587ed10d-fd48-4483-ba8f-aceb4b77d23a_1806x938.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Data for AAPL</figcaption></figure></div><p>Now, retrieving all data is straightforward:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Basq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Basq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png 424w, https://substackcdn.com/image/fetch/$s_!Basq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png 848w, https://substackcdn.com/image/fetch/$s_!Basq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png 1272w, https://substackcdn.com/image/fetch/$s_!Basq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Basq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png" width="1456" height="721" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:721,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:194848,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Basq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png 424w, https://substackcdn.com/image/fetch/$s_!Basq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png 848w, https://substackcdn.com/image/fetch/$s_!Basq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png 1272w, https://substackcdn.com/image/fetch/$s_!Basq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846112b0-71e2-49af-b201-ff5194a55c57_1550x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In about 30 minutes, we are ready to continue.</p><h2>2. Pre-processing</h2><p>Before training the model, we apply several <strong>pre-processing steps</strong> to clean the data, standardize features, and define the target variable:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bvwK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bvwK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png 424w, https://substackcdn.com/image/fetch/$s_!bvwK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png 848w, https://substackcdn.com/image/fetch/$s_!bvwK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png 1272w, https://substackcdn.com/image/fetch/$s_!bvwK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bvwK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png" width="1456" height="1021" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1021,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:270530,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bvwK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png 424w, https://substackcdn.com/image/fetch/$s_!bvwK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png 848w, https://substackcdn.com/image/fetch/$s_!bvwK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png 1272w, https://substackcdn.com/image/fetch/$s_!bvwK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c6225f-fe4b-456e-b4a7-82d6c49e46ba_1552x1088.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We first filter out <strong>low-priced stocks</strong> (unadjusted close &#8804; $5), which are often illiquid and noisy. Then, we apply <strong>cross-sectional z-score standardization</strong> to all features (excluding the last two columns) on each date to normalize them. The <strong>target variable</strong> is defined as a binary label: 1 if the next month&#8217;s return is above the <strong>median return</strong> for that date, and 0 otherwise. We also preserve the <strong>raw (unstandardized)</strong> version of the last feature (<code>is_next_jan</code>) and the <strong>original forward return</strong> for later analysis. All components are then combined into a single DataFrame for model input.</p><h2>3. Cross-validation splits</h2><p>To evaluate model performance over time, we implement a <strong>rolling-window cross-validation</strong> framework tailored for time series data:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ku7K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ku7K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png 424w, https://substackcdn.com/image/fetch/$s_!ku7K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png 848w, https://substackcdn.com/image/fetch/$s_!ku7K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png 1272w, https://substackcdn.com/image/fetch/$s_!ku7K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ku7K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png" width="1244" height="1704" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1704,&quot;width&quot;:1244,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:406198,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ku7K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png 424w, https://substackcdn.com/image/fetch/$s_!ku7K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png 848w, https://substackcdn.com/image/fetch/$s_!ku7K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png 1272w, https://substackcdn.com/image/fetch/$s_!ku7K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f64c39d-7465-460e-9a9c-0f520ac62c94_1244x1704.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The <code>train_val_test_split</code> function generates <strong>chronological train/validation/test splits</strong> by sliding a multi-year window forward one year at a time. For each iteration, it defines a training period, a validation period, and a test year&#8212;ensuring <strong>no data leakage</strong>. We can choose whether to place the validation set <strong>before</strong> or <strong>after</strong> the training set using the <code>validation_first</code> flag. This approach mimics a realistic backtesting setup and provides <strong>out-of-sample evaluation</strong> across multiple time periods.</p><p>We can verify that the datasets are being generated correctly with the following code:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gQXc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gQXc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png 424w, https://substackcdn.com/image/fetch/$s_!gQXc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png 848w, https://substackcdn.com/image/fetch/$s_!gQXc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png 1272w, https://substackcdn.com/image/fetch/$s_!gQXc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gQXc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png" width="1456" height="570" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:570,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:160643,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gQXc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png 424w, https://substackcdn.com/image/fetch/$s_!gQXc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png 848w, https://substackcdn.com/image/fetch/$s_!gQXc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png 1272w, https://substackcdn.com/image/fetch/$s_!gQXc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43c30141-4304-4141-bc42-df57b8c16e17_1552x608.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5Io7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71996043-36cb-401a-9208-422cbdf46bf1_1098x1182.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5Io7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71996043-36cb-401a-9208-422cbdf46bf1_1098x1182.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5Io7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71996043-36cb-401a-9208-422cbdf46bf1_1098x1182.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5Io7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71996043-36cb-401a-9208-422cbdf46bf1_1098x1182.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5Io7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71996043-36cb-401a-9208-422cbdf46bf1_1098x1182.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5Io7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71996043-36cb-401a-9208-422cbdf46bf1_1098x1182.jpeg" width="1098" height="1182" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71996043-36cb-401a-9208-422cbdf46bf1_1098x1182.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1182,&quot;width&quot;:1098,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5Io7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71996043-36cb-401a-9208-422cbdf46bf1_1098x1182.jpeg 424w, https://substackcdn.com/image/fetch/$s_!5Io7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71996043-36cb-401a-9208-422cbdf46bf1_1098x1182.jpeg 848w, https://substackcdn.com/image/fetch/$s_!5Io7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71996043-36cb-401a-9208-422cbdf46bf1_1098x1182.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!5Io7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71996043-36cb-401a-9208-422cbdf46bf1_1098x1182.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Train, validation, and test datasets</figcaption></figure></div><p>Now, we are ready to work on the model.</p><h2>4. The model</h2><p>We define a simple <strong>feedforward neural network (FFNN)</strong> architecture to classify the pre-processed features into two classes, as specified in the paper:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fNba!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fNba!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png 424w, https://substackcdn.com/image/fetch/$s_!fNba!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png 848w, https://substackcdn.com/image/fetch/$s_!fNba!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png 1272w, https://substackcdn.com/image/fetch/$s_!fNba!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fNba!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png" width="1456" height="756" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:756,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:165372,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fNba!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png 424w, https://substackcdn.com/image/fetch/$s_!fNba!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png 848w, https://substackcdn.com/image/fetch/$s_!fNba!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png 1272w, https://substackcdn.com/image/fetch/$s_!fNba!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc478890-1349-4c4e-94aa-9847ea59a6e4_1552x806.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The <code>FFNN</code> model consists of <strong>three hidden layers</strong> with ReLU activations, followed by a final output layer that produces <strong>logits for binary classification</strong>. The input layer expects <strong>33 features</strong>, which are transformed through progressively deeper representations: from 40 units, to 4, then to 50, before reaching the final output layer with 2 neurons. The model returns raw logits, which are suitable for use with <code>CrossEntropyLoss</code>, a standard loss function for multi-class classification tasks.</p><p>In the original 2013 paper, Takeuchi and Lee used a <strong>stacked autoencoder built from restricted Boltzmann machines (RBMs)</strong> for pretraining, which was common at the time. They pre-trained the encoder (33&#8594;40&#8594;4) to extract features and then attached a feedforward classifier (4&#8594;50&#8594;2) on top. Our model directly implements the <strong>final architecture</strong> they found optimal through cross-validation, bypassing the pretraining phase.</p><p>The reason we can now skip RBMs and pretraining is due to major advances in <strong>hardware (GPUs/TPUs), software (PyTorch, TensorFlow), initialization methods</strong>, and <strong>optimization algorithms</strong> (like Adam). These allow deep neural networks to be trained <strong>end-to-end from scratch</strong> efficiently, even on noisy financial datasets. In contrast, a decade ago, training deep nets from scratch often resulted in poor convergence, which is why <strong>unsupervised layer-wise pretraining</strong> with RBMs was widely used to help the network learn useful representations before supervised fine-tuning.</p><p>We can verify that our architecture works using the following code:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!099M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!099M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png 424w, https://substackcdn.com/image/fetch/$s_!099M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png 848w, https://substackcdn.com/image/fetch/$s_!099M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png 1272w, https://substackcdn.com/image/fetch/$s_!099M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!099M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png" width="1456" height="907" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:907,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:258030,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!099M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png 424w, https://substackcdn.com/image/fetch/$s_!099M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png 848w, https://substackcdn.com/image/fetch/$s_!099M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png 1272w, https://substackcdn.com/image/fetch/$s_!099M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5588f1db-df4a-4b2b-8609-c35525a2eced_1550x966.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The code builds a <strong>PyTorch DataLoader</strong> from a DataFrame, converting features and labels to tensors for training. It retrieves one <strong>mini-batch</strong>, checks the shapes, and runs a forward pass through the <strong>FFNN</strong> to verify the model works as expected. We should see something like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sFPH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sFPH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png 424w, https://substackcdn.com/image/fetch/$s_!sFPH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png 848w, https://substackcdn.com/image/fetch/$s_!sFPH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png 1272w, https://substackcdn.com/image/fetch/$s_!sFPH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sFPH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png" width="1456" height="381" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:381,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:77212,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sFPH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png 424w, https://substackcdn.com/image/fetch/$s_!sFPH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png 848w, https://substackcdn.com/image/fetch/$s_!sFPH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png 1272w, https://substackcdn.com/image/fetch/$s_!sFPH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3f04f88-3c86-42d4-b5b0-8e50101cf318_1550x406.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now, let's move to training.</p><h2>5. Training</h2><p>We now define the training loop used to optimize the model parameters using the training and validation sets:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5j5k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5j5k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png 424w, https://substackcdn.com/image/fetch/$s_!5j5k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png 848w, https://substackcdn.com/image/fetch/$s_!5j5k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png 1272w, https://substackcdn.com/image/fetch/$s_!5j5k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5j5k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png" width="1352" height="3034" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3034,&quot;width&quot;:1352,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:658407,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5j5k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png 424w, https://substackcdn.com/image/fetch/$s_!5j5k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png 848w, https://substackcdn.com/image/fetch/$s_!5j5k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png 1272w, https://substackcdn.com/image/fetch/$s_!5j5k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F245d64d4-5a81-4968-9800-3c14519366bd_1352x3034.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The <code>train</code> function performs <strong>mini-batch training</strong> of the FFNN model using the <strong>Adam optimizer</strong> and <strong>cross-entropy loss</strong>. It tracks performance on both the training and <strong>validation sets</strong>, saving the model weights that yield the <strong>lowest validation loss</strong>. After training for a specified number of <strong>epochs</strong>, it returns the best-performing model along with key metrics such as validation loss, accuracy, and the epoch at which the best performance was achieved.</p><p>We now generate predictions and rank stocks by model confidence:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EviC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EviC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png 424w, https://substackcdn.com/image/fetch/$s_!EviC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png 848w, https://substackcdn.com/image/fetch/$s_!EviC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png 1272w, https://substackcdn.com/image/fetch/$s_!EviC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EviC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png" width="1456" height="1281" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1281,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:370555,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EviC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png 424w, https://substackcdn.com/image/fetch/$s_!EviC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png 848w, https://substackcdn.com/image/fetch/$s_!EviC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png 1272w, https://substackcdn.com/image/fetch/$s_!EviC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faae598e1-20f2-4274-b693-09d08104ace5_1550x1364.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The method above generates <strong>model predictions</strong> on the test set by applying the trained network to each mini-batch and collecting the <strong>predicted classes</strong> and <strong>class probabilities</strong>. It appends these outputs to the original test DataFrame and assigns each example to a <strong>quantile bucket</strong> based on its predicted probability of belonging to class 1. This enables <strong>cross-sectional ranking</strong> of stocks by confidence level, which is useful for evaluating <strong>strategy performance by signal strength</strong>.</p><p>We now run <strong>rolling-window training and evaluation</strong> to collect predictions and track model performance over time:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UK3X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UK3X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png 424w, https://substackcdn.com/image/fetch/$s_!UK3X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png 848w, https://substackcdn.com/image/fetch/$s_!UK3X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png 1272w, https://substackcdn.com/image/fetch/$s_!UK3X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UK3X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png" width="1456" height="1399" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1399,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:373628,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UK3X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png 424w, https://substackcdn.com/image/fetch/$s_!UK3X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png 848w, https://substackcdn.com/image/fetch/$s_!UK3X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png 1272w, https://substackcdn.com/image/fetch/$s_!UK3X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95449b72-4a49-4c49-914b-4693c5a6316b_1546x1486.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Running the code above will take a bit over an hour. We should see something like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!I0I6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!I0I6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png 424w, https://substackcdn.com/image/fetch/$s_!I0I6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png 848w, https://substackcdn.com/image/fetch/$s_!I0I6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png 1272w, https://substackcdn.com/image/fetch/$s_!I0I6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!I0I6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png" width="1456" height="988" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:988,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:376420,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!I0I6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png 424w, https://substackcdn.com/image/fetch/$s_!I0I6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png 848w, https://substackcdn.com/image/fetch/$s_!I0I6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png 1272w, https://substackcdn.com/image/fetch/$s_!I0I6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2e0f7ec-b65a-4e58-95bb-0a81027520b9_1548x1050.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The DataFrame that tracks the performance should record something like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2uAa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a65d6ee-cd52-4ad7-a4f0-b2b7274d9a0e_1584x1184.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2uAa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a65d6ee-cd52-4ad7-a4f0-b2b7274d9a0e_1584x1184.jpeg 424w, https://substackcdn.com/image/fetch/$s_!2uAa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a65d6ee-cd52-4ad7-a4f0-b2b7274d9a0e_1584x1184.jpeg 848w, https://substackcdn.com/image/fetch/$s_!2uAa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a65d6ee-cd52-4ad7-a4f0-b2b7274d9a0e_1584x1184.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!2uAa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a65d6ee-cd52-4ad7-a4f0-b2b7274d9a0e_1584x1184.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2uAa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a65d6ee-cd52-4ad7-a4f0-b2b7274d9a0e_1584x1184.jpeg" width="1456" height="1088" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9a65d6ee-cd52-4ad7-a4f0-b2b7274d9a0e_1584x1184.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1088,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2uAa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a65d6ee-cd52-4ad7-a4f0-b2b7274d9a0e_1584x1184.jpeg 424w, https://substackcdn.com/image/fetch/$s_!2uAa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a65d6ee-cd52-4ad7-a4f0-b2b7274d9a0e_1584x1184.jpeg 848w, https://substackcdn.com/image/fetch/$s_!2uAa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a65d6ee-cd52-4ad7-a4f0-b2b7274d9a0e_1584x1184.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!2uAa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9a65d6ee-cd52-4ad7-a4f0-b2b7274d9a0e_1584x1184.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Results from training the model</figcaption></figure></div><p>Now, we are ready to see the results.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/the-bitter-lesson?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/the-bitter-lesson?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/the-bitter-lesson?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1>Results</h1><p>Let's start reviewing the model's classification performance by analyzing the <strong>confusion matrix:</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7gUz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7gUz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png 424w, https://substackcdn.com/image/fetch/$s_!7gUz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png 848w, https://substackcdn.com/image/fetch/$s_!7gUz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png 1272w, https://substackcdn.com/image/fetch/$s_!7gUz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7gUz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png" width="1456" height="683" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:683,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:173498,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7gUz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png 424w, https://substackcdn.com/image/fetch/$s_!7gUz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png 848w, https://substackcdn.com/image/fetch/$s_!7gUz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png 1272w, https://substackcdn.com/image/fetch/$s_!7gUz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3155caff-ced8-479b-bcda-a8b765b0dfe5_1548x726.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This code compares the <strong>true labels</strong> and the model&#8217;s <strong>predicted classes</strong> across the entire test set to compute a <strong>confusion matrix</strong>, which is then <strong>column-normalized</strong> to show the <strong>distribution of predictions per class</strong>. This helps assess whether the model is biased toward one class and how well it distinguishes between them. The results are visualized using <code>ConfusionMatrixDisplay</code>, with values shown as <strong>proportions</strong> for easier interpretation.</p><p>We should see something like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iZ9M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa14e8963-64a3-4457-a0e8-c3e90853cb71_814x692.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iZ9M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa14e8963-64a3-4457-a0e8-c3e90853cb71_814x692.jpeg 424w, https://substackcdn.com/image/fetch/$s_!iZ9M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa14e8963-64a3-4457-a0e8-c3e90853cb71_814x692.jpeg 848w, https://substackcdn.com/image/fetch/$s_!iZ9M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa14e8963-64a3-4457-a0e8-c3e90853cb71_814x692.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!iZ9M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa14e8963-64a3-4457-a0e8-c3e90853cb71_814x692.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iZ9M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa14e8963-64a3-4457-a0e8-c3e90853cb71_814x692.jpeg" width="814" height="692" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a14e8963-64a3-4457-a0e8-c3e90853cb71_814x692.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:692,&quot;width&quot;:814,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iZ9M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa14e8963-64a3-4457-a0e8-c3e90853cb71_814x692.jpeg 424w, https://substackcdn.com/image/fetch/$s_!iZ9M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa14e8963-64a3-4457-a0e8-c3e90853cb71_814x692.jpeg 848w, https://substackcdn.com/image/fetch/$s_!iZ9M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa14e8963-64a3-4457-a0e8-c3e90853cb71_814x692.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!iZ9M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa14e8963-64a3-4457-a0e8-c3e90853cb71_814x692.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Confusion matrix</figcaption></figure></div><p>Highlights:</p><ul><li><p>The model is <strong>slightly better than random guessing</strong>, with <strong>~52% accuracy</strong> for both predicted classes.</p></li><li><p>It shows <strong>no strong bias</strong> toward one class&#8212;performance is symmetrical.</p></li><li><p>This aligns with expectations for <strong>noisy financial datasets</strong> with low signal-to-noise ratios, where even a small edge (e.g., &gt;50% accuracy) can be <strong>economically meaningful</strong> when scaled properly in a trading strategy.</p></li></ul><p>We now compute the <strong>monthly long-short returns</strong> based on the spread between the top and bottom quantile predictions:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!j3-F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!j3-F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png 424w, https://substackcdn.com/image/fetch/$s_!j3-F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png 848w, https://substackcdn.com/image/fetch/$s_!j3-F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png 1272w, https://substackcdn.com/image/fetch/$s_!j3-F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!j3-F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png" width="1456" height="267" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:267,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:87300,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!j3-F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png 424w, https://substackcdn.com/image/fetch/$s_!j3-F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png 848w, https://substackcdn.com/image/fetch/$s_!j3-F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png 1272w, https://substackcdn.com/image/fetch/$s_!j3-F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b5bd7f8-5836-48e3-b619-1a970db88fa3_1548x284.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>This snippet computes the <strong>average forward return</strong> for each <strong>quantile bucket</strong> on a monthly basis by grouping predictions by date and quantile. It then <strong>unstacks</strong> the results into a table where each column represents a quantile. Finally, it prints how many months are missing one or more quantiles, which can occur due to <code>duplicates='drop'</code> in <code>qcut</code>, highlighting potential <strong>data sparsity</strong> in certain months.</p><p>We now visualize the <strong>annualized average return</strong> by quantile to assess the relationship between predicted confidence and realized performance:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IPuq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IPuq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png 424w, https://substackcdn.com/image/fetch/$s_!IPuq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png 848w, https://substackcdn.com/image/fetch/$s_!IPuq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png 1272w, https://substackcdn.com/image/fetch/$s_!IPuq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IPuq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png" width="1456" height="717" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:717,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:213224,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IPuq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png 424w, https://substackcdn.com/image/fetch/$s_!IPuq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png 848w, https://substackcdn.com/image/fetch/$s_!IPuq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png 1272w, https://substackcdn.com/image/fetch/$s_!IPuq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb10310d0-3ed5-4a75-8855-f469d81ec449_1552x764.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This code calculates the <strong>mean return</strong> for each quantile across all months, <strong>annualizes</strong> it, and plots it as a <strong>bar chart</strong>. The chart highlights how returns vary by model confidence:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Lz6d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eac5606-e8b9-4ce8-8727-0eac2461f554_1778x1124.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Lz6d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eac5606-e8b9-4ce8-8727-0eac2461f554_1778x1124.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Lz6d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eac5606-e8b9-4ce8-8727-0eac2461f554_1778x1124.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Lz6d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eac5606-e8b9-4ce8-8727-0eac2461f554_1778x1124.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Lz6d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eac5606-e8b9-4ce8-8727-0eac2461f554_1778x1124.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Lz6d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eac5606-e8b9-4ce8-8727-0eac2461f554_1778x1124.jpeg" width="1456" height="920" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5eac5606-e8b9-4ce8-8727-0eac2461f554_1778x1124.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:920,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Lz6d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eac5606-e8b9-4ce8-8727-0eac2461f554_1778x1124.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Lz6d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eac5606-e8b9-4ce8-8727-0eac2461f554_1778x1124.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Lz6d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eac5606-e8b9-4ce8-8727-0eac2461f554_1778x1124.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Lz6d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eac5606-e8b9-4ce8-8727-0eac2461f554_1778x1124.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Mean return for each quantile</figcaption></figure></div><p>Highlights:</p><ul><li><p>Returns <strong>increase monotonically</strong> from quantile 1 to quantile 10.</p></li><li><p><strong>Quantile 1</strong> has a <strong>negative return</strong> (-0.64%), indicating the model is correctly identifying poor-performing stocks.</p></li><li><p><strong>Quantile 10</strong> shows the highest return at <strong>13.0%</strong>, suggesting strong predictive power in selecting top-performing stocks.</p></li><li><p>The spread between quantile 10 and quantile 1 is approximately <strong>13.6 percentage points</strong>, which is economically meaningful.</p></li><li><p>The results are not as good as described in the paper, but still, worth looking into it.</p></li></ul><p>This pattern strongly supports the idea that the model&#8217;s <strong>confidence scores are informative, </strong>as shown by the authors in the paper. A long-short strategy (long top quantile, short bottom) would likely be <strong>profitable and consistent</strong>, as we can verify:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gR3p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gR3p!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png 424w, https://substackcdn.com/image/fetch/$s_!gR3p!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png 848w, https://substackcdn.com/image/fetch/$s_!gR3p!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png 1272w, https://substackcdn.com/image/fetch/$s_!gR3p!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gR3p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png" width="1456" height="344" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:344,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:107031,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gR3p!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png 424w, https://substackcdn.com/image/fetch/$s_!gR3p!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png 848w, https://substackcdn.com/image/fetch/$s_!gR3p!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png 1272w, https://substackcdn.com/image/fetch/$s_!gR3p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1ae562-22cb-4cc5-9323-52cd2571380b_1548x366.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The snippet above generates the cumulative returns for the strategy. We can visualize it with one line, <code>cumulative_rets.plot(logy=True)</code>, or if we add a bit more formatting and the benchmark:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Uwwu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8612a91c-2785-4011-b95d-1d8b0e43ffae_1536x1472.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Uwwu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8612a91c-2785-4011-b95d-1d8b0e43ffae_1536x1472.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Uwwu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8612a91c-2785-4011-b95d-1d8b0e43ffae_1536x1472.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Uwwu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8612a91c-2785-4011-b95d-1d8b0e43ffae_1536x1472.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Uwwu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8612a91c-2785-4011-b95d-1d8b0e43ffae_1536x1472.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Uwwu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8612a91c-2785-4011-b95d-1d8b0e43ffae_1536x1472.jpeg" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8612a91c-2785-4011-b95d-1d8b0e43ffae_1536x1472.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Uwwu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8612a91c-2785-4011-b95d-1d8b0e43ffae_1536x1472.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Uwwu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8612a91c-2785-4011-b95d-1d8b0e43ffae_1536x1472.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Uwwu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8612a91c-2785-4011-b95d-1d8b0e43ffae_1536x1472.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Uwwu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8612a91c-2785-4011-b95d-1d8b0e43ffae_1536x1472.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves</figcaption></figure></div><p>To get a summary of the backtest main stats, here's what we can do:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A2MY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A2MY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png 424w, https://substackcdn.com/image/fetch/$s_!A2MY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png 848w, https://substackcdn.com/image/fetch/$s_!A2MY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png 1272w, https://substackcdn.com/image/fetch/$s_!A2MY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A2MY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png" width="1456" height="1205" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1205,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:586533,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/161831551?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!A2MY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png 424w, https://substackcdn.com/image/fetch/$s_!A2MY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png 848w, https://substackcdn.com/image/fetch/$s_!A2MY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png 1272w, https://substackcdn.com/image/fetch/$s_!A2MY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F455f070c-b2ec-4bb8-b180-11199687c853_1552x1284.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We should see something like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_3x_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa83356ba-6c35-40b3-a17d-a4ec6a76d5d3_610x642.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_3x_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa83356ba-6c35-40b3-a17d-a4ec6a76d5d3_610x642.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_3x_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa83356ba-6c35-40b3-a17d-a4ec6a76d5d3_610x642.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_3x_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa83356ba-6c35-40b3-a17d-a4ec6a76d5d3_610x642.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_3x_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa83356ba-6c35-40b3-a17d-a4ec6a76d5d3_610x642.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_3x_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa83356ba-6c35-40b3-a17d-a4ec6a76d5d3_610x642.jpeg" width="610" height="642" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a83356ba-6c35-40b3-a17d-a4ec6a76d5d3_610x642.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:642,&quot;width&quot;:610,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_3x_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa83356ba-6c35-40b3-a17d-a4ec6a76d5d3_610x642.jpeg 424w, https://substackcdn.com/image/fetch/$s_!_3x_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa83356ba-6c35-40b3-a17d-a4ec6a76d5d3_610x642.jpeg 848w, https://substackcdn.com/image/fetch/$s_!_3x_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa83356ba-6c35-40b3-a17d-a4ec6a76d5d3_610x642.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!_3x_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa83356ba-6c35-40b3-a17d-a4ec6a76d5d3_610x642.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest stats</figcaption></figure></div><p>Overall, the strategy outperforms the benchmark across all key dimensions:</p><ul><li><p><strong>Annualized return</strong> is <strong>12.8%</strong>, nearly double the <strong>S&amp;P 500&#8217;s 7.0%</strong>;</p></li><li><p><strong>Sharpe Ratio</strong> is <strong>1.03</strong>, more than twice that of the benchmark, indicating superior risk-adjusted performance;</p></li><li><p><strong>Maximum drawdown</strong> is limited to <strong>24%</strong>, less than half of the <strong>S&amp;P 500&#8217;s 52.6%</strong>, reflecting strong downside protection;</p></li><li><p><strong>Correlation to the market is negative</strong>, offering valuable <strong>diversification benefits</strong> in a broader portfolio.</p></li></ul><h2>Final thoughts</h2><p>While our implementation successfully demonstrated the viability of applying deep learning to momentum-based stock prediction, the results we obtained were a far cry from those reported by Takeuchi and Lee (2013). There are several likely reasons for this discrepancy. First, we used a <strong>different and significantly smaller dataset</strong>, both in terms of the number of stock-month observations and market breadth. Second, our <strong>time horizon</strong> was more recent and extended into a different market regime, potentially less favorable to momentum strategies. Third, unlike the authors&#8217; original approach which involved <strong>unsupervised pretraining using stacked RBMs</strong>, we trained the feedforward network <strong>end-to-end using modern initialization and optimization techniques</strong>. Additionally, we adopted a <strong>rolling-window training and evaluation protocol</strong>, whereas the original study trained once on a large historical sample and tested on a fixed out-of-sample window. These methodological and structural differences, combined with evolving market dynamics, likely account for the performance gap.</p><p>Nevertheless, replicating the exact results reported by Takeuchi and Lee was never the true goal. The purpose of this project was to explore, in a simplified and more accessible setting, the core insight behind Richard Sutton&#8217;s <em>Bitter Lesson</em>: that <strong>general methods powered by computation outperform systems infused with human-crafted rules and domain expertise</strong>. Our toy example, despite its simplicity and the constraints we faced, served as a proof of concept for this idea. By throwing a clean pipeline, raw price data, and compute at the return prediction problem&#8212;without relying on hand-engineered financial indicators&#8212;we were able to extract signal and generate meaningful returns. In that sense, the experiment achieved what it set out to do: <strong>demonstrate that scaling learning systems and leaning into computation-first approaches can produce viable results even in challenging, noisy domains like financial markets</strong>.</p><p>I would love to tackle the other papers mentioned in this article right away. Unfortunately, I don't have time now. Their implementation will come later down the road.</p><p>Next, I believe we will tackle another interesting problem. Over the past months, I developed a system that is performing really well over the past month. Backtests looked great, so, we decided to deploy it in a small account.</p><p>It's being over 6 weeks and the system is killing it: it has deliverd over +3% vs. -9% the S&amp;P 500. It has completed over 100 trades, so we have a minimally sufficient sample size to run some statistical tests and decide whether to continue collecting more data or scale it right away. What kind of analysis should we run to make a rational decision? That's what we will cover next.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to <strong>reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a></strong> if you have questions, ideas, or feedback.</p><p>Cheers!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Informational Edge]]></title><description><![CDATA[Turning news sentiment data into a +2 Sharpe market-neutral strategy]]></description><link>https://www.quantitativo.com/p/informational-edge</link><guid isPermaLink="false">https://www.quantitativo.com/p/informational-edge</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Sun, 30 Mar 2025 20:37:08 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Jp3l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Jp3l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jp3l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png 424w, https://substackcdn.com/image/fetch/$s_!Jp3l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png 848w, https://substackcdn.com/image/fetch/$s_!Jp3l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!Jp3l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jp3l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2753533,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Jp3l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png 424w, https://substackcdn.com/image/fetch/$s_!Jp3l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png 848w, https://substackcdn.com/image/fetch/$s_!Jp3l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png 1272w, https://substackcdn.com/image/fetch/$s_!Jp3l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d896aa-34a8-4089-bbea-db58f9e8ba95_2048x1152.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Peter Norvig, AI pioneer and former Director of Research at Google</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;We don't have better algorithms; we just have more data.&#8221; Peter Norvig.</p></blockquote><p>Peter Norvig is one of the greatest computer scientists of all time and a leading figure in artificial intelligence. As the former Director of Research at Google, he played a key role in shaping the technologies behind Google Search &#8212; the flagship product of one of the most transformative companies of our era.</p><p>He is also a personal hero. I had the opportunity to learn from his seminal book and the privilege of working at a company that became possible thanks to his work. In fact, his textbook <em>Artificial Intelligence: A Modern Approach</em> has trained generations of engineers and researchers, many of whom have gone on to lead companies in AI, robotics, and machine learning.</p><p>This week, we will develop a trading strategy using informational edge. Informational edge refers to having access to superior or less-known information that can be used to make better trading or investment decisions. It could be:</p><ul><li><p>Faster access to public data (e.g., low-latency news feeds)</p></li><li><p>Deeper insights from alternative data (e.g., satellite imagery, credit card data, web traffic)</p></li><li><p>Proprietary analysis (e.g., unique sentiment models, NLP on earnings calls)</p></li></ul><p>The key idea: you know something the market hasn&#8217;t fully priced in yet &#8212; and you act before others catch up. As Peter would also say, &#8220;Simple models and a lot of data trump more elaborate models based on less data.&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aRgH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aRgH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png 424w, https://substackcdn.com/image/fetch/$s_!aRgH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png 848w, https://substackcdn.com/image/fetch/$s_!aRgH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png 1272w, https://substackcdn.com/image/fetch/$s_!aRgH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aRgH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png" width="1212" height="604" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:604,&quot;width&quot;:1212,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:197416,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aRgH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png 424w, https://substackcdn.com/image/fetch/$s_!aRgH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png 848w, https://substackcdn.com/image/fetch/$s_!aRgH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png 1272w, https://substackcdn.com/image/fetch/$s_!aRgH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7a780998-a738-4586-9b0b-4dafa1cfb693_1212x604.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From the study "Casting the Net: How Hedge Funds are Using Alternative Data&#8221;</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A1KX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf462ad2-ec3a-4493-96b8-210745da39bb_840x610.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A1KX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf462ad2-ec3a-4493-96b8-210745da39bb_840x610.png 424w, https://substackcdn.com/image/fetch/$s_!A1KX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf462ad2-ec3a-4493-96b8-210745da39bb_840x610.png 848w, https://substackcdn.com/image/fetch/$s_!A1KX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf462ad2-ec3a-4493-96b8-210745da39bb_840x610.png 1272w, https://substackcdn.com/image/fetch/$s_!A1KX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf462ad2-ec3a-4493-96b8-210745da39bb_840x610.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A1KX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf462ad2-ec3a-4493-96b8-210745da39bb_840x610.png" width="840" height="610" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af462ad2-ec3a-4493-96b8-210745da39bb_840x610.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:610,&quot;width&quot;:840,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212725,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf462ad2-ec3a-4493-96b8-210745da39bb_840x610.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!A1KX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf462ad2-ec3a-4493-96b8-210745da39bb_840x610.png 424w, https://substackcdn.com/image/fetch/$s_!A1KX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf462ad2-ec3a-4493-96b8-210745da39bb_840x610.png 848w, https://substackcdn.com/image/fetch/$s_!A1KX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf462ad2-ec3a-4493-96b8-210745da39bb_840x610.png 1272w, https://substackcdn.com/image/fetch/$s_!A1KX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf462ad2-ec3a-4493-96b8-210745da39bb_840x610.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">From the study "Casting the Net: How Hedge Funds are Using Alternative Data&#8221;</figcaption></figure></div><p>Here's the plan we&#8217;ll follow:</p><ol><li><p>First, we&#8217;ll discuss the different types of edges and take a closer look at informational edge;</p></li><li><p>Then, we&#8217;ll introduce the dataset used to build the strategy;</p></li><li><p>Next, we&#8217;ll develop a simple model and demonstrate its strong predictive power&#8212;thanks to the unique data;</p></li><li><p>We&#8217;ll then formulate a trading strategy and present the results;</p></li><li><p>Finally, we&#8217;ll wrap up with key takeaways and next steps.</p></li></ol><p>This is a production-level model, so some details will be omitted for obvious reasons.</p><blockquote><p>As many of you have requested, I&#8217;ll be sharing some of my codebase in a course. It&#8217;s almost ready and should be finished in the coming weeks. I&#8217;ve created the page below to explain the course content, who it&#8217;s for, and to answer the main questions about it. If you have any additional questions, feel free to send me an <a href="mailto:cs@quantitativo.com">email</a>.</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://quantitativo.carrd.co/&quot;,&quot;text&quot;:&quot;Course Content&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://quantitativo.carrd.co/"><span>Course Content</span></a></p><p>Now, to the strategy!</p><h1>Different types of edge</h1><p>An <strong>edge</strong> is any <strong>sustainable advantage</strong> that increases your probability of making profitable decisions compared to the rest of the market. Put simply:</p><blockquote><p>An edge is what allows you to make money when others don&#8217;t.</p></blockquote><p>Some key characteristics of a real edge:</p><ul><li><p><strong>Repeatable</strong> &#8211; Not just luck or a one-time insight</p></li><li><p><strong>Testable</strong> &#8211; You can back it up with data or logic</p></li><li><p><strong>Actionable</strong> &#8211; It translates into decisions you can trade on</p></li><li><p><strong>Durable</strong> &#8211; It lasts long enough to extract value before it's arbitraged away</p></li></ul><p>There are a few types of edges. I've heard people classify them into 3-5 different types. A possible classification is:</p><ol><li><p><strong>Informational Edge</strong></p><p>Access to better or faster information.</p></li><li><p><strong>Analytical Edge</strong></p><p>Superior ability to analyze the same data everyone has &#8212; e.g., better models, smarter features, novel metrics.</p></li><li><p><strong>Behavioral Edge</strong></p><p>Ability to stay rational when others panic or overreact &#8212; exploiting predictable human biases.</p></li><li><p><strong>Structural Edge</strong></p><p>Benefits from the setup &#8212; like lower transaction costs, access to certain markets, or priority in order execution.</p></li><li><p><strong>Technical Edge</strong></p><p>Superior tech infrastructure &#8212; e.g., co-located servers, low-latency systems, or highly optimized software for faster execution than competitors.</p></li></ol><p>To generate alpha, we must have some sort of advantage, or edge, over the competition. The two most common claims lie in having either <strong>better information</strong> (Information Edge) or <strong>better analysis</strong> (Analytical Edge).</p><p>Generating alpha via better information implies that the information collected is either better than what others have access to or altogether different from what others are looking for. To have an <strong>Information Edge</strong>, we must know something that others do not.</p><p>This is precisely what&#8217;s driving the rapid growth of the <strong>alternative data</strong> industry. As traditional data sources become widely accessible and quickly priced into the market, firms are turning to unconventional datasets&#8212;like satellite imagery, web traffic, credit card transactions, and social media sentiment&#8212;to uncover insights others overlook. The goal is to extract <strong>unique, actionable signals</strong> before they become mainstream, turning informational asymmetry into alpha.</p><p>Today, we&#8217;ll use a sample <strong>news sentiment dataset</strong> to explore how alpha can be extracted from information that isn&#8217;t widely accessible. This dataset is costly and typically reserved for hedge funds and institutional investors&#8212;firms for whom the potential return justifies the investment in exclusive data sources. Let's get to it.</p><h1>The dataset</h1><p>Many firms specialize in providing <strong>news sentiment data</strong>, leveraging AI&#8212;specifically <strong>Natural Language Processing (NLP)</strong>&#8212;to extract signals from vast volumes of unstructured text. These systems quantify the tone, relevance, and impact of news articles, headlines, and press releases, transforming qualitative content into structured data that can be used to inform trading decisions in real-time.</p><p>To transform news into data, these firms first acquire raw content from premium news providers like Dow Jones. They then apply NLP algorithms to parse and analyze the text, generating a rich set of features. The output is a structured dataset&#8212;delivered with only a few seconds or minutes of delay&#8212;containing columns such as:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1YIT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1YIT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png 424w, https://substackcdn.com/image/fetch/$s_!1YIT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png 848w, https://substackcdn.com/image/fetch/$s_!1YIT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png 1272w, https://substackcdn.com/image/fetch/$s_!1YIT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1YIT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png" width="1456" height="161" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:161,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:157863,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1YIT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png 424w, https://substackcdn.com/image/fetch/$s_!1YIT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png 848w, https://substackcdn.com/image/fetch/$s_!1YIT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png 1272w, https://substackcdn.com/image/fetch/$s_!1YIT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896b10bd-8ac9-4c07-ab84-3a4c182d6b4f_2048x227.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Working with these datasets presents several challenges. Efficiently handling tens of millions of rows is one; another is the need for additional cleaning and preprocessing to ensure data quality.</p><h1>The model</h1><p>Let&#8217;s now use this data to model next-day returns. Our goal is to train a model that predicts the return over the next 24 hours, using all news published in the preceding 24 hours. Specifically, we&#8217;ll model <strong>close-to-close</strong> price returns.</p><blockquote><p>To demonstrate the power of Informational Edge, we won&#8217;t use any additional features&#8212;only those derived from the news sentiment dataset.</p></blockquote><p>The first challenge we face is <strong>feature engineering</strong>. Over a 24-hour period, a stock:</p><ul><li><p>May have several news articles written about it</p></li><li><p>Or may have no news at all</p></li></ul><p><em>So, how do we combine all the news related to a stock within a time window into a single sentiment score?</em></p><h2><strong>Odds Ratios and Log(Odds Ratios)</strong></h2><p>Answering this question is essential for engineering the core feature of our model. To answer it, we derive inspiration from <strong>log-odds ratios</strong>, which are commonly used in logistic regression and text classification to quantify relative likelihoods.</p><p>If you have never heard about it, I leave you with Josh Starmer's clear explanation (he has one of the coolest YouTube channels :)):</p><div id="youtube2-8nm0G-1uJzA" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;8nm0G-1uJzA&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/8nm0G-1uJzA?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>To transform raw sentiment probabilities into a more interpretable and aggregatable score, we use the following formula:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;(1 - P_{\\text{neutral}}) \\cdot \\log_{10} \\left( \\frac{P_{\\text{positive}} + \\varepsilon}{P_{\\text{negative}} + \\varepsilon} \\right)&quot;,&quot;id&quot;:&quot;QYXMYDCHCK&quot;}" data-component-name="LatexBlockToDOM"></div><p>By applying the logarithm to the ratio of positive and negative sentiment probabilities, we emphasize the <strong>direction and strength</strong> of the sentiment signal. Multiplying by $(1 - P_{neutral})$ acts as a confidence weighting, downscaling the score when the model is uncertain or when the news is neutral in tone. This feature can then be averaged to produce a final sentiment score per stock per day.</p><h2>More preprocessing</h2><p>To achieve good results, additional preprocessing steps are necessary. Some of the most important adjustments include:</p><ul><li><p><strong>Standardizing returns within each GICS sector</strong>: Instead of predicting raw next-24-hour returns, we subtract the sector mean and divide by the sector standard deviation.</p></li><li><p><strong>Filtering by relevance</strong>: We include only news articles that exceed a specified relevance threshold.</p></li><li><p><strong>Encoding categorical topics</strong>: We convert categorical topic tags into one-hot encoded features.</p></li></ul><h2>Linear Regression</h2><p>There are many modeling options available for predicting next-day returns, including tree-based models like XGBoost, neural networks, and other more complex machine learning architectures. However, for this initial exploration, we&#8217;ll start with <strong>linear regression</strong>&#8212;a simple yet powerful baseline.</p><p>Linear regression is particularly well-suited for our use case because:</p><ul><li><p>It&#8217;s <strong>interpretable</strong>, allowing us to understand the relationship between sentiment features and returns.</p></li><li><p>It works well when the number of features is <strong>moderate</strong> and the <strong>signal-to-noise ratio is low</strong>.</p></li><li><p>It&#8217;s <strong>fast to train</strong> and easy to validate, making it ideal for rapid iteration.</p></li><li><p>It provides a strong benchmark to compare against more complex models later.</p></li></ul><p>This simplicity will help us evaluate whether the informational edge in the sentiment data alone is enough to generate alpha.</p><p>As in previous articles, we follow a rolling training approach: at the start of each year, we look back over the past 10 years to train the model, then use it to make predictions for that specific year. This process is repeated annually.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1>The edge</h1><p>After training the model, the first question we want to answer is: what is the edge of using such a model?</p><p>To analyze that, we:</p><ul><li><p>Compute the prediction for every stock in the universe for every day since 2010;</p></li><li><p>Compute the realized future returns for every stock;</p></li><li><p>Assign a quintile to each stock every day (Q5: lowest signal; Q1: highest signal);</p></li><li><p>Aggregate by decile and annualize returns.</p></li></ul><p>Here's what we found:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hGTX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdeb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hGTX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdeb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png 424w, https://substackcdn.com/image/fetch/$s_!hGTX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdeb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png 848w, https://substackcdn.com/image/fetch/$s_!hGTX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdeb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png 1272w, https://substackcdn.com/image/fetch/$s_!hGTX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdeb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hGTX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdeb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png" width="1456" height="925" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/deb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:925,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:126807,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdeb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hGTX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdeb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png 424w, https://substackcdn.com/image/fetch/$s_!hGTX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdeb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png 848w, https://substackcdn.com/image/fetch/$s_!hGTX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdeb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png 1272w, https://substackcdn.com/image/fetch/$s_!hGTX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdeb3ce84-adf2-4016-b09f-8bde4ad1ec54_1778x1130.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Mean return across quintiles</figcaption></figure></div><p>Ideally, we would expect returns to increase steadily from Q5 to Q1. If it weren't by Q2, we would have seen a perfectly monotonic relationship: the higher the signal, the higher the return (which is exactly what we wanted). The fact that <strong>Q2 &gt; Q1</strong> <em>isn't fatal</em>, but it <strong>weakens the ideal monotonic structure</strong> you'd want in a clean alpha factor.</p><p>Well, life is not perfect, especially in the realm of very simple models. Let's move forward in constructing long-short portfolios (long Q1, short Q5) and backtest that. The signal will be the ranking feature. Let's also note that non-linear ML models might actually capture these patterns better than OLS, but that will be addressed in a future article.</p><h1>Experiments</h1><p>Our first experiment is the simplest possible strategy:</p><ul><li><p>At the end of every day, we will use the signal generated from the past 24-hour news articles to rank the stocks;</p></li><li><p>We will long the top quintile and short the bottom quintile;</p></li><li><p>We will hold the portfolio for 24-hours; at the end of the next trading day, we will repeat the process.</p></li></ul><p>That's it. It can't get simpler than that. Also, in all backtests, I assumed IBKR's Pro Tier 3 trading costs. Let's see the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SjRo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SjRo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!SjRo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!SjRo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!SjRo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SjRo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:621637,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SjRo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!SjRo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!SjRo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!SjRo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66bba4cb-a65c-44a0-b9a9-9ee13af9393d_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity curve for the first experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6FTM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36708274-7524-4763-8555-909460a5b173_1074x1064.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6FTM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36708274-7524-4763-8555-909460a5b173_1074x1064.png 424w, https://substackcdn.com/image/fetch/$s_!6FTM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36708274-7524-4763-8555-909460a5b173_1074x1064.png 848w, https://substackcdn.com/image/fetch/$s_!6FTM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36708274-7524-4763-8555-909460a5b173_1074x1064.png 1272w, https://substackcdn.com/image/fetch/$s_!6FTM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36708274-7524-4763-8555-909460a5b173_1074x1064.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6FTM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36708274-7524-4763-8555-909460a5b173_1074x1064.png" width="1074" height="1064" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36708274-7524-4763-8555-909460a5b173_1074x1064.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1064,&quot;width&quot;:1074,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:258297,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36708274-7524-4763-8555-909460a5b173_1074x1064.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6FTM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36708274-7524-4763-8555-909460a5b173_1074x1064.png 424w, https://substackcdn.com/image/fetch/$s_!6FTM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36708274-7524-4763-8555-909460a5b173_1074x1064.png 848w, https://substackcdn.com/image/fetch/$s_!6FTM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36708274-7524-4763-8555-909460a5b173_1074x1064.png 1272w, https://substackcdn.com/image/fetch/$s_!6FTM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36708274-7524-4763-8555-909460a5b173_1074x1064.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oQxU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oQxU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png 424w, https://substackcdn.com/image/fetch/$s_!oQxU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png 848w, https://substackcdn.com/image/fetch/$s_!oQxU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png 1272w, https://substackcdn.com/image/fetch/$s_!oQxU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oQxU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png" width="1092" height="602" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:602,&quot;width&quot;:1092,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:156156,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oQxU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png 424w, https://substackcdn.com/image/fetch/$s_!oQxU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png 848w, https://substackcdn.com/image/fetch/$s_!oQxU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png 1272w, https://substackcdn.com/image/fetch/$s_!oQxU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b53333b-28c6-48d6-a9c1-6df5dd5a37dc_1092x602.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest trades</figcaption></figure></div><p>Not bad for a first experiment:</p><ul><li><p>We see a good 1.88 Sharpe ratio vs. 0.73 the benchmark, over 2x better;</p></li><li><p>The annual return is at 18.7%, also much better than the S&amp;P 500 in the same period;</p></li><li><p>The maximum drawdown is only 11% vs. 34% the benchmark;</p></li><li><p>But the really eye-popping stat is the 0.01 correlation with the benchmark.</p></li></ul><p>This is a 100% market-neutral strategy, with 100% gross exposure and zero net exposure. But there&#8217;s a problem with this backtest&#8212;can you spot it?</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/informational-edge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/informational-edge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/informational-edge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1>Restricting Shorts to the S&amp;P 1500 Index</h1><p>We&#8217;ve demonstrated that news sentiment data can be effectively used to predict next-day returns. In an ideal world, this would translate into a smooth and profitable equity curve.</p><p>However, the world is not ideal. To replicate these results in live trading, we would need to short every stock the model signals&#8212;and that&#8217;s simply not feasible.</p><p>The best way to realistically backtest short positions would be to use historical short availability or inventory data. Unfortunately, Interactive Brokers does not provide historical short inventory, only daily snapshots going forward. So how can we proceed?</p><p>One practical solution is to <strong>restrict short positions to S&amp;P 1500 constituents</strong> and assume those shorts can be filled. While not always true, this is a reasonable approximation for backtesting purposes&#8212;at least until we transition to forward testing.</p><p>Let&#8217;s see how the strategy performs under this constraint.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3MR0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3MR0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!3MR0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!3MR0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!3MR0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3MR0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:618786,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3MR0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!3MR0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!3MR0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!3MR0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cc873b2-e996-45ac-9292-acf853653dcc_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity curve for the second experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YSsW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YSsW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png 424w, https://substackcdn.com/image/fetch/$s_!YSsW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png 848w, https://substackcdn.com/image/fetch/$s_!YSsW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png 1272w, https://substackcdn.com/image/fetch/$s_!YSsW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YSsW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png" width="1070" height="1070" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1070,&quot;width&quot;:1070,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:260414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YSsW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png 424w, https://substackcdn.com/image/fetch/$s_!YSsW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png 848w, https://substackcdn.com/image/fetch/$s_!YSsW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png 1272w, https://substackcdn.com/image/fetch/$s_!YSsW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F231f1b77-b559-4076-a42d-851b2fc1bf1a_1070x1070.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jRd9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jRd9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png 424w, https://substackcdn.com/image/fetch/$s_!jRd9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png 848w, https://substackcdn.com/image/fetch/$s_!jRd9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png 1272w, https://substackcdn.com/image/fetch/$s_!jRd9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jRd9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png" width="1096" height="602" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:602,&quot;width&quot;:1096,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:155310,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jRd9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png 424w, https://substackcdn.com/image/fetch/$s_!jRd9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png 848w, https://substackcdn.com/image/fetch/$s_!jRd9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png 1272w, https://substackcdn.com/image/fetch/$s_!jRd9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba58c9b-2028-4941-b3c7-3400e5d80b80_1096x602.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest trades</figcaption></figure></div><p>That's a nice improvement:</p><ul><li><p>The Sharpe ratio now is at 2.14 vs. 1.88 in the previous test;</p></li><li><p>The annual return is at 21.4%, about 2x the benchmark;</p></li><li><p>The maximum drawdown increases a bit, from 11% to 13%, but is still much lower than the 34% of the S&amp;P 500;</p></li><li><p>The strategy continues uncorrelated to the market (-0.01);</p></li><li><p>All the trade stats improve vs. last experiment.</p></li></ul><p>Is there anything else we can do to improve?</p><h1>Changing the Net Exposure</h1><p>So far, the strategy we've been testing has zero net exposure. But what if we change it to, say, +10% net exposure?</p><p>Having a positive net exposure can be beneficial when investing in stocks, as equities tend to rise over the long term, allowing you to capture the market&#8217;s natural upward drift.</p><p>Let's see the impact of this change:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8zsO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8zsO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!8zsO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!8zsO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!8zsO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8zsO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:626584,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8zsO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!8zsO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!8zsO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!8zsO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd867341-4e09-40f4-b5de-306fed49b0c2_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity curve for the third experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U_4m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U_4m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png 424w, https://substackcdn.com/image/fetch/$s_!U_4m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png 848w, https://substackcdn.com/image/fetch/$s_!U_4m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png 1272w, https://substackcdn.com/image/fetch/$s_!U_4m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U_4m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png" width="1070" height="1074" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1074,&quot;width&quot;:1070,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:263132,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U_4m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png 424w, https://substackcdn.com/image/fetch/$s_!U_4m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png 848w, https://substackcdn.com/image/fetch/$s_!U_4m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png 1272w, https://substackcdn.com/image/fetch/$s_!U_4m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7e85c98-1ae3-4086-b0ed-dae1d6fd4868_1070x1074.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><p>By taking more risk, we improve the overall returns as expected, at the expense of increasing the maximum drawdown.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4Div!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4Div!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png 424w, https://substackcdn.com/image/fetch/$s_!4Div!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png 848w, https://substackcdn.com/image/fetch/$s_!4Div!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png 1272w, https://substackcdn.com/image/fetch/$s_!4Div!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4Div!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png" width="1456" height="755" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:755,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1252669,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4Div!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png 424w, https://substackcdn.com/image/fetch/$s_!4Div!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png 848w, https://substackcdn.com/image/fetch/$s_!4Div!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png 1272w, https://substackcdn.com/image/fetch/$s_!4Div!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19d6ef05-d7a7-4ba8-ae22-b1d8b3334d83_1650x856.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>If we had traded this strategy since 2010:</p><ul><li><p>We would have had <strong>only one negative year</strong> (this year so far)<strong>;</strong></p></li><li><p>We would have seen <strong>74% of the months positive</strong>, with the best at +14.1% (Nov'23);</p></li><li><p>We would have seen <strong>26% of the months negative</strong>, with the worst at -9.0% (Mar'20);</p></li><li><p>The <strong>longest</strong> <strong>positive streak</strong> would have been <strong>18 months</strong>, from Sep'13 to Feb'15;</p></li><li><p>The <strong>longest negative streak</strong> would have been <strong>3 months</strong>, from Jan'18 to Mar'18.</p></li></ul><h1><strong>How much of this performance is driven by common risk factors?</strong></h1><p>To better understand what&#8217;s driving the strategy&#8217;s returns, we apply the <strong>Fama-French 3-Factor Model</strong> to analyze its exposure to well-known risk factors: <strong>market, size, and value</strong>. By performing an <strong>OLS regression</strong> on the strategy&#8217;s excess returns using these factors, we can break down its performance into:</p><ul><li><p><strong>Market Risk (Mkt-RF):</strong> Measures how sensitive the strategy is to overall market movements, capturing broad market exposure.</p></li><li><p><strong>Size (SMB):</strong> Evaluates whether the portfolio has a tilt toward smaller or larger stocks.</p></li><li><p><strong>Value (HML):</strong> Determines whether the strategy favors value stocks or growth stocks.</p></li></ul><p>For this analysis, we used <strong>daily factor data from Kenneth French&#8217;s website</strong>. Here are the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!D9ob!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda4165af-44b1-4564-9139-0d52d723f23a_1294x364.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D9ob!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda4165af-44b1-4564-9139-0d52d723f23a_1294x364.png 424w, https://substackcdn.com/image/fetch/$s_!D9ob!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda4165af-44b1-4564-9139-0d52d723f23a_1294x364.png 848w, https://substackcdn.com/image/fetch/$s_!D9ob!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda4165af-44b1-4564-9139-0d52d723f23a_1294x364.png 1272w, https://substackcdn.com/image/fetch/$s_!D9ob!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda4165af-44b1-4564-9139-0d52d723f23a_1294x364.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!D9ob!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda4165af-44b1-4564-9139-0d52d723f23a_1294x364.png" width="1294" height="364" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/da4165af-44b1-4564-9139-0d52d723f23a_1294x364.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:364,&quot;width&quot;:1294,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:109948,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/160208760?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda4165af-44b1-4564-9139-0d52d723f23a_1294x364.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!D9ob!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda4165af-44b1-4564-9139-0d52d723f23a_1294x364.png 424w, https://substackcdn.com/image/fetch/$s_!D9ob!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda4165af-44b1-4564-9139-0d52d723f23a_1294x364.png 848w, https://substackcdn.com/image/fetch/$s_!D9ob!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda4165af-44b1-4564-9139-0d52d723f23a_1294x364.png 1272w, https://substackcdn.com/image/fetch/$s_!D9ob!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda4165af-44b1-4564-9139-0d52d723f23a_1294x364.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">OLS Regression Results</figcaption></figure></div><p>Highlights:</p><ul><li><p><strong>Annualized alpha of 24.4%</strong>, statistically significant (<strong>t = 21.88</strong>, <em>p</em> &lt; 0.001), indicating strong performance unexplained by common risk factors.</p></li><li><p><strong>Negative and statistically significant exposure to market risk (Mkt-RF)</strong>, suggesting the strategy is slightly <strong>defensive</strong> or <strong>market-neutral</strong>.</p></li><li><p><strong>Positive exposure to the size factor (SMB)</strong>, indicating a <strong>tilt toward smaller-cap stocks</strong>, with statistical significance (<em>p</em> = 0.044).</p></li><li><p><strong>No significant exposure to the value factor (HML)</strong>, with a near-zero coefficient and an insignificant p-value (<em>p</em> = 0.973).</p></li></ul><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/informational-edge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/informational-edge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/informational-edge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1>Final thoughts</h1><p>This article explored how <strong>informational edge</strong>, driven by alternative data, can be harnessed to build a high-performing, market-neutral trading strategy. Using only features derived from a premium news sentiment dataset, we demonstrated that even a simple linear model&#8212;when paired with rich, well-engineered inputs&#8212;can deliver strong, persistent alpha.</p><p>We showed that news sentiment is not just noise: it carries predictive power. Even after accounting for execution costs, the strategy posted high Sharpe ratios, low drawdowns, and near-zero correlation to the broader market&#8212;an attractive profile for hedge funds or institutional allocators seeking diversification.</p><p>That said, we&#8217;ve only scratched the surface. This was a <strong>baseline model</strong> designed to showcase the power of unique data. There are many exciting directions for improvement:</p><ul><li><p>Replace linear regression with <strong>non-linear models</strong> (e.g., gradient boosting or deep learning) to capture richer sentiment-return relationships.</p></li><li><p>Explore <strong>longer or shorter holding periods</strong>, potentially adjusting for momentum decay or reaction lag.</p></li><li><p>Combine this sentiment signal with other <strong>orthogonal factors</strong> (e.g., earnings quality, technicals) for improved robustness.</p></li></ul><p>Alternative data offers a real edge&#8212;but only if paired with thoughtful modeling, careful preprocessing, and disciplined execution. If this is what a simple model can achieve, imagine what&#8217;s possible with deeper pipelines, more compute, and continuous learning.</p><p>As always, I&#8217;d love to hear your thoughts. Feel free to <strong>reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a></strong> if you have questions, ideas, or feedback.</p><p>Cheers!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Learning to Rank]]></title><description><![CDATA[A market-neutral strategy that delivers 18% annual returns with a 13% max drawdown]]></description><link>https://www.quantitativo.com/p/learning-to-rank</link><guid isPermaLink="false">https://www.quantitativo.com/p/learning-to-rank</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Sat, 01 Mar 2025 18:16:25 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!mUIl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mUIl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mUIl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png 424w, https://substackcdn.com/image/fetch/$s_!mUIl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png 848w, https://substackcdn.com/image/fetch/$s_!mUIl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png 1272w, https://substackcdn.com/image/fetch/$s_!mUIl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mUIl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png" width="1456" height="970" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:970,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2412522,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mUIl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png 424w, https://substackcdn.com/image/fetch/$s_!mUIl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png 848w, https://substackcdn.com/image/fetch/$s_!mUIl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png 1272w, https://substackcdn.com/image/fetch/$s_!mUIl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b124d4b-6cca-4de6-85d3-9adad51544e9_2048x1365.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Engraving from Mechanic's Magazine, London, 1824</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;Give me a firm place to stand and a lever, and I can move the Earth.&#8221; Archimedes.</p></blockquote><p>Archimedes, the brilliant Greek mathematician and engineer, was so fascinated by levers that he claimed he could move the Earth with one. His deep understanding of mechanics made him a legend, from designing war machines to discovering buoyancy while lounging in a bathtub. Just as he used levers to amplify force, money managers <strong>use leverage to amplify market exposure</strong>&#8212;turning small amounts of capital into powerful positions. When applied wisely, it can be a game-changer.</p><p>This week, we will implement the paper <em><a href="https://www.pm-research.com/content/iijjfds/3/2/70">Building Cross-Sectional Systematic Strategies By Learning to Rank</a></em> by Daniel Poh, Bryan Lim, Stefan Zohren, and Stephen Roberts. Published in 2021, the paper explores how machine learning techniques, particularly <strong>learning-to-rank algorithms</strong>, can enhance the construction of systematic trading strategies. Let me start by saying why I chose this particular paper.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!q7fJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!q7fJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png 424w, https://substackcdn.com/image/fetch/$s_!q7fJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png 848w, https://substackcdn.com/image/fetch/$s_!q7fJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png 1272w, https://substackcdn.com/image/fetch/$s_!q7fJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!q7fJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png" width="794" height="568" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:568,&quot;width&quot;:794,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:237179,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!q7fJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png 424w, https://substackcdn.com/image/fetch/$s_!q7fJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png 848w, https://substackcdn.com/image/fetch/$s_!q7fJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png 1272w, https://substackcdn.com/image/fetch/$s_!q7fJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24660507-ab7f-4d59-8ab8-e34ad06747cc_794x568.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Exhibit 1 in the paper Building Cross-Sectional Systematic Strategies By Learning to Rank</figcaption></figure></div><p>Over the past few months, I&#8217;ve had the opportunity to learn more about first-loss funds. Among the funds I spoke with, <strong>market-neutral</strong> strategies are the preferred choice. With that in mind, I&#8217;ve been exploring ideas that align with this approach, and the <em>Learning to Rank</em> paper immediately caught my attention. Its unique methodology sparked my curiosity, making it a perfect candidate for deeper analysis.</p><p>As always, replicating the exact results from a research paper proved challenging&#8212;but I managed to get promising outcomes worth sharing. One key factor made all the difference: <strong>leverage</strong>. That&#8217;s when Archimedes came to mind. I carefully applied leverage while keeping <strong>gross exposure</strong> within levels that would meet first-loss funds&#8217; <strong>risk guidelines</strong>. But I&#8217;m getting ahead of myself&#8212;let&#8217;s take it step by step.</p><p>Here's the plan for today:</p><ol><li><p><strong>Summarize the paper</strong> &#8211; a quick overview of its core ideas;</p></li><li><p><strong>Explain our implementation</strong> &#8211; highlighting both similarities and differences;</p></li><li><p><strong>Replicate the backtest results</strong> &#8211; seeing how well they hold up;</p></li><li><p><strong>Propose improvements</strong> &#8211; exploring ways to refine the strategy.</p></li></ol><blockquote><p>Unlike last week, I won&#8217;t be sharing the code for this paper here. This project is more complex; a full breakdown would make the post too long. Instead, I&#8217;ll include it in the course I&#8217;m developing, where I&#8217;ll provide my complete multi-asset Python backtester, my analysis &amp; visualization modules, 3&#8211;4 fully implemented strategies, and execution code for forward testing and live trading. I&#8217;ve already written about 30% and should have it wrapped up in the next few weeks.</p></blockquote><p>I&#8217;ve been using the survey below to understand better what types of strategies our community is most interested in. If you have 60 seconds, I&#8217;d love to hear your input:</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/survey/2136497?token=&quot;,&quot;text&quot;:&quot;What kind of content interests you most?&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/survey/2136497?token="><span>What kind of content interests you most?</span></a></p><p>Now, to the strategy!</p><h1>Paper summary</h1><p>The paper introduces <strong>Learning to Rank (LTR)</strong> as a novel approach to enhance <strong>cross-sectional systematic trading strategies</strong>, particularly <strong>momentum-based</strong> strategies. Traditional ranking methods, such as sorting past returns or using regression-based forecasts, often fail to optimize ranking accuracy, leading to suboptimal portfolio performance. LTR, widely used in search engines and recommendation systems, improves ranking precision by <strong>learning pairwise and listwise relationships</strong> between assets. The study applies LTR techniques to a <strong>cross-sectional momentum strategy</strong> and demonstrates that <strong>Sharpe Ratios can be tripled</strong> compared to traditional methods. This provides a <strong>flexible, generalizable framework</strong> for improving asset selection in systematic trading.</p><p>The paper explores three LTR categories:</p><ul><li><p><strong>Pointwise methods</strong> (inferior ranking accuracy);</p></li><li><p><strong>Pairwise methods</strong> (RankNet, LambdaMART);</p></li><li><p><strong>Listwise methods</strong> (ListNet, ListMLE).</p></li></ul><p>LTR learns the relative rankings of assets instead of just their expected returns.</p><p><strong>LambdaMART performs best</strong> across profitability, ranking accuracy, and risk metrics: we will focus on this algorithm. Please check the paper for a full review of all the different methods.</p><p>Here is the summary of the main details:</p><ul><li><p><strong>Universe Selection:</strong></p><ul><li><p>Uses <strong>CRSP data (1980-2019)</strong> for <strong>NYSE-listed stocks</strong>.</p></li><li><p>Includes only <strong>actively traded stocks above $1</strong> with at least <strong>one year of price history</strong>.</p></li></ul></li><li><p><strong>Portfolio Construction Framework:</strong></p><ol><li><p><strong>Features</strong></p><ul><li><p>Compute asset scores using past returns, volatility-normalized indicators, and momentum signals.</p></li></ul></li><li><p><strong>Score Ranking</strong></p><ul><li><p>Apply <strong>LambdaMART</strong> to rank stocks <strong>based on future expected performance</strong>.</p></li></ul></li><li><p><strong>Security Selection</strong></p><ul><li><p>Go <strong>long the top decile</strong> and <strong>short the bottom decile</strong> based on rankings.</p></li></ul></li><li><p><strong>Volatility Scaling</strong></p><ul><li><p>Normalize position sizes based on <strong>ex-ante monthly volatility</strong>, targeting <strong>15% annualized volatility</strong>.</p></li></ul></li></ol></li><li><p><strong>Re-Training &amp; Rebalancing:</strong></p><ul><li><p><strong>Model re-training:</strong> Every <strong>5 years</strong> (parameters are fixed for the next 5 years).</p></li><li><p><strong>Portfolio rebalancing:</strong> <strong>Monthly</strong> (on the last trading day of each month).</p></li></ul></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!odHh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!odHh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png 424w, https://substackcdn.com/image/fetch/$s_!odHh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png 848w, https://substackcdn.com/image/fetch/$s_!odHh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png 1272w, https://substackcdn.com/image/fetch/$s_!odHh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!odHh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png" width="1302" height="506" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:506,&quot;width&quot;:1302,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:232609,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!odHh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png 424w, https://substackcdn.com/image/fetch/$s_!odHh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png 848w, https://substackcdn.com/image/fetch/$s_!odHh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png 1272w, https://substackcdn.com/image/fetch/$s_!odHh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c52ce93-7796-4084-a8ad-bc0c9190729c_1302x506.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Exhibit 2: Performance Metrics &#8211; Rescaled to Target Volatility. LM is the LambdaMART.</figcaption></figure></div><ul><li><p><strong>Performance Results:</strong></p><ul><li><p><strong>LTR methods significantly outperform</strong> traditional ranking techniques.</p></li><li><p><strong>Sharpe Ratios triple</strong> compared to classical cross-sectional momentum strategies.</p></li><li><p><strong>LambdaMART delivers the best returns and ranking accuracy.</strong></p></li><li><p><strong>Lower drawdowns and downside risk</strong> compared to regression-based approaches.</p></li></ul></li><li><p><strong>Key Takeaways:</strong></p><ul><li><p><strong>Learning to Rank enhances cross-sectional strategies</strong> by improving asset selection.</p></li><li><p><strong>LambdaMART is the most effective method</strong>, balancing accuracy and efficiency.</p></li><li><p><strong>The framework is modular</strong>, allowing incorporation of <strong>alternative features</strong> beyond momentum.</p></li><li><p>Potential future improvements include <strong>model ensembling</strong> and <strong>higher-frequency applications</strong>.</p></li></ul></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1>The strategy - our implementation</h1><p>We did some important changes in implementation. Here are the main differences and similarities:</p><ul><li><p><strong>Universe Selection:</strong></p><ul><li><p>Instead of CRSP data, we used Norgate data</p></li><li><p>We used Russell 3000 Current &amp; Past stocks, taking care only to include stocks when they were part of the index</p></li></ul></li><li><p><strong>Portfolio Construction Framework:</strong></p><ol><li><p><strong>Features:</strong></p><ul><li><p>The 21 features used to train the model are implemented exactly as described in the paper: 6 features are past returns (raw and normalized, different windows), and 15 are momentum based (different windows)</p></li></ul></li><li><p><strong>Target and model:</strong></p><ul><li><p>Next month returns are used to rank the stocks</p></li><li><p>LambdaMART models this ranking and learns to predict it</p></li><li><p>We use <a href="https://xgboost.readthedocs.io/en/stable/tutorials/learning_to_rank.html">XGBoost's LambdaMART implementation</a></p></li></ul></li><li><p><strong>Security Selection:</strong></p><ul><li><p>We replicated the 10 deciles as described in the paper</p></li><li><p>Additionally, we experimented with 20, 30, 40, 50, 60 quantiles as well</p></li></ul></li><li><p><strong>Volatility Scaling/leverage:</strong></p><ul><li><p>My experiments with volatility target didn't work as reported in the paper; so, I used equal weights for all long &amp; short positions</p></li><li><p>However, I did apply leverage: instead of 100% gross exposure, I used 150% gross exposure</p></li></ul></li></ol></li><li><p><strong>Re-Training &amp; Rebalancing:</strong></p><ul><li><p><strong>Model re-training:</strong> Every year instead of every 5 years as proposed in the paper. At every year, the model was retrained using past 15 years of data.</p></li><li><p><strong>Portfolio rebalancing:</strong> <strong>Monthly</strong> (on the first trading day of each month instead of the last as proposed in the paper)</p></li></ul></li></ul><p>I haven't performed any optimization whatsoever, as I believe that would lead to overfitting. In fact, to prevent overfitting, I did the following changes in XGBoost's default parameters:</p><p>&#9989; <strong>Max depth reduction from 6 to 5</strong> &#8594; Limits tree complexity, reducing variance and making the model less prone to memorizing noise.</p><p>&#9989; <strong>Learning rate reduction from 0.3 to 0.1</strong> &#8594; Slows down learning, ensuring smoother updates and better generalization. Helps prevent overfitting to short-term patterns in ranking.</p><p>&#9989; <strong>Number of trees increase from 100 to 200</strong> &#8594; Compensates for the lower learning rate, allowing the model to gradually improve without aggressive updates.</p><blockquote><p>These details were omitted in the paper, yet they are essential for a successful implementation. Quantitative research papers often leave out such specifics, making it our responsibility to bridge the gaps.</p></blockquote><p>Finally, here are my trading cost assumptions: I assumed 10 bps per trade, covering slippage, commissions, and borrowing fees, applied uniformly across all stocks. The paper did not account for trading costs, arguing that the strategy rebalances monthly, which helps minimize their impact compared to higher-frequency approaches. For backtesting, I believe this assumption should suffice. If the results look promising, the next logical step would be forward testing, which provides a more detailed view of real-world trading costs.</p><h1>The edge</h1><p>After training the model, the first question we want to answer is: what is the edge of using such a model?</p><p>To analyze that, we:</p><ul><li><p>Compute the prediction for every stock in the universe for every day since 2006;</p></li><li><p>Compute the realized future returns for every stock;</p></li><li><p>Aggregate by decile and annualize returns.</p></li></ul><p>Here's what we found:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3HUN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3HUN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png 424w, https://substackcdn.com/image/fetch/$s_!3HUN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png 848w, https://substackcdn.com/image/fetch/$s_!3HUN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png 1272w, https://substackcdn.com/image/fetch/$s_!3HUN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3HUN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png" width="1263" height="808" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:808,&quot;width&quot;:1263,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:99954,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3HUN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png 424w, https://substackcdn.com/image/fetch/$s_!3HUN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png 848w, https://substackcdn.com/image/fetch/$s_!3HUN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png 1272w, https://substackcdn.com/image/fetch/$s_!3HUN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5313d2f-458a-482d-bf41-2265ff2f2531_1263x808.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Mean return across deciles</figcaption></figure></div><p>The results align with our expectations:</p><ul><li><p>The top 10% of stocks (1st decile) generate the highest returns.</p></li><li><p>The bottom 10% of stocks (10th decile) produce the lowest returns, which are negative.</p></li><li><p>This confirms the foundation for constructing a long-short portfolio.</p></li></ul><p>Now, let's see the experiments.</p><h1>Experiments</h1><p>Here are the results of the first experiment:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!huUZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!huUZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!huUZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!huUZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!huUZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!huUZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png" width="1456" height="1410" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1410,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:639602,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!huUZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!huUZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!huUZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!huUZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95dfe5cd-2241-4c5c-bf87-811c0215428d_1520x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity curve for the first experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fgJ7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fgJ7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png 424w, https://substackcdn.com/image/fetch/$s_!fgJ7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png 848w, https://substackcdn.com/image/fetch/$s_!fgJ7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png 1272w, https://substackcdn.com/image/fetch/$s_!fgJ7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fgJ7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png" width="1070" height="1328" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1328,&quot;width&quot;:1070,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:315188,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fgJ7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png 424w, https://substackcdn.com/image/fetch/$s_!fgJ7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png 848w, https://substackcdn.com/image/fetch/$s_!fgJ7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png 1272w, https://substackcdn.com/image/fetch/$s_!fgJ7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3eb3f2a1-77f9-456b-8238-66cb6ab66a0e_1070x1328.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KQgy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KQgy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png 424w, https://substackcdn.com/image/fetch/$s_!KQgy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png 848w, https://substackcdn.com/image/fetch/$s_!KQgy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png 1272w, https://substackcdn.com/image/fetch/$s_!KQgy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KQgy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png" width="1094" height="662" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:662,&quot;width&quot;:1094,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:159523,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KQgy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png 424w, https://substackcdn.com/image/fetch/$s_!KQgy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png 848w, https://substackcdn.com/image/fetch/$s_!KQgy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png 1272w, https://substackcdn.com/image/fetch/$s_!KQgy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06bf7f59-4f4c-4342-87af-51db8797e1bf_1094x662.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest trades</figcaption></figure></div><p>Highlights:</p><ul><li><p>The first experiment delivered a <strong>10.6%</strong> annual return, slightly above S&amp;P 500 during the same period;</p></li><li><p>The risk-adjusted return is <strong>1.37</strong>, over twice the benchmark;</p></li><li><p>The maximum drawdown is <strong>12.7%,</strong> much better than the benchmark;</p></li><li><p>The expected return/trade is <strong>+2.16%,</strong> with a win rate of <strong>49.0%</strong> and a payoff ratio of 1.43.</p></li></ul><p>Not bad for a first experiment, especially for a strategy that executes monthly rebalances. Let's see now how to improve these results.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/learning-to-rank?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/learning-to-rank?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/learning-to-rank?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1>Number of stocks in each portfolio</h1><p>Looking at the previous table, we notice a <strong>high number of trades per year</strong>, despite the portfolio being <strong>rebalanced monthly</strong>. Why is that?</p><p>The reason is <strong>excessive diversification</strong> due to using <strong>10 quantiles</strong>. Since our universe consists of <strong>Russell 3000 stocks</strong>, each long portfolio, on average, holds <strong>300 stocks</strong>, and each short portfolio holds the same.</p><p>To create more <strong>concentrated portfolios</strong>, we can <strong>increase the number of quantiles</strong>, reducing the number of stocks selected per bucket. Let's analyze how this parameter affects the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HP7l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HP7l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png 424w, https://substackcdn.com/image/fetch/$s_!HP7l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png 848w, https://substackcdn.com/image/fetch/$s_!HP7l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png 1272w, https://substackcdn.com/image/fetch/$s_!HP7l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HP7l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png" width="1454" height="672" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:672,&quot;width&quot;:1454,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:295704,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HP7l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png 424w, https://substackcdn.com/image/fetch/$s_!HP7l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png 848w, https://substackcdn.com/image/fetch/$s_!HP7l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png 1272w, https://substackcdn.com/image/fetch/$s_!HP7l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d966a51-fd66-4fee-8e93-494c714ae9d4_1454x672.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Results per number of quantiles</figcaption></figure></div><p>Looking at the results, we can draw interesting conclusions:</p><ul><li><p>Higher concentration improves returns but increases volatility and drawdowns:</p><ul><li><p>Return (Ann.) rises from 10.6% (10 quantiles) to 18.9% (40 quantiles)</p></li><li><p>Volatility increases from 7.6% to 14.1%</p></li><li><p>Max drawdown worsens from -12.7% to -24.9%</p></li></ul></li><li><p>Optimal trade-off <strong>around 30-40 quantiles</strong>:</p><ul><li><p><strong>Best Sharpe Ratio (1.62) at 30 quantiles</strong></p></li><li><p><strong>Highest return (2,652%) at 40 quantiles</strong></p></li><li><p>Beyond 40 quantiles, Sharpe Ratio declines due to higher volatility and drawdowns</p></li></ul></li><li><p>Too many quantiles (50-60) degrade risk-adjusted returns</p><ul><li><p>Sharpe Ratio drops to 1.21 at 60 quantiles</p></li><li><p>Drawdowns exceed -20%</p></li></ul></li></ul><p>A <strong>moderate number of quantiles (30-40) provides the best balance</strong> between return and risk. Let's settle in 30 quantiles and see its results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4kXZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4kXZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!4kXZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!4kXZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!4kXZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4kXZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:620354,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4kXZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!4kXZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!4kXZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!4kXZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F834d70c5-e687-4780-8ec6-d341e2ffecdc_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity curve for 30 quantiles instead of 10</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tm5Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tm5Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png 424w, https://substackcdn.com/image/fetch/$s_!Tm5Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png 848w, https://substackcdn.com/image/fetch/$s_!Tm5Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png 1272w, https://substackcdn.com/image/fetch/$s_!Tm5Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tm5Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png" width="1068" height="1338" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1338,&quot;width&quot;:1068,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:318370,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Tm5Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png 424w, https://substackcdn.com/image/fetch/$s_!Tm5Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png 848w, https://substackcdn.com/image/fetch/$s_!Tm5Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png 1272w, https://substackcdn.com/image/fetch/$s_!Tm5Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb06cb0bd-c2f0-46c2-b105-f91a3a34a949_1068x1338.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YAZb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YAZb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png 424w, https://substackcdn.com/image/fetch/$s_!YAZb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png 848w, https://substackcdn.com/image/fetch/$s_!YAZb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png 1272w, https://substackcdn.com/image/fetch/$s_!YAZb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YAZb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png" width="1094" height="664" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:664,&quot;width&quot;:1094,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:159138,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YAZb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png 424w, https://substackcdn.com/image/fetch/$s_!YAZb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png 848w, https://substackcdn.com/image/fetch/$s_!YAZb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png 1272w, https://substackcdn.com/image/fetch/$s_!YAZb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400536a6-1d94-4845-94d9-0126edba8ae4_1094x664.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest trades</figcaption></figure></div><p>Highlights:</p><ul><li><p>The strategy achieves an <strong>18.1% annual return</strong>, more than double the 8.5% of the S&amp;P 500.</p></li><li><p>The <strong>Sharpe Ratio is 1.62</strong>, significantly higher than 0.51 for the benchmark</p></li><li><p><strong>Volatility is 10.6%</strong>, much lower than the 19.5% of the S&amp;P 500</p></li><li><p><strong>Maximum drawdown is -13.0%</strong>, far better than -56.8%</p></li><li><p><strong>Correlation with the S&amp;P 500 is only 0.09</strong>, indicating diversification benefits</p></li><li><p>The expected return/trade is <strong>+2.77%,</strong> with a win rate of <strong>50.0%</strong> and a payoff ratio of 1.47, a nice improvement vs. the first experiment</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H880!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H880!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png 424w, https://substackcdn.com/image/fetch/$s_!H880!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png 848w, https://substackcdn.com/image/fetch/$s_!H880!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png 1272w, https://substackcdn.com/image/fetch/$s_!H880!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H880!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png" width="1456" height="933" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:933,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1395345,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H880!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png 424w, https://substackcdn.com/image/fetch/$s_!H880!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png 848w, https://substackcdn.com/image/fetch/$s_!H880!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png 1272w, https://substackcdn.com/image/fetch/$s_!H880!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd45c1486-bfc1-4189-9dfe-f77b7590c6de_1644x1054.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>If we had traded this strategy since 2006:</p><ul><li><p>We would have had <strong>only one negative year;</strong></p></li><li><p>We would have seen <strong>70% of the months positive</strong>, with the best at +11.9% (Jan'23);</p></li><li><p>We would have seen <strong>30% of the months negative</strong>, with the worst at -6.2% (Nov'22);</p></li><li><p>The <strong>longest</strong> <strong>positive streak</strong> would have been <strong>16 months</strong>, from Nov'20 to Feb'22;</p></li><li><p>The <strong>longest negative streak</strong> would have been 5 <strong>months</strong>, from Aug'18 to Dec'18.</p></li></ul><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/learning-to-rank?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/learning-to-rank?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/learning-to-rank?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1><strong>How much of this performance is driven by common risk factors?</strong></h1><p>To better understand what&#8217;s driving the strategy&#8217;s returns, we apply the <strong>Fama-French 3-Factor Model</strong> to analyze its exposure to well-known risk factors: <strong>market, size, and value</strong>. By performing an <strong>OLS regression</strong> on the strategy&#8217;s excess returns using these factors, we can break down its performance into:</p><ul><li><p><strong>Market Risk (Mkt-RF):</strong> Measures how sensitive the strategy is to overall market movements, capturing broad market exposure.</p></li><li><p><strong>Size (SMB):</strong> Evaluates whether the portfolio has a tilt toward smaller or larger stocks.</p></li><li><p><strong>Value (HML):</strong> Determines whether the strategy favors value stocks or growth stocks.</p></li></ul><p>For this analysis, we used <strong>daily factor data from Kenneth French&#8217;s website</strong>. Here are the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jHuH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jHuH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png 424w, https://substackcdn.com/image/fetch/$s_!jHuH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png 848w, https://substackcdn.com/image/fetch/$s_!jHuH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png 1272w, https://substackcdn.com/image/fetch/$s_!jHuH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jHuH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png" width="1288" height="370" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:370,&quot;width&quot;:1288,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:106092,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantitativo.com/i/158182571?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jHuH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png 424w, https://substackcdn.com/image/fetch/$s_!jHuH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png 848w, https://substackcdn.com/image/fetch/$s_!jHuH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png 1272w, https://substackcdn.com/image/fetch/$s_!jHuH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04da76f6-f95f-417d-95ef-e7a2926f0b39_1288x370.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">OLS Regression Results</figcaption></figure></div><p>Highlights:</p><ul><li><p><strong>Alpha (16.4%)</strong>: Statistically significant and positive, indicating that the strategy delivers <strong>16.4% annualized excess returns</strong> beyond what is explained by the three factors. This suggests strong <strong>idiosyncratic performance</strong> independent of common risk premia.</p></li><li><p><strong>Market Beta (0.0291)</strong>: Statistically significant, meaning the strategy has <strong>some exposure to market risk</strong>, but the low coefficient suggests that it is <strong>not highly sensitive to market movements</strong>, aligning with the goal of a market-neutral approach.</p></li><li><p><strong>Size Beta (0.1664)</strong>: Highly significant, indicating a <strong>tilt toward small-cap stocks</strong>. This suggests that a meaningful portion of the strategy's returns is <strong>influenced by the size factor</strong>.</p></li><li><p><strong>Value Beta (0.0615)</strong>: Statistically significant, showing that the strategy <strong>leans toward value stocks</strong>, though the effect is smaller than the size factor.</p></li></ul><h1>Final thoughts</h1><p>LTR-based strategies offer <strong>a fresh perspective on asset ranking</strong>, improving trade selection and overall performance. While <strong>this research-backed approach is promising</strong>, its <strong>practical implementation requires careful adaptation</strong> to account for <strong>trading constraints, costs, and execution dynamics</strong>. With further refinements, this could become a <strong>robust foundation for a market-neutral strategy</strong> suitable for <strong>institutional portfolios</strong>.</p><p>The results we obtained, while promising, were <strong>inferior to those reported in the paper</strong>&#8212;our <strong>Sharpe Ratio of 1.62</strong> falls short of the <strong>2.16</strong> achieved in the original study. This discrepancy is largely explained by <strong>differences in the dataset, parameter choices, and the inclusion of trading costs</strong>. We used <strong>Norgate data with Russell 3000 stocks</strong>, retrained the model <strong>annually instead of every five years</strong>, and applied <strong>a 10 bps trading cost assumption</strong>, all of which contributed to a more conservative outcome. Despite these differences, the strategy still demonstrates <strong>strong performance and risk-adjusted returns</strong>, reinforcing its potential.</p><p>There are many improvement ideas:</p><ul><li><p>Use <strong>model ensembling</strong> to combine multiple LTR models and improve ranking robustness.</p></li><li><p>Experiment with <strong>feature selection techniques</strong> to refine the most predictive signals.</p></li><li><p>Apply LTR techniques to <strong>higher-frequency data</strong> (e.g., intraday or order-book features).</p></li><li><p>Investigate <strong>shorter rebalancing periods</strong> (e.g., weekly or daily) to optimize market responsiveness.</p></li><li><p>Replace <strong>equal-weighted position sizing</strong> with <strong>dynamic volatility-based allocation</strong>.</p></li><li><p>Integrate alternative data sources such as <strong>earnings transcripts, analyst ratings, or news sentiment</strong> to enhance ranking predictions and improve signal quality.</p></li></ul><p>I'd love to hear your thoughts about this approach. If you have any questions or comments, <strong>just reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a></strong>.</p><p>Cheers!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Coding Trend Factor]]></title><description><![CDATA[From Paper to Python: Implementing a High-Performing Factor from Academic Research]]></description><link>https://www.quantitativo.com/p/coding-trend-factor</link><guid isPermaLink="false">https://www.quantitativo.com/p/coding-trend-factor</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Fri, 07 Feb 2025 15:38:33 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!qYDk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qYDk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qYDk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png 424w, https://substackcdn.com/image/fetch/$s_!qYDk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png 848w, https://substackcdn.com/image/fetch/$s_!qYDk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png 1272w, https://substackcdn.com/image/fetch/$s_!qYDk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qYDk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png" width="1400" height="934" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ebac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:934,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1612607,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qYDk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png 424w, https://substackcdn.com/image/fetch/$s_!qYDk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png 848w, https://substackcdn.com/image/fetch/$s_!qYDk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png 1272w, https://substackcdn.com/image/fetch/$s_!qYDk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febac90b6-c47f-4d96-a7af-3757d86306c4_1400x934.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1>The idea</h1><blockquote><p><strong>"Every great developer you know got there by solving problems they were unqualified to solve until they actually did it."</strong> &#8212; Patrick McKenzie.</p></blockquote><p>Patrick McKenzie is a well-known software developer, entrepreneur, and writer, widely recognized for his work in the software industry, particularly in bootstrapped startups and software-as-a-service (SaaS) businesses.</p><p>He built his entire career around <strong>sharing everything he learned</strong>, and his blog posts and tweets are often cited as <strong>must-reads for software entrepreneurs</strong>.</p><p>His quote about developers solving problems for which they were initially unqualified reflects a fundamental truth in programming&#8212;many great developers learn by doing rather than waiting until they are "ready.&#8221;</p><p>This week, I will share the implementation of the paper "<a href="https://www.sciencedirect.com/science/article/abs/pii/S0304405X16301271">A Trend Factor: Any Economic Gains from Using Information Over Investment Horizons?</a>" from Yufeng Han, Guofu Zhou, and Yingzi Zhu. This paper was published in the Journal of Financial Economics (2016).</p><p>Before we dive into the paper's code, let me share a bit about the why and the how. The why is basically two reasons. First, I love implementing papers. I think by coding classic ideas, new ideas can emerge. Second, I believe these implementations might help other people who like studying. After all, sharing code implementations is the #1 ask I have received from the +3,500 readers in these past 8 months.</p><p>Now, to the how. I will share paper implementations and suggestions I find interesting. Every week, I receive many suggestions. And I read a lot of papers. The code I share here will be written in Python. I also like to code in C++, but I believe Python is more suitable for what I intend to write. I plan to share some implementations for free (like this one); I intend to put others on a larger course I want to launch. More on that later.</p><p>Finally, I love how the Gitbook platform works: it's great for creating and sharing code documentation and looks beautiful. In particular, I believe they do a much better job as a code-sharing platform than Substack. Therefore, I will share the implementations on both platforms: here and <a href="https://tutorials.quantitativo.com/momentum-and-trend-following/a-trend-factor">Gitbook</a>. If you are like me, you'll prefer <a href="https://tutorials.quantitativo.com/momentum-and-trend-following/a-trend-factor">Gitbook</a>.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1><strong>Why implement this paper?</strong></h1><p>The idea to write about this paper first appeared when I read another paper: &#8220;<a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5031755">Design Choices, Machine Learning, and the Cross-section of Stock Returns</a>&#8221; by Minghui Chen, Matthias X. Hanauer, and Tobias Kalsbach. The suggestion to read this came from one of <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;QuantSeeker&quot;,&quot;id&quot;:202371574,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80b37bb8-4000-4b6d-9d30-571a9573c33a_6000x6000.jpeg&quot;,&quot;uuid&quot;:&quot;ba7c3c21-447c-4827-89c7-22e2005c489d&quot;}" data-component-name="MentionToDOM"></span> 's great <a href="https://www.quantseeker.com/p/weekly-recap-de9?utm_source=publication-search">weekly recaps</a>.</p><p>There, I found this table on page 33:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dPVa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89eb518d-bdb1-4d9b-b85f-07db729575fb_2048x1685.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dPVa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89eb518d-bdb1-4d9b-b85f-07db729575fb_2048x1685.png 424w, https://substackcdn.com/image/fetch/$s_!dPVa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89eb518d-bdb1-4d9b-b85f-07db729575fb_2048x1685.png 848w, https://substackcdn.com/image/fetch/$s_!dPVa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89eb518d-bdb1-4d9b-b85f-07db729575fb_2048x1685.png 1272w, https://substackcdn.com/image/fetch/$s_!dPVa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89eb518d-bdb1-4d9b-b85f-07db729575fb_2048x1685.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dPVa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89eb518d-bdb1-4d9b-b85f-07db729575fb_2048x1685.png" width="1456" height="1198" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/89eb518d-bdb1-4d9b-b85f-07db729575fb_2048x1685.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1198,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1741003,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dPVa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89eb518d-bdb1-4d9b-b85f-07db729575fb_2048x1685.png 424w, https://substackcdn.com/image/fetch/$s_!dPVa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89eb518d-bdb1-4d9b-b85f-07db729575fb_2048x1685.png 848w, https://substackcdn.com/image/fetch/$s_!dPVa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89eb518d-bdb1-4d9b-b85f-07db729575fb_2048x1685.png 1272w, https://substackcdn.com/image/fetch/$s_!dPVa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89eb518d-bdb1-4d9b-b85f-07db729575fb_2048x1685.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The most important features, according to the paper</figcaption></figure></div><p>Figure 6 also illustrates the same point:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2FwC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdbcaf13-e662-42c5-88d9-1e866089bf7d_1630x1950.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2FwC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdbcaf13-e662-42c5-88d9-1e866089bf7d_1630x1950.png 424w, https://substackcdn.com/image/fetch/$s_!2FwC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdbcaf13-e662-42c5-88d9-1e866089bf7d_1630x1950.png 848w, https://substackcdn.com/image/fetch/$s_!2FwC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdbcaf13-e662-42c5-88d9-1e866089bf7d_1630x1950.png 1272w, https://substackcdn.com/image/fetch/$s_!2FwC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdbcaf13-e662-42c5-88d9-1e866089bf7d_1630x1950.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2FwC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdbcaf13-e662-42c5-88d9-1e866089bf7d_1630x1950.png" width="1456" height="1742" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cdbcaf13-e662-42c5-88d9-1e866089bf7d_1630x1950.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1742,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:698716,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2FwC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdbcaf13-e662-42c5-88d9-1e866089bf7d_1630x1950.png 424w, https://substackcdn.com/image/fetch/$s_!2FwC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdbcaf13-e662-42c5-88d9-1e866089bf7d_1630x1950.png 848w, https://substackcdn.com/image/fetch/$s_!2FwC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdbcaf13-e662-42c5-88d9-1e866089bf7d_1630x1950.png 1272w, https://substackcdn.com/image/fetch/$s_!2FwC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdbcaf13-e662-42c5-88d9-1e866089bf7d_1630x1950.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The most important features, according to the paper</figcaption></figure></div><p>The table and the chart showed this TrendFactor feature as one of the most important predictors in the model. Looking at the references, I discovered that this feature was introduced in the paper "<a href="https://www.sciencedirect.com/science/article/abs/pii/S0304405X16301271">A Trend Factor: Any Economic Gains from Using Information Over Investment Horizons?</a>" by Yufeng Han, Guofu Zhou, and Yingzi Zhu, published in the Journal of Financial Economics (2016).</p><p>Unlike previous studies that examine short-term reversals (daily/monthly), momentum (6-12 months), and long-term reversals (3-5 years) separately, the authors construct a <strong>single factor</strong> that incorporates <strong>all three price trends</strong> using moving averages over different time horizons.</p><p>In the paper, the authors report that the <strong>trend factor</strong> earns an <strong>average return of 1.63% per month</strong>, significantly higher than short-term reversal (0.79%), momentum (0.79%), and long-term reversal (0.34%). It <strong>more than doubles the Sharpe ratios</strong> of existing factors.</p><p>During the <strong>2007-2009 financial crisis</strong>, the trend factor earned <strong>+0.75% per month</strong>, while:</p><ul><li><p>The <strong>market lost -2.03% per month</strong>.</p></li><li><p>The <strong>momentum factor lost -3.88% per month</strong>.</p></li><li><p>The <strong>short-term reversal factor lost -0.82% per month</strong>.</p></li><li><p>The <strong>long-term reversal factor barely gained 0.03%</strong>.</p></li></ul><p>Let's dive into the implementation. You can continue reading here or <a href="https://tutorials.quantitativo.com/momentum-and-trend-following">head to Gitbook</a> for a better reading experience.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://tutorials.quantitativo.com/momentum-and-trend-following&quot;,&quot;text&quot;:&quot;Check this post on Gitbook&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://tutorials.quantitativo.com/momentum-and-trend-following"><span>Check this post on Gitbook</span></a></p><h2><strong>Data</strong></h2><p>The study <strong>uses daily stock prices from January 2, 1926, to December 31, 2014</strong>, obtained from the <strong>Center for Research in Security Prices (CRSP)</strong>.</p><p>Our replication will use daily stock prices from January 1, 1990, to January 1, 2025, obtained from Norgate data. Norgate provides high-quality survivorship bias-free daily data for the US stock market that is very affordable. For more information on how to acquire a Norgate data subscription, please check the <a href="https://norgatedata.com/">Norgate website</a>.</p><p>The paper explains that to compute the trend factor, monthly moving average signals are calculated at the <strong>end of each month</strong>. So, first, let's create a <code>fullcalendar</code> variable, which is a <a href="https://pandas.pydata.org/docs/reference/api/pandas.DatetimeIndex.html">Pandas DatetimeIndex</a> that holds the last trading day of each month:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!APPP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac69a37d-38c2-4b50-a015-52e4c25595f7_1562x338.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!APPP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac69a37d-38c2-4b50-a015-52e4c25595f7_1562x338.png 424w, https://substackcdn.com/image/fetch/$s_!APPP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac69a37d-38c2-4b50-a015-52e4c25595f7_1562x338.png 848w, https://substackcdn.com/image/fetch/$s_!APPP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac69a37d-38c2-4b50-a015-52e4c25595f7_1562x338.png 1272w, https://substackcdn.com/image/fetch/$s_!APPP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac69a37d-38c2-4b50-a015-52e4c25595f7_1562x338.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!APPP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac69a37d-38c2-4b50-a015-52e4c25595f7_1562x338.png" width="1456" height="315" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ac69a37d-38c2-4b50-a015-52e4c25595f7_1562x338.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:315,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:210284,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!APPP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac69a37d-38c2-4b50-a015-52e4c25595f7_1562x338.png 424w, https://substackcdn.com/image/fetch/$s_!APPP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac69a37d-38c2-4b50-a015-52e4c25595f7_1562x338.png 848w, https://substackcdn.com/image/fetch/$s_!APPP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac69a37d-38c2-4b50-a015-52e4c25595f7_1562x338.png 1272w, https://substackcdn.com/image/fetch/$s_!APPP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac69a37d-38c2-4b50-a015-52e4c25595f7_1562x338.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Now, let's see what the paper says about the stock universe:</p><ul><li><p>The dataset includes <strong>all domestic common stocks</strong> listed on NYSE, AMEX and NASDAQ;</p></li><li><p>The dataset excludes Close-end funds, REITs, unit trusts, ADRs and foreign stocks;</p></li><li><p><strong>Price Filter</strong>: Stocks with prices <strong>below $5</strong> at the end of each month are excluded;</p></li><li><p><strong>Size Filter</strong>: Stocks in the <strong>smallest decile</strong> (based on NYSE breakpoints) are excluded.</p></li></ul><p>These filters are applied to <strong>reduce noise and ensure liquidity</strong>, following the methodology used in <strong>Jegadeesh &amp; Titman (1993)</strong> for constructing momentum strategies.</p><p>We will implement something close: we will only consider Russell 3000 current &amp; past constituents. That should address the first, second, and last bullets above. Considering stocks only when they were part of the index also ensures we are not adding survivorship bias. Finally, we will exclude stocks whenever their unadjusted closing price is below $5. Here's how that translates into code for a given <code>symbol</code>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xm7x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F122780ab-f92c-435a-8fe2-bf6d32ead538_1560x1172.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xm7x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F122780ab-f92c-435a-8fe2-bf6d32ead538_1560x1172.png 424w, https://substackcdn.com/image/fetch/$s_!xm7x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F122780ab-f92c-435a-8fe2-bf6d32ead538_1560x1172.png 848w, https://substackcdn.com/image/fetch/$s_!xm7x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F122780ab-f92c-435a-8fe2-bf6d32ead538_1560x1172.png 1272w, https://substackcdn.com/image/fetch/$s_!xm7x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F122780ab-f92c-435a-8fe2-bf6d32ead538_1560x1172.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xm7x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F122780ab-f92c-435a-8fe2-bf6d32ead538_1560x1172.png" width="1456" height="1094" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/122780ab-f92c-435a-8fe2-bf6d32ead538_1560x1172.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1094,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:786741,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xm7x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F122780ab-f92c-435a-8fe2-bf6d32ead538_1560x1172.png 424w, https://substackcdn.com/image/fetch/$s_!xm7x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F122780ab-f92c-435a-8fe2-bf6d32ead538_1560x1172.png 848w, https://substackcdn.com/image/fetch/$s_!xm7x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F122780ab-f92c-435a-8fe2-bf6d32ead538_1560x1172.png 1272w, https://substackcdn.com/image/fetch/$s_!xm7x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F122780ab-f92c-435a-8fe2-bf6d32ead538_1560x1172.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/coding-trend-factor?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/coding-trend-factor?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/coding-trend-factor?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><p>Now, let's compute the moving averages (trend signals). Moving averages are computed at the <strong>end of each month</strong> using stock prices over different lag lengths. The moving average (MA) for stock <em>j</em> with lag <em>L</em> at month <em>t</em> is defined as:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;A_{j,t,L} = \\frac{P_{j,d-L+1} + P_{j,d-L+2} + \\dots + P_{j,d}}{L}&quot;,&quot;id&quot;:&quot;USUKYLWDHG&quot;}" data-component-name="LatexBlockToDOM"></div><p>where $P_{j,d}$ (I know, this is not good&#8230; but Substack does not support inline LaTex&#8230; but Gitbook does, <a href="https://tutorials.quantitativo.com/momentum-and-trend-following">check it out</a>) is the closing price for stock <em>j</em> on the last trading day <em>d</em> of month <em>t</em>, and <em>L</em> is the lag length. Then, we normalize the moving average prices by the closing price on the last trading day of the month: </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\tilde{A}_{j,t,L} = \\frac{A_{j,t,L}}{P_{j,d}}&quot;,&quot;id&quot;:&quot;DVVLYVRTFX&quot;}" data-component-name="LatexBlockToDOM"></div><p>This ensures stationarity and prevents biases from high-priced stocks.</p><p>The paper considers MAs of lag lengths 3-, 5-, 10-, 20-, 50-, 100-, 200-, 400-, 600-, 800- and 1,000-days. Let's see how this translates into code:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ARnV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444a71a7-1975-48cd-a7dd-b0f3bda71a06_1560x176.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ARnV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444a71a7-1975-48cd-a7dd-b0f3bda71a06_1560x176.png 424w, https://substackcdn.com/image/fetch/$s_!ARnV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444a71a7-1975-48cd-a7dd-b0f3bda71a06_1560x176.png 848w, https://substackcdn.com/image/fetch/$s_!ARnV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444a71a7-1975-48cd-a7dd-b0f3bda71a06_1560x176.png 1272w, https://substackcdn.com/image/fetch/$s_!ARnV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444a71a7-1975-48cd-a7dd-b0f3bda71a06_1560x176.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ARnV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444a71a7-1975-48cd-a7dd-b0f3bda71a06_1560x176.png" width="1456" height="164" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/444a71a7-1975-48cd-a7dd-b0f3bda71a06_1560x176.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:164,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:144162,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ARnV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444a71a7-1975-48cd-a7dd-b0f3bda71a06_1560x176.png 424w, https://substackcdn.com/image/fetch/$s_!ARnV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444a71a7-1975-48cd-a7dd-b0f3bda71a06_1560x176.png 848w, https://substackcdn.com/image/fetch/$s_!ARnV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444a71a7-1975-48cd-a7dd-b0f3bda71a06_1560x176.png 1272w, https://substackcdn.com/image/fetch/$s_!ARnV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F444a71a7-1975-48cd-a7dd-b0f3bda71a06_1560x176.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>We are getting to the final steps of the data-gathering stage. Now, we must add the target variable that will be used to predict the monthly expected stock returns cross-sectionally.</p><p>In other words, we must compute the next month return for every date:</p><ol><li><p>First, we gather the prices from a given symbol;</p></li><li><p>Next, we compute the normalized MAs for all lags;</p></li><li><p>Then, we select only the last day of every month and compute the next month's return;</p></li><li><p>Finally, we apply the size/price filters.</p></li></ol><p>We already did (1), (2) and (4). Now, let's see how to do (3):</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sHv_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c02675b-e2e2-4506-8fde-4544fd2b9546_1560x254.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sHv_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c02675b-e2e2-4506-8fde-4544fd2b9546_1560x254.png 424w, https://substackcdn.com/image/fetch/$s_!sHv_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c02675b-e2e2-4506-8fde-4544fd2b9546_1560x254.png 848w, https://substackcdn.com/image/fetch/$s_!sHv_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c02675b-e2e2-4506-8fde-4544fd2b9546_1560x254.png 1272w, https://substackcdn.com/image/fetch/$s_!sHv_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c02675b-e2e2-4506-8fde-4544fd2b9546_1560x254.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sHv_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c02675b-e2e2-4506-8fde-4544fd2b9546_1560x254.png" width="1456" height="237" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c02675b-e2e2-4506-8fde-4544fd2b9546_1560x254.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:237,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:248257,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sHv_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c02675b-e2e2-4506-8fde-4544fd2b9546_1560x254.png 424w, https://substackcdn.com/image/fetch/$s_!sHv_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c02675b-e2e2-4506-8fde-4544fd2b9546_1560x254.png 848w, https://substackcdn.com/image/fetch/$s_!sHv_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c02675b-e2e2-4506-8fde-4544fd2b9546_1560x254.png 1272w, https://substackcdn.com/image/fetch/$s_!sHv_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c02675b-e2e2-4506-8fde-4544fd2b9546_1560x254.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>It's important to observe the correct use of the <code>.shift(x)</code> operator. </p><blockquote><p><code>.shift(1)</code> gets the previous value, while <code>.shift(-1)</code> gets the next value. Messing with these operators is a common source of error in many quant codebases found online.</p></blockquote><p>So, when we run <code>(df['Close'] / df['Close'].shift(1) - 1)</code> , we are computing the current month's return. After that, when we apply <code>.shift(-1)</code> , this results in the next month's return, which is exactly what we need.</p><p>Now, let's put everything together into a method that retrieves data for a given symbol:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9swj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F101bd8ea-87bd-4638-9ae4-2570bd3325e5_1562x1772.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9swj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F101bd8ea-87bd-4638-9ae4-2570bd3325e5_1562x1772.png 424w, https://substackcdn.com/image/fetch/$s_!9swj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F101bd8ea-87bd-4638-9ae4-2570bd3325e5_1562x1772.png 848w, https://substackcdn.com/image/fetch/$s_!9swj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F101bd8ea-87bd-4638-9ae4-2570bd3325e5_1562x1772.png 1272w, https://substackcdn.com/image/fetch/$s_!9swj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F101bd8ea-87bd-4638-9ae4-2570bd3325e5_1562x1772.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9swj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F101bd8ea-87bd-4638-9ae4-2570bd3325e5_1562x1772.png" width="1456" height="1652" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/101bd8ea-87bd-4638-9ae4-2570bd3325e5_1562x1772.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1652,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1469235,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9swj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F101bd8ea-87bd-4638-9ae4-2570bd3325e5_1562x1772.png 424w, https://substackcdn.com/image/fetch/$s_!9swj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F101bd8ea-87bd-4638-9ae4-2570bd3325e5_1562x1772.png 848w, https://substackcdn.com/image/fetch/$s_!9swj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F101bd8ea-87bd-4638-9ae4-2570bd3325e5_1562x1772.png 1272w, https://substackcdn.com/image/fetch/$s_!9swj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F101bd8ea-87bd-4638-9ae4-2570bd3325e5_1562x1772.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The last few lines organize the columns and the index. The index, in particular, is organized in a Multi-level indexing, which is a great Pandas feature to work with higher dimensional data. To more information about MultiIndex / advanced indexing, please check <a href="https://pandas.pydata.org/docs/user_guide/advanced.html">Pandas documentation</a>.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Let's see the data from the past 12 months of AAPL by running <code>get_data('AAPL').tail(12)</code> :</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rcLS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d2dc78-01ca-4e35-b6a0-c4e030278f8e_1960x678.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rcLS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d2dc78-01ca-4e35-b6a0-c4e030278f8e_1960x678.png 424w, https://substackcdn.com/image/fetch/$s_!rcLS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d2dc78-01ca-4e35-b6a0-c4e030278f8e_1960x678.png 848w, https://substackcdn.com/image/fetch/$s_!rcLS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d2dc78-01ca-4e35-b6a0-c4e030278f8e_1960x678.png 1272w, https://substackcdn.com/image/fetch/$s_!rcLS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d2dc78-01ca-4e35-b6a0-c4e030278f8e_1960x678.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rcLS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d2dc78-01ca-4e35-b6a0-c4e030278f8e_1960x678.png" width="1456" height="504" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b6d2dc78-01ca-4e35-b6a0-c4e030278f8e_1960x678.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:504,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:550737,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rcLS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d2dc78-01ca-4e35-b6a0-c4e030278f8e_1960x678.png 424w, https://substackcdn.com/image/fetch/$s_!rcLS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d2dc78-01ca-4e35-b6a0-c4e030278f8e_1960x678.png 848w, https://substackcdn.com/image/fetch/$s_!rcLS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d2dc78-01ca-4e35-b6a0-c4e030278f8e_1960x678.png 1272w, https://substackcdn.com/image/fetch/$s_!rcLS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d2dc78-01ca-4e35-b6a0-c4e030278f8e_1960x678.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Data from the past 12 months of AAPL</figcaption></figure></div><p>We can now gather data for all stocks in the <strong>Russell 3000 universe</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pVGb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ae35ba3-a906-4502-871d-777dd1120bf4_1560x374.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pVGb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ae35ba3-a906-4502-871d-777dd1120bf4_1560x374.png 424w, https://substackcdn.com/image/fetch/$s_!pVGb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ae35ba3-a906-4502-871d-777dd1120bf4_1560x374.png 848w, https://substackcdn.com/image/fetch/$s_!pVGb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ae35ba3-a906-4502-871d-777dd1120bf4_1560x374.png 1272w, https://substackcdn.com/image/fetch/$s_!pVGb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ae35ba3-a906-4502-871d-777dd1120bf4_1560x374.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pVGb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ae35ba3-a906-4502-871d-777dd1120bf4_1560x374.png" width="1456" height="349" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ae35ba3-a906-4502-871d-777dd1120bf4_1560x374.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:349,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:215600,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pVGb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ae35ba3-a906-4502-871d-777dd1120bf4_1560x374.png 424w, https://substackcdn.com/image/fetch/$s_!pVGb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ae35ba3-a906-4502-871d-777dd1120bf4_1560x374.png 848w, https://substackcdn.com/image/fetch/$s_!pVGb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ae35ba3-a906-4502-871d-777dd1120bf4_1560x374.png 1272w, https://substackcdn.com/image/fetch/$s_!pVGb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ae35ba3-a906-4502-871d-777dd1120bf4_1560x374.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The data DataFrame is a table with approximately 800k rows and 12 columns that looks like this:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!m4XH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa6261f3-94f3-40e9-94f2-20151535a3fa_1976x742.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!m4XH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa6261f3-94f3-40e9-94f2-20151535a3fa_1976x742.png 424w, https://substackcdn.com/image/fetch/$s_!m4XH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa6261f3-94f3-40e9-94f2-20151535a3fa_1976x742.png 848w, https://substackcdn.com/image/fetch/$s_!m4XH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa6261f3-94f3-40e9-94f2-20151535a3fa_1976x742.png 1272w, https://substackcdn.com/image/fetch/$s_!m4XH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa6261f3-94f3-40e9-94f2-20151535a3fa_1976x742.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!m4XH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa6261f3-94f3-40e9-94f2-20151535a3fa_1976x742.png" width="1456" height="547" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fa6261f3-94f3-40e9-94f2-20151535a3fa_1976x742.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:547,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:458680,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!m4XH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa6261f3-94f3-40e9-94f2-20151535a3fa_1976x742.png 424w, https://substackcdn.com/image/fetch/$s_!m4XH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa6261f3-94f3-40e9-94f2-20151535a3fa_1976x742.png 848w, https://substackcdn.com/image/fetch/$s_!m4XH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa6261f3-94f3-40e9-94f2-20151535a3fa_1976x742.png 1272w, https://substackcdn.com/image/fetch/$s_!m4XH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa6261f3-94f3-40e9-94f2-20151535a3fa_1976x742.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">DataFrame ready to compute the trend factors</figcaption></figure></div><p>Great! We are ready to move to the next step: compute the trend factors. It's important to highlight how the data is organized:</p><ul><li><p>In the first level of our index, we have the last day of each month;</p></li><li><p>In the second level of our index, we have all stocks in our universe for that particular date;</p></li><li><p>In the columns, we have the MAs computed with the prices up until that specific date for that specific stock, and the next month return for that particular stock.</p></li></ul><h2><strong>Step 1: Cross-sectional regressions</strong></h2><p>To predict the monthly expected stock returns cross-sectionally, we use a two-step procedure. In the first step, we run in each month t<em>t</em> a cross-section regression of stock returns on observed normalized MA signals to obtain the time-series of the coefficients on the signals: </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;r_{j,t} = \\beta_{0,t} + \\sum_{i} \\beta_{i,t} \\tilde{A}_{j,t-1,L_i} + \\varepsilon_{j,t}&quot;,&quot;id&quot;:&quot;YVLELXXLQX&quot;}" data-component-name="LatexBlockToDOM"></div><p>where:</p><ul><li><p>$r_{j,t}=$ return on stock <em>j</em> in month <em>t</em></p></li><li><p>$\tilde{A}_{j,t-1,L_i}=$ trend signal at the end of month <em>t&#8722;1</em> on stock <em>j</em> with lag $L_i$</p></li><li><p>$\beta_{i,t}=$ coefficient of the trend signal with lag $L_i$ in month <em>t</em></p></li><li><p>$\beta_{0,t}=$ intercept in month <em>t</em></p></li></ul><p>To do the regressions, we will use Python's <a href="https://www.statsmodels.org/stable/index.html">Statsmodels package</a>. We loop through all dates, doing the cross-sectional regressions:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8CaF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65fc24b9-4e93-447d-a631-3ee6a0995c65_1558x574.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8CaF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65fc24b9-4e93-447d-a631-3ee6a0995c65_1558x574.png 424w, https://substackcdn.com/image/fetch/$s_!8CaF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65fc24b9-4e93-447d-a631-3ee6a0995c65_1558x574.png 848w, https://substackcdn.com/image/fetch/$s_!8CaF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65fc24b9-4e93-447d-a631-3ee6a0995c65_1558x574.png 1272w, https://substackcdn.com/image/fetch/$s_!8CaF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65fc24b9-4e93-447d-a631-3ee6a0995c65_1558x574.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8CaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65fc24b9-4e93-447d-a631-3ee6a0995c65_1558x574.png" width="1456" height="536" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/65fc24b9-4e93-447d-a631-3ee6a0995c65_1558x574.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:536,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:345901,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8CaF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65fc24b9-4e93-447d-a631-3ee6a0995c65_1558x574.png 424w, https://substackcdn.com/image/fetch/$s_!8CaF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65fc24b9-4e93-447d-a631-3ee6a0995c65_1558x574.png 848w, https://substackcdn.com/image/fetch/$s_!8CaF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65fc24b9-4e93-447d-a631-3ee6a0995c65_1558x574.png 1272w, https://substackcdn.com/image/fetch/$s_!8CaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65fc24b9-4e93-447d-a631-3ee6a0995c65_1558x574.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The code above is straightforward. It produces the coefs DataFrame, a table with close to 400 rows and 12 columns with all \beta_{i,t} coefficients:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gbA3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80442df-a9cc-463d-b80b-29a28b12eea5_1878x634.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gbA3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80442df-a9cc-463d-b80b-29a28b12eea5_1878x634.png 424w, https://substackcdn.com/image/fetch/$s_!gbA3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80442df-a9cc-463d-b80b-29a28b12eea5_1878x634.png 848w, https://substackcdn.com/image/fetch/$s_!gbA3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80442df-a9cc-463d-b80b-29a28b12eea5_1878x634.png 1272w, https://substackcdn.com/image/fetch/$s_!gbA3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80442df-a9cc-463d-b80b-29a28b12eea5_1878x634.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gbA3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80442df-a9cc-463d-b80b-29a28b12eea5_1878x634.png" width="1456" height="492" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f80442df-a9cc-463d-b80b-29a28b12eea5_1878x634.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:492,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:448365,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gbA3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80442df-a9cc-463d-b80b-29a28b12eea5_1878x634.png 424w, https://substackcdn.com/image/fetch/$s_!gbA3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80442df-a9cc-463d-b80b-29a28b12eea5_1878x634.png 848w, https://substackcdn.com/image/fetch/$s_!gbA3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80442df-a9cc-463d-b80b-29a28b12eea5_1878x634.png 1272w, https://substackcdn.com/image/fetch/$s_!gbA3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80442df-a9cc-463d-b80b-29a28b12eea5_1878x634.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Coefficients of the trend signals</figcaption></figure></div><blockquote><p>The paper has the following important sentence: "It should be noted that only information in month ttt or prior is used above to regress returns in month <em>t</em>." This is what the <code>.shift(1)</code> operator in the last line of the last code block is for. Omitting that code would result in lookahead bias and results too good to be true.</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://tutorials.quantitativo.com/momentum-and-trend-following&quot;,&quot;text&quot;:&quot;Check this post on Gitbook&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://tutorials.quantitativo.com/momentum-and-trend-following"><span>Check this post on Gitbook</span></a></p><h2>Step 2: Expected returns</h2><p>We estimate the expected return for month <em>t+1</em> from</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;E_t[r_{j,t+1}]=\\sum_i E_t[\\beta_{i,t+1}] \\tilde{A}_{j,t,L_i}&quot;,&quot;id&quot;:&quot;TBWLRUBBIH&quot;}" data-component-name="LatexBlockToDOM"></div><p>where $E_t[r_{j,t+1}]$ is our forecasted expected return on stock <em>j</em> for month <em>t+1</em> and $E_t[\beta_{i,t+1}]$ is the estimated expected coefficient of the trend signal with lag $L_i$ and is given by</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;E_t[\\beta_{i,t+1}] = \\frac{1}{12}\\sum_{m=1}^{12} \\beta_{i,t+1-m}&quot;,&quot;id&quot;:&quot;KCYMYEOLIL&quot;}" data-component-name="LatexBlockToDOM"></div><p>which is the average of the estimated loadings on the trend signals over the past 12 months.</p><p>First, let's compute the matrix $E_t[\beta_{i,t+1}]$:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7hE-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F326ba0ec-858d-49d2-9aa6-82961064a996_1554x140.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7hE-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F326ba0ec-858d-49d2-9aa6-82961064a996_1554x140.png 424w, https://substackcdn.com/image/fetch/$s_!7hE-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F326ba0ec-858d-49d2-9aa6-82961064a996_1554x140.png 848w, https://substackcdn.com/image/fetch/$s_!7hE-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F326ba0ec-858d-49d2-9aa6-82961064a996_1554x140.png 1272w, https://substackcdn.com/image/fetch/$s_!7hE-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F326ba0ec-858d-49d2-9aa6-82961064a996_1554x140.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7hE-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F326ba0ec-858d-49d2-9aa6-82961064a996_1554x140.png" width="1456" height="131" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/326ba0ec-858d-49d2-9aa6-82961064a996_1554x140.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:131,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:108773,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7hE-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F326ba0ec-858d-49d2-9aa6-82961064a996_1554x140.png 424w, https://substackcdn.com/image/fetch/$s_!7hE-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F326ba0ec-858d-49d2-9aa6-82961064a996_1554x140.png 848w, https://substackcdn.com/image/fetch/$s_!7hE-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F326ba0ec-858d-49d2-9aa6-82961064a996_1554x140.png 1272w, https://substackcdn.com/image/fetch/$s_!7hE-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F326ba0ec-858d-49d2-9aa6-82961064a996_1554x140.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CoSn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16074d28-2e2d-46fe-8f52-004544d4c5da_1700x634.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CoSn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16074d28-2e2d-46fe-8f52-004544d4c5da_1700x634.png 424w, https://substackcdn.com/image/fetch/$s_!CoSn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16074d28-2e2d-46fe-8f52-004544d4c5da_1700x634.png 848w, https://substackcdn.com/image/fetch/$s_!CoSn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16074d28-2e2d-46fe-8f52-004544d4c5da_1700x634.png 1272w, https://substackcdn.com/image/fetch/$s_!CoSn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16074d28-2e2d-46fe-8f52-004544d4c5da_1700x634.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CoSn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16074d28-2e2d-46fe-8f52-004544d4c5da_1700x634.png" width="1456" height="543" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/16074d28-2e2d-46fe-8f52-004544d4c5da_1700x634.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:543,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:416392,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CoSn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16074d28-2e2d-46fe-8f52-004544d4c5da_1700x634.png 424w, https://substackcdn.com/image/fetch/$s_!CoSn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16074d28-2e2d-46fe-8f52-004544d4c5da_1700x634.png 848w, https://substackcdn.com/image/fetch/$s_!CoSn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16074d28-2e2d-46fe-8f52-004544d4c5da_1700x634.png 1272w, https://substackcdn.com/image/fetch/$s_!CoSn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16074d28-2e2d-46fe-8f52-004544d4c5da_1700x634.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Estimated expected coefficients of the trend signals</figcaption></figure></div><p>Note that we do not include an intercept above because it is the same for all stocks in the same cross-section regression, and thus it plays no role in ranking the stocks.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/coding-trend-factor?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/coding-trend-factor?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/coding-trend-factor?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h2><strong>Trend factor</strong></h2><p>Now, we are ready to construct the trend factor. We loop through all dates, performing the dot product between the estimated expected coefficients of the trend signals and the trend signals matrices:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!znrD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db6ab78-3143-4fbb-a528-8f7a4b90ed8f_1562x620.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!znrD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db6ab78-3143-4fbb-a528-8f7a4b90ed8f_1562x620.png 424w, https://substackcdn.com/image/fetch/$s_!znrD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db6ab78-3143-4fbb-a528-8f7a4b90ed8f_1562x620.png 848w, https://substackcdn.com/image/fetch/$s_!znrD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db6ab78-3143-4fbb-a528-8f7a4b90ed8f_1562x620.png 1272w, https://substackcdn.com/image/fetch/$s_!znrD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db6ab78-3143-4fbb-a528-8f7a4b90ed8f_1562x620.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!znrD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db6ab78-3143-4fbb-a528-8f7a4b90ed8f_1562x620.png" width="1456" height="578" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6db6ab78-3143-4fbb-a528-8f7a4b90ed8f_1562x620.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:578,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:389227,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!znrD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db6ab78-3143-4fbb-a528-8f7a4b90ed8f_1562x620.png 424w, https://substackcdn.com/image/fetch/$s_!znrD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db6ab78-3143-4fbb-a528-8f7a4b90ed8f_1562x620.png 848w, https://substackcdn.com/image/fetch/$s_!znrD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db6ab78-3143-4fbb-a528-8f7a4b90ed8f_1562x620.png 1272w, https://substackcdn.com/image/fetch/$s_!znrD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6db6ab78-3143-4fbb-a528-8f7a4b90ed8f_1562x620.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>And that's all there is to it. We get the following table, with approximately 800k rows and 4 columns:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZLlQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fb83bbc-68ad-4ac8-bc75-8103c0538b1e_914x632.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZLlQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fb83bbc-68ad-4ac8-bc75-8103c0538b1e_914x632.png 424w, https://substackcdn.com/image/fetch/$s_!ZLlQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fb83bbc-68ad-4ac8-bc75-8103c0538b1e_914x632.png 848w, https://substackcdn.com/image/fetch/$s_!ZLlQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fb83bbc-68ad-4ac8-bc75-8103c0538b1e_914x632.png 1272w, https://substackcdn.com/image/fetch/$s_!ZLlQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fb83bbc-68ad-4ac8-bc75-8103c0538b1e_914x632.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZLlQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fb83bbc-68ad-4ac8-bc75-8103c0538b1e_914x632.png" width="914" height="632" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8fb83bbc-68ad-4ac8-bc75-8103c0538b1e_914x632.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:632,&quot;width&quot;:914,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:175032,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZLlQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fb83bbc-68ad-4ac8-bc75-8103c0538b1e_914x632.png 424w, https://substackcdn.com/image/fetch/$s_!ZLlQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fb83bbc-68ad-4ac8-bc75-8103c0538b1e_914x632.png 848w, https://substackcdn.com/image/fetch/$s_!ZLlQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fb83bbc-68ad-4ac8-bc75-8103c0538b1e_914x632.png 1272w, https://substackcdn.com/image/fetch/$s_!ZLlQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8fb83bbc-68ad-4ac8-bc75-8103c0538b1e_914x632.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Trend factors for every symbol-date pair</figcaption></figure></div><p>In our last step, we sort all stocks into five portfolios by their expected returns. The portfolios are equal-weighted and rebalanced every month. The return difference between the quintile portfolio of the highest expected returns and the quintile portfolio of the lowest is defined as the return on the trend factor. Intuitively, the trend factor buys stocks that are forecasted to yield the highest expected returns (Buy High) and shorts stocks that are forecasted to yield the lowest expected returns (Sell Low).</p><p>Adding the quantiles is straightforward:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yCFD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9706b7ee-1f6c-47f9-a376-450db6b2a53e_1558x336.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yCFD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9706b7ee-1f6c-47f9-a376-450db6b2a53e_1558x336.png 424w, https://substackcdn.com/image/fetch/$s_!yCFD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9706b7ee-1f6c-47f9-a376-450db6b2a53e_1558x336.png 848w, https://substackcdn.com/image/fetch/$s_!yCFD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9706b7ee-1f6c-47f9-a376-450db6b2a53e_1558x336.png 1272w, https://substackcdn.com/image/fetch/$s_!yCFD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9706b7ee-1f6c-47f9-a376-450db6b2a53e_1558x336.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yCFD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9706b7ee-1f6c-47f9-a376-450db6b2a53e_1558x336.png" width="1456" height="314" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9706b7ee-1f6c-47f9-a376-450db6b2a53e_1558x336.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:314,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:324046,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yCFD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9706b7ee-1f6c-47f9-a376-450db6b2a53e_1558x336.png 424w, https://substackcdn.com/image/fetch/$s_!yCFD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9706b7ee-1f6c-47f9-a376-450db6b2a53e_1558x336.png 848w, https://substackcdn.com/image/fetch/$s_!yCFD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9706b7ee-1f6c-47f9-a376-450db6b2a53e_1558x336.png 1272w, https://substackcdn.com/image/fetch/$s_!yCFD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9706b7ee-1f6c-47f9-a376-450db6b2a53e_1558x336.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The code above produces the following table:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k1il!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff3e9a0e-da26-4bbb-a643-d01142c3d9c1_1170x632.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k1il!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff3e9a0e-da26-4bbb-a643-d01142c3d9c1_1170x632.png 424w, https://substackcdn.com/image/fetch/$s_!k1il!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff3e9a0e-da26-4bbb-a643-d01142c3d9c1_1170x632.png 848w, https://substackcdn.com/image/fetch/$s_!k1il!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff3e9a0e-da26-4bbb-a643-d01142c3d9c1_1170x632.png 1272w, https://substackcdn.com/image/fetch/$s_!k1il!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff3e9a0e-da26-4bbb-a643-d01142c3d9c1_1170x632.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k1il!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff3e9a0e-da26-4bbb-a643-d01142c3d9c1_1170x632.png" width="1170" height="632" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ff3e9a0e-da26-4bbb-a643-d01142c3d9c1_1170x632.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:632,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:220202,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k1il!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff3e9a0e-da26-4bbb-a643-d01142c3d9c1_1170x632.png 424w, https://substackcdn.com/image/fetch/$s_!k1il!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff3e9a0e-da26-4bbb-a643-d01142c3d9c1_1170x632.png 848w, https://substackcdn.com/image/fetch/$s_!k1il!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff3e9a0e-da26-4bbb-a643-d01142c3d9c1_1170x632.png 1272w, https://substackcdn.com/image/fetch/$s_!k1il!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff3e9a0e-da26-4bbb-a643-d01142c3d9c1_1170x632.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Trend factor quantiles</figcaption></figure></div><p>Now, we group by date:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nvOZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad3d98f-2632-4e35-9f35-4eec4790147c_1556x338.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nvOZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad3d98f-2632-4e35-9f35-4eec4790147c_1556x338.png 424w, https://substackcdn.com/image/fetch/$s_!nvOZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad3d98f-2632-4e35-9f35-4eec4790147c_1556x338.png 848w, https://substackcdn.com/image/fetch/$s_!nvOZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad3d98f-2632-4e35-9f35-4eec4790147c_1556x338.png 1272w, https://substackcdn.com/image/fetch/$s_!nvOZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad3d98f-2632-4e35-9f35-4eec4790147c_1556x338.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nvOZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad3d98f-2632-4e35-9f35-4eec4790147c_1556x338.png" width="1456" height="316" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dad3d98f-2632-4e35-9f35-4eec4790147c_1556x338.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:316,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:390140,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nvOZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad3d98f-2632-4e35-9f35-4eec4790147c_1556x338.png 424w, https://substackcdn.com/image/fetch/$s_!nvOZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad3d98f-2632-4e35-9f35-4eec4790147c_1556x338.png 848w, https://substackcdn.com/image/fetch/$s_!nvOZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad3d98f-2632-4e35-9f35-4eec4790147c_1556x338.png 1272w, https://substackcdn.com/image/fetch/$s_!nvOZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad3d98f-2632-4e35-9f35-4eec4790147c_1556x338.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The rets DataFrame has the monthly returns and the number of stocks from each quantile, as we can see below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4cna!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13586477-527d-4b47-8924-a5f82542b06b_1218x734.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4cna!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13586477-527d-4b47-8924-a5f82542b06b_1218x734.png 424w, https://substackcdn.com/image/fetch/$s_!4cna!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13586477-527d-4b47-8924-a5f82542b06b_1218x734.png 848w, https://substackcdn.com/image/fetch/$s_!4cna!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13586477-527d-4b47-8924-a5f82542b06b_1218x734.png 1272w, https://substackcdn.com/image/fetch/$s_!4cna!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13586477-527d-4b47-8924-a5f82542b06b_1218x734.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4cna!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13586477-527d-4b47-8924-a5f82542b06b_1218x734.png" width="1218" height="734" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/13586477-527d-4b47-8924-a5f82542b06b_1218x734.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:734,&quot;width&quot;:1218,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:300392,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4cna!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13586477-527d-4b47-8924-a5f82542b06b_1218x734.png 424w, https://substackcdn.com/image/fetch/$s_!4cna!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13586477-527d-4b47-8924-a5f82542b06b_1218x734.png 848w, https://substackcdn.com/image/fetch/$s_!4cna!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13586477-527d-4b47-8924-a5f82542b06b_1218x734.png 1272w, https://substackcdn.com/image/fetch/$s_!4cna!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13586477-527d-4b47-8924-a5f82542b06b_1218x734.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Final results</figcaption></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://tutorials.quantitativo.com/momentum-and-trend-following&quot;,&quot;text&quot;:&quot;Check this post on Gitbook&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://tutorials.quantitativo.com/momentum-and-trend-following"><span>Check this post on Gitbook</span></a></p><h1>Visualizing the results</h1><p>Finally, we can plot the return of the trend factor:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RbGX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F813f3f45-f4ad-4916-aa0f-1cde9cd82286_1562x182.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RbGX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F813f3f45-f4ad-4916-aa0f-1cde9cd82286_1562x182.png 424w, https://substackcdn.com/image/fetch/$s_!RbGX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F813f3f45-f4ad-4916-aa0f-1cde9cd82286_1562x182.png 848w, https://substackcdn.com/image/fetch/$s_!RbGX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F813f3f45-f4ad-4916-aa0f-1cde9cd82286_1562x182.png 1272w, https://substackcdn.com/image/fetch/$s_!RbGX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F813f3f45-f4ad-4916-aa0f-1cde9cd82286_1562x182.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RbGX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F813f3f45-f4ad-4916-aa0f-1cde9cd82286_1562x182.png" width="1456" height="170" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/813f3f45-f4ad-4916-aa0f-1cde9cd82286_1562x182.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:170,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:133577,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RbGX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F813f3f45-f4ad-4916-aa0f-1cde9cd82286_1562x182.png 424w, https://substackcdn.com/image/fetch/$s_!RbGX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F813f3f45-f4ad-4916-aa0f-1cde9cd82286_1562x182.png 848w, https://substackcdn.com/image/fetch/$s_!RbGX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F813f3f45-f4ad-4916-aa0f-1cde9cd82286_1562x182.png 1272w, https://substackcdn.com/image/fetch/$s_!RbGX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F813f3f45-f4ad-4916-aa0f-1cde9cd82286_1562x182.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Looking at this equity curve, we see that the factor performs until 2016. After that, it's basically flat. If we reduce the exposure on the shorts to 0.5 instead of 1, we can get a better equity curve. </p><p>Adding a bit of formatting, we get the following:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-6kJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0093bd2-f0a9-4ebc-a9d0-c31f1da0d423_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-6kJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0093bd2-f0a9-4ebc-a9d0-c31f1da0d423_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!-6kJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0093bd2-f0a9-4ebc-a9d0-c31f1da0d423_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!-6kJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0093bd2-f0a9-4ebc-a9d0-c31f1da0d423_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!-6kJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0093bd2-f0a9-4ebc-a9d0-c31f1da0d423_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-6kJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0093bd2-f0a9-4ebc-a9d0-c31f1da0d423_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e0093bd2-f0a9-4ebc-a9d0-c31f1da0d423_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:635118,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-6kJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0093bd2-f0a9-4ebc-a9d0-c31f1da0d423_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!-6kJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0093bd2-f0a9-4ebc-a9d0-c31f1da0d423_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!-6kJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0093bd2-f0a9-4ebc-a9d0-c31f1da0d423_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!-6kJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0093bd2-f0a9-4ebc-a9d0-c31f1da0d423_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">TrendFactor equity curve</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bKn4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a7ef91-cacb-4921-bd19-bf8c1ab87662_1074x940.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bKn4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a7ef91-cacb-4921-bd19-bf8c1ab87662_1074x940.png 424w, https://substackcdn.com/image/fetch/$s_!bKn4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a7ef91-cacb-4921-bd19-bf8c1ab87662_1074x940.png 848w, https://substackcdn.com/image/fetch/$s_!bKn4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a7ef91-cacb-4921-bd19-bf8c1ab87662_1074x940.png 1272w, https://substackcdn.com/image/fetch/$s_!bKn4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a7ef91-cacb-4921-bd19-bf8c1ab87662_1074x940.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bKn4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a7ef91-cacb-4921-bd19-bf8c1ab87662_1074x940.png" width="1074" height="940" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a2a7ef91-cacb-4921-bd19-bf8c1ab87662_1074x940.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:940,&quot;width&quot;:1074,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:211447,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bKn4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a7ef91-cacb-4921-bd19-bf8c1ab87662_1074x940.png 424w, https://substackcdn.com/image/fetch/$s_!bKn4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a7ef91-cacb-4921-bd19-bf8c1ab87662_1074x940.png 848w, https://substackcdn.com/image/fetch/$s_!bKn4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a7ef91-cacb-4921-bd19-bf8c1ab87662_1074x940.png 1272w, https://substackcdn.com/image/fetch/$s_!bKn4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2a7ef91-cacb-4921-bd19-bf8c1ab87662_1074x940.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest statistics</figcaption></figure></div><p>We can also see the average return per quantile:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!v35g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3050480b-bd7f-4059-897a-4286102b2b61_1978x1250.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v35g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3050480b-bd7f-4059-897a-4286102b2b61_1978x1250.png 424w, https://substackcdn.com/image/fetch/$s_!v35g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3050480b-bd7f-4059-897a-4286102b2b61_1978x1250.png 848w, https://substackcdn.com/image/fetch/$s_!v35g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3050480b-bd7f-4059-897a-4286102b2b61_1978x1250.png 1272w, https://substackcdn.com/image/fetch/$s_!v35g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3050480b-bd7f-4059-897a-4286102b2b61_1978x1250.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v35g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3050480b-bd7f-4059-897a-4286102b2b61_1978x1250.png" width="1456" height="920" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3050480b-bd7f-4059-897a-4286102b2b61_1978x1250.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:920,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:159043,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!v35g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3050480b-bd7f-4059-897a-4286102b2b61_1978x1250.png 424w, https://substackcdn.com/image/fetch/$s_!v35g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3050480b-bd7f-4059-897a-4286102b2b61_1978x1250.png 848w, https://substackcdn.com/image/fetch/$s_!v35g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3050480b-bd7f-4059-897a-4286102b2b61_1978x1250.png 1272w, https://substackcdn.com/image/fetch/$s_!v35g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3050480b-bd7f-4059-897a-4286102b2b61_1978x1250.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Returns for each quantile</figcaption></figure></div><p>And finally, we can see the monthly and annual returns:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iN9I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b6f4e6-c493-40a7-a165-5032ff5c941c_1412x1628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iN9I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b6f4e6-c493-40a7-a165-5032ff5c941c_1412x1628.png 424w, https://substackcdn.com/image/fetch/$s_!iN9I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b6f4e6-c493-40a7-a165-5032ff5c941c_1412x1628.png 848w, https://substackcdn.com/image/fetch/$s_!iN9I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b6f4e6-c493-40a7-a165-5032ff5c941c_1412x1628.png 1272w, https://substackcdn.com/image/fetch/$s_!iN9I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b6f4e6-c493-40a7-a165-5032ff5c941c_1412x1628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iN9I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b6f4e6-c493-40a7-a165-5032ff5c941c_1412x1628.png" width="1412" height="1628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/46b6f4e6-c493-40a7-a165-5032ff5c941c_1412x1628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1628,&quot;width&quot;:1412,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1834463,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iN9I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b6f4e6-c493-40a7-a165-5032ff5c941c_1412x1628.png 424w, https://substackcdn.com/image/fetch/$s_!iN9I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b6f4e6-c493-40a7-a165-5032ff5c941c_1412x1628.png 848w, https://substackcdn.com/image/fetch/$s_!iN9I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b6f4e6-c493-40a7-a165-5032ff5c941c_1412x1628.png 1272w, https://substackcdn.com/image/fetch/$s_!iN9I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46b6f4e6-c493-40a7-a165-5032ff5c941c_1412x1628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><h2><strong>Conclusion</strong></h2><p>This paper introduces a <strong>trend factor</strong> that synthesizes short-, intermediate-, and long-term price trends using moving averages, significantly outperforming traditional factors like <strong>momentum, short-term reversal, and long-term reversal</strong>. The trend factor provides <strong>higher returns, better risk-adjusted performance, and reduced crash risk</strong>, making it a valuable addition to both asset pricing models and portfolio construction strategies.</p><p>Implementing this approach in <strong>Python</strong> is a <strong>good exercise</strong> in <strong>quantitative finance and systematic trading</strong>. It allows practitioners to explore <strong>data handling, time-series analysis, and cross-sectional regressions</strong> using libraries such as <strong>Pandas, NumPy, and Statsmodels</strong>. Coding this methodology in Python is a practical way to deepen one&#8217;s understanding of <strong>factor-based investing and trend-following strategies</strong>.</p><p>I'd love to hear your thoughts about this. If you have any questions or comments, <strong>just reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a></strong>. Also, I would love if you could answer a few questions about the content I am sharing: this is useful in determining what to share in the next articles, and how:</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/survey/2136497?token=&quot;,&quot;text&quot;:&quot;What Type of Content Interests You Most?&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/survey/2136497?token="><span>What Type of Content Interests You Most?</span></a></p><p>Cheers!</p><p></p>]]></content:encoded></item><item><title><![CDATA[Intraday Momentum for ES and NQ]]></title><description><![CDATA[A system that delivered +1.5 Sharpe ratio over the past 15 years]]></description><link>https://www.quantitativo.com/p/intraday-momentum-for-es-and-nq</link><guid isPermaLink="false">https://www.quantitativo.com/p/intraday-momentum-for-es-and-nq</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Thu, 16 Jan 2025 16:53:46 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lsfe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feee8434c-df77-47f4-a339-09165194493a_1200x880.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lsfe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feee8434c-df77-47f4-a339-09165194493a_1200x880.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lsfe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feee8434c-df77-47f4-a339-09165194493a_1200x880.png 424w, https://substackcdn.com/image/fetch/$s_!lsfe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feee8434c-df77-47f4-a339-09165194493a_1200x880.png 848w, https://substackcdn.com/image/fetch/$s_!lsfe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feee8434c-df77-47f4-a339-09165194493a_1200x880.png 1272w, https://substackcdn.com/image/fetch/$s_!lsfe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feee8434c-df77-47f4-a339-09165194493a_1200x880.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lsfe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feee8434c-df77-47f4-a339-09165194493a_1200x880.png" width="1200" height="880" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eee8434c-df77-47f4-a339-09165194493a_1200x880.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:880,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1911310,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lsfe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feee8434c-df77-47f4-a339-09165194493a_1200x880.png 424w, https://substackcdn.com/image/fetch/$s_!lsfe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feee8434c-df77-47f4-a339-09165194493a_1200x880.png 848w, https://substackcdn.com/image/fetch/$s_!lsfe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feee8434c-df77-47f4-a339-09165194493a_1200x880.png 1272w, https://substackcdn.com/image/fetch/$s_!lsfe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feee8434c-df77-47f4-a339-09165194493a_1200x880.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Master Isaac Newton in His Garden at Woolsthorpe, in the Autumn of 1665</figcaption></figure></div><h1>The idea</h1><blockquote><p>"If I have seen further, it is by standing on the shoulders of giants.&#8221; Sir Isaac Newton.</p></blockquote><p>First of all, Happy New Year! When I started Quantitativo a few months ago, I could never expect to gather such an amazing group of like-minded people in such a short time. Your enthusiasm, curiosity, and engagement have made this journey incredibly rewarding and inspiring.</p><p>Reflecting on the many, many messages I've received since I published the first article, the number 1 request has been to share more details and possibly the source code. I am working on that - more news on that front soon.</p><p>Starting this year, I decided to write about my implementation of popular papers in the field. So, starting with this article, I will implement a paper every once in a while, reproduce the results achieved by the research, and then try to contribute by adding original ideas on top of what has been built. The idea is to stand on the shoulders of giants, as Sir Isaac Newton put it.</p><p>The first paper for which I will share my implementation and some potential improvements is titled '<a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4824172">Beat the Market: An Effective Intraday Momentum Strategy for S&amp;P500 ETF</a>,' by Carlo Zarattini, Andrew Aziz, and Andrea Barbon. The reasons for this particular choice are:</p><ul><li><p>Many readers asked about my take on this work;</p></li><li><p>I am particularly interested in developing more trend-following/momentum strategies.</p></li></ul><p>So, here's our plan:</p><ol><li><p>First, we will quickly summarize the strategy as described in the paper;</p></li><li><p>Then, we will evaluate if the edge is statistically significant;</p></li><li><p>Then, we will replicate the backtest results presented in the paper;</p></li><li><p>Finally, we will propose some improvements.</p></li></ol><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1>Strategy summary</h1><p>The strategy's core idea is to exploits intraday trends caused by demand/supply imbalances, avoiding periods of market noise. In a nutshell:</p><ul><li><p><strong>Key Elements</strong>:</p><ul><li><p>The authors define a <strong>Noise Area</strong> using past intraday price movements over 14 days;</p></li><li><p>Trades are initiated when the price moves outside this area, indicating significant demand/supply imbalance;</p></li><li><p>Positions are closed either at the market close or when the price reverses back into the Noise Area.</p></li></ul></li><li><p><strong>Trailing Stops</strong>:</p><ul><li><p>Enhanced risk management includes dynamic stops based on the Noise Area boundaries or VWAP (Volume-Weighted Average Price).</p></li></ul></li><li><p><strong>Risk Adjustment</strong>:</p><ul><li><p>Positions are adjusted based on recent market volatility, targeting consistent risk exposure.</p></li></ul></li></ul><p>Here's some trade examples:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oeQD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0131088-b1e4-4f94-a756-97fd58fcaee1_2048x1383.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oeQD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0131088-b1e4-4f94-a756-97fd58fcaee1_2048x1383.png 424w, https://substackcdn.com/image/fetch/$s_!oeQD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0131088-b1e4-4f94-a756-97fd58fcaee1_2048x1383.png 848w, https://substackcdn.com/image/fetch/$s_!oeQD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0131088-b1e4-4f94-a756-97fd58fcaee1_2048x1383.png 1272w, https://substackcdn.com/image/fetch/$s_!oeQD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0131088-b1e4-4f94-a756-97fd58fcaee1_2048x1383.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oeQD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0131088-b1e4-4f94-a756-97fd58fcaee1_2048x1383.png" width="1456" height="983" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c0131088-b1e4-4f94-a756-97fd58fcaee1_2048x1383.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:983,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:822069,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oeQD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0131088-b1e4-4f94-a756-97fd58fcaee1_2048x1383.png 424w, https://substackcdn.com/image/fetch/$s_!oeQD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0131088-b1e4-4f94-a756-97fd58fcaee1_2048x1383.png 848w, https://substackcdn.com/image/fetch/$s_!oeQD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0131088-b1e4-4f94-a756-97fd58fcaee1_2048x1383.png 1272w, https://substackcdn.com/image/fetch/$s_!oeQD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0131088-b1e4-4f94-a756-97fd58fcaee1_2048x1383.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Long trade example - Jan-31st 2022</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!j6Ec!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7208935-0860-418b-8483-307db6bb3ef8_2048x1383.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!j6Ec!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7208935-0860-418b-8483-307db6bb3ef8_2048x1383.png 424w, https://substackcdn.com/image/fetch/$s_!j6Ec!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7208935-0860-418b-8483-307db6bb3ef8_2048x1383.png 848w, https://substackcdn.com/image/fetch/$s_!j6Ec!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7208935-0860-418b-8483-307db6bb3ef8_2048x1383.png 1272w, https://substackcdn.com/image/fetch/$s_!j6Ec!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7208935-0860-418b-8483-307db6bb3ef8_2048x1383.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!j6Ec!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7208935-0860-418b-8483-307db6bb3ef8_2048x1383.png" width="1456" height="983" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d7208935-0860-418b-8483-307db6bb3ef8_2048x1383.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:983,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:748744,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!j6Ec!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7208935-0860-418b-8483-307db6bb3ef8_2048x1383.png 424w, https://substackcdn.com/image/fetch/$s_!j6Ec!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7208935-0860-418b-8483-307db6bb3ef8_2048x1383.png 848w, https://substackcdn.com/image/fetch/$s_!j6Ec!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7208935-0860-418b-8483-307db6bb3ef8_2048x1383.png 1272w, https://substackcdn.com/image/fetch/$s_!j6Ec!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7208935-0860-418b-8483-307db6bb3ef8_2048x1383.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Short trade example - Apr-29th 2022</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q_su!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff350e250-0379-408c-8cdb-37428f256808_2048x1393.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q_su!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff350e250-0379-408c-8cdb-37428f256808_2048x1393.png 424w, https://substackcdn.com/image/fetch/$s_!Q_su!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff350e250-0379-408c-8cdb-37428f256808_2048x1393.png 848w, https://substackcdn.com/image/fetch/$s_!Q_su!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff350e250-0379-408c-8cdb-37428f256808_2048x1393.png 1272w, https://substackcdn.com/image/fetch/$s_!Q_su!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff350e250-0379-408c-8cdb-37428f256808_2048x1393.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q_su!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff350e250-0379-408c-8cdb-37428f256808_2048x1393.png" width="1456" height="990" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f350e250-0379-408c-8cdb-37428f256808_2048x1393.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:990,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:824881,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Q_su!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff350e250-0379-408c-8cdb-37428f256808_2048x1393.png 424w, https://substackcdn.com/image/fetch/$s_!Q_su!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff350e250-0379-408c-8cdb-37428f256808_2048x1393.png 848w, https://substackcdn.com/image/fetch/$s_!Q_su!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff350e250-0379-408c-8cdb-37428f256808_2048x1393.png 1272w, https://substackcdn.com/image/fetch/$s_!Q_su!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff350e250-0379-408c-8cdb-37428f256808_2048x1393.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Long trade activating VWAP stop-loss example - Jan-20th 2022</figcaption></figure></div><p>For more details on how to implement the rules, please check the paper.</p><h1>The edge</h1><p>Let's start the analysis by evaluating what would have happened if we had took all long &amp; short opportunities according to the rules above.</p><p>Important: for the analysis, we used Databento's minute data since 2010. In all numbers, we considered 1 tick in slippage, IBKR's fixed commissions and exchange fees.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!skkw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a34780-f9cc-4835-901a-8e4d63b3c09a_1280x732.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!skkw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a34780-f9cc-4835-901a-8e4d63b3c09a_1280x732.png 424w, https://substackcdn.com/image/fetch/$s_!skkw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a34780-f9cc-4835-901a-8e4d63b3c09a_1280x732.png 848w, https://substackcdn.com/image/fetch/$s_!skkw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a34780-f9cc-4835-901a-8e4d63b3c09a_1280x732.png 1272w, https://substackcdn.com/image/fetch/$s_!skkw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a34780-f9cc-4835-901a-8e4d63b3c09a_1280x732.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!skkw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a34780-f9cc-4835-901a-8e4d63b3c09a_1280x732.png" width="1280" height="732" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d9a34780-f9cc-4835-901a-8e4d63b3c09a_1280x732.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:732,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:158688,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!skkw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a34780-f9cc-4835-901a-8e4d63b3c09a_1280x732.png 424w, https://substackcdn.com/image/fetch/$s_!skkw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a34780-f9cc-4835-901a-8e4d63b3c09a_1280x732.png 848w, https://substackcdn.com/image/fetch/$s_!skkw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a34780-f9cc-4835-901a-8e4d63b3c09a_1280x732.png 1272w, https://substackcdn.com/image/fetch/$s_!skkw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd9a34780-f9cc-4835-901a-8e4d63b3c09a_1280x732.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Statistics of trading all opportunities (long &amp; short) from 2010 to today</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6pF0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c527e6-a3d3-4213-b54a-197c02d79d67_1280x732.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6pF0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c527e6-a3d3-4213-b54a-197c02d79d67_1280x732.png 424w, https://substackcdn.com/image/fetch/$s_!6pF0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c527e6-a3d3-4213-b54a-197c02d79d67_1280x732.png 848w, https://substackcdn.com/image/fetch/$s_!6pF0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c527e6-a3d3-4213-b54a-197c02d79d67_1280x732.png 1272w, https://substackcdn.com/image/fetch/$s_!6pF0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c527e6-a3d3-4213-b54a-197c02d79d67_1280x732.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6pF0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c527e6-a3d3-4213-b54a-197c02d79d67_1280x732.png" width="1280" height="732" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80c527e6-a3d3-4213-b54a-197c02d79d67_1280x732.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:732,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:161316,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6pF0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c527e6-a3d3-4213-b54a-197c02d79d67_1280x732.png 424w, https://substackcdn.com/image/fetch/$s_!6pF0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c527e6-a3d3-4213-b54a-197c02d79d67_1280x732.png 848w, https://substackcdn.com/image/fetch/$s_!6pF0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c527e6-a3d3-4213-b54a-197c02d79d67_1280x732.png 1272w, https://substackcdn.com/image/fetch/$s_!6pF0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80c527e6-a3d3-4213-b54a-197c02d79d67_1280x732.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Statistics of trading all long opportunities from 2010 to today</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LNaq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18198448-500b-4f87-87df-1cad7c516d51_1280x718.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LNaq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18198448-500b-4f87-87df-1cad7c516d51_1280x718.png 424w, https://substackcdn.com/image/fetch/$s_!LNaq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18198448-500b-4f87-87df-1cad7c516d51_1280x718.png 848w, https://substackcdn.com/image/fetch/$s_!LNaq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18198448-500b-4f87-87df-1cad7c516d51_1280x718.png 1272w, https://substackcdn.com/image/fetch/$s_!LNaq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18198448-500b-4f87-87df-1cad7c516d51_1280x718.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LNaq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18198448-500b-4f87-87df-1cad7c516d51_1280x718.png" width="1280" height="718" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/18198448-500b-4f87-87df-1cad7c516d51_1280x718.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:718,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:162495,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LNaq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18198448-500b-4f87-87df-1cad7c516d51_1280x718.png 424w, https://substackcdn.com/image/fetch/$s_!LNaq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18198448-500b-4f87-87df-1cad7c516d51_1280x718.png 848w, https://substackcdn.com/image/fetch/$s_!LNaq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18198448-500b-4f87-87df-1cad7c516d51_1280x718.png 1272w, https://substackcdn.com/image/fetch/$s_!LNaq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18198448-500b-4f87-87df-1cad7c516d51_1280x718.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Statistics of trading all short opportunities from 2010 to today</figcaption></figure></div><p>Highlights:</p><ul><li><p>Overall, taking all trade opportunities has a positive expected return per trade (after costs) of +4 bps (+6 bps longs, +3 bps shorts)</p></li><li><p>The win ratio is 39% (43% longs, 34% shorts)</p></li><li><p>The payoff ratio is approximately 2:1 (shorts over 2:1)</p></li></ul><p>Now, let's check the overall stats of non-events: what would have happened if we had traded all days when the entry signal was not triggered (long and short)?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tXRL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b12efff-962b-4b25-9235-05985dce4774_1282x724.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tXRL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b12efff-962b-4b25-9235-05985dce4774_1282x724.png 424w, https://substackcdn.com/image/fetch/$s_!tXRL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b12efff-962b-4b25-9235-05985dce4774_1282x724.png 848w, https://substackcdn.com/image/fetch/$s_!tXRL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b12efff-962b-4b25-9235-05985dce4774_1282x724.png 1272w, https://substackcdn.com/image/fetch/$s_!tXRL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b12efff-962b-4b25-9235-05985dce4774_1282x724.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tXRL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b12efff-962b-4b25-9235-05985dce4774_1282x724.png" width="1282" height="724" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b12efff-962b-4b25-9235-05985dce4774_1282x724.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:724,&quot;width&quot;:1282,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:164826,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tXRL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b12efff-962b-4b25-9235-05985dce4774_1282x724.png 424w, https://substackcdn.com/image/fetch/$s_!tXRL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b12efff-962b-4b25-9235-05985dce4774_1282x724.png 848w, https://substackcdn.com/image/fetch/$s_!tXRL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b12efff-962b-4b25-9235-05985dce4774_1282x724.png 1272w, https://substackcdn.com/image/fetch/$s_!tXRL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b12efff-962b-4b25-9235-05985dce4774_1282x724.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Statistics of non-events</figcaption></figure></div><p>As expected, trading non-events would be a coin-flip. But most importantly, the <strong>P-value is well below 0.05</strong>: the means of the two distributions are <strong>significantly different</strong>. So, we have an edge.</p><p>Now, let's see how this strategy backtests from 2010 to today.</p><h1>Experiments</h1><p>Our first experiment is the implementation of the paper, but with the following changes:</p><ul><li><p>Instead of using SPY ETF, we use ES futures contract (always the most liquid contract)</p></li><li><p>Instead of considering the trading costs as presented in the paper, we used $0.85/contract in commissions + $1.40/contract in fees (per transaction, i.e., we multiply by 2 for every trade), and 0.25 tick in slippage in every transaction (i.e., 0.5 tick per trade)</p></li></ul><p>All the other rules are kept as presented in the paper. Important: we apply the 2% target daily market volatility, capping the leverage at 4x as the authors did.</p><p>Here are the first results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mp5Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34362ccc-c9ca-41b8-a8ca-e8f03a346b44_1520x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mp5Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34362ccc-c9ca-41b8-a8ca-e8f03a346b44_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!mp5Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34362ccc-c9ca-41b8-a8ca-e8f03a346b44_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!mp5Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34362ccc-c9ca-41b8-a8ca-e8f03a346b44_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!mp5Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34362ccc-c9ca-41b8-a8ca-e8f03a346b44_1520x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mp5Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34362ccc-c9ca-41b8-a8ca-e8f03a346b44_1520x1472.png" width="1456" height="1410" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/34362ccc-c9ca-41b8-a8ca-e8f03a346b44_1520x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1410,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:705934,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mp5Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34362ccc-c9ca-41b8-a8ca-e8f03a346b44_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!mp5Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34362ccc-c9ca-41b8-a8ca-e8f03a346b44_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!mp5Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34362ccc-c9ca-41b8-a8ca-e8f03a346b44_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!mp5Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34362ccc-c9ca-41b8-a8ca-e8f03a346b44_1520x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the first experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Cepb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846b4e4c-7baf-4b43-b27a-0b52b158f8cb_1070x1334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Cepb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846b4e4c-7baf-4b43-b27a-0b52b158f8cb_1070x1334.png 424w, https://substackcdn.com/image/fetch/$s_!Cepb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846b4e4c-7baf-4b43-b27a-0b52b158f8cb_1070x1334.png 848w, https://substackcdn.com/image/fetch/$s_!Cepb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846b4e4c-7baf-4b43-b27a-0b52b158f8cb_1070x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!Cepb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846b4e4c-7baf-4b43-b27a-0b52b158f8cb_1070x1334.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Cepb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846b4e4c-7baf-4b43-b27a-0b52b158f8cb_1070x1334.png" width="1070" height="1334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/846b4e4c-7baf-4b43-b27a-0b52b158f8cb_1070x1334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1334,&quot;width&quot;:1070,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:314875,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Cepb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846b4e4c-7baf-4b43-b27a-0b52b158f8cb_1070x1334.png 424w, https://substackcdn.com/image/fetch/$s_!Cepb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846b4e4c-7baf-4b43-b27a-0b52b158f8cb_1070x1334.png 848w, https://substackcdn.com/image/fetch/$s_!Cepb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846b4e4c-7baf-4b43-b27a-0b52b158f8cb_1070x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!Cepb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F846b4e4c-7baf-4b43-b27a-0b52b158f8cb_1070x1334.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Pj5k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ac4003e-cb72-4a03-8f7d-ecad61b87a32_1094x868.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Pj5k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ac4003e-cb72-4a03-8f7d-ecad61b87a32_1094x868.png 424w, https://substackcdn.com/image/fetch/$s_!Pj5k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ac4003e-cb72-4a03-8f7d-ecad61b87a32_1094x868.png 848w, https://substackcdn.com/image/fetch/$s_!Pj5k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ac4003e-cb72-4a03-8f7d-ecad61b87a32_1094x868.png 1272w, https://substackcdn.com/image/fetch/$s_!Pj5k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ac4003e-cb72-4a03-8f7d-ecad61b87a32_1094x868.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Pj5k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ac4003e-cb72-4a03-8f7d-ecad61b87a32_1094x868.png" width="1094" height="868" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ac4003e-cb72-4a03-8f7d-ecad61b87a32_1094x868.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:868,&quot;width&quot;:1094,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:196996,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Pj5k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ac4003e-cb72-4a03-8f7d-ecad61b87a32_1094x868.png 424w, https://substackcdn.com/image/fetch/$s_!Pj5k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ac4003e-cb72-4a03-8f7d-ecad61b87a32_1094x868.png 848w, https://substackcdn.com/image/fetch/$s_!Pj5k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ac4003e-cb72-4a03-8f7d-ecad61b87a32_1094x868.png 1272w, https://substackcdn.com/image/fetch/$s_!Pj5k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ac4003e-cb72-4a03-8f7d-ecad61b87a32_1094x868.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of trade statistics</figcaption></figure></div><p>The results are somewhat inferior than what was achieved by the authors in the paper:</p><ul><li><p>Annual return is +8.1% vs 12.4% the benchmark;</p></li><li><p>Sharpe ratio is 0.91, slightly above benchmark;</p></li><li><p>Max drawdown is at 24% vs. 34% NQ long only;</p></li><li><p>The expected return/trade is +2 bps, with a win rate of 36% and a good payoff ratio of 2.09.</p></li></ul><p>Two reasons explain the difference:</p><ul><li><p>In the paper, the authors start the backtest in 2007. This makes a significant difference, as 2008 is a great year for the strategy, and a very negative year for the market;</p></li><li><p>Also, slippage assumptions cause a significant impact. The lower the slippage assumption, the better the results. However, I don't think it's realistic to assume less than 0.5 tick/trade, which is already optimistic.</p></li></ul><p>The strategy is basically flat from 2010 to 2017, and then starts working from 2018 on.</p><p>Let's see how we can improve these results.</p><h1>Adjusting the lookback and adding leverage</h1><p>To compute the noisy area, which is critical to define the entries and stop losses, the paper uses a lookback window of 14 days. The first adjustment we will implement to improve the results is to use 90 days instead.</p><p>Secondly, we will take the advantage we are trading futures instead of ETFs and increase the leverage: daily target volatility of 3% instead of 2%, capped at 8x instead of 4x.</p><p>These changes produce the following results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iaHr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38c880-c55b-4420-9981-7293cc07462c_1520x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iaHr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38c880-c55b-4420-9981-7293cc07462c_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!iaHr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38c880-c55b-4420-9981-7293cc07462c_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!iaHr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38c880-c55b-4420-9981-7293cc07462c_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!iaHr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38c880-c55b-4420-9981-7293cc07462c_1520x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iaHr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38c880-c55b-4420-9981-7293cc07462c_1520x1472.png" width="1456" height="1410" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc38c880-c55b-4420-9981-7293cc07462c_1520x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1410,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:702207,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iaHr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38c880-c55b-4420-9981-7293cc07462c_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!iaHr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38c880-c55b-4420-9981-7293cc07462c_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!iaHr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38c880-c55b-4420-9981-7293cc07462c_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!iaHr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc38c880-c55b-4420-9981-7293cc07462c_1520x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the second experiment (ES)</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GUwG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc40dcb44-0476-4f75-ab6e-3db9d92eb746_1072x1332.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GUwG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc40dcb44-0476-4f75-ab6e-3db9d92eb746_1072x1332.png 424w, https://substackcdn.com/image/fetch/$s_!GUwG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc40dcb44-0476-4f75-ab6e-3db9d92eb746_1072x1332.png 848w, https://substackcdn.com/image/fetch/$s_!GUwG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc40dcb44-0476-4f75-ab6e-3db9d92eb746_1072x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!GUwG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc40dcb44-0476-4f75-ab6e-3db9d92eb746_1072x1332.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GUwG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc40dcb44-0476-4f75-ab6e-3db9d92eb746_1072x1332.png" width="1072" height="1332" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c40dcb44-0476-4f75-ab6e-3db9d92eb746_1072x1332.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1332,&quot;width&quot;:1072,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:319202,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GUwG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc40dcb44-0476-4f75-ab6e-3db9d92eb746_1072x1332.png 424w, https://substackcdn.com/image/fetch/$s_!GUwG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc40dcb44-0476-4f75-ab6e-3db9d92eb746_1072x1332.png 848w, https://substackcdn.com/image/fetch/$s_!GUwG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc40dcb44-0476-4f75-ab6e-3db9d92eb746_1072x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!GUwG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc40dcb44-0476-4f75-ab6e-3db9d92eb746_1072x1332.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o4Nb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3d3c3f3-5407-4445-89cc-754d23653bcd_1092x866.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o4Nb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3d3c3f3-5407-4445-89cc-754d23653bcd_1092x866.png 424w, https://substackcdn.com/image/fetch/$s_!o4Nb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3d3c3f3-5407-4445-89cc-754d23653bcd_1092x866.png 848w, https://substackcdn.com/image/fetch/$s_!o4Nb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3d3c3f3-5407-4445-89cc-754d23653bcd_1092x866.png 1272w, https://substackcdn.com/image/fetch/$s_!o4Nb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3d3c3f3-5407-4445-89cc-754d23653bcd_1092x866.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o4Nb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3d3c3f3-5407-4445-89cc-754d23653bcd_1092x866.png" width="1092" height="866" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b3d3c3f3-5407-4445-89cc-754d23653bcd_1092x866.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:866,&quot;width&quot;:1092,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:197616,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!o4Nb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3d3c3f3-5407-4445-89cc-754d23653bcd_1092x866.png 424w, https://substackcdn.com/image/fetch/$s_!o4Nb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3d3c3f3-5407-4445-89cc-754d23653bcd_1092x866.png 848w, https://substackcdn.com/image/fetch/$s_!o4Nb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3d3c3f3-5407-4445-89cc-754d23653bcd_1092x866.png 1272w, https://substackcdn.com/image/fetch/$s_!o4Nb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3d3c3f3-5407-4445-89cc-754d23653bcd_1092x866.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of trade statistics</figcaption></figure></div><p>The adjustments resulted in a good improvement:</p><ul><li><p>Annual returns more than doubled, now reaching 16.8% vs. 12% the benchmark;</p></li><li><p>Sharpe ratio increased from 0.91 to 1.25;</p></li><li><p>Max drawdown reduced from 24% to 21%;</p></li><li><p>All trade statistics improved.</p></li></ul><p>What else can we do to improve the results further?</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/intraday-momentum-for-es-and-nq?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/intraday-momentum-for-es-and-nq?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/intraday-momentum-for-es-and-nq?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1>Diversification</h1><p>My first idea when I initially read the paper was to apply the strategy across a basket of stocks, such as S&amp;P 500 or Nasdaq-100 constituents, and trade multiple stocks simultaneously, thus taking the advantage of automation. However, I couldn't make such a system work.</p><p>For some stocks (like the ones shown in the end of the paper), the model does work. Unfortunately, according to my tests, this is not true for most of the stocks in a larger basket. And cherry-picking stocks after seeing their backtest results is the text-book definition of selection bias.</p><p>So, to add some diversification, I decided to consider only two instruments: ES and NQ, the two most liquid futures contracts in stock indices.</p><p>First, let's see how the model performs when applied to NQ:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!N0SL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa2a818-68f0-4c8d-9eec-d3be44d166d0_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!N0SL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa2a818-68f0-4c8d-9eec-d3be44d166d0_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!N0SL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa2a818-68f0-4c8d-9eec-d3be44d166d0_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!N0SL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa2a818-68f0-4c8d-9eec-d3be44d166d0_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!N0SL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa2a818-68f0-4c8d-9eec-d3be44d166d0_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!N0SL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa2a818-68f0-4c8d-9eec-d3be44d166d0_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5fa2a818-68f0-4c8d-9eec-d3be44d166d0_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:686654,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!N0SL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa2a818-68f0-4c8d-9eec-d3be44d166d0_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!N0SL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa2a818-68f0-4c8d-9eec-d3be44d166d0_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!N0SL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa2a818-68f0-4c8d-9eec-d3be44d166d0_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!N0SL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5fa2a818-68f0-4c8d-9eec-d3be44d166d0_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the third experiment (NQ)</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ls4n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cb3c94-e997-4cd9-8b0f-9ab05acf3548_1068x1328.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ls4n!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cb3c94-e997-4cd9-8b0f-9ab05acf3548_1068x1328.png 424w, https://substackcdn.com/image/fetch/$s_!Ls4n!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cb3c94-e997-4cd9-8b0f-9ab05acf3548_1068x1328.png 848w, https://substackcdn.com/image/fetch/$s_!Ls4n!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cb3c94-e997-4cd9-8b0f-9ab05acf3548_1068x1328.png 1272w, https://substackcdn.com/image/fetch/$s_!Ls4n!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cb3c94-e997-4cd9-8b0f-9ab05acf3548_1068x1328.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ls4n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cb3c94-e997-4cd9-8b0f-9ab05acf3548_1068x1328.png" width="1068" height="1328" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d8cb3c94-e997-4cd9-8b0f-9ab05acf3548_1068x1328.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1328,&quot;width&quot;:1068,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:324642,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ls4n!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cb3c94-e997-4cd9-8b0f-9ab05acf3548_1068x1328.png 424w, https://substackcdn.com/image/fetch/$s_!Ls4n!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cb3c94-e997-4cd9-8b0f-9ab05acf3548_1068x1328.png 848w, https://substackcdn.com/image/fetch/$s_!Ls4n!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cb3c94-e997-4cd9-8b0f-9ab05acf3548_1068x1328.png 1272w, https://substackcdn.com/image/fetch/$s_!Ls4n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8cb3c94-e997-4cd9-8b0f-9ab05acf3548_1068x1328.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CMld!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c1c6fd3-5717-43ae-aa19-2afc3483c798_1090x864.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CMld!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c1c6fd3-5717-43ae-aa19-2afc3483c798_1090x864.png 424w, https://substackcdn.com/image/fetch/$s_!CMld!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c1c6fd3-5717-43ae-aa19-2afc3483c798_1090x864.png 848w, https://substackcdn.com/image/fetch/$s_!CMld!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c1c6fd3-5717-43ae-aa19-2afc3483c798_1090x864.png 1272w, https://substackcdn.com/image/fetch/$s_!CMld!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c1c6fd3-5717-43ae-aa19-2afc3483c798_1090x864.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CMld!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c1c6fd3-5717-43ae-aa19-2afc3483c798_1090x864.png" width="1090" height="864" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2c1c6fd3-5717-43ae-aa19-2afc3483c798_1090x864.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:864,&quot;width&quot;:1090,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:198794,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CMld!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c1c6fd3-5717-43ae-aa19-2afc3483c798_1090x864.png 424w, https://substackcdn.com/image/fetch/$s_!CMld!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c1c6fd3-5717-43ae-aa19-2afc3483c798_1090x864.png 848w, https://substackcdn.com/image/fetch/$s_!CMld!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c1c6fd3-5717-43ae-aa19-2afc3483c798_1090x864.png 1272w, https://substackcdn.com/image/fetch/$s_!CMld!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c1c6fd3-5717-43ae-aa19-2afc3483c798_1090x864.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of trade statistics</figcaption></figure></div><p>The system works well on NQ as well:</p><ul><li><p>Annual return is at 24.3% vs. 17.6% the benchmark;</p></li><li><p>Sharpe ratio achieves 1.67 vs. 0.93 NQ long only;</p></li><li><p>Max drawdown is at 24% vs. 35% the benchmark;</p></li><li><p>The expected return per trade is +6 bps, with a win ratio of 38% and a payoff ratio of 2.25.</p></li></ul><p>Now, we create a portfolio allocating our capital with the following weights:</p><ul><li><p>50% on the strategy applied to NQ;</p></li><li><p>25% on strategy applied to ES;</p></li><li><p>25% on NQ long only.</p></li></ul><p>The weights that maximize the Sharpe ratio would be 45%, 15% and 40% - but that would be too much optimization to my taste.</p><p>So, these are the results for the portfolio:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o8Ju!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be30ae8-a17f-4130-9135-b363a14dde42_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o8Ju!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be30ae8-a17f-4130-9135-b363a14dde42_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!o8Ju!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be30ae8-a17f-4130-9135-b363a14dde42_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!o8Ju!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be30ae8-a17f-4130-9135-b363a14dde42_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!o8Ju!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be30ae8-a17f-4130-9135-b363a14dde42_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o8Ju!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be30ae8-a17f-4130-9135-b363a14dde42_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1be30ae8-a17f-4130-9135-b363a14dde42_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:627042,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!o8Ju!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be30ae8-a17f-4130-9135-b363a14dde42_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!o8Ju!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be30ae8-a17f-4130-9135-b363a14dde42_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!o8Ju!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be30ae8-a17f-4130-9135-b363a14dde42_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!o8Ju!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1be30ae8-a17f-4130-9135-b363a14dde42_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the final experiment (portfolio)</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h8S9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e9e22bd-dcbf-4ec2-a2bd-fdb777125bcf_1070x1332.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h8S9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e9e22bd-dcbf-4ec2-a2bd-fdb777125bcf_1070x1332.png 424w, https://substackcdn.com/image/fetch/$s_!h8S9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e9e22bd-dcbf-4ec2-a2bd-fdb777125bcf_1070x1332.png 848w, https://substackcdn.com/image/fetch/$s_!h8S9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e9e22bd-dcbf-4ec2-a2bd-fdb777125bcf_1070x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!h8S9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e9e22bd-dcbf-4ec2-a2bd-fdb777125bcf_1070x1332.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h8S9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e9e22bd-dcbf-4ec2-a2bd-fdb777125bcf_1070x1332.png" width="1070" height="1332" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9e9e22bd-dcbf-4ec2-a2bd-fdb777125bcf_1070x1332.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1332,&quot;width&quot;:1070,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:321477,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h8S9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e9e22bd-dcbf-4ec2-a2bd-fdb777125bcf_1070x1332.png 424w, https://substackcdn.com/image/fetch/$s_!h8S9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e9e22bd-dcbf-4ec2-a2bd-fdb777125bcf_1070x1332.png 848w, https://substackcdn.com/image/fetch/$s_!h8S9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e9e22bd-dcbf-4ec2-a2bd-fdb777125bcf_1070x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!h8S9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e9e22bd-dcbf-4ec2-a2bd-fdb777125bcf_1070x1332.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of backtest statistics</figcaption></figure></div><p>Highlights:</p><ul><li><p>Annual returns reaches 22.4% vs. 18.2% benchmark;</p></li><li><p>Sharpe ratio is now at 1.57 vs. 0.92 NQ long only;</p></li><li><p>Maximum drawdown is 15%, less than half of the benchmark's</p></li></ul><p>Now, let's see the monthly and annual returns:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SPFd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F069233b6-4a63-47c2-8dd4-71801fd4ecdc_1690x894.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SPFd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F069233b6-4a63-47c2-8dd4-71801fd4ecdc_1690x894.png 424w, https://substackcdn.com/image/fetch/$s_!SPFd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F069233b6-4a63-47c2-8dd4-71801fd4ecdc_1690x894.png 848w, https://substackcdn.com/image/fetch/$s_!SPFd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F069233b6-4a63-47c2-8dd4-71801fd4ecdc_1690x894.png 1272w, https://substackcdn.com/image/fetch/$s_!SPFd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F069233b6-4a63-47c2-8dd4-71801fd4ecdc_1690x894.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SPFd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F069233b6-4a63-47c2-8dd4-71801fd4ecdc_1690x894.png" width="1456" height="770" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/069233b6-4a63-47c2-8dd4-71801fd4ecdc_1690x894.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:770,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1171591,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SPFd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F069233b6-4a63-47c2-8dd4-71801fd4ecdc_1690x894.png 424w, https://substackcdn.com/image/fetch/$s_!SPFd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F069233b6-4a63-47c2-8dd4-71801fd4ecdc_1690x894.png 848w, https://substackcdn.com/image/fetch/$s_!SPFd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F069233b6-4a63-47c2-8dd4-71801fd4ecdc_1690x894.png 1272w, https://substackcdn.com/image/fetch/$s_!SPFd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F069233b6-4a63-47c2-8dd4-71801fd4ecdc_1690x894.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>If we had traded this strategy since 2010:</p><ul><li><p>We would have had <strong>2 negative years in 16;</strong></p></li><li><p>We would have seen <strong>65% of the months positive</strong>, with the best at +12.7% (Jun'11);</p></li><li><p>We would have seen <strong>35% of the months negative</strong>, with the worst at -6.6% (Sep'11);</p></li><li><p>The <strong>longest</strong> <strong>positive streak</strong> would have been <strong>11 months</strong>, from Apr'20 to Feb'11;</p></li><li><p>The <strong>longest negative streak</strong> would have been <strong>4 months</strong>, from Oct'14 to Jan'15.</p></li></ul><h1>Final thoughts</h1><p>Over the past several weeks, I've spent a lot of time implementing and deploying strategies live. As the number of live systems and the AUM increase, continuing to write and share ideas is getting harder. But I am committed to continue.</p><p>I am definitely forward-testing this system; if the forward-test results come in line with the backtest, this model will be a great addition to the portfolio.</p><p>I'd love to hear your thoughts about this approach. If you have any questions or comments, <strong>just reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a></strong>.</p><p>Cheers!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Fast trend following]]></title><description><![CDATA[+20% annual returns with a trend-following system in a shorter timeframe]]></description><link>https://www.quantitativo.com/p/fast-trend-following</link><guid isPermaLink="false">https://www.quantitativo.com/p/fast-trend-following</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Wed, 11 Dec 2024 15:44:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!2T9S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2T9S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2T9S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png 424w, https://substackcdn.com/image/fetch/$s_!2T9S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png 848w, https://substackcdn.com/image/fetch/$s_!2T9S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png 1272w, https://substackcdn.com/image/fetch/$s_!2T9S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2T9S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png" width="1300" height="650" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:650,&quot;width&quot;:1300,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1716535,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2T9S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png 424w, https://substackcdn.com/image/fetch/$s_!2T9S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png 848w, https://substackcdn.com/image/fetch/$s_!2T9S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png 1272w, https://substackcdn.com/image/fetch/$s_!2T9S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff79453b9-7d76-4e8a-8949-26ee54cd9fa1_1300x650.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Richard Dennis, Chicago's trading legend who famously turned a $1,600 loan into a $200 million fortune</figcaption></figure></div><h1>The idea</h1><blockquote><p>&#8220;I always say that you could publish trading rules in the newspaper and no one would follow them. The key is consistency and discipline.&#8221; Richard Dennis.</p></blockquote><p>Richard Dennis is one of the greatest trend-following traders in history, renowned for transforming a small loan into a fortune in the commodities markets. As a pioneer of systematic trading, Dennis believed that successful trading could be taught, leading to the famous Turtle Traders experiment in the 1980s. In this bold experiment, he trained a group of novices to follow a simple trend-following system, proving that discipline and consistency, not innate talent, were the keys to trading success.</p><p>This week, let's view a trend-following idea applied to the futures market. This article will be similar to A Mean Reversion Strategy from First Principles Thinking; let's follow a similar approach. Here's our plan:</p><ol><li><p>First, we will deconstruct a trend-following strategy into its basic components;</p></li><li><p>Then, we will propose a new way to identify when a trend starts and ends;</p></li><li><p>Next, we will devise a strategy based on this new indicator and run some experiments;</p></li><li><p>Finally, we will discuss how to improve further.</p></li></ol><h1>Deconstructing a trend following strategy</h1><p>Let's break down a trend-following strategy into smaller, more manageable parts:</p><ul><li><p><strong>Entry trigger.</strong> Every trend-following strategy has a set of entry rules that, when triggered, tell us to go long (or short) if the instrument's price has started to trend up (or down). Typically, these entry rules are based on price movements breaking above or below predefined thresholds, such as moving averages, channel breakouts, or volatility bands. For example, an entry might be triggered when the price closes above a long-term moving average or surpasses a recent high.</p></li><li><p><strong>Exit trigger.</strong> Also, every trend-following strategy has a set of exit rules that, when triggered, tell us to close the position. They try to signal the trend started to reverse. These exit rules often rely on trailing stops, such as moving averages, recent lows (for long positions), or volatility-based stops. The goal is to allow the strategy to ride the trend as long as it persists while minimizing losses when it ends. This ensures the strategy captures large price moves while managing downside risk.</p></li></ul><p>Our strategy will focus on NQ futures (always the most liquid contract), with a 1-minute timeframe. The simplest possible choice would be to define entry and exit triggers with moving averages. As I am an engineer, I prefer Kalman filters. They offer some advantages over moving averages:</p><ul><li><p><strong>Noise Reduction:</strong> Kalman filters are highly effective at reducing noise in price data, providing smoother signals for identifying trends compared to traditional moving averages.</p></li><li><p><strong>Adaptability:</strong> Unlike fixed moving averages, Kalman filters dynamically adjust to changing market conditions, making them more responsive to trend shifts.</p></li><li><p><strong>Robustness:</strong> They incorporate both historical data and statistical models, improving their ability to predict trends and filter out false signals.</p></li><li><p><strong>Efficiency:</strong> Kalman filters can provide a clearer signal with fewer lagging effects, allowing for more timely entries and exits in rapidly changing markets.</p></li><li><p><strong>Flexibility:</strong> They can be customized to suit different trading timeframes and objectives, offering a more tailored approach to trend-following strategies.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ggg9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a04ae83-cb94-4dfb-b12f-afca950415d8_1883x1247.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ggg9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a04ae83-cb94-4dfb-b12f-afca950415d8_1883x1247.png 424w, https://substackcdn.com/image/fetch/$s_!Ggg9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a04ae83-cb94-4dfb-b12f-afca950415d8_1883x1247.png 848w, https://substackcdn.com/image/fetch/$s_!Ggg9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a04ae83-cb94-4dfb-b12f-afca950415d8_1883x1247.png 1272w, https://substackcdn.com/image/fetch/$s_!Ggg9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a04ae83-cb94-4dfb-b12f-afca950415d8_1883x1247.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ggg9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a04ae83-cb94-4dfb-b12f-afca950415d8_1883x1247.png" width="1456" height="964" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a04ae83-cb94-4dfb-b12f-afca950415d8_1883x1247.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:964,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:618364,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ggg9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a04ae83-cb94-4dfb-b12f-afca950415d8_1883x1247.png 424w, https://substackcdn.com/image/fetch/$s_!Ggg9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a04ae83-cb94-4dfb-b12f-afca950415d8_1883x1247.png 848w, https://substackcdn.com/image/fetch/$s_!Ggg9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a04ae83-cb94-4dfb-b12f-afca950415d8_1883x1247.png 1272w, https://substackcdn.com/image/fetch/$s_!Ggg9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a04ae83-cb94-4dfb-b12f-afca950415d8_1883x1247.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">NQ 1-minute closing prices on March 8th, 2022, with two Kalman Filters</figcaption></figure></div><p>The chart above shows the price of NQ in light blue on a given day and two Kalman filters - one in dark blue and one in red. To explain the difference between them, let me briefly explain what is a Kalman filter.</p><p>A <strong>Kalman Filter</strong> is an algorithm for estimating the state of a dynamic system. It combines noisy observations with predictions based on a mathematical model. The filter is widely used in control systems, robotics, and financial markets to filter noise from data and make more accurate predictions.</p><p>In financial markets, the Kalman Filter is particularly useful for smoothing price data, estimating trends, and identifying underlying patterns in the presence of market noise.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h3><strong>Key Components of the Kalman Filter</strong></h3><ol><li><p><strong>State Variables</strong>:</p><ul><li><p>Represent the system being estimated. In this case:</p><ul><li><p><code>price</code>: The observed asset price.</p></li><li><p><code>trend</code>: The estimated rate of change in the price.</p></li></ul></li></ul></li><li><p><strong>Measurement</strong>:</p><ul><li><p>Observations used to update the state. Here, the observed price (<code>close</code>) is the only measurement.</p></li></ul></li><li><p><strong>State Transition Matrix (</strong><code>F</code><strong>)</strong>:</p><ul><li><p>Defines how the state evolves over time:</p><ul><li><p>new price = current price + trend</p></li><li><p>new trend = current trend</p></li></ul></li></ul></li><li><p><strong>Measurement Function (</strong><code>H</code><strong>)</strong>:</p><ul><li><p>Relates the observed measurement (price) to the state:</p><ul><li><p>observed price = true price (state variable)</p></li></ul></li></ul></li><li><p><strong>Covariances</strong>:</p><ul><li><p><strong>Process Noise (</strong><code>Q</code><strong>)</strong>:</p><ul><li><p>Represents the uncertainty in the model's predictions.</p></li></ul></li><li><p><strong>Measurement Noise (</strong><code>R</code><strong>)</strong>:</p><ul><li><p>Represents the uncertainty in the observed data.</p></li></ul></li></ul></li><li><p><strong>Uncertainty (</strong><code>P</code><strong>)</strong>:</p><ul><li><p>Represents the initial uncertainty about the system's state.</p></li></ul></li></ol><h3><strong>Impact of the Noise Parameter (</strong><code>R</code><strong>)</strong></h3><p>The <strong>measurement noise (</strong><code>R</code><strong>)</strong> is a critical parameter in the Kalman Filter, and its value influences how the filter balances trust between the model's predictions and the observed data.</p><ol><li><p><strong>Low </strong><code>R</code><strong> (Low Measurement Noise - the dark blue line)</strong>:</p><ul><li><p>The filter assumes the observations are highly reliable.</p></li><li><p>The estimate closely follows the observed data, reacting quickly to changes in the measurements.</p></li><li><p><strong>Impact</strong>: May result in overfitting to noisy data, reducing smoothness.</p></li></ul></li><li><p><strong>High </strong><code>R</code><strong> (High Measurement Noise - the red line)</strong>:</p><ul><li><p>The filter assumes the observations are noisy and unreliable.</p></li><li><p>The estimate relies more on the model's predictions, leading to smoother output.</p></li><li><p><strong>Impact</strong>: May lag behind sudden changes in the data (e.g., sharp trend reversals).</p></li></ul></li></ol><p>My idea is not to provide a full review of Kalman filters. I believe, though, this brief introduction is enough to give anyone the basics so we can move forward to our next step.</p><h1>The QT indicator</h1><p>Looking at the previous chart, we observe the blue line is always oscillating above and below the red line. So, we can compute the percentage difference between the blue line and the red line - which will be positive if the blue line is above the red line, or negative otherwise.</p><p>If we were to plot these percentage differences in a histogram, we would see a nice Gaussian curve (with fatter tails to make Nassim Taleb happy :)).</p><p>But instead, let's compute the percentiles for each of these differences, such that:</p><ul><li><p>+100 will be the highest difference % in our distribution (the positive value farthest from the red line);</p></li><li><p>-100 will be the lowest difference % in our distribution (the negative value farthest from the red line);</p></li><li><p>0 will be mid value (exactly on top of the red line).</p></li></ul><p>Now, if we plot these values for a given day, that would be like if we took the both ends of the red line and pulled it, straightening it:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!t-A0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca6cdb8-0970-4b9e-bdfd-0ede9df036ec_1873x1247.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t-A0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca6cdb8-0970-4b9e-bdfd-0ede9df036ec_1873x1247.png 424w, https://substackcdn.com/image/fetch/$s_!t-A0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca6cdb8-0970-4b9e-bdfd-0ede9df036ec_1873x1247.png 848w, https://substackcdn.com/image/fetch/$s_!t-A0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca6cdb8-0970-4b9e-bdfd-0ede9df036ec_1873x1247.png 1272w, https://substackcdn.com/image/fetch/$s_!t-A0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca6cdb8-0970-4b9e-bdfd-0ede9df036ec_1873x1247.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t-A0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca6cdb8-0970-4b9e-bdfd-0ede9df036ec_1873x1247.png" width="1456" height="969" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cca6cdb8-0970-4b9e-bdfd-0ede9df036ec_1873x1247.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:969,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:581028,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!t-A0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca6cdb8-0970-4b9e-bdfd-0ede9df036ec_1873x1247.png 424w, https://substackcdn.com/image/fetch/$s_!t-A0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca6cdb8-0970-4b9e-bdfd-0ede9df036ec_1873x1247.png 848w, https://substackcdn.com/image/fetch/$s_!t-A0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca6cdb8-0970-4b9e-bdfd-0ede9df036ec_1873x1247.png 1272w, https://substackcdn.com/image/fetch/$s_!t-A0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca6cdb8-0970-4b9e-bdfd-0ede9df036ec_1873x1247.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">NQ 1-minute Quantitativo Trend Indicator on March 8th, 2022</figcaption></figure></div><p>For the lack of a better name, let's call this indicator QTI (Quantitativo Trend Indicator). It indicates how far the (smoothed) prices (the blue line) are from the trend (the red line):</p><ul><li><p>+100 means the price is well above the trend;</p></li><li><p>-100 means the price is well below the trend;</p></li><li><p>0 means the price is exactly on the trend line;</p></li><li><p>If the indicator is crossing above the red line up, this means the price is trending up;</p></li><li><p>If the indicator is crossing below the red line down, this means the price is trending down.</p></li></ul><p>Now, let's devise a strategy using this indicator.</p><h1>The strategy</h1><p>Our strategy will be either 100% long, 100% short, or out of the market. Here's how we will determine our position:</p><ul><li><p>Whenever NQ's QTI crosses above 5, we will open a long position, set a profit target at QTI 35, and stop loss at 5;</p></li><li><p>Whenever NQ's QTI crosses below -90, we will open a short position, set a profit target at QTI -95, and a stop loss at -90.</p></li></ul><p>That's it. Let's run some experiments.</p><h1>Experiments</h1><p>This week's strategy is a bit different than what I've been writing so far in some important aspects. So, here are the assumptions on the experiments:</p><ul><li><p><strong>Trading around the clock</strong>. This strategy trades 1-minute bars (data from Databento) starting mid-2017. So, we will assume trading whenever NQ is trading. We will trade at the closing prices of the 1-minute bars.</p></li><li><p><strong>No compounding</strong>. Throughout the experiments, we will trade only a single contract. We will be either long this 1 contract, short this 1 contract, or out of the market.</p></li><li><p><strong>Leverage</strong>. Trading futures allow us to use leverage. We will use 4x leverage by having our starting capital as 1/4 of the notional value of 1 contract.</p></li><li><p><strong>Trading costs</strong>. NQ is one of the most liquid contracts there is (we will always trade the front month contract). The bid-ask spread really tight, usually 1 tick or 0.25 index points. This means the bid-ask spread is ~1/10th of a basis point. So, in these experiments, we will not consider slippage nor commission (which can be easily added later; IBKR for example charges $0.85/contract).</p></li></ul><p>Let's see how our first experiment fares:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h-lJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4496ab3-d6f4-4e0a-818d-2fb43e7d3b44_1520x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h-lJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4496ab3-d6f4-4e0a-818d-2fb43e7d3b44_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!h-lJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4496ab3-d6f4-4e0a-818d-2fb43e7d3b44_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!h-lJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4496ab3-d6f4-4e0a-818d-2fb43e7d3b44_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!h-lJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4496ab3-d6f4-4e0a-818d-2fb43e7d3b44_1520x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h-lJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4496ab3-d6f4-4e0a-818d-2fb43e7d3b44_1520x1472.png" width="1456" height="1410" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4496ab3-d6f4-4e0a-818d-2fb43e7d3b44_1520x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1410,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:649156,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h-lJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4496ab3-d6f4-4e0a-818d-2fb43e7d3b44_1520x1472.png 424w, https://substackcdn.com/image/fetch/$s_!h-lJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4496ab3-d6f4-4e0a-818d-2fb43e7d3b44_1520x1472.png 848w, https://substackcdn.com/image/fetch/$s_!h-lJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4496ab3-d6f4-4e0a-818d-2fb43e7d3b44_1520x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!h-lJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4496ab3-d6f4-4e0a-818d-2fb43e7d3b44_1520x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the first experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!X7Kg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b1858a9-501b-4188-b315-4d25eba3b3d2_1070x1342.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!X7Kg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b1858a9-501b-4188-b315-4d25eba3b3d2_1070x1342.png 424w, https://substackcdn.com/image/fetch/$s_!X7Kg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b1858a9-501b-4188-b315-4d25eba3b3d2_1070x1342.png 848w, https://substackcdn.com/image/fetch/$s_!X7Kg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b1858a9-501b-4188-b315-4d25eba3b3d2_1070x1342.png 1272w, https://substackcdn.com/image/fetch/$s_!X7Kg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b1858a9-501b-4188-b315-4d25eba3b3d2_1070x1342.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!X7Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b1858a9-501b-4188-b315-4d25eba3b3d2_1070x1342.png" width="1070" height="1342" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1b1858a9-501b-4188-b315-4d25eba3b3d2_1070x1342.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1342,&quot;width&quot;:1070,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:318372,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!X7Kg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b1858a9-501b-4188-b315-4d25eba3b3d2_1070x1342.png 424w, https://substackcdn.com/image/fetch/$s_!X7Kg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b1858a9-501b-4188-b315-4d25eba3b3d2_1070x1342.png 848w, https://substackcdn.com/image/fetch/$s_!X7Kg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b1858a9-501b-4188-b315-4d25eba3b3d2_1070x1342.png 1272w, https://substackcdn.com/image/fetch/$s_!X7Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b1858a9-501b-4188-b315-4d25eba3b3d2_1070x1342.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DaKK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77369d6e-7700-4454-800f-1fcf419dfe9c_1090x868.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DaKK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77369d6e-7700-4454-800f-1fcf419dfe9c_1090x868.png 424w, https://substackcdn.com/image/fetch/$s_!DaKK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77369d6e-7700-4454-800f-1fcf419dfe9c_1090x868.png 848w, https://substackcdn.com/image/fetch/$s_!DaKK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77369d6e-7700-4454-800f-1fcf419dfe9c_1090x868.png 1272w, https://substackcdn.com/image/fetch/$s_!DaKK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77369d6e-7700-4454-800f-1fcf419dfe9c_1090x868.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DaKK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77369d6e-7700-4454-800f-1fcf419dfe9c_1090x868.png" width="1090" height="868" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/77369d6e-7700-4454-800f-1fcf419dfe9c_1090x868.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:868,&quot;width&quot;:1090,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:196975,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DaKK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77369d6e-7700-4454-800f-1fcf419dfe9c_1090x868.png 424w, https://substackcdn.com/image/fetch/$s_!DaKK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77369d6e-7700-4454-800f-1fcf419dfe9c_1090x868.png 848w, https://substackcdn.com/image/fetch/$s_!DaKK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77369d6e-7700-4454-800f-1fcf419dfe9c_1090x868.png 1272w, https://substackcdn.com/image/fetch/$s_!DaKK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77369d6e-7700-4454-800f-1fcf419dfe9c_1090x868.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest trades</figcaption></figure></div><p>Highlights:</p><ul><li><p>The annual return achieved is 29.7% vs. 15.0% the NQ in the same period;</p></li><li><p>The strategy was positive in all years except 2021 (near zero);</p></li><li><p>The maximum drawdown is at 26%, vs. 35% the benchmark;</p></li><li><p>The risk-adjusted return is at 1.19 (Sharpe), vs 0.77 the benchmark;</p></li><li><p>The strategy trades 3,972 times/year, or about 16 times/day, with a win rate of 48.5%, profit factor of 1.07 and payoff ratio of 1.11;</p></li></ul><p>How to improve this strategy?</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/fast-trend-following?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/fast-trend-following?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/fast-trend-following?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1>Choosing parameters to entry and exit</h1><p>The entry and exit parameters used in the first experiment were arbitrarily chosen. Let's search for optimal parameters:</p><ul><li><p>We will search for the best combination of parameters varying the entries and exits in terms of QTI around 1-10, 30-40 for longs, and (85)-(97), (87)-(99) for shorts;</p></li><li><p>The in-sample period will be from 2017 until the end of 2021, where we will perform the search;</p></li><li><p>The out-of-sample period will be from 2022 on.</p></li></ul><p>Running the search, here's what we find out of sample:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9ao3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F493a39ac-2e0a-460b-83e0-eba85f48c418_1298x1480.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9ao3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F493a39ac-2e0a-460b-83e0-eba85f48c418_1298x1480.png 424w, https://substackcdn.com/image/fetch/$s_!9ao3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F493a39ac-2e0a-460b-83e0-eba85f48c418_1298x1480.png 848w, https://substackcdn.com/image/fetch/$s_!9ao3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F493a39ac-2e0a-460b-83e0-eba85f48c418_1298x1480.png 1272w, https://substackcdn.com/image/fetch/$s_!9ao3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F493a39ac-2e0a-460b-83e0-eba85f48c418_1298x1480.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9ao3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F493a39ac-2e0a-460b-83e0-eba85f48c418_1298x1480.png" width="1298" height="1480" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/493a39ac-2e0a-460b-83e0-eba85f48c418_1298x1480.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1480,&quot;width&quot;:1298,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:300009,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9ao3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F493a39ac-2e0a-460b-83e0-eba85f48c418_1298x1480.png 424w, https://substackcdn.com/image/fetch/$s_!9ao3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F493a39ac-2e0a-460b-83e0-eba85f48c418_1298x1480.png 848w, https://substackcdn.com/image/fetch/$s_!9ao3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F493a39ac-2e0a-460b-83e0-eba85f48c418_1298x1480.png 1272w, https://substackcdn.com/image/fetch/$s_!9ao3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F493a39ac-2e0a-460b-83e0-eba85f48c418_1298x1480.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Out-of-sample results of the in-sample best parameters</figcaption></figure></div><p>Now, instead of cherry-picking one of these sets of parameters, or simply averaging them out, let's assemble a portfolio with the 10 sets of parameters. To determine the weights, let's run a simple optimization algorithm on the in-sample daily returns, with the objective of maximizing the Sharpe ratio. Then, we can apply these weights to the out-of-sample period.</p><p>The weight results from the optimization on the in-sample period are:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eCpd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb1db5-4893-4a61-8152-ba9f2a3f3941_1072x510.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eCpd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb1db5-4893-4a61-8152-ba9f2a3f3941_1072x510.png 424w, https://substackcdn.com/image/fetch/$s_!eCpd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb1db5-4893-4a61-8152-ba9f2a3f3941_1072x510.png 848w, https://substackcdn.com/image/fetch/$s_!eCpd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb1db5-4893-4a61-8152-ba9f2a3f3941_1072x510.png 1272w, https://substackcdn.com/image/fetch/$s_!eCpd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb1db5-4893-4a61-8152-ba9f2a3f3941_1072x510.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eCpd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb1db5-4893-4a61-8152-ba9f2a3f3941_1072x510.png" width="1072" height="510" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/daeb1db5-4893-4a61-8152-ba9f2a3f3941_1072x510.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:510,&quot;width&quot;:1072,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:54409,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eCpd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb1db5-4893-4a61-8152-ba9f2a3f3941_1072x510.png 424w, https://substackcdn.com/image/fetch/$s_!eCpd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb1db5-4893-4a61-8152-ba9f2a3f3941_1072x510.png 848w, https://substackcdn.com/image/fetch/$s_!eCpd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb1db5-4893-4a61-8152-ba9f2a3f3941_1072x510.png 1272w, https://substackcdn.com/image/fetch/$s_!eCpd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaeb1db5-4893-4a61-8152-ba9f2a3f3941_1072x510.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">In-sample weights of the optimization (target: Sharpe ratio)</figcaption></figure></div><p>These are the results for the optimized portfolio out-of-sample:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xhGb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e147bd4-c02a-409a-8bfb-13c098ebf809_1510x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xhGb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e147bd4-c02a-409a-8bfb-13c098ebf809_1510x1472.png 424w, https://substackcdn.com/image/fetch/$s_!xhGb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e147bd4-c02a-409a-8bfb-13c098ebf809_1510x1472.png 848w, https://substackcdn.com/image/fetch/$s_!xhGb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e147bd4-c02a-409a-8bfb-13c098ebf809_1510x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!xhGb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e147bd4-c02a-409a-8bfb-13c098ebf809_1510x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xhGb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e147bd4-c02a-409a-8bfb-13c098ebf809_1510x1472.png" width="1456" height="1419" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e147bd4-c02a-409a-8bfb-13c098ebf809_1510x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1419,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:560945,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xhGb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e147bd4-c02a-409a-8bfb-13c098ebf809_1510x1472.png 424w, https://substackcdn.com/image/fetch/$s_!xhGb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e147bd4-c02a-409a-8bfb-13c098ebf809_1510x1472.png 848w, https://substackcdn.com/image/fetch/$s_!xhGb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e147bd4-c02a-409a-8bfb-13c098ebf809_1510x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!xhGb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e147bd4-c02a-409a-8bfb-13c098ebf809_1510x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the optimized portfolio</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8h0Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc6badba-6f45-4441-98bb-4f8f0927242d_1074x1334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8h0Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc6badba-6f45-4441-98bb-4f8f0927242d_1074x1334.png 424w, https://substackcdn.com/image/fetch/$s_!8h0Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc6badba-6f45-4441-98bb-4f8f0927242d_1074x1334.png 848w, https://substackcdn.com/image/fetch/$s_!8h0Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc6badba-6f45-4441-98bb-4f8f0927242d_1074x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!8h0Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc6badba-6f45-4441-98bb-4f8f0927242d_1074x1334.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8h0Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc6badba-6f45-4441-98bb-4f8f0927242d_1074x1334.png" width="1074" height="1334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc6badba-6f45-4441-98bb-4f8f0927242d_1074x1334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1334,&quot;width&quot;:1074,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:307299,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8h0Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc6badba-6f45-4441-98bb-4f8f0927242d_1074x1334.png 424w, https://substackcdn.com/image/fetch/$s_!8h0Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc6badba-6f45-4441-98bb-4f8f0927242d_1074x1334.png 848w, https://substackcdn.com/image/fetch/$s_!8h0Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc6badba-6f45-4441-98bb-4f8f0927242d_1074x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!8h0Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc6badba-6f45-4441-98bb-4f8f0927242d_1074x1334.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics out-of-sample</figcaption></figure></div><p>Highlights:</p><ul><li><p>The annual return reached 27.7% vs. 6.5% the NQ in the same period (since Jan'22);</p></li><li><p>The maximum drawdown is at 13.5% vs. 35% the benchmark;</p></li><li><p>Sharpe ratio is at 1.17 vs. 0.40 NQ.</p></li></ul><p>Now, let's look at the monthly and annual returns out-of-sample:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yHVl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a187552-6b06-49fe-8416-add429ec888a_1412x226.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yHVl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a187552-6b06-49fe-8416-add429ec888a_1412x226.png 424w, https://substackcdn.com/image/fetch/$s_!yHVl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a187552-6b06-49fe-8416-add429ec888a_1412x226.png 848w, https://substackcdn.com/image/fetch/$s_!yHVl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a187552-6b06-49fe-8416-add429ec888a_1412x226.png 1272w, https://substackcdn.com/image/fetch/$s_!yHVl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a187552-6b06-49fe-8416-add429ec888a_1412x226.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yHVl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a187552-6b06-49fe-8416-add429ec888a_1412x226.png" width="1412" height="226" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8a187552-6b06-49fe-8416-add429ec888a_1412x226.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:226,&quot;width&quot;:1412,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:207443,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yHVl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a187552-6b06-49fe-8416-add429ec888a_1412x226.png 424w, https://substackcdn.com/image/fetch/$s_!yHVl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a187552-6b06-49fe-8416-add429ec888a_1412x226.png 848w, https://substackcdn.com/image/fetch/$s_!yHVl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a187552-6b06-49fe-8416-add429ec888a_1412x226.png 1272w, https://substackcdn.com/image/fetch/$s_!yHVl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a187552-6b06-49fe-8416-add429ec888a_1412x226.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>If we had traded this strategy since 2022:</p><ul><li><p>We would have had <strong>only positive years;</strong></p></li><li><p>We would have seen <strong>76% of the months positive</strong>, with the best at +11.2% (Feb'23);</p></li><li><p>We would have seen <strong>24% of the months negative</strong>, with the worst at -8.5% (Jun'22);</p></li><li><p>The <strong>longest</strong> <strong>positive streak</strong> would have been <strong>6 months</strong>, from Apr'24 to Sep'24;</p></li><li><p>We would nave <strong>not seen two consecutive negative months</strong>.</p></li></ul><h1>Final thoughts</h1><p>Several people have asked me to develop trend-following strategies, especially applied to futures. This is a first study in the trend-following/futures direction. I combined it with my curiosity in exploring shorter timeframes and Databento's datasets. But there's still much to do in that front.</p><p>In my experience, whenever we try shorter timeframes, we encounter challenges in the execution front. So, before trading a system like this, I would have to carefully develop the execution algorithm and observe it for a while until acquiring enough conviction that the forward test results were inline with the backtest results.</p><p>Here are some improvements and tests to run on this idea before moving into production:</p><ul><li><p>Diversify the system, applying it to several futures markets;</p></li><li><p>Test it with different timeframes (5&#8217;, 10&#8217;, 15&#8217;, 30&#8217;, 1h, etc);</p></li><li><p>Try more sets of noise parameters in the Kalman filters.</p></li></ul><p>Over the past few months, I've been completely immersed in deploying and running live strategies. In November, we had a nice +8% return with all strategies combined. Looking forward, I believe I will be able to resume writing once a week or once every other week in January.</p><p>I'd love to hear your thoughts about this approach. If you have any questions or comments, <strong>just reach out via <a href="https://x.com/quantitativo1">Twitter</a> or <a href="mailto:cs@quantitativo.com">email</a></strong>.</p><p>Cheers!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Statistical Arbitrage]]></title><description><![CDATA[Can we get over 20% of annual returns uncorrelated with market risk?]]></description><link>https://www.quantitativo.com/p/statistical-arbitrage</link><guid isPermaLink="false">https://www.quantitativo.com/p/statistical-arbitrage</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Sun, 10 Nov 2024 19:18:14 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!C3oF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!C3oF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!C3oF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png 424w, https://substackcdn.com/image/fetch/$s_!C3oF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png 848w, https://substackcdn.com/image/fetch/$s_!C3oF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png 1272w, https://substackcdn.com/image/fetch/$s_!C3oF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!C3oF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png" width="1456" height="1019" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1019,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2792327,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!C3oF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png 424w, https://substackcdn.com/image/fetch/$s_!C3oF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png 848w, https://substackcdn.com/image/fetch/$s_!C3oF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png 1272w, https://substackcdn.com/image/fetch/$s_!C3oF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4b0547c-e48b-4f3b-9649-f82923d44472_2048x1434.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Ray Dalio, founder of Bridgewater Associates, the largest hedge fund in the world</figcaption></figure></div><h1>The idea</h1><blockquote><p>"The holy grail of investing is to have 15 or more good, uncorrelated return streams.&#8221; Ray Dalio.</p></blockquote><p>I find Ray Dalio's story truly inspiring. From founding Bridgewater Associates in his two-bedroom apartment and growing it into the largest hedge fund in the world to publicly sharing the principles that guided him&#8212;what he did right and wrong throughout the years&#8212;Dalio has always prioritized transparency and self-reflection. His journey is marked not just by his success but by his willingness to openly acknowledge his mistakes, learn from them, and turn those lessons into tools for others.</p><p>The greatest obstacle to rational decision-making, he found, was &#8220;the ego barrier,&#8221; the desire to prove oneself right and others wrong, even in the face of evidence to the contrary. I believe so many people on Twitter would profit from applying his principles. Anyway&#8230;</p><p>As he openly shares his thoughts, there are many great quotes from him. One of the greatest is about the holy grail of investing, according to him: having 15 or more good, <strong>uncorrelated return streams.</strong></p><p>So far, all ideas I have shared are somewhat positively correlated with the market. This week, I am sharing the overall gist of a statistical arbitrage model I've been working on for the past weeks.</p><p>A key characteristic of statistical arbitrage is the <strong>market neutrality</strong>. Stat arb strategies typically aim to be <strong>market-neutral</strong> by <strong>balancing long and short positions</strong>, <strong>reducing exposure to overall market movements</strong>, and focusing on the spread between assets. This will be one of the key focus of this idea.</p><p>Here's our plan:</p><ol><li><p>First, we will introduce statistical arbitrage, explain some of its most popular variations, and select one on which to build our model.</p></li><li><p>Second, we will explain our model and the approach used to create it.</p></li><li><p>Then, we will prove our model has a statistical edge.</p></li><li><p>Next, we will devise a strategy that profitably uses our model.</p></li><li><p>Finally, we will perform some backtest experiments and analyze the results.</p></li></ol><p>This is a model I've been developing for production. So, as usual, I will share the overall gist but not every single detail. You can fill in the blanks using your creativity.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1>Statistical Arbitrage</h1><p>My goal is not to provide a full review of statistical arbitrage. However, defining the term is a good introduction to our strategy.</p><p>Statistical arbitrage can be defined as a <strong>quantitative trading strategy</strong> that identifies <strong>short-term pricing discrepancies</strong> between financial instruments based on statistical models, which aim to detect and capitalize on <strong>temporary deviations</strong> from expected price relationships or historical norms. The strategy often <strong>balances long and short positions</strong> to remain <strong>market-neutral</strong> and aims for <strong>mean reversion</strong> or relative convergence to generate returns.</p><h2>Key Characteristics of Statistical Arbitrage</h2><ul><li><p><strong>Market Neutrality</strong>: Stat arb strategies typically aim to be market-neutral by balancing long and short positions, reducing exposure to overall market movements, and focusing on the spread between assets.</p></li><li><p><strong>Mean Reversion</strong>: The strategy often assumes that price deviations between pairs or groups of assets are temporary and will revert to a mean or historical relationship.</p></li><li><p><strong>Relative Value Focus</strong>: Rather than forecasting absolute price movements, statistical arbitrage relies on relative mispricing. It profits from the <strong>convergence of misaligned prices</strong> between correlated or cointegrated assets.</p></li><li><p><strong>High Volume and Short Holding Periods</strong>: Stat arb strategies often involve a large number of trades over short holding periods, attempting to capture small, frequent gains.</p></li><li><p><strong>Data-Driven Models</strong>: These strategies use advanced statistical techniques, such as machine learning, regression analysis, and time series models, to identify profitable opportunities based on historical data patterns.</p></li><li><p><strong>Risk Management</strong>: Statistical arbitrage incorporates risk management techniques to limit losses from unpredictable deviations. Strategies are tested and backtested rigorously to ensure robustness.</p></li></ul><h2>Example Applications</h2><ul><li><p><strong>Pairs Trading</strong>: A classic stat arb strategy that identifies two historically correlated assets (like stocks in the same sector) and trades on temporary deviations in their price relationship;</p></li><li><p><strong>Multi-Asset Portfolios</strong>: Long and short positions are taken across a basket of stocks based on factor models;</p></li><li><p><strong>Machine Learning-Based Predictions</strong>: Using models to predict short-term returns and rank assets, then taking offsetting long and short positions based on relative rankings.</p></li></ul><h1>The model</h1><p>Our strategy is based on machine learning-based predictions. We will develop a simple model to predict short-term returns and rank assets. Then, we will long the top predictions and short the bottom ones, continuously creating market-neutral portfolios.</p><h2>The dataset and features</h2><p>I use Norgate data, a great survivorship-bias-free dataset. To collect data points, I settled on the Russell 3000 universe (current and past).</p><p>For features, I use:</p><ul><li><p>Rates of change for different windows (short, mid, and long terms, up to a year);</p></li><li><p>Distances from the last price to moving averages of different lookback windows (also up to a year);</p></li><li><p>How far the last volume is from the past 6 months average</p></li></ul><p>All distances are computed in percentages so we can compare apples to apples. Then, they are properly standardized.</p><p>For target, we get the next 3-days return.</p><p>Before training and using the model, we transform the returns in the features and the target into log returns.</p><h2>Algorithm options</h2><p>I formulated this problem as a&nbsp;<strong>regression problem</strong>. The trained model will try to predict the magnitude of the log return for the next 3 days.</p><p>Several possible algorithms exist: simple linear regression, Ridge regression, Lasso regression, Elastic-Net, and more advanced models like Decision Trees, Random Forests, and Gradient Boosting Machines (GBM). We could also leverage ensemble techniques, such as XGBoost or LightGBM, known for their strong performance on regression tasks with structured data. Each model has its strengths; for instance, linear regression provides interpretability, while regularization methods like Ridge and Lasso help prevent overfitting by penalizing large coefficients. Meanwhile, tree-based models can capture non-linear relationships within the data, which may improve predictive accuracy in financial time series data.</p><h2>The training process</h2><p>To train the model, we will use the&nbsp;<strong>sliding window technique</strong>, with 10 years of lookback,&nbsp;<strong>retraining the model at the beginning of every year:</strong></p><ul><li><p>2024 model: trained with data from 2014 to 2023;</p></li><li><p>2023 model: trained with data from 2013 to 2022;</p></li><li><p>2022 model: trained with data from 2012 to 2021;</p></li><li><p>So on and so forth.</p></li></ul><h1>The edge</h1><p>After training the model, the first question we want to answer is: what is the edge of using such a model?</p><p>To analyze that, we:</p><ul><li><p>Compute the prediction for every stock in the universe for every day since 2010;</p></li><li><p>Compute the realized future returns for every stock;</p></li><li><p>Assign a decile to each stock every day;</p></li><li><p>Aggregate by decile and annualize returns.</p></li></ul><p>Here's what we found:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rOKz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94818f8c-dbc5-40db-9ebd-758139b931bd_1982x1248.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rOKz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94818f8c-dbc5-40db-9ebd-758139b931bd_1982x1248.png 424w, https://substackcdn.com/image/fetch/$s_!rOKz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94818f8c-dbc5-40db-9ebd-758139b931bd_1982x1248.png 848w, https://substackcdn.com/image/fetch/$s_!rOKz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94818f8c-dbc5-40db-9ebd-758139b931bd_1982x1248.png 1272w, https://substackcdn.com/image/fetch/$s_!rOKz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94818f8c-dbc5-40db-9ebd-758139b931bd_1982x1248.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rOKz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94818f8c-dbc5-40db-9ebd-758139b931bd_1982x1248.png" width="1456" height="917" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/94818f8c-dbc5-40db-9ebd-758139b931bd_1982x1248.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:917,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:153434,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rOKz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94818f8c-dbc5-40db-9ebd-758139b931bd_1982x1248.png 424w, https://substackcdn.com/image/fetch/$s_!rOKz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94818f8c-dbc5-40db-9ebd-758139b931bd_1982x1248.png 848w, https://substackcdn.com/image/fetch/$s_!rOKz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94818f8c-dbc5-40db-9ebd-758139b931bd_1982x1248.png 1272w, https://substackcdn.com/image/fetch/$s_!rOKz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94818f8c-dbc5-40db-9ebd-758139b931bd_1982x1248.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Mean return across deciles</figcaption></figure></div><p>This is precisely what we expected:</p><ul><li><p>The top-decile stocks (1st decile) show the highest returns</p></li><li><p>The bottom-decile stocks (10th decile) show the lowest (negative) returns</p></li><li><p>This is what we need to create a&nbsp;<strong>long-short portfolio</strong></p></li></ul><h1>The strategy</h1><p>Here are the rules to use our model. We will split our capital into three equal portfolios. Each portfolio will be rebalanced every 3 days. The only difference between each of them will be the starting date. For each portfolio:</p><ul><li><p>At the opening of a 3-day cycle, we will use the model to compute the next 3-day log returns for all Russell 3000 constituents on that date;</p></li><li><p>We will go long on the top 20 predictions and short on the bottom 20 predictions;</p></li><li><p>We will cap any position in no more than 3% of the available capital;</p></li><li><p>We will exclude penny stocks (price below $1), biotech stocks, and meme stocks;</p></li><li><p>After 3 days, at the opening, we will close all the positions and repeat the process.</p></li></ul><p>That's it. It is crucial to exclude penny stocks, biotech stocks, and meme stocks, as these stocks show the largest overnight price swings. A short position in them might severely impact the returns. Identifying penny stocks and biotech stocks is trivial (Norgate has a great classification system). Identifying meme stocks programmatically is not that complicated: a good method can be found <a href="https://counterpointfunds.com/meme-stocks/">here</a>.</p><p>Throughout all the experiments, we will consider 10 basis points in trading costs in every trade.</p><h1>Experiments</h1><p>Here are the results of the first experiment:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U4jl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20bf062-2f27-4583-9dcf-943a632d4ef6_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U4jl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20bf062-2f27-4583-9dcf-943a632d4ef6_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!U4jl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20bf062-2f27-4583-9dcf-943a632d4ef6_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!U4jl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20bf062-2f27-4583-9dcf-943a632d4ef6_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!U4jl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20bf062-2f27-4583-9dcf-943a632d4ef6_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U4jl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20bf062-2f27-4583-9dcf-943a632d4ef6_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c20bf062-2f27-4583-9dcf-943a632d4ef6_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:684332,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U4jl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20bf062-2f27-4583-9dcf-943a632d4ef6_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!U4jl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20bf062-2f27-4583-9dcf-943a632d4ef6_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!U4jl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20bf062-2f27-4583-9dcf-943a632d4ef6_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!U4jl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc20bf062-2f27-4583-9dcf-943a632d4ef6_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity curve, drawdown curve, and annual returns for the first experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nRJJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F252d8672-5af2-4ecc-a496-795fa922187d_1074x1334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nRJJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F252d8672-5af2-4ecc-a496-795fa922187d_1074x1334.png 424w, https://substackcdn.com/image/fetch/$s_!nRJJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F252d8672-5af2-4ecc-a496-795fa922187d_1074x1334.png 848w, https://substackcdn.com/image/fetch/$s_!nRJJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F252d8672-5af2-4ecc-a496-795fa922187d_1074x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!nRJJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F252d8672-5af2-4ecc-a496-795fa922187d_1074x1334.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nRJJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F252d8672-5af2-4ecc-a496-795fa922187d_1074x1334.png" width="1074" height="1334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/252d8672-5af2-4ecc-a496-795fa922187d_1074x1334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1334,&quot;width&quot;:1074,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:315075,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nRJJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F252d8672-5af2-4ecc-a496-795fa922187d_1074x1334.png 424w, https://substackcdn.com/image/fetch/$s_!nRJJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F252d8672-5af2-4ecc-a496-795fa922187d_1074x1334.png 848w, https://substackcdn.com/image/fetch/$s_!nRJJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F252d8672-5af2-4ecc-a496-795fa922187d_1074x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!nRJJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F252d8672-5af2-4ecc-a496-795fa922187d_1074x1334.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6Lpm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb73dc8f3-79be-4686-806d-14480950328f_1088x870.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6Lpm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb73dc8f3-79be-4686-806d-14480950328f_1088x870.png 424w, https://substackcdn.com/image/fetch/$s_!6Lpm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb73dc8f3-79be-4686-806d-14480950328f_1088x870.png 848w, https://substackcdn.com/image/fetch/$s_!6Lpm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb73dc8f3-79be-4686-806d-14480950328f_1088x870.png 1272w, https://substackcdn.com/image/fetch/$s_!6Lpm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb73dc8f3-79be-4686-806d-14480950328f_1088x870.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6Lpm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb73dc8f3-79be-4686-806d-14480950328f_1088x870.png" width="1088" height="870" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b73dc8f3-79be-4686-806d-14480950328f_1088x870.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:870,&quot;width&quot;:1088,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:207103,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6Lpm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb73dc8f3-79be-4686-806d-14480950328f_1088x870.png 424w, https://substackcdn.com/image/fetch/$s_!6Lpm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb73dc8f3-79be-4686-806d-14480950328f_1088x870.png 848w, https://substackcdn.com/image/fetch/$s_!6Lpm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb73dc8f3-79be-4686-806d-14480950328f_1088x870.png 1272w, https://substackcdn.com/image/fetch/$s_!6Lpm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb73dc8f3-79be-4686-806d-14480950328f_1088x870.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest trades</figcaption></figure></div><p>Highlights:</p><ul><li><p>The first experiment delivered an impressive <strong>21.7%</strong> annual return, ~2x the S&amp;P 500 during the same period;</p></li><li><p>The risk-adjusted return is <strong>1.46</strong>, over twice the benchmark;</p></li><li><p>The maximum drawdown is <strong>21.8%,</strong> also better than the benchmark;</p></li><li><p>The expected return/trade is <strong>+0.76%,</strong> with a win rate of <strong>49.8%</strong> and a payoff ratio of 1.24.</p></li></ul><p>Not bad for a first experiment. The most impressive result, in my opinion, is that <strong>this result is uncorrelated to the market</strong>: the correlation to S&amp;P 500 daily returns is only 0.09.</p><p>Let's see if we can improve these results.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/statistical-arbitrage?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/statistical-arbitrage?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/statistical-arbitrage?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1>Reducing the number of positions</h1><p>My first idea to improve the results is to reduce the number of positions: instead of 20 longs and 20 shorts every day, let's reduce it to 10. Additionally, let's relax the 3% maximum cap of any position, increasing it to 4%.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uyMw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce108fec-3203-46e4-bf12-511abb9cade9_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uyMw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce108fec-3203-46e4-bf12-511abb9cade9_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!uyMw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce108fec-3203-46e4-bf12-511abb9cade9_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!uyMw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce108fec-3203-46e4-bf12-511abb9cade9_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!uyMw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce108fec-3203-46e4-bf12-511abb9cade9_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uyMw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce108fec-3203-46e4-bf12-511abb9cade9_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ce108fec-3203-46e4-bf12-511abb9cade9_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:661041,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uyMw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce108fec-3203-46e4-bf12-511abb9cade9_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!uyMw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce108fec-3203-46e4-bf12-511abb9cade9_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!uyMw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce108fec-3203-46e4-bf12-511abb9cade9_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!uyMw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce108fec-3203-46e4-bf12-511abb9cade9_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity curve, drawdown curve, and annual returns for the second experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bIb3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6676fa45-9ea5-49a2-bfc5-d4a4fd8c394a_1072x1328.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bIb3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6676fa45-9ea5-49a2-bfc5-d4a4fd8c394a_1072x1328.png 424w, https://substackcdn.com/image/fetch/$s_!bIb3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6676fa45-9ea5-49a2-bfc5-d4a4fd8c394a_1072x1328.png 848w, https://substackcdn.com/image/fetch/$s_!bIb3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6676fa45-9ea5-49a2-bfc5-d4a4fd8c394a_1072x1328.png 1272w, https://substackcdn.com/image/fetch/$s_!bIb3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6676fa45-9ea5-49a2-bfc5-d4a4fd8c394a_1072x1328.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bIb3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6676fa45-9ea5-49a2-bfc5-d4a4fd8c394a_1072x1328.png" width="1072" height="1328" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6676fa45-9ea5-49a2-bfc5-d4a4fd8c394a_1072x1328.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1328,&quot;width&quot;:1072,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:316082,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bIb3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6676fa45-9ea5-49a2-bfc5-d4a4fd8c394a_1072x1328.png 424w, https://substackcdn.com/image/fetch/$s_!bIb3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6676fa45-9ea5-49a2-bfc5-d4a4fd8c394a_1072x1328.png 848w, https://substackcdn.com/image/fetch/$s_!bIb3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6676fa45-9ea5-49a2-bfc5-d4a4fd8c394a_1072x1328.png 1272w, https://substackcdn.com/image/fetch/$s_!bIb3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6676fa45-9ea5-49a2-bfc5-d4a4fd8c394a_1072x1328.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-Qm3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ad616d-259a-4a5e-8988-57afbed618ed_1090x864.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-Qm3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ad616d-259a-4a5e-8988-57afbed618ed_1090x864.png 424w, https://substackcdn.com/image/fetch/$s_!-Qm3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ad616d-259a-4a5e-8988-57afbed618ed_1090x864.png 848w, https://substackcdn.com/image/fetch/$s_!-Qm3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ad616d-259a-4a5e-8988-57afbed618ed_1090x864.png 1272w, https://substackcdn.com/image/fetch/$s_!-Qm3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ad616d-259a-4a5e-8988-57afbed618ed_1090x864.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-Qm3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ad616d-259a-4a5e-8988-57afbed618ed_1090x864.png" width="1090" height="864" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/64ad616d-259a-4a5e-8988-57afbed618ed_1090x864.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:864,&quot;width&quot;:1090,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:211573,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-Qm3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ad616d-259a-4a5e-8988-57afbed618ed_1090x864.png 424w, https://substackcdn.com/image/fetch/$s_!-Qm3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ad616d-259a-4a5e-8988-57afbed618ed_1090x864.png 848w, https://substackcdn.com/image/fetch/$s_!-Qm3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ad616d-259a-4a5e-8988-57afbed618ed_1090x864.png 1272w, https://substackcdn.com/image/fetch/$s_!-Qm3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ad616d-259a-4a5e-8988-57afbed618ed_1090x864.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest trades</figcaption></figure></div><p>We were able to improve the results while cutting the number of trades by half. Here are the highlights:</p><ul><li><p>Annual return improved +1 ppt to <strong>22.7%;</strong></p></li><li><p>Sharpe ratio also improved, now at <strong>1.57;</strong></p></li><li><p>The maximum drawdown reduced to <strong>16.6%</strong>, now less than half the benchmark;</p></li><li><p>The average return/trade improved to <strong>+0.98%,</strong> with an improvement in both the win ratio (now at <strong>50.1%</strong>) and payoff ratio (now at <strong>1.28</strong>).</p></li></ul><p>The strategy continues with a <strong>low correlation to the market (0.11)</strong>.</p><p>What else can we do to improve it?</p><h1>Increasing the trade frequency</h1><p>Now, instead of holding positions for 3 days, let's close it sooner, in 2 days. So, instead of splitting our capital into three portfolios, let's split it into 2. Let's see how increasing the frequency impacts the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!K_5J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff204ab99-1a05-46a7-b339-ca8fef2c6f43_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!K_5J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff204ab99-1a05-46a7-b339-ca8fef2c6f43_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!K_5J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff204ab99-1a05-46a7-b339-ca8fef2c6f43_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!K_5J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff204ab99-1a05-46a7-b339-ca8fef2c6f43_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!K_5J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff204ab99-1a05-46a7-b339-ca8fef2c6f43_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!K_5J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff204ab99-1a05-46a7-b339-ca8fef2c6f43_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f204ab99-1a05-46a7-b339-ca8fef2c6f43_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:671377,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!K_5J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff204ab99-1a05-46a7-b339-ca8fef2c6f43_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!K_5J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff204ab99-1a05-46a7-b339-ca8fef2c6f43_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!K_5J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff204ab99-1a05-46a7-b339-ca8fef2c6f43_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!K_5J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff204ab99-1a05-46a7-b339-ca8fef2c6f43_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity curve, drawdown curve, and annual returns for the third experiment</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kJsx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0705e600-9e77-4d60-9b93-bbecc9ccf14e_1066x1336.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kJsx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0705e600-9e77-4d60-9b93-bbecc9ccf14e_1066x1336.png 424w, https://substackcdn.com/image/fetch/$s_!kJsx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0705e600-9e77-4d60-9b93-bbecc9ccf14e_1066x1336.png 848w, https://substackcdn.com/image/fetch/$s_!kJsx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0705e600-9e77-4d60-9b93-bbecc9ccf14e_1066x1336.png 1272w, https://substackcdn.com/image/fetch/$s_!kJsx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0705e600-9e77-4d60-9b93-bbecc9ccf14e_1066x1336.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kJsx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0705e600-9e77-4d60-9b93-bbecc9ccf14e_1066x1336.png" width="1066" height="1336" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0705e600-9e77-4d60-9b93-bbecc9ccf14e_1066x1336.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1336,&quot;width&quot;:1066,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:320330,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kJsx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0705e600-9e77-4d60-9b93-bbecc9ccf14e_1066x1336.png 424w, https://substackcdn.com/image/fetch/$s_!kJsx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0705e600-9e77-4d60-9b93-bbecc9ccf14e_1066x1336.png 848w, https://substackcdn.com/image/fetch/$s_!kJsx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0705e600-9e77-4d60-9b93-bbecc9ccf14e_1066x1336.png 1272w, https://substackcdn.com/image/fetch/$s_!kJsx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0705e600-9e77-4d60-9b93-bbecc9ccf14e_1066x1336.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zbWH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffde125b8-cc51-4ce2-ba68-c2250eb16932_1096x866.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zbWH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffde125b8-cc51-4ce2-ba68-c2250eb16932_1096x866.png 424w, https://substackcdn.com/image/fetch/$s_!zbWH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffde125b8-cc51-4ce2-ba68-c2250eb16932_1096x866.png 848w, https://substackcdn.com/image/fetch/$s_!zbWH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffde125b8-cc51-4ce2-ba68-c2250eb16932_1096x866.png 1272w, https://substackcdn.com/image/fetch/$s_!zbWH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffde125b8-cc51-4ce2-ba68-c2250eb16932_1096x866.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zbWH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffde125b8-cc51-4ce2-ba68-c2250eb16932_1096x866.png" width="1096" height="866" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fde125b8-cc51-4ce2-ba68-c2250eb16932_1096x866.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:866,&quot;width&quot;:1096,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:204933,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zbWH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffde125b8-cc51-4ce2-ba68-c2250eb16932_1096x866.png 424w, https://substackcdn.com/image/fetch/$s_!zbWH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffde125b8-cc51-4ce2-ba68-c2250eb16932_1096x866.png 848w, https://substackcdn.com/image/fetch/$s_!zbWH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffde125b8-cc51-4ce2-ba68-c2250eb16932_1096x866.png 1272w, https://substackcdn.com/image/fetch/$s_!zbWH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffde125b8-cc51-4ce2-ba68-c2250eb16932_1096x866.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest trades</figcaption></figure></div><p>So, much better results:</p><ul><li><p>The annual return had a significant improvement, now at <strong>28.2%;</strong></p></li><li><p>The risk-adjusted return also improved, now at <strong>1.72;</strong></p></li><li><p>The maximum drawdown remained at <strong>16.7%.</strong></p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-XcN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde8773d-63c0-441c-87c3-7d746f0fddb2_1410x780.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-XcN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde8773d-63c0-441c-87c3-7d746f0fddb2_1410x780.png 424w, https://substackcdn.com/image/fetch/$s_!-XcN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde8773d-63c0-441c-87c3-7d746f0fddb2_1410x780.png 848w, https://substackcdn.com/image/fetch/$s_!-XcN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde8773d-63c0-441c-87c3-7d746f0fddb2_1410x780.png 1272w, https://substackcdn.com/image/fetch/$s_!-XcN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde8773d-63c0-441c-87c3-7d746f0fddb2_1410x780.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-XcN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde8773d-63c0-441c-87c3-7d746f0fddb2_1410x780.png" width="1410" height="780" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cde8773d-63c0-441c-87c3-7d746f0fddb2_1410x780.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:780,&quot;width&quot;:1410,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:960233,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-XcN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde8773d-63c0-441c-87c3-7d746f0fddb2_1410x780.png 424w, https://substackcdn.com/image/fetch/$s_!-XcN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde8773d-63c0-441c-87c3-7d746f0fddb2_1410x780.png 848w, https://substackcdn.com/image/fetch/$s_!-XcN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde8773d-63c0-441c-87c3-7d746f0fddb2_1410x780.png 1272w, https://substackcdn.com/image/fetch/$s_!-XcN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcde8773d-63c0-441c-87c3-7d746f0fddb2_1410x780.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><p>If we had traded this strategy since 2010:</p><ul><li><p>We would have had&nbsp;<strong>only positive years;</strong></p></li><li><p>We would have seen&nbsp;<strong>66% of the months positive</strong>, with the best at +14.4% (Oct'15);</p></li><li><p>We would have seen&nbsp;<strong>34% of the months negative</strong>, with the worst at -8.6% (Apr'22);</p></li><li><p>The&nbsp;<strong>longest</strong>&nbsp;<strong>positive streak</strong>&nbsp;would have been&nbsp;<strong>18 months</strong>, from Aug'19 to Mar'20;</p></li><li><p>The&nbsp;<strong>longest negative streak</strong>&nbsp;would have been&nbsp;<strong>4 months</strong>, from Jul'20 to Oct'20.</p></li></ul><h1>How much of this performance is explained by common risk factors?</h1><p>Now, let's use the Fama-French 3-Factor Model to <strong>analyze how much of the strategy's performance can be attributed to common risk factors</strong> like the market, size, and value. By running an OLS regression on the strategy's excess returns using the Fama-French factors, we can break down the sources of performance into:</p><ol><li><p><strong>Market Risk (Mkt-RF)</strong>: The sensitivity of the portfolio to market movements, which reflects general market exposure.</p></li><li><p><strong>Size (SMB)</strong>: The sensitivity of the portfolio to the size factor, indicating whether it leans towards small or large-cap stocks.</p></li><li><p><strong>Value (HML)</strong>: The sensitivity to the value factor, showing whether it favors value or growth stocks.</p></li></ol><p>We used the daily data from <a href="https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html">Kenneth French's website</a>. Here are the results:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5f1G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2bcea1a-a14e-4fba-af3b-2edffeb30183_1380x376.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5f1G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2bcea1a-a14e-4fba-af3b-2edffeb30183_1380x376.png 424w, https://substackcdn.com/image/fetch/$s_!5f1G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2bcea1a-a14e-4fba-af3b-2edffeb30183_1380x376.png 848w, https://substackcdn.com/image/fetch/$s_!5f1G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2bcea1a-a14e-4fba-af3b-2edffeb30183_1380x376.png 1272w, https://substackcdn.com/image/fetch/$s_!5f1G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2bcea1a-a14e-4fba-af3b-2edffeb30183_1380x376.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5f1G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2bcea1a-a14e-4fba-af3b-2edffeb30183_1380x376.png" width="1380" height="376" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a2bcea1a-a14e-4fba-af3b-2edffeb30183_1380x376.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:376,&quot;width&quot;:1380,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:107964,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5f1G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2bcea1a-a14e-4fba-af3b-2edffeb30183_1380x376.png 424w, https://substackcdn.com/image/fetch/$s_!5f1G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2bcea1a-a14e-4fba-af3b-2edffeb30183_1380x376.png 848w, https://substackcdn.com/image/fetch/$s_!5f1G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2bcea1a-a14e-4fba-af3b-2edffeb30183_1380x376.png 1272w, https://substackcdn.com/image/fetch/$s_!5f1G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2bcea1a-a14e-4fba-af3b-2edffeb30183_1380x376.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">OLS Regression Results</figcaption></figure></div><p>Highlights:</p><ul><li><p><strong>Alpha (0.0961)</strong>: Statistically significant and positive, suggesting that the strategy has a daily excess return beyond what is explained by the three factors.</p></li><li><p><strong>Market Beta (0.0777)</strong>: Statistically significant, a coefficient of 0.0777 indicates that for each 1% excess return in the market, the strategy's excess return increases by 0.0777%. So, our strategy is not very sensitive to the market, which was our intention.</p></li><li><p><strong>Size Beta (0.0316)</strong> and <strong>Value Beta (-0.0043)</strong>: Neither is statistically significant, suggesting that exposure to small-cap or value stocks does not meaningfully impact the strategy's returns.</p></li></ul><p>Also, we got an R-squared of 0.010 from the OLS regression results. An R-squared of <strong>0.010</strong> means that only <strong>1% of the variation in daily excess returns is explained by the model.</strong> The <strong>low R-squared</strong> suggests that the model explains only a small portion of daily returns, which is what we want.</p><h1>Final thoughts</h1><p>As I mentioned in the introduction, this model is going into production, so yes, I am trading this system. Nevertheless, there are many improvements yet to be implemented:</p><ul><li><p>So far, the long and short positions are equally distributed across opportunities. We can try different weighting ideas;</p></li><li><p>Throughout the simulation, there is cash sitting idle in the account (what is not required as margin for the short positions). We can invest this capital depending on the market regime, stacking the strategy's returns with other return streams;</p></li><li><p>We can also apply the model to a narrower universe, such as the S&amp;P Composite 1500 or even the S&amp;P 500, and check the results.</p></li></ul><p>Developing an idea like this took me a lot of time, especially debugging. But I'm glad it's now ready for forward testing.</p><p>I'd love to hear your thoughts about this approach. If you have any questions or comments,&nbsp;<strong>just reach out via&nbsp;<a href="https://x.com/quantitativo1">Twitter</a>&nbsp;or&nbsp;<a href="mailto:cs@quantitativo.com">email</a></strong>.</p><p>Cheers!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Mind the gap]]></title><description><![CDATA[Can a good execution algorithm enable a 28% annual return with a 19% max drawdown?]]></description><link>https://www.quantitativo.com/p/mind-the-gap</link><guid isPermaLink="false">https://www.quantitativo.com/p/mind-the-gap</guid><dc:creator><![CDATA[Quantitativo]]></dc:creator><pubDate>Sat, 19 Oct 2024 16:54:31 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!XKy0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F614930f3-d1a2-4058-ae18-99056692d896_900x619.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XKy0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F614930f3-d1a2-4058-ae18-99056692d896_900x619.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XKy0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F614930f3-d1a2-4058-ae18-99056692d896_900x619.png 424w, https://substackcdn.com/image/fetch/$s_!XKy0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F614930f3-d1a2-4058-ae18-99056692d896_900x619.png 848w, https://substackcdn.com/image/fetch/$s_!XKy0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F614930f3-d1a2-4058-ae18-99056692d896_900x619.png 1272w, https://substackcdn.com/image/fetch/$s_!XKy0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F614930f3-d1a2-4058-ae18-99056692d896_900x619.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XKy0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F614930f3-d1a2-4058-ae18-99056692d896_900x619.png" width="900" height="619" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/614930f3-d1a2-4058-ae18-99056692d896_900x619.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:619,&quot;width&quot;:900,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:986657,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XKy0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F614930f3-d1a2-4058-ae18-99056692d896_900x619.png 424w, https://substackcdn.com/image/fetch/$s_!XKy0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F614930f3-d1a2-4058-ae18-99056692d896_900x619.png 848w, https://substackcdn.com/image/fetch/$s_!XKy0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F614930f3-d1a2-4058-ae18-99056692d896_900x619.png 1272w, https://substackcdn.com/image/fetch/$s_!XKy0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F614930f3-d1a2-4058-ae18-99056692d896_900x619.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Engraving Of Isaac Newton And His Notes Burning</figcaption></figure></div><h1><strong>The idea</strong></h1><blockquote><p>"What we know is a drop; what we don't know is an ocean.&#8221; Isaac Newton.</p></blockquote><p>Many of Isaac Newton's early theories and ideas were met with skepticism or outright failure. Newton spent years working on problems related to motion, optics, and gravity, often facing dead ends and revisions.</p><p>In fact, throughout most of his career, Newton was very loathe to publish due to his high intellectual standards and his aversion to the public controversies that publishing original ideas inevitably attracted.</p><p>I am not that worried about public controversies. Whenever I believe I have found an idea that meets my quality standards, I publish it. Also, I am not that worried about being wrong: at the end of the day, the ideas I am sharing are about models, and as George Box has said, &#8220;all models are wrong.&#8221; (But some are useful.)</p><p>Nevertheless, sometimes it takes me a few experiments, and quickly, I find something worthy of sharing by my standards. However, sometimes, it takes me a lot of failed experiments until I arrive at something. That's one of the reasons why it took me three weeks since the last article to publish this one.</p><p>This week's idea is a study on gaps. It's the first statistical investigation on <strong>how trading stocks that have shown gaps</strong> between days might be a profitable idea as long as we have a <strong>careful execution to control slippage.</strong></p><p>There are many resources on the internet explaining all kinds of trading strategies based on gaps. A nice introduction to the topic is <a href="https://bettersystemtrader.com/018-scott-andrews/">Scott &#8216;The Gap Guy&#8217; Andrew's interview with Andrew Swanscott</a>.</p><p>I remember hearing this interview a while ago: it sparked my curiosity, and as a result, I tried several approaches to devise a profitable gap strategy. All failed. The idea went to my &#8220;revisit later&#8221; bucket. I kept revisiting it, and eventually, over these last three weeks, I tried a specific approach that worked this time.</p><p>As usual, this is not a definitive write-up about the topic. None of my articles are. It's the first study that looks promising after looking at the data. In fact, this study seems so promising to me that I will share the overall gist but refrain from quoting specific parameters. But you can fill in the blanks as you please.</p><p>Here's the plan for today:</p><ol><li><p>First, we will look into the <strong>distribution of gaps</strong> for a given stock;</p></li><li><p>Then, we will <strong>statistically prove</strong> that trading these gaps <strong>has an edge;</strong></p></li><li><p>We will then experiment with some backtests</p></li><li><p>Finally, we will talk about <strong>execution</strong>, which is <strong>crucial</strong> to make a strategy like this work.</p></li></ol><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h1>Distribution of gaps</h1><p>First, let's take CSCO as an example. Let's look at its distribution of gaps:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!85U9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa58affc3-0c1f-49c6-a951-cb553d71003e_1950x1140.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!85U9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa58affc3-0c1f-49c6-a951-cb553d71003e_1950x1140.png 424w, https://substackcdn.com/image/fetch/$s_!85U9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa58affc3-0c1f-49c6-a951-cb553d71003e_1950x1140.png 848w, https://substackcdn.com/image/fetch/$s_!85U9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa58affc3-0c1f-49c6-a951-cb553d71003e_1950x1140.png 1272w, https://substackcdn.com/image/fetch/$s_!85U9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa58affc3-0c1f-49c6-a951-cb553d71003e_1950x1140.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!85U9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa58affc3-0c1f-49c6-a951-cb553d71003e_1950x1140.png" width="1456" height="851" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a58affc3-0c1f-49c6-a951-cb553d71003e_1950x1140.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:851,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:151661,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!85U9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa58affc3-0c1f-49c6-a951-cb553d71003e_1950x1140.png 424w, https://substackcdn.com/image/fetch/$s_!85U9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa58affc3-0c1f-49c6-a951-cb553d71003e_1950x1140.png 848w, https://substackcdn.com/image/fetch/$s_!85U9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa58affc3-0c1f-49c6-a951-cb553d71003e_1950x1140.png 1272w, https://substackcdn.com/image/fetch/$s_!85U9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa58affc3-0c1f-49c6-a951-cb553d71003e_1950x1140.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Distribution of gaps in CSCO history</figcaption></figure></div><p>As expected, we see a distribution that resembles a normal distribution centered at zero. Now, let's pick an arbitrary point on the X-axis, i.e., a maximum value, and analyze what would have happened if we had bought all events when CSCO had opened with a gap at or below this value, provided that it also had opened above its 200-day SMA, and sold at the next open:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!noYR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa4763f-1c8c-4018-802d-75e54146e01b_1284x662.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!noYR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa4763f-1c8c-4018-802d-75e54146e01b_1284x662.png 424w, https://substackcdn.com/image/fetch/$s_!noYR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa4763f-1c8c-4018-802d-75e54146e01b_1284x662.png 848w, https://substackcdn.com/image/fetch/$s_!noYR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa4763f-1c8c-4018-802d-75e54146e01b_1284x662.png 1272w, https://substackcdn.com/image/fetch/$s_!noYR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa4763f-1c8c-4018-802d-75e54146e01b_1284x662.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!noYR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa4763f-1c8c-4018-802d-75e54146e01b_1284x662.png" width="1284" height="662" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6fa4763f-1c8c-4018-802d-75e54146e01b_1284x662.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:662,&quot;width&quot;:1284,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:142244,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!noYR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa4763f-1c8c-4018-802d-75e54146e01b_1284x662.png 424w, https://substackcdn.com/image/fetch/$s_!noYR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa4763f-1c8c-4018-802d-75e54146e01b_1284x662.png 848w, https://substackcdn.com/image/fetch/$s_!noYR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa4763f-1c8c-4018-802d-75e54146e01b_1284x662.png 1272w, https://substackcdn.com/image/fetch/$s_!noYR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6fa4763f-1c8c-4018-802d-75e54146e01b_1284x662.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Statistics of buying all events when CSCO price gaps down by a particular value and selling the next day.</figcaption></figure></div><p>There would have been fewer than a thousand of these events throughout history. The <strong>winning rate</strong> would have been <strong>56%,</strong> with an <strong>expected return per trade of 0.2%</strong> overall. That's the gist of the idea.</p><h1>The edge</h1><p>Now, let's check the idea's overall edge. What would have happened if we had bought <strong>all events</strong> when a stock (<strong>belonging to S&amp;P 500</strong>) had had a <strong>gap down</strong> by a particular value, provided that its <strong>opening price</strong> was <strong>above its 200-day MA</strong>, and <strong>sold at the next opening</strong>?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!201z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcc491c7-9498-496d-8833-d1abe62cc322_1284x652.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!201z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcc491c7-9498-496d-8833-d1abe62cc322_1284x652.png 424w, https://substackcdn.com/image/fetch/$s_!201z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcc491c7-9498-496d-8833-d1abe62cc322_1284x652.png 848w, https://substackcdn.com/image/fetch/$s_!201z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcc491c7-9498-496d-8833-d1abe62cc322_1284x652.png 1272w, https://substackcdn.com/image/fetch/$s_!201z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcc491c7-9498-496d-8833-d1abe62cc322_1284x652.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!201z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcc491c7-9498-496d-8833-d1abe62cc322_1284x652.png" width="1284" height="652" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bcc491c7-9498-496d-8833-d1abe62cc322_1284x652.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:652,&quot;width&quot;:1284,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:139229,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!201z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcc491c7-9498-496d-8833-d1abe62cc322_1284x652.png 424w, https://substackcdn.com/image/fetch/$s_!201z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcc491c7-9498-496d-8833-d1abe62cc322_1284x652.png 848w, https://substackcdn.com/image/fetch/$s_!201z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcc491c7-9498-496d-8833-d1abe62cc322_1284x652.png 1272w, https://substackcdn.com/image/fetch/$s_!201z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcc491c7-9498-496d-8833-d1abe62cc322_1284x652.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Statistics of buying all events when stock prices gap down by a particular value and selling the next day.</figcaption></figure></div><p>We see a positive expected return:</p><ul><li><p>We can expect a <strong>+0.1% return/trade;</strong></p></li><li><p>The <strong>win ratio is at 55%;</strong></p></li><li><p>There's a <strong>slightly negative payoff ratio</strong>: the expected return on winning trades is +1.5% vs -1.6% on losing trades.</p></li></ul><p>Looking at non-events (gap downs above the particular value we've chosen), we see an <strong>expected return per trade of only 5 bps</strong> and a <strong>win ratio of 52%</strong>. But most importantly, the&nbsp;<strong>P-value is well below 0.05</strong>: the means of the two distributions are&nbsp;<strong>significantly different</strong>. So, we have an edge.</p><p>Now, let's check how many stocks trigger the entry rule throughout history:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tn2r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefa0e96c-c260-4991-955b-378ff5c588e5_1958x1274.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tn2r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefa0e96c-c260-4991-955b-378ff5c588e5_1958x1274.png 424w, https://substackcdn.com/image/fetch/$s_!tn2r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefa0e96c-c260-4991-955b-378ff5c588e5_1958x1274.png 848w, https://substackcdn.com/image/fetch/$s_!tn2r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefa0e96c-c260-4991-955b-378ff5c588e5_1958x1274.png 1272w, https://substackcdn.com/image/fetch/$s_!tn2r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefa0e96c-c260-4991-955b-378ff5c588e5_1958x1274.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tn2r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefa0e96c-c260-4991-955b-378ff5c588e5_1958x1274.png" width="1456" height="947" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/efa0e96c-c260-4991-955b-378ff5c588e5_1958x1274.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:947,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:798086,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tn2r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefa0e96c-c260-4991-955b-378ff5c588e5_1958x1274.png 424w, https://substackcdn.com/image/fetch/$s_!tn2r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefa0e96c-c260-4991-955b-378ff5c588e5_1958x1274.png 848w, https://substackcdn.com/image/fetch/$s_!tn2r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefa0e96c-c260-4991-955b-378ff5c588e5_1958x1274.png 1272w, https://substackcdn.com/image/fetch/$s_!tn2r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fefa0e96c-c260-4991-955b-378ff5c588e5_1958x1274.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Frequency of events (63-day MA to smooth the curve). The median value is close to 20.</figcaption></figure></div><p>So, we have a <strong>sufficient number of stocks triggering the entry rules.</strong></p><p>Finally, let's look at how this edge varies with <strong>volatility</strong>:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7-OD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c7d41-40b3-4bf9-aec3-b542cbac917b_1162x656.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7-OD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c7d41-40b3-4bf9-aec3-b542cbac917b_1162x656.png 424w, https://substackcdn.com/image/fetch/$s_!7-OD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c7d41-40b3-4bf9-aec3-b542cbac917b_1162x656.png 848w, https://substackcdn.com/image/fetch/$s_!7-OD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c7d41-40b3-4bf9-aec3-b542cbac917b_1162x656.png 1272w, https://substackcdn.com/image/fetch/$s_!7-OD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c7d41-40b3-4bf9-aec3-b542cbac917b_1162x656.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7-OD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c7d41-40b3-4bf9-aec3-b542cbac917b_1162x656.png" width="1162" height="656" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e95c7d41-40b3-4bf9-aec3-b542cbac917b_1162x656.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:656,&quot;width&quot;:1162,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:179470,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7-OD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c7d41-40b3-4bf9-aec3-b542cbac917b_1162x656.png 424w, https://substackcdn.com/image/fetch/$s_!7-OD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c7d41-40b3-4bf9-aec3-b542cbac917b_1162x656.png 848w, https://substackcdn.com/image/fetch/$s_!7-OD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c7d41-40b3-4bf9-aec3-b542cbac917b_1162x656.png 1272w, https://substackcdn.com/image/fetch/$s_!7-OD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c7d41-40b3-4bf9-aec3-b542cbac917b_1162x656.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Statistics of the events by quintile of volatility</figcaption></figure></div><p>An interesting observation is that the <strong>lower the volatility</strong>, the <strong>higher the win ratio</strong> and the <strong>expected return per trade.</strong></p><p>With this fact, we are ready to devise a strategy.</p><h1>Strategy</h1><p>The strategy rules are surprisingly simple:</p><ul><li><p>At the openings, we will look into all <strong>bullish stocks</strong> (open price above 200-day SMA) that opened with a gap down vs. the last day's close;</p></li><li><p>For each stock, we will <strong>check if the gap is wider than a specific threshold</strong>;</p></li><li><p>We will select all stocks that open with a gap wider than the threshold;</p></li><li><p>We will hold <strong>10 stocks maximum;</strong></p></li><li><p>If there are more than 10 stocks, we will <strong>rank them by volatility</strong> and select the <strong>least volatile ones</strong>; if there are fewer, we will trade only the opportunities available;</p></li><li><p>We <strong>will hold these positions until the next opening</strong> when we will sell at the opening and repeat the process.</p></li></ul><p>As you are probably already thinking, this strategy is <strong>pretty sensitive to slippage.</strong></p><p>By the end of the article, we will discuss slippage in more detail and offer ideas on minimizing it.</p><p>For now, it suffices to say that we will start our experiments by considering <strong>10 bps of slippage + trading costs</strong> (5 bps against us while buying, then another 5 bps against us when selling).</p><h1>Experiments</h1><p>Here are the results of the first experiment. By the way, I'm only showing the results starting in 2010 because the results before 2010 were significantly better. Including them doesn't make sense, so we should focus on the more recent 15 years.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xjE2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2a81ea-18b7-485f-8b11-05828eb20716_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xjE2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2a81ea-18b7-485f-8b11-05828eb20716_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!xjE2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2a81ea-18b7-485f-8b11-05828eb20716_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!xjE2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2a81ea-18b7-485f-8b11-05828eb20716_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!xjE2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2a81ea-18b7-485f-8b11-05828eb20716_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xjE2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2a81ea-18b7-485f-8b11-05828eb20716_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f2a81ea-18b7-485f-8b11-05828eb20716_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:649031,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xjE2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2a81ea-18b7-485f-8b11-05828eb20716_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!xjE2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2a81ea-18b7-485f-8b11-05828eb20716_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!xjE2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2a81ea-18b7-485f-8b11-05828eb20716_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!xjE2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2a81ea-18b7-485f-8b11-05828eb20716_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the first experiment: 10 bps of total slippage per trade</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_gv0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d612a8b-766f-42f9-b03b-da71b64c0fac_1070x1328.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_gv0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d612a8b-766f-42f9-b03b-da71b64c0fac_1070x1328.png 424w, https://substackcdn.com/image/fetch/$s_!_gv0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d612a8b-766f-42f9-b03b-da71b64c0fac_1070x1328.png 848w, https://substackcdn.com/image/fetch/$s_!_gv0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d612a8b-766f-42f9-b03b-da71b64c0fac_1070x1328.png 1272w, https://substackcdn.com/image/fetch/$s_!_gv0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d612a8b-766f-42f9-b03b-da71b64c0fac_1070x1328.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_gv0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d612a8b-766f-42f9-b03b-da71b64c0fac_1070x1328.png" width="1070" height="1328" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2d612a8b-766f-42f9-b03b-da71b64c0fac_1070x1328.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1328,&quot;width&quot;:1070,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:316518,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_gv0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d612a8b-766f-42f9-b03b-da71b64c0fac_1070x1328.png 424w, https://substackcdn.com/image/fetch/$s_!_gv0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d612a8b-766f-42f9-b03b-da71b64c0fac_1070x1328.png 848w, https://substackcdn.com/image/fetch/$s_!_gv0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d612a8b-766f-42f9-b03b-da71b64c0fac_1070x1328.png 1272w, https://substackcdn.com/image/fetch/$s_!_gv0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d612a8b-766f-42f9-b03b-da71b64c0fac_1070x1328.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2n7w!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6beb43a1-9932-4a63-850e-e71d18d7dcb3_1092x870.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2n7w!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6beb43a1-9932-4a63-850e-e71d18d7dcb3_1092x870.png 424w, https://substackcdn.com/image/fetch/$s_!2n7w!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6beb43a1-9932-4a63-850e-e71d18d7dcb3_1092x870.png 848w, https://substackcdn.com/image/fetch/$s_!2n7w!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6beb43a1-9932-4a63-850e-e71d18d7dcb3_1092x870.png 1272w, https://substackcdn.com/image/fetch/$s_!2n7w!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6beb43a1-9932-4a63-850e-e71d18d7dcb3_1092x870.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2n7w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6beb43a1-9932-4a63-850e-e71d18d7dcb3_1092x870.png" width="1092" height="870" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6beb43a1-9932-4a63-850e-e71d18d7dcb3_1092x870.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:870,&quot;width&quot;:1092,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:195095,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2n7w!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6beb43a1-9932-4a63-850e-e71d18d7dcb3_1092x870.png 424w, https://substackcdn.com/image/fetch/$s_!2n7w!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6beb43a1-9932-4a63-850e-e71d18d7dcb3_1092x870.png 848w, https://substackcdn.com/image/fetch/$s_!2n7w!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6beb43a1-9932-4a63-850e-e71d18d7dcb3_1092x870.png 1272w, https://substackcdn.com/image/fetch/$s_!2n7w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6beb43a1-9932-4a63-850e-e71d18d7dcb3_1092x870.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest trades</figcaption></figure></div><p>That was surprisingly positive for a first experiment:</p><ul><li><p>The&nbsp;<strong>annual return</strong>&nbsp;achieved is&nbsp;<strong>22.9% vs. 11.8%</strong>&nbsp;the S&amp;P 500 in the same period;</p></li><li><p>The strategy was&nbsp;<strong>positive in 13 out of 15 years</strong>;</p></li><li><p>The&nbsp;<strong>maximum drawdown</strong>&nbsp;is at&nbsp;<strong>19.7%</strong>, below what we aim (20%);</p></li><li><p>The&nbsp;<strong>risk-adjusted return</strong>&nbsp;is at&nbsp;<strong>1.66</strong>&nbsp;(Sharpe), vs 0.73 the benchmark;</p></li><li><p>The strategy trades&nbsp;10 times/day, with a&nbsp;<strong>win rate</strong>&nbsp;of&nbsp;<strong>55.6%;</strong></p></li><li><p>The&nbsp;<strong>expected return per trade</strong>&nbsp;is&nbsp;<strong>+0.11%</strong>, with a&nbsp;<strong>payoff ratio</strong>&nbsp;of&nbsp;<strong>0.96.</strong></p></li></ul><p>How to improve it?</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/mind-the-gap?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/p/mind-the-gap?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantitativo.com/p/mind-the-gap?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h1>Execution considerations</h1><p>As we briefly discussed earlier, the execution is critical. We must <strong>minimize slippage</strong> for this strategy to work while at the same time <strong>maximizing the likelihood of filling all the orders</strong>. This can be done by:</p><ul><li><p>Using <strong>limit orders</strong> instead of market orders to <strong>avoid the opening auctions</strong>;</p></li><li><p>Finding the <strong>right sweet spot time</strong> to place the orders: if we place them too fast, we increase the odds of filling all the orders; however, we end up trading suboptimal stocks (higher volatility). If we wait for too long to place the trades, we ensure selecting the best stocks to trade; however, we decrease the odds of filling all the orders;</p></li><li><p>Depending on the size of the account (we will discuss capacity in the final thoughts), we may <strong>break orders into smaller blocks</strong>.</p></li></ul><p>One of the reasons it took me three weeks to publish this article instead of the usual once-a-week frequency was that I wanted to implement this execution algorithm and forward test it a bit before sharing this idea. My thought was that if I can't get less than 10 bps of slippage in the round-trip, I will place this idea back into the &#8220;revisit later&#8221; bucket.</p><p>However, I'm happy to say that, so far, the live forward tests are showing promising results for the account size I'm trading, with slippages below this threshold. Of course, that's not 100% guaranteed, as the slippage obtained is a function of how good the IBKR paper trading system is. <strong>We will only be able to say for sure that our execution algorithm that places orders is actually good at minimizing slippage with live trading</strong>. I will write about it once I have live trading data&#8212;one step at a time.</p><p>So, let's just show two more simulations:</p><ul><li><p>One worse, with 12 bps;</p></li><li><p>One better, with 8 bps.</p></li></ul><p>Let me highlight again: these results are only indicative. They are dependent on:</p><ol><li><p>The execution algorithm each trader uses, with their unique logic details about how to place the orders;</p></li><li><p>The account size (more on capacity later).</p></li></ol><h2>12 bps of slippage</h2><p>Here are the indicative results if the execution algorithm that places the orders manages to achieve a total of 12 bps of slippage per trade (6 bps when buying + 6 bps when selling):</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Lp7s!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc70f9fb9-41bf-49f6-a927-7b1441090211_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Lp7s!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc70f9fb9-41bf-49f6-a927-7b1441090211_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!Lp7s!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc70f9fb9-41bf-49f6-a927-7b1441090211_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!Lp7s!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc70f9fb9-41bf-49f6-a927-7b1441090211_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!Lp7s!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc70f9fb9-41bf-49f6-a927-7b1441090211_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Lp7s!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc70f9fb9-41bf-49f6-a927-7b1441090211_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c70f9fb9-41bf-49f6-a927-7b1441090211_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:651914,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Lp7s!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc70f9fb9-41bf-49f6-a927-7b1441090211_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!Lp7s!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc70f9fb9-41bf-49f6-a927-7b1441090211_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!Lp7s!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc70f9fb9-41bf-49f6-a927-7b1441090211_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!Lp7s!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc70f9fb9-41bf-49f6-a927-7b1441090211_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the first experiment: 12 bps of total slippage per trade</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YYM0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d6c88e-8e2a-4c5c-bce9-fc52c1585d37_1070x1334.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YYM0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d6c88e-8e2a-4c5c-bce9-fc52c1585d37_1070x1334.png 424w, https://substackcdn.com/image/fetch/$s_!YYM0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d6c88e-8e2a-4c5c-bce9-fc52c1585d37_1070x1334.png 848w, https://substackcdn.com/image/fetch/$s_!YYM0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d6c88e-8e2a-4c5c-bce9-fc52c1585d37_1070x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!YYM0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d6c88e-8e2a-4c5c-bce9-fc52c1585d37_1070x1334.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YYM0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d6c88e-8e2a-4c5c-bce9-fc52c1585d37_1070x1334.png" width="1070" height="1334" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b6d6c88e-8e2a-4c5c-bce9-fc52c1585d37_1070x1334.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1334,&quot;width&quot;:1070,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:315935,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YYM0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d6c88e-8e2a-4c5c-bce9-fc52c1585d37_1070x1334.png 424w, https://substackcdn.com/image/fetch/$s_!YYM0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d6c88e-8e2a-4c5c-bce9-fc52c1585d37_1070x1334.png 848w, https://substackcdn.com/image/fetch/$s_!YYM0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d6c88e-8e2a-4c5c-bce9-fc52c1585d37_1070x1334.png 1272w, https://substackcdn.com/image/fetch/$s_!YYM0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d6c88e-8e2a-4c5c-bce9-fc52c1585d37_1070x1334.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yYSN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1de04ea9-ba82-4180-888c-34e0df7c1bb2_1090x868.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yYSN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1de04ea9-ba82-4180-888c-34e0df7c1bb2_1090x868.png 424w, https://substackcdn.com/image/fetch/$s_!yYSN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1de04ea9-ba82-4180-888c-34e0df7c1bb2_1090x868.png 848w, https://substackcdn.com/image/fetch/$s_!yYSN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1de04ea9-ba82-4180-888c-34e0df7c1bb2_1090x868.png 1272w, https://substackcdn.com/image/fetch/$s_!yYSN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1de04ea9-ba82-4180-888c-34e0df7c1bb2_1090x868.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yYSN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1de04ea9-ba82-4180-888c-34e0df7c1bb2_1090x868.png" width="1090" height="868" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1de04ea9-ba82-4180-888c-34e0df7c1bb2_1090x868.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:868,&quot;width&quot;:1090,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:197858,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yYSN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1de04ea9-ba82-4180-888c-34e0df7c1bb2_1090x868.png 424w, https://substackcdn.com/image/fetch/$s_!yYSN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1de04ea9-ba82-4180-888c-34e0df7c1bb2_1090x868.png 848w, https://substackcdn.com/image/fetch/$s_!yYSN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1de04ea9-ba82-4180-888c-34e0df7c1bb2_1090x868.png 1272w, https://substackcdn.com/image/fetch/$s_!yYSN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1de04ea9-ba82-4180-888c-34e0df7c1bb2_1090x868.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest trades</figcaption></figure></div><h2>8 bps of slippage</h2><p>Here are the indicative results if the execution algorithm that places the orders manages to achieve a total of 8 bps of slippage per trade (4 bps when buying + 4 bps when selling):</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MHDX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93624e2-1441-4f35-84c9-a5fe918d3946_1536x1472.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MHDX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93624e2-1441-4f35-84c9-a5fe918d3946_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!MHDX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93624e2-1441-4f35-84c9-a5fe918d3946_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!MHDX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93624e2-1441-4f35-84c9-a5fe918d3946_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!MHDX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93624e2-1441-4f35-84c9-a5fe918d3946_1536x1472.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MHDX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93624e2-1441-4f35-84c9-a5fe918d3946_1536x1472.png" width="1456" height="1395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b93624e2-1441-4f35-84c9-a5fe918d3946_1536x1472.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:626428,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MHDX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93624e2-1441-4f35-84c9-a5fe918d3946_1536x1472.png 424w, https://substackcdn.com/image/fetch/$s_!MHDX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93624e2-1441-4f35-84c9-a5fe918d3946_1536x1472.png 848w, https://substackcdn.com/image/fetch/$s_!MHDX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93624e2-1441-4f35-84c9-a5fe918d3946_1536x1472.png 1272w, https://substackcdn.com/image/fetch/$s_!MHDX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93624e2-1441-4f35-84c9-a5fe918d3946_1536x1472.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Equity and drawdown curves for the first experiment: 8 bps of total slippage per trade</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BDsN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb92fc38f-4af7-4bb1-aa12-ba58ca0fcf3a_1070x1330.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BDsN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb92fc38f-4af7-4bb1-aa12-ba58ca0fcf3a_1070x1330.png 424w, https://substackcdn.com/image/fetch/$s_!BDsN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb92fc38f-4af7-4bb1-aa12-ba58ca0fcf3a_1070x1330.png 848w, https://substackcdn.com/image/fetch/$s_!BDsN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb92fc38f-4af7-4bb1-aa12-ba58ca0fcf3a_1070x1330.png 1272w, https://substackcdn.com/image/fetch/$s_!BDsN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb92fc38f-4af7-4bb1-aa12-ba58ca0fcf3a_1070x1330.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BDsN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb92fc38f-4af7-4bb1-aa12-ba58ca0fcf3a_1070x1330.png" width="1070" height="1330" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b92fc38f-4af7-4bb1-aa12-ba58ca0fcf3a_1070x1330.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1330,&quot;width&quot;:1070,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:318533,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BDsN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb92fc38f-4af7-4bb1-aa12-ba58ca0fcf3a_1070x1330.png 424w, https://substackcdn.com/image/fetch/$s_!BDsN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb92fc38f-4af7-4bb1-aa12-ba58ca0fcf3a_1070x1330.png 848w, https://substackcdn.com/image/fetch/$s_!BDsN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb92fc38f-4af7-4bb1-aa12-ba58ca0fcf3a_1070x1330.png 1272w, https://substackcdn.com/image/fetch/$s_!BDsN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb92fc38f-4af7-4bb1-aa12-ba58ca0fcf3a_1070x1330.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest statistics</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Lzz2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c22e2e8-9913-4dbe-b842-c1e6d5e0edfa_1090x868.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Lzz2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c22e2e8-9913-4dbe-b842-c1e6d5e0edfa_1090x868.png 424w, https://substackcdn.com/image/fetch/$s_!Lzz2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c22e2e8-9913-4dbe-b842-c1e6d5e0edfa_1090x868.png 848w, https://substackcdn.com/image/fetch/$s_!Lzz2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c22e2e8-9913-4dbe-b842-c1e6d5e0edfa_1090x868.png 1272w, https://substackcdn.com/image/fetch/$s_!Lzz2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c22e2e8-9913-4dbe-b842-c1e6d5e0edfa_1090x868.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Lzz2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c22e2e8-9913-4dbe-b842-c1e6d5e0edfa_1090x868.png" width="1090" height="868" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c22e2e8-9913-4dbe-b842-c1e6d5e0edfa_1090x868.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:868,&quot;width&quot;:1090,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:196401,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Lzz2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c22e2e8-9913-4dbe-b842-c1e6d5e0edfa_1090x868.png 424w, https://substackcdn.com/image/fetch/$s_!Lzz2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c22e2e8-9913-4dbe-b842-c1e6d5e0edfa_1090x868.png 848w, https://substackcdn.com/image/fetch/$s_!Lzz2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c22e2e8-9913-4dbe-b842-c1e6d5e0edfa_1090x868.png 1272w, https://substackcdn.com/image/fetch/$s_!Lzz2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c22e2e8-9913-4dbe-b842-c1e6d5e0edfa_1090x868.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Summary of the backtest trades</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fbv0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e132e7-1847-4333-a275-165f0e68843f_1412x776.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fbv0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e132e7-1847-4333-a275-165f0e68843f_1412x776.png 424w, https://substackcdn.com/image/fetch/$s_!Fbv0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e132e7-1847-4333-a275-165f0e68843f_1412x776.png 848w, https://substackcdn.com/image/fetch/$s_!Fbv0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e132e7-1847-4333-a275-165f0e68843f_1412x776.png 1272w, https://substackcdn.com/image/fetch/$s_!Fbv0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e132e7-1847-4333-a275-165f0e68843f_1412x776.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fbv0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e132e7-1847-4333-a275-165f0e68843f_1412x776.png" width="1412" height="776" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d1e132e7-1847-4333-a275-165f0e68843f_1412x776.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:776,&quot;width&quot;:1412,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:955969,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Fbv0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e132e7-1847-4333-a275-165f0e68843f_1412x776.png 424w, https://substackcdn.com/image/fetch/$s_!Fbv0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e132e7-1847-4333-a275-165f0e68843f_1412x776.png 848w, https://substackcdn.com/image/fetch/$s_!Fbv0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e132e7-1847-4333-a275-165f0e68843f_1412x776.png 1272w, https://substackcdn.com/image/fetch/$s_!Fbv0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd1e132e7-1847-4333-a275-165f0e68843f_1412x776.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Monthly and annual returns</figcaption></figure></div><h1>Final thoughts</h1><p>This is the first study on gap mean reversion and slippage. The first backtests are appealing enough to drive further investigation, and the early results from the forward test also corroborate.</p><p>After a few weeks of forward tests, once we have a sufficiently large sample size of trades, if we verify the trade stats closely resemble what we saw on the backtests, we should move to live trading. If that happens, we should start small and grow from there.</p><p>Assuming that it works, we should then ask ourselves: what is the capacity of a strategy like this? I would guess up to a few million, maybe even low tens of millions. But for sure, it has a number above which the returns rapidly decrease. Otherwise, large funds would have already arbitraged out this type of idea.</p><p>The only way to know for sure is live trading. However, an idea to estimate the capacity is to analyze the volume % of each stock traded at or below the opening price in the first minutes of the day. This can be done by collecting trade-by-trade market data from IBKR for a few weeks. But that comes down the road iff i) the forward test finishes with a positive outlook and ii) the live trading with a small account delivers the expected returns. If everything works out, this might be a good idea for small funds/family offices.</p><p>I'd love to hear your thoughts about this approach. If you have any questions or comments,&nbsp;<strong>just reach out via&nbsp;<a href="https://x.com/quantitativo1">Twitter</a>&nbsp;or&nbsp;<a href="mailto:cs@quantitativo.com">email</a></strong>.</p><p>Also,&nbsp;<strong>if you want to implement this strategy (or any other strategy) and need help, just let me know</strong>.</p><p>Cheers!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.quantitativo.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Quant Trading Rules! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item></channel></rss>