Summary of "I Re-Created A Quant Trading Strategy With Claude Code (Insanely Cool)"

Finance-focused summary (markets / quant methodology)

Core idea: “Hedge fund method” instead of chart indicators / trend lines

Framework / step-by-step methodology (10 elements)

  1. Define “states” using the 20-day cumulative return thresholds

    • Bull if ≥ +5%
    • Bear if ≤ −5%
    • Sideways otherwise
  2. Determine today’s state

    • Label each day in history (starting from day 20) according to the 20-day return criterion.
  3. Markov property (focus on today)

    • Transitions depend primarily on the current state, not the full past path.
  4. Build the “hedge fund matrix” (3×3 transition matrix)

    • From today’s state → tomorrow’s state, using empirical transition counts converted into probabilities.
  5. Persistence / “stickiness”

    • Diagonal elements indicate how likely the regime is to remain the same.
    • Stickiness is inferred from the transition probabilities.
  6. Multi-day forecasting by “squaring the matrix”

    • 2-day: square the transition matrix (matrix power 2)
    • 3-day: cube it (power 3)
    • Generally: higher powers for longer horizons; probabilities become less informative as horizon increases.
  7. Stationary distribution

    • With very long horizons (example mentioned: ~28 days), probabilities converge toward an uninformative regime mix.
  8. Signal generation (probability differential)

    • Trading signal is computed as:
      • Signal = P(tomorrow = Bull) − P(tomorrow = Bear)
    • Interpretation:
      • Magnitude ⇒ trade size / risk intensity
        • “The larger the number, the more money”
      • Sign ⇒ direction
        • Positive ⇒ go long
        • Negative ⇒ go short
  9. Walk-forward backtesting

    • Recalculate the entire regime model repeatedly (each day) to avoid “future leakage” from fitting on the whole sample.
  10. Hidden Markov Model (HMM) to reduce subjective thresholds

    • Uses pattern recognition to infer state “personalities” rather than relying only on fixed human-labeled bull/bear/sideways thresholds.
    • The video frames overlap between:
      • Original subjective thresholds (±5% over 20 days)
      • HMM-inferred states
    • When they agree, it’s framed as a “green light”.

Explicit instruments / tickers mentioned

Also referenced conceptually:


Key numbers / thresholds / example probabilities

State definition thresholds (main parameter)

Stickiness / persistence

Signal example (probability differential)

Signal:

On-chart example probabilities (Bitcoin, shown in subtitles)

Interpretation:

Long-horizon caution


Recommendations / cautions and risk handling


Disclosures / disclaimers


Tools promoted (implementation details)


Presenters / sources mentioned

Category ?

Finance


Share this summary


Is the summary off?

If you think the summary is inaccurate, you can reprocess it with the latest model.

Video