{"slug": "three-eras-of-quantitative-finance-how-rule-based-ml-and-deep-learning-models-to", "title": "Three Eras of Quantitative Finance: How Rule-Based, ML, and Deep Learning Models React to the Same…", "summary": "A research project comparing three generations of quantitative trading strategies—1970s rule-based systems, classical machine learning, and Transformer-based deep learning—on Apple stock data from 2014 to 2024 found that the most complex model, the Transformer, performed worst, while a Random Forest from the 1990s achieved the best risk-adjusted returns. The study highlights that complexity does not guarantee performance and warns against the naive prediction trap where models simply predict tomorrow's price equals today's.", "body_md": "**Introduction**\n\nQuantitative finance has undergone three distinct technological revolutions over the past 50 years. Each one promised to give traders an edge. But does more sophisticated technology actually translate to better performance?\n\nIf you had access to the same AI technology powering ChatGPT, could you beat the stock market?\n\nThis question motivated a two-week independent research project where I compared three generations of quantitative trading strategies — from 1970s rule-based systems to modern Transformer-based deep learning — all applied to the same 10 years of Apple (AAPL) stock data.\n\nThe answer surprised me. And the reason *why* turned out to be more interesting than the result itself.\n\n**Background: Three Eras of Quantitative Finance**\n\nQuantitative finance has undergone significant evolution over the past 50 years. I organized this evolution into three distinct eras:\n\n**Era 1 — Rule-Based Strategies (1970s–1990s)**\n\nThe earliest quant strategies were simply rules written by humans. The famous Moving Average Crossover strategy, for example, says: when the 20-day average price rises above the 50-day average, buy; when it falls below, sell. No learning, no adaptation — pure human logic encoded into a computer.\n\n**Era 2 — Classical Machine Learning (1990s–2010s)**\n\nInstead of humans writing rules, machine learning algorithms like Random Forest learn patterns automatically from historical data. Feed it thousands of past trading days with labels (“this day was followed by a price increase”), and it builds its own decision rules. This is the foundation of firms like Renaissance Technologies and the early Jane Street.\n\n**Era 3 — Deep Learning (2010s–present)**\n\nTransformer models — the same architecture behind ChatGPT — can now process entire sequences of market data, finding complex relationships across hundreds of historical days simultaneously. In theory, this should give them a significant edge.\n\n**The Experiment**\n\nI implemented all three eras from scratch in Python and tested them on AAPL data from January 2014 to January 2024 — a period that includes a steady bull market, the COVID crash, and the AI-driven rally of 2023.\n\nThe results across all three strategies were evaluated using three metrics:\n\n**Finding 1: Complexity Does Not Guarantee Performance**\n\nHere is what the numbers showed:\n\nThe most complex model — the Transformer — performed worst by every metric. The Random Forest, a method from the 1990s, achieved the best risk-adjusted returns.\n\nThis is not a coincidence. It reflects a finding that has been gaining traction in academic research. \"The [PatchTST paper](https://arxiv.org/abs/2211.14730) *(Nie et al., 2023)*, published by researchers studying time series forecasting, demonstrated that well-designed, simpler models can match or outperform deep learning on financial data. The intuition is that financial markets are full of noise, and complex models can overfit to patterns that no longer exist by the time you trade on them.\n\n**Finding 2: The Trap I Almost Fell Into**\n\nThis was the most valuable lesson of the project — and it came from making a mistake.\n\nWhen I first trained the Transformer, it seemed to work perfectly. The training loss dropped to near zero, and the predicted price line tracked the actual price almost exactly.\n\nBut something felt wrong. I compared the model’s predictions to the simplest possible baseline: just predict that tomorrow’s price equals today’s price. The two lines were almost identical.\n\nThe model had not learned anything about the future. It had learned one trivial fact: **prices do not change very much from one day to the next.** By predicting “tomorrow ≈ today,” it achieved excellent accuracy while providing zero trading value.\n\nThis is called the **Naive Prediction Trap**, and it is one of the most common mistakes in financial machine learning. The fix was to change the task: instead of predicting the price, predict the *direction* — will the price go up or down tomorrow?\n\nAfter this fix, the training loss stayed higher, which is actually a good sign. It means the model is tackling a genuinely difficult problem instead of finding an easy shortcut.\n\n**Finding 3: How You Evaluate Matters as Much as What You Build**\n\nThere is a subtlety in the results that is easy to miss.\n\nEra 1 covers the full 10-year period (2014–2024), which includes AAPL’s most explosive growth. Era 3 only covers 2022–2024, a period of high volatility and a significant price correction.\n\nThis means comparing their total returns directly is misleading. A strategy that looks mediocre over 2022–2024 might have been excellent over 2014–2020. **The choice of evaluation period can completely change your conclusions** — a problem that real quantitative researchers deal with constantly.\n\nThis is one reason why backtesting results should always be interpreted with caution.\n\n**Finding 4: The Hardest Benchmark to Beat**\n\nAcross all three eras, every strategy underperformed one simple alternative: just buy AAPL and hold it for 10 years.\n\nThis is a humbling result. It suggests that for strongly trending assets like AAPL during a bull market, the edge that sophisticated strategies provide is not enough to compensate for the times they are wrong and sitting in cash while the stock keeps rising.\n\nThis does not mean quantitative strategies are useless — they become more valuable in sideways markets, bear markets, or when managing large portfolios where risk control matters more than raw return. But it is an important reminder that **complexity is not the same as insight.**\n\n**Finding 5: The Same Event, Three Different Reactions**\n\nNumbers alone do not tell the full story. To understand *how* each model behaves — not just *how well* — I examined three specific market events and tracked what signal each model generated in real time.\n\n**Event 1: COVID Crash (February–April 2020, -21.8%)**\n\nWhen AAPL began its rapid 30% decline in late February 2020, the three models reacted very differently.\n\nThe MA Crossover switched to cash around March 1st and stayed there for the rest of the period — protecting capital during the worst of the selloff. The Random Forest oscillated frantically between invested and cash, unable to make a stable decision in the face of extreme daily volatility. The Transformer stayed invested for 38 out of 42 days, providing almost no protection whatsoever.\n\n**Event 2: COVID Recovery (April–July 2020, +51.5%)**\n\nThe recovery revealed a different set of tradeoffs. The MA strategy, having correctly exited during the crash, was slow to re-enter — it waited until May 1st, missing the entire April rebound. The Random Forest, despite its confusion during the crash, was more nimble in catching the recovery. The Transformer stayed invested for 63 out of 64 days, which this time worked in its favor.\n\n**Event 3: Rate Hike Selloff (January–May 2022, -13.3%)**\n\nThis event was the most revealing. Unlike the COVID crash — a sudden panic — this was a slow, grinding decline driven by macroeconomic factors. The Transformer invested for all 82 out of 82 days, completely ignoring the sustained downtrend. The MA strategy recognized the trend change in early February and moved to cash for nearly two months. The Random Forest continued its pattern of frequent signal switching.\n\n**What the Three Events Reveal**\n\nEach model has a distinct behavioral profile that aggregate performance metrics cannot capture:\n\n*Era 1 — MA Crossover: Slow but decisive.* It consistently misses the first few days of any move, but once it makes a decision, it commits. It is the only model that genuinely reduces downside exposure during sustained declines.\n\n*Era 2 — Random Forest: Fast but indecisive.* It reacts quickly to short-term patterns, but in high-volatility environments, it generates noisy, unstable signals. This explains its strong Sharpe Ratio in normal markets and its confusion during extreme events.\n\n*Era 3 — Transformer: Rarely changes its mind.* Its signal is almost always 1 — invest — regardless of market conditions. In bull markets, this looks like wisdom; in bear markets, it is indistinguishable from a strategy of simply never selling.\n\nThis behavioural analysis adds an important dimension to the quantitative results: **a model’s aggregate performance score can look similar to another model’s while its underlying decision-making process is completely different.**\n\n**What I Learned**\n\nBeyond the numerical results, this project taught me three things about doing research:\n\nFirst, results that look too good are usually a warning sign. The near-zero loss on the first Transformer attempt should have been suspicious, not exciting.\n\nSecond, the evaluation framework matters as much as the model. Two strategies can produce completely different rankings depending on the time period you test them on.\n\nThird, the most interesting findings often come from failure. Discovering and diagnosing the Naive Prediction Trap was more educational than any result that “worked.”\n\n**What Comes Next**\n\nThis project deliberately used a simplified setup — one stock, daily data, and a basic Transformer architecture. Real-world quantitative strategies are far more sophisticated. Some directions worth exploring:\n\nThe code for this project is fully open-source and documented on GitHub: **https://github.com/ZhuYX163/quant-ai-study**\n\n**References**\n\nNie, Y., Nguyen, N. H., Sinthong, P., & Kalagnanam, J. (2023). *A Time Series is Worth 64 Words: Long-term Forecasting with Transformers.* International Conference on Learning Representations (ICLR 2023). [https://arxiv.org/abs/2211.14730](https://arxiv.org/abs/2211.14730)\n\n*This project was built as an independent two-week research study. I am a second-year student at École Polytechnique studying Mathematics and Economics with a minor in Computer Science.*\n\n[Three Eras of Quantitative Finance: How Rule-Based, ML, and Deep Learning Models React to the Same…](https://pub.towardsai.net/three-eras-of-quantitative-finance-how-rule-based-ml-and-deep-learning-models-react-to-the-same-554d75a2dc7b) was originally published in [Towards AI](https://pub.towardsai.net) on Medium, where people are continuing the conversation by highlighting and responding to this story.", "url": "https://wpnews.pro/news/three-eras-of-quantitative-finance-how-rule-based-ml-and-deep-learning-models-to", "canonical_source": "https://pub.towardsai.net/three-eras-of-quantitative-finance-how-rule-based-ml-and-deep-learning-models-react-to-the-same-554d75a2dc7b?source=rss----98111c9905da---4", "published_at": "2026-06-24 23:01:01+00:00", "updated_at": "2026-06-24 23:20:24.612157+00:00", "lang": "en", "topics": ["machine-learning", "artificial-intelligence", "ai-research"], "entities": ["Apple", "Renaissance Technologies", "Jane Street", "ChatGPT", "Random Forest", "Transformer", "AAPL"], "alternates": {"html": "https://wpnews.pro/news/three-eras-of-quantitative-finance-how-rule-based-ml-and-deep-learning-models-to", "markdown": "https://wpnews.pro/news/three-eras-of-quantitative-finance-how-rule-based-ml-and-deep-learning-models-to.md", "text": "https://wpnews.pro/news/three-eras-of-quantitative-finance-how-rule-based-ml-and-deep-learning-models-to.txt", "jsonld": "https://wpnews.pro/news/three-eras-of-quantitative-finance-how-rule-based-ml-and-deep-learning-models-to.jsonld"}}