{"id":529,"date":"2025-05-14T09:00:00","date_gmt":"2025-05-14T01:00:00","guid":{"rendered":"https:\/\/philip.twinight.co\/portfolio\/?p=529"},"modified":"2026-05-04T23:24:19","modified_gmt":"2026-05-04T15:24:19","slug":"building-a-regime-aware-dca-strategy-for-small-mid-cap-investing","status":"publish","type":"post","link":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/","title":{"rendered":"Building a Regime-Aware DCA Strategy for Small\/Mid-Cap Investing"},"content":{"rendered":"\n<p>I built this project to test a practical investing idea: instead of buying small-cap stocks every month no matter what, can I use simple market rules to decide when small caps are worth holding?<\/p>\n\n\n\n<p>Small-cap stocks can do well, but they can also stay weak for a long time. I wanted to build a system that still invests monthly, but avoids blindly adding money during weak small-cap periods.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1411376527  fetchpriority=\"high\" loading=\"eager\" decoding=\"async\" width=\"2282\" height=\"980\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/03_metrics.png\" alt=\"Headline metrics comparing US v9 Regime DCA against IWM DCA\" class=\"wp-image-527\" style=\"width:720px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:824\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/03_metrics.png 2282w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:129\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/03_metrics.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:440\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/03_metrics.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:330\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/03_metrics.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:660\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/03_metrics.png 1536w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:825\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/03_metrics.png 2048w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#Why_I_Compared_Against_IWM\" >Why I Compared Against IWM<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#System_Design\" >System Design<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#How_the_Market_Rules_Work\" >How the Market Rules Work<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#Stock_Selection\" >Stock Selection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#Backtest_Setup\" >Backtest Setup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#Results\" >Results<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#When_the_Outperformance_Happened\" >When the Outperformance Happened<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#The_Cost_of_Being_Active\" >The Cost of Being Active<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#The_DCA_Mechanics\" >The DCA Mechanics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#What_Worked_and_What_Didnt\" >What Worked and What Didn&#8217;t<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#What_Id_Do_Next\" >What I&#8217;d Do Next<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_I_Compared_Against_IWM\"><\/span>Why I Compared Against IWM<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>I used IWM as the main comparison because it tracks the Russell 2000 small-cap index. IWM is basically the simple version: invest monthly into small caps and hold. So the question wasn&#8217;t &#8220;can this beat every index?&#8221; \u2014 it was simpler: can this improve a small-cap DCA approach compared with just buying IWM every month?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"System_Design\"><\/span>System Design<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The system has five parts. It loads stock data, builds signals, decides the market state, selects stocks, and then simulates monthly investing with trading costs.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=772513910  fetchpriority=\"high\" loading=\"eager\" decoding=\"async\" width=\"1936\" height=\"742\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/05_architecture.png\" alt=\"Research pipeline for regime-aware DCA strategy\" class=\"wp-image-531\" style=\"width:720px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:735\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/05_architecture.png 1936w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:115\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/05_architecture.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:392\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/05_architecture.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:294\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/05_architecture.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:589\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/05_architecture.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Part<\/th><th>What it does<\/th><\/tr><\/thead><tbody><tr><td>Data loading<\/td><td>Loads company fundamentals, stock prices, and ETF prices.<\/td><\/tr><tr><td>Signal building<\/td><td>Calculates profitability, momentum, liquidity, volatility, and balance-sheet signals.<\/td><\/tr><tr><td>Market state check<\/td><td>Decides whether to hold small caps, use a fallback ETF, or stay defensive.<\/td><\/tr><tr><td>Stock selection<\/td><td>Ranks small\/mid-cap stocks and picks the strongest candidates.<\/td><\/tr><tr><td>Backtest<\/td><td>Simulates monthly investing, rebalancing, fees, returns, and drawdowns.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_the_Market_Rules_Work\"><\/span>How the Market Rules Work<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Each month, the model checks two things: are small caps doing well, and is the overall market still healthy? Based on that, it chooses one of three actions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Small-cap basket (8 months, ~14% of the time):<\/strong> When small caps look strong, the strategy buys a basket of 30 selected small\/mid-cap stocks.<\/li>\n\n\n\n<li><strong>Large-cap fallback (41 months, ~72% of the time):<\/strong> When the market is still okay but small caps don&#8217;t look attractive, the strategy uses a broader growth ETF instead.<\/li>\n\n\n\n<li><strong>Defensive (8 months, ~14% of the time):<\/strong> When the market looks weak, the strategy moves to short-term Treasury bills to reduce losses.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=447321991  loading=\"lazy\" decoding=\"async\" width=\"1936\" height=\"867\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/06_regime_timeline.png\" alt=\"Monthly regime decisions across the backtest\" class=\"wp-image-532\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:859\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/06_regime_timeline.png 1936w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:134\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/06_regime_timeline.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:459\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/06_regime_timeline.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:344\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/06_regime_timeline.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:688\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/06_regime_timeline.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<p>The timeline shows when the model changed position. It moved defensive during weaker market periods, especially around parts of the 2022 selloff and early 2025 volatility. It only bought the small-cap basket during a few stronger windows.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1800583127  loading=\"lazy\" decoding=\"async\" width=\"1569\" height=\"992\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/04_regime_mix.png\" alt=\"Regime allocation mix for US v9 Regime DCA\" class=\"wp-image-528\" style=\"width:560px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1569\/h:992\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/04_regime_mix.png 1569w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:190\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/04_regime_mix.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:647\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/04_regime_mix.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:486\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/04_regime_mix.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:971\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/04_regime_mix.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Stock_Selection\"><\/span>Stock Selection<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>When the model chooses small caps, it doesn&#8217;t buy the whole Russell 2000. It screens companies first and picks 30 stocks, trying to avoid weaker ones with poor earnings, weak balance sheets, or low trading volume.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Filter<\/th><th>Examples<\/th><th>Why it matters<\/th><\/tr><\/thead><tbody><tr><td>Profitability<\/td><td>ROA, ROE, net margin, positive net income<\/td><td>Prefer companies that are actually making money.<\/td><\/tr><tr><td>Momentum<\/td><td>6-month and 12-month price strength<\/td><td>Prefer stocks already moving in the right direction.<\/td><\/tr><tr><td>Balance sheet<\/td><td>Equity-to-assets, positive equity<\/td><td>Avoid companies with weak financial structure.<\/td><\/tr><tr><td>Trading quality<\/td><td>Minimum price, market cap, dollar volume<\/td><td>Avoid penny stocks and stocks that are hard to trade.<\/td><\/tr><tr><td>Risk<\/td><td>63-day volatility filter<\/td><td>Avoid stocks with extreme price swings.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The selected basket can look very different from the index. For example, in November 2021, the model picked names like <code>WIRE<\/code>, <code>MC<\/code>, and <code>VSTO<\/code>, which came from more traditional business areas instead of only high-growth tech names.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=556716166  loading=\"lazy\" decoding=\"async\" width=\"1620\" height=\"914\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/08_sample_basket.png\" alt=\"Example selected stocks from one small-cap regime month\" class=\"wp-image-534\" style=\"width:680px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1620\/h:914\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/08_sample_basket.png 1620w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:169\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/08_sample_basket.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:578\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/08_sample_basket.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:433\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/08_sample_basket.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:867\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/08_sample_basket.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Backtest_Setup\"><\/span>Backtest Setup<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>I tried to keep the test realistic. The backtest runs from September 2020 to May 2025, which includes both strong and weak market periods. I also included trading fees and FX costs instead of assuming free trading.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Period<\/td><td>2020-09-01 to 2025-05-07<\/td><\/tr><tr><td>Monthly contribution<\/td><td>$1,000<\/td><\/tr><tr><td>Main comparison<\/td><td>IWM DCA (monthly $1,000 into IWM)<\/td><\/tr><tr><td>Trading fee<\/td><td>$1 per trade<\/td><\/tr><tr><td>FX cost<\/td><td>0.2%<\/td><\/tr><tr><td>Rebalancing<\/td><td>Monthly<\/td><\/tr><tr><td>Metrics<\/td><td>Final value, return, max drawdown, trades, fees<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Results\"><\/span>Results<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The chart below shows the main result. The two strategies were close for a long time. The difference became clearer in weaker periods, when the model moved away from small caps and avoided part of the drawdown.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=451188366  loading=\"lazy\" decoding=\"async\" width=\"1778\" height=\"1023\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/01_equity_curve.png\" alt=\"Portfolio value curve for US v9 Regime DCA versus IWM DCA\" class=\"wp-image-525\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1778\/h:1023\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/01_equity_curve.png 1778w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:173\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/01_equity_curve.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:589\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/01_equity_curve.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:442\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/01_equity_curve.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:884\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/01_equity_curve.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Strategy<\/th><th>Final Value<\/th><th>Gain vs Invested<\/th><th>Annualized DCA Return<\/th><th>Max Drawdown<\/th><th>Trades<\/th><th>Total Fees<\/th><\/tr><\/thead><tbody><tr><td>US v9 Regime DCA<\/td><td>$59,829<\/td><td>4.96%<\/td><td>2.07%<\/td><td>-15.52%<\/td><td>289<\/td><td>$881<\/td><\/tr><tr><td>IWM DCA<\/td><td>$58,787<\/td><td>3.13%<\/td><td>1.32%<\/td><td>-22.33%<\/td><td>57<\/td><td>$171<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>In simple terms:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Final value:<\/strong> The strategy ended with about $1,042 more than IWM DCA after investing around $57,000.<\/li>\n\n\n\n<li><strong>Return:<\/strong> The annualized DCA return was 2.07%, compared with 1.32% for IWM DCA.<\/li>\n\n\n\n<li><strong>Max drawdown:<\/strong> The worst drop was -15.5%, compared with -22.3% for IWM. This is the main benefit \u2014 reducing drawdown by 6.8 percentage points.<\/li>\n\n\n\n<li><strong>Cost:<\/strong> The strategy traded more often, so it paid more fees. This is the main tradeoff.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1696708707  loading=\"lazy\" decoding=\"async\" width=\"1778\" height=\"992\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/02_drawdown.png\" alt=\"Drawdown comparison between US v9 Regime DCA and IWM DCA\" class=\"wp-image-526\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1778\/h:992\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/02_drawdown.png 1778w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:167\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/02_drawdown.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:571\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/02_drawdown.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:428\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/02_drawdown.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:857\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/02_drawdown.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"When_the_Outperformance_Happened\"><\/span>When the Outperformance Happened<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The strategy didn&#8217;t beat IWM every month. Most of the advantage came during weaker market periods, when the model avoided part of the loss. The chart below shows the dollar gap over time.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1200264199  loading=\"lazy\" decoding=\"async\" width=\"1940\" height=\"966\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/09_outperformance.png\" alt=\"Cumulative dollar outperformance of regime strategy vs IWM DCA\" class=\"wp-image-537\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:956\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/09_outperformance.png 1940w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:149\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/09_outperformance.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:510\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/09_outperformance.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:382\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/09_outperformance.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:765\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/09_outperformance.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<p>The strategy sometimes fell behind during strong markets, then caught up when the market got weaker. It wasn&#8217;t designed to catch every rally, it was designed to reduce losses during bad periods. So this kind of pattern is expected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_Cost_of_Being_Active\"><\/span>The Cost of Being Active<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The main downside is trading cost. The strategy made 289 trades, compared with 57 for IWM DCA. It paid $881 in fees, while IWM DCA paid $171.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=1499350352  loading=\"lazy\" decoding=\"async\" width=\"1854\" height=\"863\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/11_cost_analysis.png\" alt=\"Cost and turnover comparison between strategies\" class=\"wp-image-538\" style=\"width:720px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1854\/h:863\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/11_cost_analysis.png 1854w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:140\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/11_cost_analysis.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:477\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/11_cost_analysis.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:357\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/11_cost_analysis.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:715\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/11_cost_analysis.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<p>The extra trading still helped overall, but the margin wasn&#8217;t huge. The strategy ended about $1,042 ahead, while paying $710 more in fees. So this works better if trading costs are low.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_DCA_Mechanics\"><\/span>The DCA Mechanics<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>For DCA backtests, I also like to compare portfolio value with total money invested. The shaded area below shows total contributions. The lines show how much those contributions became over time.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-opt-id=176488118  loading=\"lazy\" decoding=\"async\" width=\"1940\" height=\"966\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/12_invested_vs_value.png\" alt=\"Portfolio value versus cumulative contributions over time\" class=\"wp-image-539\" style=\"width:760px\" srcset=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1920\/h:956\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/12_invested_vs_value.png 1940w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:300\/h:149\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/12_invested_vs_value.png 300w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:510\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/12_invested_vs_value.png 1024w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:768\/h:382\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/12_invested_vs_value.png 768w, https:\/\/mlcznkdztmb6.i.optimole.com\/w:1536\/h:765\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/12_invested_vs_value.png 1536w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Worked_and_What_Didnt\"><\/span>What Worked and What Didn&#8217;t<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The result is not perfect. Moving defensive helped reduce losses during weak periods, and some of the small-cap stock picks helped the strategy recover later. But the strategy was sometimes too conservative \u2014 it spent most months in the fallback ETF, so it missed some small-cap rallies. The signal also reacts with a delay, so it can switch after a move has already started.<\/p>\n\n\n\n<p>Overall the strategy reduced drawdown by 6.8 percentage points, but the return improvement was small. It works better as a risk-control idea than as a way to get high returns. And the comparison matters \u2014 I compared against IWM because this project is about improving small-cap DCA, not about beating every possible index.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Id_Do_Next\"><\/span>What I&#8217;d Do Next<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If I continue this, the priority would be:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Test on more periods:<\/strong> Run the strategy on more historical data to see if the rules still hold.<\/li>\n\n\n\n<li><strong>Check rule sensitivity:<\/strong> Change the rule thresholds and see if the result is still similar.<\/li>\n\n\n\n<li><strong>Reduce trading:<\/strong> Add rules that avoid switching too often, like waiting for two months of confirmation before changing position.<\/li>\n\n\n\n<li><strong>Control sector exposure:<\/strong> Avoid letting the stock basket become too concentrated in one industry.<\/li>\n\n\n\n<li><strong>Check survivorship bias:<\/strong> Make sure the test includes companies that disappeared or were delisted, not only the ones that survived.<\/li>\n<\/ol>\n\n\n\n<p>This is still a research prototype. The test period is short and the rules need more validation before this could be used as a real investment system. But as a way to think about when to hold small caps and when to step back, I think it&#8217;s a decent starting point.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>I built this project to test a practical investing idea: instead of buying small-cap stocks every month no matter what, can I use simple market rules to decide when small &hellip; <a href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/\" class=\"more-link\"><span>Continue reading<span class=\"screen-reader-text\">Building a Regime-Aware DCA Strategy for Small\/Mid-Cap Investing<\/span><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":541,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,71],"tags":[65,13,66,64,63],"class_list":["post-529","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-proj","category-quant-finance-trading","tag-backtesting","tag-data-science","tag-portfolio-optimization","tag-python","tag-quantitative-finance"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Building a Regime-Aware DCA Strategy for Small\/Mid-Cap Investing - Philip\u2019s Data Science Diary<\/title>\n<meta name=\"description\" content=\"A Python backtesting project that combines regime detection, SimFin fundamentals, and monthly DCA to improve small-cap investing risk control.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building a Regime-Aware DCA Strategy for Small\/Mid-Cap Investing - Philip\u2019s Data Science Diary\" \/>\n<meta property=\"og:description\" content=\"A Python backtesting project that combines regime detection, SimFin fundamentals, and monthly DCA to improve small-cap investing risk control.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/\" \/>\n<meta property=\"og:site_name\" content=\"Philip\u2019s Data Science Diary\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-14T01:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-04T15:24:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:572\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/529_feature.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"572\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Philip\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Philip\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/\"},\"author\":{\"name\":\"Philip\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\"},\"headline\":\"Building a Regime-Aware DCA Strategy for Small\\\/Mid-Cap Investing\",\"datePublished\":\"2025-05-14T01:00:00+00:00\",\"dateModified\":\"2026-05-04T15:24:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/\"},\"wordCount\":1129,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\"},\"image\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2026\\/05\\/529_feature-scaled.png\",\"keywords\":[\"Backtesting\",\"Data Science\",\"Portfolio Optimization\",\"Python\",\"Quantitative Finance\"],\"articleSection\":[\"Projects\",\"Quant Finance &amp; Trading\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/\",\"url\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/\",\"name\":\"Building a Regime-Aware DCA Strategy for Small\\\/Mid-Cap Investing - Philip\u2019s Data Science Diary\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2026\\/05\\/529_feature-scaled.png\",\"datePublished\":\"2025-05-14T01:00:00+00:00\",\"dateModified\":\"2026-05-04T15:24:19+00:00\",\"description\":\"A Python backtesting project that combines regime detection, SimFin fundamentals, and monthly DCA to improve small-cap investing risk control.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/#primaryimage\",\"url\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2026\\/05\\/529_feature-scaled.png\",\"contentUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2026\\/05\\/529_feature-scaled.png\",\"width\":2560,\"height\":1429},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/2025\\\/05\\\/14\\\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building a Regime-Aware DCA Strategy for Small\\\/Mid-Cap Investing\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#website\",\"url\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/\",\"name\":\"Philip\u2019s University Data Science Journey\",\"description\":\"Navigating Data Science: From Classroom to Career\",\"publisher\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\",\"name\":\"Philip\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"url\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"contentUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"width\":16,\"height\":16,\"caption\":\"Philip\"},\"logo\":{\"@id\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\"},\"description\":\"Data Scientist &amp; Systems Engineer. Graduated from City University of Hong Kong. Previously founded Twinight Limited as CTO, developing AI investment analytics and automated trading solutions. Currently working as a Test and Integration Engineer on a Vessel Traffic Service (VTS) system in the maritime industry since December 2024.\",\"sameAs\":[\"https:\\\/\\\/philip.twinight.co\\\/portfolio\"],\"url\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/author\\\/philip\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building a Regime-Aware DCA Strategy for Small\/Mid-Cap Investing - Philip\u2019s Data Science Diary","description":"A Python backtesting project that combines regime detection, SimFin fundamentals, and monthly DCA to improve small-cap investing risk control.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/","og_locale":"en_GB","og_type":"article","og_title":"Building a Regime-Aware DCA Strategy for Small\/Mid-Cap Investing - Philip\u2019s Data Science Diary","og_description":"A Python backtesting project that combines regime detection, SimFin fundamentals, and monthly DCA to improve small-cap investing risk control.","og_url":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/","og_site_name":"Philip\u2019s Data Science Diary","article_published_time":"2025-05-14T01:00:00+00:00","article_modified_time":"2026-05-04T15:24:19+00:00","og_image":[{"width":1024,"height":572,"url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:1024\/h:572\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/529_feature.png","type":"image\/png"}],"author":"Philip","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Philip","Estimated reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#article","isPartOf":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/"},"author":{"name":"Philip","@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414"},"headline":"Building a Regime-Aware DCA Strategy for Small\/Mid-Cap Investing","datePublished":"2025-05-14T01:00:00+00:00","dateModified":"2026-05-04T15:24:19+00:00","mainEntityOfPage":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/"},"wordCount":1129,"commentCount":0,"publisher":{"@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414"},"image":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#primaryimage"},"thumbnailUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/529_feature-scaled.png","keywords":["Backtesting","Data Science","Portfolio Optimization","Python","Quantitative Finance"],"articleSection":["Projects","Quant Finance &amp; Trading"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/","url":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/","name":"Building a Regime-Aware DCA Strategy for Small\/Mid-Cap Investing - Philip\u2019s Data Science Diary","isPartOf":{"@id":"https:\/\/philip.twinight.co\/portfolio\/#website"},"primaryImageOfPage":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#primaryimage"},"image":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#primaryimage"},"thumbnailUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/529_feature-scaled.png","datePublished":"2025-05-14T01:00:00+00:00","dateModified":"2026-05-04T15:24:19+00:00","description":"A Python backtesting project that combines regime detection, SimFin fundamentals, and monthly DCA to improve small-cap investing risk control.","breadcrumb":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#primaryimage","url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/529_feature-scaled.png","contentUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2026\/05\/529_feature-scaled.png","width":2560,"height":1429},{"@type":"BreadcrumbList","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/2025\/05\/14\/building-a-regime-aware-dca-strategy-for-small-mid-cap-investing\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/philip.twinight.co\/portfolio\/"},{"@type":"ListItem","position":2,"name":"Building a Regime-Aware DCA Strategy for Small\/Mid-Cap Investing"}]},{"@type":"WebSite","@id":"https:\/\/philip.twinight.co\/portfolio\/#website","url":"https:\/\/philip.twinight.co\/portfolio\/","name":"Philip\u2019s University Data Science Journey","description":"Navigating Data Science: From Classroom to Career","publisher":{"@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/philip.twinight.co\/portfolio\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414","name":"Philip","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","contentUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","width":16,"height":16,"caption":"Philip"},"logo":{"@id":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png"},"description":"Data Scientist &amp; Systems Engineer. Graduated from City University of Hong Kong. Previously founded Twinight Limited as CTO, developing AI investment analytics and automated trading solutions. Currently working as a Test and Integration Engineer on a Vessel Traffic Service (VTS) system in the maritime industry since December 2024.","sameAs":["https:\/\/philip.twinight.co\/portfolio"],"url":"https:\/\/philip.twinight.co\/portfolio\/index.php\/author\/philip\/"}]}},"_links":{"self":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts\/529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/comments?post=529"}],"version-history":[{"count":7,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts\/529\/revisions"}],"predecessor-version":[{"id":590,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/posts\/529\/revisions\/590"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/media\/541"}],"wp:attachment":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/media?parent=529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/categories?post=529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/tags?post=529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}