<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Quant on Calm Engineering</title>
    <link>https://lukastymo.com/tags/quant/</link>
    <description>Recent content in Quant on Calm Engineering</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 04 May 2026 12:00:00 +0000</lastBuildDate>
    <atom:link href="https://lukastymo.com/tags/quant/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Backtested: 16 years, $320k invested. The Magic Formula still has an edge.</title>
      <link>https://lukastymo.com/posts/029-software-engineer-value-investing-magic-formula/</link>
      <pubDate>Mon, 04 May 2026 12:00:00 +0000</pubDate>
      <guid>https://lukastymo.com/posts/029-software-engineer-value-investing-magic-formula/</guid>
      <description>&lt;aside class=&#34;not-prose my-6 rounded-md border-l-4 border-amber-400 bg-amber-50 dark:border-amber-500 dark:bg-amber-950 text-amber-900 dark:text-amber-100 px-4 py-3&#34;&gt;&#xA;  &lt;div class=&#34;flex items-start gap-2&#34;&gt;&#xA;    &lt;span class=&#34;mt-[2px] opacity-60 leading-none&#34; aria-hidden=&#34;true&#34;&gt;&#xA;      ⚠️&#xA;    &lt;/span&gt;&#xA;&#xA;    &lt;div class=&#34;space-y-2 text-sm sm:text-base leading-relaxed&#34;&gt;&#xA;      &lt;div class=&#34;flex items-center gap-2 font-semibold&#34;&gt;Disclaimer&lt;/div&gt;&#xA;&#xA;      &lt;div class=&#34;&#xA;        [&amp;&gt;p]:m-0&#xA;        [&amp;&gt;ul]:m-0 [&amp;&gt;ul]:list-disc [&amp;&gt;ul]:pl-5&#xA;        [&amp;&gt;ol]:m-0 [&amp;&gt;ol]:list-decimal [&amp;&gt;ol]:pl-5&#xA;        [&amp;&gt;ul&gt;li]:mt-1 [&amp;&gt;ol&gt;li]:mt-1&#xA;        [&amp;&gt;ul&gt;li::marker]:opacity-50&#xA;        [&amp;&gt;ol&gt;li::marker]:opacity-50&#xA;        [&amp;&gt;pre]:m-0 [&amp;&gt;pre]:overflow-x-auto&#xA;        [&amp;_a]:underline [&amp;_a]:underline-offset-2 [&amp;_a]:font-semibold&#xA;&#34;&gt;I am not a financial advisor. Nothing here is financial advice. All numbers and backtest results are simulated and altered for educational purposes only. Past backtest performance does not guarantee future profits. Do not make investment decisions based on this post.&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/aside&gt;&#xA;&#xA;&lt;p&gt;Buffett can&amp;rsquo;t be copied. His edge is intuition built over decades. But what if you could formalize &amp;ldquo;good business, cheap price&amp;rdquo; into an algorithm and let it run? That&amp;rsquo;s what this post is about.&lt;/p&gt;</description>
      <content:encoded>&#xA;&lt;aside class=&#34;not-prose my-6 rounded-md border-l-4 border-amber-400 bg-amber-50 dark:border-amber-500 dark:bg-amber-950 text-amber-900 dark:text-amber-100 px-4 py-3&#34;&gt;&#xA;  &lt;div class=&#34;flex items-start gap-2&#34;&gt;&#xA;    &lt;span class=&#34;mt-[2px] opacity-60 leading-none&#34; aria-hidden=&#34;true&#34;&gt;&#xA;      ⚠️&#xA;    &lt;/span&gt;&#xA;&#xA;    &lt;div class=&#34;space-y-2 text-sm sm:text-base leading-relaxed&#34;&gt;&#xA;      &lt;div class=&#34;flex items-center gap-2 font-semibold&#34;&gt;Disclaimer&lt;/div&gt;&#xA;&#xA;      &lt;div class=&#34;&#xA;        [&amp;&gt;p]:m-0&#xA;        [&amp;&gt;ul]:m-0 [&amp;&gt;ul]:list-disc [&amp;&gt;ul]:pl-5&#xA;        [&amp;&gt;ol]:m-0 [&amp;&gt;ol]:list-decimal [&amp;&gt;ol]:pl-5&#xA;        [&amp;&gt;ul&gt;li]:mt-1 [&amp;&gt;ol&gt;li]:mt-1&#xA;        [&amp;&gt;ul&gt;li::marker]:opacity-50&#xA;        [&amp;&gt;ol&gt;li::marker]:opacity-50&#xA;        [&amp;&gt;pre]:m-0 [&amp;&gt;pre]:overflow-x-auto&#xA;        [&amp;_a]:underline [&amp;_a]:underline-offset-2 [&amp;_a]:font-semibold&#xA;&#34;&gt;I am not a financial advisor. Nothing here is financial advice. All numbers and backtest results are simulated and altered for educational purposes only. Past backtest performance does not guarantee future profits. Do not make investment decisions based on this post.&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/aside&gt;&#xA;&#xA;&lt;p&gt;Buffett can&amp;rsquo;t be copied. His edge is intuition built over decades. But what if you could formalize &amp;ldquo;good business, cheap price&amp;rdquo; into an algorithm and let it run? That&amp;rsquo;s what this post is about.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ll walk through how I built a Magic Formula value investing pipeline in Python, what I found after a 16-year backtest, and what I&amp;rsquo;d do differently. Along the way I&amp;rsquo;ll cover the data engineering side: Medallion Architecture, DuckDB audit trails, and Optuna for parameter optimization. If you&amp;rsquo;re not a software person, don&amp;rsquo;t worry. I&amp;rsquo;ll keep the technical parts light.&lt;/p&gt;&#xA;&lt;p&gt;The Magic Formula comes from the book &amp;ldquo;The Little Book That Still Beats the Market.&amp;rdquo; My first issue with it: I&amp;rsquo;d rather work from a scientific paper where tables and charts are reproducible. The book is written for intuition, not the mathematical rigour I needed to build a concrete strategy.&lt;/p&gt;&#xA;&lt;p&gt;LLMs are great for learning, but generating code with them caused a lot of bugs. The model was quietly using proxy values and fallbacks that I only caught after inspecting the full calculation pipeline. Be careful. I recommend splitting the strategy into smaller, self-contained pieces that are easy to test and reason about independently.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;1-value-investing&#34;&gt;1. Value Investing&lt;/h2&gt;&#xA;&lt;p&gt;Some context first. There are different styles of investing. The one used here is value investing. The premise is simple in theory and hard in practice: buy a good business at a cheap price.&lt;/p&gt;&#xA;&lt;p&gt;Buffett, Peter Lynch, David Dodd, and Benjamin Graham spent their lives turning that sentence into usable frameworks. The sad truth: we can&amp;rsquo;t use their frameworks. Any method that reliably generates excess returns gets traded away. That is the core claim of the Efficient Market Hypothesis (EMH).&lt;/p&gt;&#xA;&lt;p&gt;Early value investing focused on book values. It was mostly manual calculation, with the edge coming from doing the work others wouldn&amp;rsquo;t. As EMH predicts, the edge disappears once enough participants adopt the same method, so new techniques had to be invented. The core assumption stayed the same: good business, cheap price. But the definitions evolved.&lt;/p&gt;&#xA;&lt;p&gt;The DCF method appeared. You could discount future cash flows, compare them to the current price, and decide if it was a bargain. Layer in qualitative checks, like whether the business has a moat or good management, and you had a workable value investing approach for the modern era.&lt;/p&gt;&#xA;&lt;p&gt;None of that worked for me though. It all sounds reasonable when you read it, but I couldn&amp;rsquo;t formalize it into an algorithm without years of experience I don&amp;rsquo;t have. Buffett spent decades building that intuition. I needed a different proxy.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;2-greenblatts-magic-formula---what-model-intuition&#34;&gt;2. Greenblatt&amp;rsquo;s Magic Formula - What, Model, Intuition&lt;/h2&gt;&#xA;&lt;figure class=&#34;not-prose my-8&#34;&gt;&#xA;  &lt;img src=&#34;https://lukastymo.com/images/posts/029/little-book-that-beats-the-market.jpg&#34; alt=&#34;The Little Book That Still Beats the Market by Joel Greenblatt&#34; class=&#34;h-auto&#34; style=&#34;width: 220px;&#34; /&gt;&#xA;  &lt;figcaption class=&#34;mt-2 text-sm text-gray-500 dark:text-gray-400 text-left font-sans&#34;&gt;The Little Book That Still Beats the Market by Joel Greenblatt&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;h3 id=&#34;the-what&#34;&gt;The What&lt;/h3&gt;&#xA;&lt;p&gt;The method builds a ranking of stocks and rebalances a portfolio of 20-30 positions every year. Each company&amp;rsquo;s rank is based on two factors: cheapness and quality, both defined mathematically by the formula. There are also a few exclusions, because the accounting values the formula relies on are meaningless for certain types of businesses.&lt;/p&gt;&#xA;&lt;p&gt;The method is described in &amp;ldquo;The Little Book That Still Beats the Market.&amp;rdquo; It&amp;rsquo;s short and gives good intuition behind it.&lt;/p&gt;&#xA;&#xA;&lt;h3 id=&#34;model&#34;&gt;Model&lt;/h3&gt;&#xA;&#xA;&lt;h4 id=&#34;what-is-cheap-earnings-yield&#34;&gt;What is cheap: Earnings Yield&lt;/h4&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Earnings Yield = EBIT / Enterprise Value&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;h5 id=&#34;ebit&#34;&gt;EBIT&lt;/h5&gt;&#xA;&lt;p&gt;EBIT is the bottom line just before interest expenses and taxes.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Revenue&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;- Operating costs&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;= EBIT                ← stops here&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;- Interest expense    ← only hits Company B hard&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;= EBT (pre-tax profit)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;- Tax&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;= Net income&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Companies have different financial structures. This formula says we don&amp;rsquo;t care whether a company funds itself through equity or debt. Using net income instead of EBIT would penalize debt-funded companies unfairly.&lt;/p&gt;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Company A&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Company B&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;EBIT&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;£10M&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;£10M&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Interest&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;£0&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;£4M&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Net income&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;£10M&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;£6M&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;On net income, B looks 40% worse. On EBIT, they&amp;rsquo;re identical. For the Magic Formula, all other values equal, we treat these two companies as equal.&lt;/p&gt;&#xA;&#xA;&lt;h5 id=&#34;enterprise-value-ev&#34;&gt;Enterprise Value (EV)&lt;/h5&gt;&#xA;&lt;p&gt;Two types of valuation: top-down (what the market thinks the company is worth, i.e., EV) and bottom-up (what it would cost to rebuild the company from scratch).&lt;/p&gt;&#xA;&#xA;&lt;h5 id=&#34;earnings-yield-ey&#34;&gt;Earnings Yield (EY)&lt;/h5&gt;&#xA;&lt;p&gt;Earnings Yield is EBIT divided by Enterprise Value. It answers: for every dollar you pay to own this business, how much profit does it generate per year?&lt;/p&gt;&#xA;&lt;p&gt;EY tells us about cost.&lt;/p&gt;&#xA;&lt;p&gt;Example: if a company&amp;rsquo;s EY is 10, it means that for every \$1 you invest, the business generates \$10 per year.&lt;/p&gt;&#xA;&#xA;&lt;h4 id=&#34;what-is-good-return-on-capital&#34;&gt;What is good: Return on Capital&lt;/h4&gt;&#xA;&lt;p&gt;Good means the business uses its capital efficiently:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Return on Capital = EBIT / (Net Fixed Assets + Net Working Capital)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Net Fixed Assets + Net Working Capital is the minimum capital you would need to restart the business from zero and earn the first dollar.&lt;/p&gt;&#xA;&lt;p&gt;Return on Capital tells you how much profit is generated for every dollar permanently tied up in assets. Low ROC: sponge. High ROC: machine. Spending a lot on assets to generate a little profit is much worse than using less capital to generate the same profit.&lt;/p&gt;&#xA;&#xA;&lt;h4 id=&#34;tweaks&#34;&gt;Tweaks&lt;/h4&gt;&#xA;&lt;p&gt;The formula is just a model. As the saying goes: all models are wrong, but some are useful. A few more tweaks make the model less wrong.&lt;/p&gt;&#xA;&lt;p&gt;Filter out small caps (below \$50M market cap): they are riskier and less liquid. Some business categories rely heavily on interest income rather than operating earnings. For those, EBIT is a poor measure of value, so we filter them out. Greenblatt recommends filtering out utilities and financial stocks. We also focus on US companies: the market is more mature and has historically performed better. These are reasonable choices for backtesting.&lt;/p&gt;&#xA;&lt;p&gt;Investment horizon: 5-10 years, standard for a value investing strategy.&lt;/p&gt;&#xA;&#xA;&lt;h3 id=&#34;intuition&#34;&gt;Intuition&lt;/h3&gt;&#xA;&lt;p&gt;If we buy something good at a cheap price, the odds of profit are higher than with most other approaches. The model defines good and cheap in a simple, algorithmic way, then filters out the obvious cases where the formula breaks down. We want companies with good fundamentals: efficient operations, not heavy spending on assets relative to the profit they generate. By using EBIT, we ignore financing tricks that make a company look better on the bottom line than it actually is.&lt;/p&gt;&#xA;&lt;p&gt;The biggest advantage of this method is taking your own behavior out of the equation. A fixed rebalance date stops you from torpedoing your own portfolio. More importantly, it defines clear buy and sell signals. This protects against gambler&amp;rsquo;s ruin: if you blindly keep buying potential winners, even a winning streak can end with a single bet that wipes everything out. Without a defined exit, you have better odds of ending up at zero.&lt;/p&gt;&#xA;&lt;p&gt;This also gives you systematic exposure to value and quality stocks, which tend to hold up better in volatile conditions. Good companies tend to survive market storms. What makes a company &amp;ldquo;good&amp;rdquo; can mean many things: management quality, competitive moat. The great value investors wrote about all of it, but none of them defined it in a way you can run as an algorithm.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;3-data-architecture-medallion-pipeline-for-financial-data&#34;&gt;3. Data Architecture: Medallion Pipeline for Financial Data&lt;/h2&gt;&#xA;&lt;figure class=&#34;not-prose my-8&#34;&gt;&#xA;  &lt;img src=&#34;https://lukastymo.com/images/posts/029/server-room-kevinache.jpg&#34; alt=&#34;Data pipeline layers&#34; class=&#34;w-full h-auto&#34; /&gt;&#xA;  &lt;figcaption class=&#34;mt-2 text-sm text-gray-500 dark:text-gray-400 text-left font-sans&#34;&gt;Photo by &lt;a href=&#34;https://unsplash.com/photos/a-rack-of-servers-in-a-server-room-2JJ3wBHu4_0&#34;&gt;Kevin Ache&lt;/a&gt; on &lt;a href=&#34;https://unsplash.com&#34;&gt;Unsplash&lt;/a&gt;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;h3 id=&#34;medallion-architecture&#34;&gt;Medallion Architecture&lt;/h3&gt;&#xA;&#xA;&lt;h4 id=&#34;bronze&#34;&gt;Bronze&lt;/h4&gt;&#xA;&lt;p&gt;We solve this with a Data Engineering best practice: the Medallion Architecture. It breaks the ranking pipeline into 3 layers:&lt;/p&gt;&#xA;&lt;p&gt;Download raw data and store it in the Bronze layer. We use Sharadar data to eliminate backtesting biases like survivorship bias. Our stock universe is drawn from the Russell 2000 (IWM) holdings.&lt;/p&gt;&#xA;&#xA;&lt;h4 id=&#34;silver&#34;&gt;Silver&lt;/h4&gt;&#xA;&lt;p&gt;This layer contains processed data, standardized column names, and intermediate calculations. The pipeline can start from any layer, which speeds up iteration. If you find a mistake in a calculation, fix it and re-run from Silver. No need to re-download the raw data; it&amp;rsquo;s already cached in Bronze.&lt;/p&gt;&#xA;&lt;p&gt;Silver contains all the columns needed to calculate ROC and EY: ebit, market cap, total_debt, cash_and_cash_equivalent, and so on.&lt;/p&gt;&#xA;&#xA;&lt;h4 id=&#34;gold&#34;&gt;Gold&lt;/h4&gt;&#xA;&lt;p&gt;With all components in place, we calculate ROC and EY and produce the ranking. The result goes into the Gold layer: the ordered list the portfolio acts on in live trading.&lt;/p&gt;&#xA;&lt;p&gt;It contains ey_rank, roc_rank, and combined_rank (their sum). Tickers are sorted by combined_rank. We buy the top 20.&lt;/p&gt;&#xA;&lt;p&gt;Splitting into 3 layers makes debugging fast. If a value looks wrong, you know which layer produced it and which code to check.&lt;/p&gt;&#xA;&#xA;&lt;h3 id=&#34;coding-and-data-principles&#34;&gt;Coding and Data Principles&lt;/h3&gt;&#xA;&lt;p&gt;Do not default to null or 0. If something unexpected happens, fail fast. That forces a conscious choice about what the fallback should be.&lt;/p&gt;&#xA;&lt;p&gt;On top of fail-fast, I added automatic data quality checks using Pydantic. You define a schema for your values and catch mistakes in the algorithm early.&lt;/p&gt;&#xA;&lt;p&gt;Single Responsibility and Separation of Concerns are non-negotiable here. Small, focused modules are easy to test and easy to reason about.&lt;/p&gt;&#xA;&lt;p&gt;Keep the code simple. Simpler code has fewer bugs, by definition. Initially I planned to use Sharadar for backtesting and yfinance for live runs. That turned out to be a mistake. Two code branches meant two sets of assumptions, and Yahoo Finance makes different adjustments than Sharadar. The backtest was testing a different method than what I was using to invest. The fix was obvious: use the same data source for both. Fewer lines of code, more reliable results.&lt;/p&gt;&#xA;&#xA;&lt;h3 id=&#34;risk-tracker&#34;&gt;Risk tracker&lt;/h3&gt;&#xA;&lt;p&gt;Any improvements and code changes will require assumptions that might be wrong. I track those in README.md for future review.&lt;/p&gt;&#xA;&#xA;&lt;h4 id=&#34;risk-1-and-2-data-quality-and-bugs-in-code&#34;&gt;Risk 1 and 2: Data quality and bugs in code&lt;/h4&gt;&#xA;&lt;p&gt;Risk 1: the data source has bugs. Risk 2: my code has bugs.&lt;/p&gt;&#xA;&lt;p&gt;For Risk 1, research showed retail investors are generally satisfied with Sharadar&amp;rsquo;s quality. Nasdaq acquiring Sharadar is also a reasonable signal.&lt;/p&gt;&#xA;&lt;p&gt;For Risk 2, the mitigation is the engineering practices described above, plus the DuckDB audit database: every ticker, date, and value is queryable, with a JSON log showing exactly how each number was calculated.&lt;/p&gt;&#xA;&#xA;&lt;h4 id=&#34;risk-3-overfitting&#34;&gt;Risk 3: Overfitting&lt;/h4&gt;&#xA;&lt;p&gt;My configuration file for backtesting looks like this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-gdscript3&#34; data-lang=&#34;gdscript3&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;backtest&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Year range (inclusive) for annual rebalancing.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;start_year&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2010&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;end_year&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2025&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Rebalance date in each year.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;rebalance_month&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;7&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;rebalance_day&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Hold top N names by combined rank.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;top_n&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;20&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Amount invested at the start of each year (same currency as your prices).&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;annual_contribution&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_000&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# One-way transaction fee applied at each rebalance leg (sell + buy = 2x).&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 0.001 = 0.1% per leg, typical for a discount broker.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Set to 0 to disable.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;transaction_fee_pct&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;0.001&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Annual risk-free rate used for Sharpe ratio calculation.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Use the average short-term T-bill rate for your backtest period.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 0.04 = 4% (reasonable for 2000-2024 average), set to 0 to get raw return/vol.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;risk_free_rate&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;0.04&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Size of annual universe before Magic Formula ranking (approx Russell 1000).&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;universe_n&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2000&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Skip the top-N largest companies before sampling universe_n.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# e.g. universe_offset = 1000 → exclude the 1 000 biggest (mega caps),&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# then take the next 3 000 (ranks 1 001–4 000 by market cap).&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Set to 0 to include all sizes from the top.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#universe_offset = 200&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;universe_offset&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Benchmark ticker used for yearly comparison.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#benchmark_ticker = &amp;#34;IWB&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;benchmark_ticker&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;IWM&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Backtest bronze controls (same meaning as pipeline).&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;skip_bronze&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;false&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;force&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;false&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Write signal audit rows to audit.duckdb after each backtest year.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Disable for faster iteration when you don&amp;#39;t need to query the audit DB.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Old audit rows are always cleared at the start of a run regardless of this setting.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;write_audit&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;false&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;backtest&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;screens&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Sortino filter — require trailing-12-month Sortino ratio &amp;gt;= threshold&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 0.0 means disabled. Typical enabled value: 0.4&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sortino_min&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;0.2&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sortino_window_days&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;252&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Momentum filter — require price above SMA and/or positive 12-1 momentum&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 0 means disabled for each leg independently&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;momentum_sma_days&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;momentum_lookback_months&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Piotroski-style quality filter — require quality score &amp;gt;= threshold (0-5 scale).&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Criteria use only the SF1 columns available in the Sharadar extract:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#   Q1 EBIT &amp;gt; 0  Q2 EBIT improved YoY  Q3 debt decreased  Q4 current ratio improved  Q5 no dilution&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 0 means disabled. Typical enabled value: 3 (require 3 out of 5).&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;piotroski_min&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Composite value filter — keep only tickers in the cheapest top_pct% by a multi-ratio value score.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Three signals are percentile-ranked and averaged (Gray / Alpha Architect approach):&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#   V1 EBIT/EV   (earnings yield — Magic Formula&amp;#39;s own metric)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#   V2 EBIT/P    (P/E proxy using EBIT)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#   V3 BV/P      (book-to-price proxy: (current_assets - current_liabilities + net_PP&amp;amp;E) / mktcap)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 0 means disabled. Typical enabled value: 50 (keep the cheaper half of the ranked universe).&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;composite_value_top_pct&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Tuning those parameters until the backtest looks good is parameter hacking. To catch overfitting, I ran the full backtest on different rebalance dates. If a parameter set is truly overfit, good results on one date will collapse on another.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;composite_value_top_pct&lt;/code&gt; and &lt;code&gt;momentum_lookback_months&lt;/code&gt; are the two I learned to disable. They improved results on one specific rebalance date but fell apart when the date changed. The momentum filter was effectively turning the strategy into a momentum strategy, not a Magic Formula strategy. That&amp;rsquo;s scope creep, not an improvement.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;4-performance-engineering-vectorisation-and-parallelism&#34;&gt;4. Performance Engineering: Vectorisation and Parallelism&lt;/h2&gt;&#xA;&lt;figure class=&#34;not-prose my-8&#34;&gt;&#xA;  &lt;img src=&#34;https://lukastymo.com/images/posts/029/fiber-optics-kashishlamba.jpg&#34; alt=&#34;Parallel computing and processing speed&#34; class=&#34;w-full h-auto&#34; /&gt;&#xA;  &lt;figcaption class=&#34;mt-2 text-sm text-gray-500 dark:text-gray-400 text-left font-sans&#34;&gt;Photo by &lt;a href=&#34;https://unsplash.com/photos/abstract-blue-glowing-fiber-optics-with-bokeh-effect-DGwunSOMMbk&#34;&gt;Kashish Lamba&lt;/a&gt; on &lt;a href=&#34;https://unsplash.com&#34;&gt;Unsplash&lt;/a&gt;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;Why this matters: naively screening 2000 tickers with a row-by-row Python loop takes minutes; the vectorised + parallel version takes seconds.&lt;/p&gt;&#xA;&#xA;&lt;h3 id=&#34;medallion-architecture-separates-network-heavy-from-compute-heavy-operations&#34;&gt;Medallion Architecture separates network-heavy from compute-heavy operations&lt;/h3&gt;&#xA;&lt;p&gt;It separates slow network operations (downloading stock data) from offline computation. The goal is fast iteration on the backtest, since you tweak it constantly.&lt;/p&gt;&#xA;&#xA;&lt;h3 id=&#34;vectorisation-beats-for-loop&#34;&gt;Vectorisation beats for-loop&lt;/h3&gt;&#xA;&lt;p&gt;Matrix multiplication is much faster than row-by-row loops because it can be parallelized, unlike for-loop operations on dataframes.&lt;/p&gt;&#xA;&#xA;&lt;h3 id=&#34;parallel-everything-you-can&#34;&gt;Parallel everything you can&lt;/h3&gt;&#xA;&lt;p&gt;Some computations can run in parallel: matrix operations, and preparing the Bronze layer (with rate-limit protection and exponential backoff).&lt;/p&gt;&#xA;&lt;p&gt;Parallelism also helped with Optuna, which searches for optimal weights for the Sortino and Piotroski filters.&lt;/p&gt;&#xA;&lt;p&gt;One caveat: parallel threads share the same Bronze/Silver/Gold folders. Make sure threads do not overwrite each other&amp;rsquo;s output.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;5-define-experiment&#34;&gt;5. Define experiment&lt;/h2&gt;&#xA;&lt;figure class=&#34;not-prose my-8&#34;&gt;&#xA;  &lt;img src=&#34;https://lukastymo.com/images/posts/029/trader-screens-jakubzerdzicki.jpg&#34; alt=&#34;Backtesting with trading screens&#34; class=&#34;w-full h-auto&#34; /&gt;&#xA;  &lt;figcaption class=&#34;mt-2 text-sm text-gray-500 dark:text-gray-400 text-left font-sans&#34;&gt;Photo by &lt;a href=&#34;https://unsplash.com/photos/trader-analyzing-stock-market-charts-on-computer-screens-with-calculator--DWqOL_d91I&#34;&gt;Jakub Żerdzicki&lt;/a&gt; on &lt;a href=&#34;https://unsplash.com&#34;&gt;Unsplash&lt;/a&gt;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;h3 id=&#34;setup&#34;&gt;Setup&lt;/h3&gt;&#xA;&lt;p&gt;Before running an experiment, define it.&lt;/p&gt;&#xA;&lt;p&gt;We add \$20,000 per year on the rebalance date, sell all positions, and buy new ones based on the updated ranking (top 20 stocks).&lt;/p&gt;&#xA;&lt;p&gt;Transaction fee: 0.1% per leg. Risk-free rate: 4%. Backtest period: 2010-2025. The period covers COVID, is recent enough to be relevant, and includes about 5 years of data after the method became widely known.&lt;/p&gt;&#xA;&lt;p&gt;The benchmark is the whole universe we are investing in: Russell 2000 (IWM). We also compare against IWB (Russell 1000, large caps) as a broader market reference, a harder bar since large caps are more efficiently priced.&lt;/p&gt;&#xA;&#xA;&lt;h3 id=&#34;metrics&#34;&gt;Metrics&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;CAGR&lt;/strong&gt; (Compound Annual Growth Rate): the constant annual rate that would produce the same end result. It normalizes growth over time.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;MWR&lt;/strong&gt; (Money-Weighted Return): weights returns by how much capital was deployed at each point in time. Large deposits before good periods amplify returns; large deposits before bad periods drag them down.&lt;/li&gt;&#xA;&lt;li&gt;Example for CAGR and MWR:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Start: £100, drops 50% → £50. You add £100 → £150. Then rises 100% → £300.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;CAGR&lt;/strong&gt;: measures strategy performance. What was the annual growth rate, independent of your deposits?&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;MWR&lt;/strong&gt;: in practice, it matters whether the strategy performs better when your capital is small versus when it&amp;rsquo;s large. MWR captures this. It&amp;rsquo;s higher when the strategy performs well while more capital is deployed.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Sharpe&lt;/strong&gt;: profit per unit of risk. Higher is better. We want at least as much return per unit of risk as the benchmark.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Min Survivors&lt;/strong&gt;: some filter configurations remove too many tickers. This shows the lowest count that remained in any single year.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Max Drawdown&lt;/strong&gt;: the largest loss from peak to trough.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Win Rate&lt;/strong&gt;: the percentage of years the portfolio beat the benchmark.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Final Profit&lt;/strong&gt;: what we actually earned after transaction fees, minus total capital invested.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h3 id=&#34;variants&#34;&gt;Variants&lt;/h3&gt;&#xA;&lt;p&gt;The vanilla Magic Formula is getting old. A few improvements have been published over the years that I wanted to optionally add, at least in a limited form. I turned them on lightly, just enough to filter out the most obvious value traps.&lt;/p&gt;&#xA;&lt;p&gt;Improvements tested:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Sortino: return per unit of downside volatility. Better than Sharpe because it only penalizes losses, not gains.&lt;/li&gt;&#xA;&lt;li&gt;Piotroski F-score: scores companies on financial health. I use a small subset of it to filter out the clearly bad ones.&lt;/li&gt;&#xA;&lt;li&gt;Momentum: did not help, disabled.&lt;/li&gt;&#xA;&lt;li&gt;Composite Value Filter: same result, disabled.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&#xA;&lt;h2 id=&#34;6-audit-trail-verifying-every-single-calculation&#34;&gt;6. Audit Trail: Verifying Every Single Calculation&lt;/h2&gt;&#xA;&lt;figure class=&#34;not-prose my-8&#34;&gt;&#xA;  &lt;img src=&#34;https://lukastymo.com/images/posts/029/financial-data-danielbrzdek.jpg&#34; alt=&#34;Financial data on screen&#34; class=&#34;w-full h-auto&#34; /&gt;&#xA;  &lt;figcaption class=&#34;mt-2 text-sm text-gray-500 dark:text-gray-400 text-left font-sans&#34;&gt;Photo by &lt;a href=&#34;https://unsplash.com/photos/financial-stock-market-data-displayed-on-a-screen-EuIqk6LpUU0&#34;&gt;Daniel Brzdęk&lt;/a&gt; on &lt;a href=&#34;https://unsplash.com&#34;&gt;Unsplash&lt;/a&gt;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;DuckDB is a Python library that gives you an analytical database. Think SQLite, but built for analytical queries: aggregations, window functions, large scans. No server needed; it runs in-process.&lt;/p&gt;&#xA;&lt;p&gt;Adding DuckDB changed everything. Auditing every calculation helped me understand the model and cross-check results against alternative data sources. Every pipeline run writes to &lt;code&gt;audit.duckdb&lt;/code&gt;, a full ledger with an explanation for every number.&lt;/p&gt;&#xA;&lt;p&gt;When I see a suspicious value in the report, I can trace its full lineage: what formula produced it, what inputs went in. I can also feed the audit output to an LLM and ask if anything looks off. This caught dozens of bugs, particularly differences between yfinance and Sharadar data.&lt;/p&gt;&#xA;&lt;p&gt;Example: FLR audit trail:&#xA;&lt;a href=&#34;https://lukastymo.com/images/posts/029-flr-audit-trail.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;img src=&#34;https://lukastymo.com/images/posts/029-flr-audit-trail.png&#34; alt=&#34;FLR audit trail&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Every value is traceable. For example: earnings_yield for FLR on 2012-07-01, built from ebit / ev, where silver.ebit=916321000.0 and gold.ev=5878382636.0.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;7-automatic-parameter-optimisation-optuna&#34;&gt;7. Automatic Parameter Optimisation: Optuna&lt;/h2&gt;&#xA;&lt;figure class=&#34;not-prose my-8&#34;&gt;&#xA;  &lt;img src=&#34;https://lukastymo.com/images/posts/029/data-viz-loganvoss.jpg&#34; alt=&#34;Optimization and hyperparameter search&#34; class=&#34;w-full h-auto&#34; /&gt;&#xA;  &lt;figcaption class=&#34;mt-2 text-sm text-gray-500 dark:text-gray-400 text-left font-sans&#34;&gt;Photo by &lt;a href=&#34;https://unsplash.com/photos/abstract-glowing-lines-forming-a-complex-data-visualization-20BjhzK9Nxs&#34;&gt;Logan Voss&lt;/a&gt; on &lt;a href=&#34;https://unsplash.com&#34;&gt;Unsplash&lt;/a&gt;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;Optuna is an open-source Python hyperparameter optimization framework. I used it to find the best values for the Sortino threshold and Piotroski minimum score. It&amp;rsquo;s much faster than brute force because it uses Bayesian search (TPE sampler) rather than testing every combination.&lt;/p&gt;&#xA;&lt;p&gt;To guard against overfitting, I ran the strategy with the tuned parameters on different rebalance dates. First manually, checking each result. Then automatically across all 12 months (1st day of each month), generating a probability distribution.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;_adv&lt;/code&gt; = advantage. Positive means the Magic Formula portfolio beat the IWB benchmark.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [ 1/12]  Jan-01 ...  cagr_adv=-2.1%  mwr_adv=-4.3%  win_rate=38%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [ 2/12]  Feb-01 ...  cagr_adv=-0.8%  mwr_adv=-1.6%  win_rate=25%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [ 3/12]  Mar-01 ...  cagr_adv=-2.5%  mwr_adv=-3.6%  win_rate=38%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [ 4/12]  Apr-01 ...  cagr_adv=+1.2%  mwr_adv=+0.8%  win_rate=50%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [ 5/12]  May-01 ...  cagr_adv=-1.3%  mwr_adv=-1.7%  win_rate=44%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [ 6/12]  Jun-01 ...  cagr_adv=+1.0%  mwr_adv=+1.2%  win_rate=50%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [ 7/12]  Jul-01 ...  cagr_adv=+1.5%  mwr_adv=+1.9%  win_rate=50%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [ 8/12]  Aug-01 ...  cagr_adv=+0.7%  mwr_adv=+0.6%  win_rate=44%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [ 9/12]  Sep-01 ...  cagr_adv=-1.4%  mwr_adv=-2.6%  win_rate=56%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [10/12]  Oct-01 ...  cagr_adv=-4.7%  mwr_adv=-5.1%  win_rate=38%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [11/12]  Nov-01 ...  cagr_adv=-4.9%  mwr_adv=-5.8%  win_rate=31%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  [12/12]  Dec-01 ...  cagr_adv=-2.3%  mwr_adv=-4.0%  win_rate=44%&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This particular run still had momentum enabled. The sweep revealed it was the culprit: momentum parameters that looked great on July rebalance collapsed on most other dates. That sensitivity to entry timing is the classic overfitting signal.&lt;/p&gt;&#xA;&lt;p&gt;Once momentum was disabled and only Sortino and Piotroski were kept, the results stabilised. April, June, July, and August show the strongest months — consistent with known seasonal effects around earnings season. The final configuration used in Appendix 2 and 3 is July rebalance, which sits in that better-performing window.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;8-summary&#34;&gt;8. Summary&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Beating the benchmark is hard.&lt;/li&gt;&#xA;&lt;li&gt;Beating it on historical data says nothing about the future. But it does show whether the method ever had an edge.&lt;/li&gt;&#xA;&lt;li&gt;Backtesting is hard. It involves a lot of assumptions and a lot of data. But once built properly, the framework can be reused for other strategies.&lt;/li&gt;&#xA;&lt;li&gt;Know what kind of investor you are. If my method slightly underperforms the benchmark but is more volatile, I might still prefer it. Consistently betting on value stocks in a volatile market is the kind of bet I want for my riskier portfolio.&lt;/li&gt;&#xA;&lt;li&gt;Benchmarks are powerful. Given that, it makes sense to hold multiple portfolios: one that simply tracks the benchmark, avoids all the risks mentioned here, and bets on a long horizon with no behavioral interference. And a separate portfolio for systematic stock picking, which works for me. It satisfies my need to do the math. It also solves the behavioral problem by delegating decisions to an algorithm, which means I&amp;rsquo;m less likely to sabotage my other portfolios where I use different strategies.&lt;/li&gt;&#xA;&lt;li&gt;Auditability is non-negotiable. A final ranking means nothing if you can&amp;rsquo;t trace how each number was calculated and spot-check a sample.&lt;/li&gt;&#xA;&lt;li&gt;Vanilla Magic Formula did not outperform Russell 1000 over the 16-year backtest. The method has been widely published; the edge is gone. With Sortino and Piotroski filters, the edge comes back: +4.8% CAGR over IWM (same universe) and +1.5% over IWB (large caps).&lt;/li&gt;&#xA;&lt;li&gt;The clearest lesson: regular investing works. Whether you use Magic Formula or just buy the benchmark, contributing \$320,000 over 16 years turned into over \$1M — vs \$794k for IWM and \$1.17M for IWB.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2 id=&#34;appendix-1-magic-formula-backtesting-config&#34;&gt;Appendix 1. Magic Formula Backtesting config&lt;/h2&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;&lt;/th&gt;&#xA;&#x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#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;excluded_sectors&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Financials, Utilities, Real Estate, Financial Services&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;excluded_industries&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Insurance, Managed Care, Healthcare Plans, Insurance—Life, Insurance—Property &amp;amp; Casualty, Insurance—Specialty, Insurance—Diversified, Insurance Brokers&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&amp;mdash; Contributions &amp;amp; Fees &amp;mdash;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;annual_contribution&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;20000&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;transaction_fee_pct&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;0.001&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;risk_free_rate&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;0.04&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&amp;mdash; Overlays &amp;mdash;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;screens.sortino_min&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;0.2&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;screens.sortino_window_days&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;252&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;screens.momentum_sma_days&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;0&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;screens.momentum_lookback_months&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;0&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;screens.piotroski_min&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;3&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;screens.composite_value_top_pct&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;0&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&#xA;&lt;h2 id=&#34;appendix-2--magic-formula-backtesting-2010---2025&#34;&gt;Appendix 2.  Magic Formula backtesting 2010 - 2025&lt;/h2&gt;&#xA;&lt;p&gt;IWB = Russell 1000 (large caps). IWM = Russell 2000 (small caps, same universe as portfolio).&lt;/p&gt;&#xA;&#xA;&lt;div class=&#34;full-bleed not-prose my-6 font-sans&#34;&gt;&#xA;  &lt;div class=&#34;full-bleed-inner&#34;&gt;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;year&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;as_of_date&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;n_holdings&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;n_survivors&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;portfolio_return&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;IWB return&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;IWM return&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;annual_contribution&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;total_contributed&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;portfolio_value&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;IWB value&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;IWM value&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;portfolio_profit&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;IWB profit&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;IWM profit&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;2010&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;2010-07-01&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;20&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;804&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;44.8%&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;34.0%&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;40.3%&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;20,000&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;20,000&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&l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#x9;&#x9;&#x9;&lt;td&gt;13.2%&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&lt;h2 id=&#34;appendix-3-magic-formula-backtesting-metrics&#34;&gt;Appendix 3. Magic Formula backtesting metrics&lt;/h2&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Portfolio&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;vs IWB (Russell 1000)&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;vs IWM (Russell 2000)&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&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x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Min Survivors / Year&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;286&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Positive CAGR and MWR advantage against both benchmarks. Against IWM (same universe): +4.8% CAGR, 75% win rate. Against IWB (large caps): +1.5% CAGR, 50% win rate.&lt;/li&gt;&#xA;&lt;li&gt;Sharpe is better than IWM (+0.268) but worse than IWB (-0.171). The portfolio takes on more volatility than large caps but less than small caps.&lt;/li&gt;&#xA;&lt;li&gt;Max Drawdown: much better than IWM (-13.8% vs -25.1%). The filters removed most of the worst small-cap crashes.&lt;/li&gt;&#xA;&lt;li&gt;Win rate 75% vs IWM. The strategy consistently picks better small caps than the index.&lt;/li&gt;&#xA;&lt;li&gt;Portfolio profit: \$1,081,079 vs \$845,683 (IWB) and \$474,343 (IWM). That&amp;rsquo;s \$235,396 more than large caps and \$606,736 more than the small-cap index over 16 years.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;aside class=&#34;not-prose my-6 rounded-md border-l-4 border-blue-300 bg-blue-50 dark:border-blue-600 dark:bg-blue-950 text-blue-900 dark:text-blue-100 px-4 py-3&#34;&gt;&#xA;  &lt;div class=&#34;flex items-start gap-2&#34;&gt;&#xA;    &lt;span class=&#34;mt-[2px] opacity-60 leading-none&#34; aria-hidden=&#34;true&#34;&gt;&#xA;      💬&#xA;    &lt;/span&gt;&#xA;&#xA;    &lt;div class=&#34;space-y-2 text-sm sm:text-base leading-relaxed&#34;&gt;&#xA;      &lt;div class=&#34;flex items-center gap-2 font-semibold&#34;&gt;Need help building your strategy?&lt;/div&gt;&#xA;&#xA;      &lt;div class=&#34;&#xA;        [&amp;&gt;p]:m-0&#xA;        [&amp;&gt;ul]:m-0 [&amp;&gt;ul]:list-disc [&amp;&gt;ul]:pl-5&#xA;        [&amp;&gt;ol]:m-0 [&amp;&gt;ol]:list-decimal [&amp;&gt;ol]:pl-5&#xA;        [&amp;&gt;ul&gt;li]:mt-1 [&amp;&gt;ol&gt;li]:mt-1&#xA;        [&amp;&gt;ul&gt;li::marker]:opacity-50&#xA;        [&amp;&gt;ol&gt;li::marker]:opacity-50&#xA;        [&amp;&gt;pre]:m-0 [&amp;&gt;pre]:overflow-x-auto&#xA;        [&amp;_a]:underline [&amp;_a]:underline-offset-2 [&amp;_a]:font-semibold&#xA;&#34;&gt;Scala, Python, Haskell, Spark. I build quant pipelines and deploy them to production. You focus on the alpha, I&amp;rsquo;ll handle the engineering. &lt;a href=&#34;mailto:lukas@codeily.com&#34;&gt;lukas@codeily.com&lt;/a&gt;&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;&lt;/aside&gt;&#xA;&#xA;&#xA;&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;&#xA;&lt;p&gt;Sources:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Magic_formula_investing&#34;&gt;Magic formula investing - Wikipedia&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;The Little Book That Still Beats the Market by Joel Greenblatt&lt;/li&gt;&#xA;&lt;li&gt;My personal backtesting and ETL pipeline framework (contact me at &lt;a href=&#34;mailto:lukas@codeily.com&#34;&gt;lukas@codeily.com&lt;/a&gt; if you&amp;rsquo;re interested in working together)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</content:encoded>
    </item>
  </channel>
</rss>
