Video summary
I Re-Built A Quant Trading Strategy With Fable 5
Main summary
Key takeaways
Finance-specific summary (quant/hedge-fund “Markov” trading framework)
The video describes a “hedge fund method” for quant trading that replaces subjective chart indicators with a regime-based approach. It uses:
- State classification of market conditions
- Transition probabilities between states to generate trade direction and (optionally) position sizing.
Instruments / tickers / assets mentioned
- SPY (S&P 500 ETF)
- Bitcoin (BTC) (referenced via “Bitcoin chart”; ticker not explicitly stated)
- Ethereum (ETH) (referenced; ticker not explicitly stated)
- Tesla (TSLA) (referenced; ticker not explicitly stated)
- S&P 500 (index)
- “S&P 500” backtest over ~30 years (mentioned as a prior prompt result)
No other tickers (e.g., bonds, sector ETFs, commodities) are mentioned.
Key numbers / thresholds / outputs mentioned
-
State lookback window: last 20 days of price history
-
Example regime thresholds for returns over 20 days:
- Bull state: return > +5%
- Sideways state: return between -5% and +5%
- Bear state: return < -5%
-
“Stickiness” fix (methodology change):
- Instead of comparing every day with overlapping 20-day windows, the method waits for non-overlap (i.e., uses a new 20-day segment without overlap with the prior segment) to avoid inflated stickiness scores.
-
Confidence / signal logic:
- Compute likelihood of bull next day and bear next day
- Signal strength uses: (bull likelihood − bear likelihood)
- Example: 80% bull vs 10% bear → 70% net bullish confidence
-
Multi-day projection:
-
If 1-day bull likelihood is 60% (0.6), then 2-day likelihood uses multiplication: 0.6 × 0.6 = 0.36 (36%)
-
General idea: cube for 3 days, power-of-n for n days
- Warning: far-ahead projections become impractically small.
-
-
Walking forward / leakage correction:
- Prior version reportedly made S&P 500 lose money over ~30 years
- Improved “no future leakage” version shows S&P 500 profitable (stated as reality)
- Bitcoin example: previously claimed 23x growth, improved to nearly 60x growth
-
Live demo snapshot (Bitcoin):
- “Today is a bear state”
- BTC: “minus 16.7% over the last 20 bars” on the daily chart (as shown in the demo)
Methodology / step-by-step framework (as described)
- Define market “states” (regimes) by quantifying market direction over a lookback window.
- Classify state using return over the last 20 days into:
- Bull / Sideways / Bear (example thresholds: >+5%, between -5% and +5%, < -5%)
- Apply the Markov property:
- Next-day state depends primarily on the current state, not the detailed past path.
- Compute transition probabilities:
- Back over history; count transitions between states (e.g., bull→sideways, bull→bear, etc.)
- “Nine combinations” are referenced (implying 3 states with pairwise transitions).
- Measure “stickiness”:
- Bull likely to remain bull; bear likely to remain bear.
- Improvement: recalculate using non-overlapping 20-day windows to reduce inflated stickiness.
- Create a trading signal from state probabilities:
- Use: (P(bull next day) − P(bear next day))
- If bullish net is positive → long bias (as implied)
- Position sizing / scaling by confidence (recommended concept):
- Allocate more when confidence is high (e.g., ~70% net bullish in the example)
- Allocate less when confidence is low
- Project further ahead (optional):
- Use repeated multiplication/powers of probabilities for 2–3+ days
- Warns very far ahead becomes less useful due to tiny numbers
- Walking forward backtesting (risk/validity fix):
- Backtests must not “see the future.”
- Restrict training/data access to only information before the evaluation window to avoid “exam after seeing the answer sheet.”
- Hidden Markov method (parameter-free state labeling):
- Instead of fixed ±5% boundaries, infer regime boundaries from the data.
- Use inferred labels to reduce arbitrariness.
- Generate / installation workflow:
- Use an LLM prompt to create a Pine Script for TradingView that computes regimes, transitions, stickiness, and emits a current signal.
Explicit recommendations / cautions
- Caution on backtest validity: naive backtesting can “learn from events ahead” (data leakage). The video frames “walking forward” as critical.
- Caution on stickiness estimation: overlapping windows can inflate stickiness; recalculate using no overlap.
- Boundaries shouldn’t be arbitrary: fixed thresholds (like ±5%) are described as “made up.” “Hidden Markov” is presented as the fix.
- Confidence-based trading: scale exposure by probability/confidence rather than going all-in on every signal.
- Far-ahead forecasting likely not useful: probabilities shrink toward zero over multiple steps.
Note: No explicit “not financial advice” disclaimer is included in the subtitles provided.
Presenter / sources mentioned
- Roan (Twitter/X quant credited with the original method; work condensed)
- Fable 5 (LLM model mentioned for improving the prompt/framework; previously also Opus 4.7)
- Claude (LLM used in the copy/paste workflow)
- TradingView (platform receiving the Pine Script / chart connection)
- 01 Systems (classroom/prompts link/source for the prompt)