Video summary

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

Main summary

Key takeaways

Finance

Finance-focused summary (markets / quant methodology)

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

  • The video claims hedge funds/quants classify market regimes using probabilities derived from historical return transitions, rather than technical indicators or subjective “feelings”.
  • Markets are modeled with three regimes (“states”):
    • Bull: last 20 trading days cumulative return ≥ +5%
    • Bear: last 20 trading days cumulative return ≤ −5% (text also implies something like “−6 so on and so forth”)
    • Sideways: anything in between

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

  • Bitcoin
  • Ethereum
  • XRP
  • SPY (used as a demo for the “10-year” / SPY 10-year chart in the onboarding demo)
  • Tesla (TSLA)

Also referenced conceptually:

  • “Bit Tensor” / “subnets” (example strategy; not clearly tied to a specific ticker in the subtitles)

Key numbers / thresholds / example probabilities

State definition thresholds (main parameter)

  • Bull if 20-day cumulative return ≥ +5%
  • Bear if 20-day cumulative return ≤ −5%
  • Otherwise: Sideways

Stickiness / persistence

  • Example described (illustrative, not computed live): bull “stickiness” 80%

Signal example (probability differential)

  • P(Bull tomorrow) = 65%
  • P(Bear tomorrow) = 20%
  • P(Sideways tomorrow) = 15%

Signal:

  • 65% − 20% = +45% ⇒ long

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

  • P(Bull tomorrow) = 29%
  • P(Bear tomorrow) = 42%
  • P(Sideways tomorrow) = 29%

Interpretation:

  • Bear is most likely based on recent behavior/stickiness.

Long-horizon caution

  • Example: ~28-day forecast
    • Probabilities converge toward a uniform / low-signal distribution, reducing actionable usefulness.

Recommendations / cautions and risk handling

  • Backtesting bias caution

    • Fitting once over the full dataset can “learn from the future”.
    • Use walk-forward recalculation to mitigate this.
  • Risk sizing concept

    • Trade size scales with the strength of the probability differential (Bull − Bear).
  • Horizon warning

    • Longer projections (example: 28 days) may converge toward uninformative distributions, lowering signal quality.

Disclosures / disclaimers

  • None explicitly shown as a formal “not financial advice” statement in the subtitles.

Tools promoted (implementation details)

  • A Claude Code / LLM “skill” with a one-shot prompt installed via GitHub.
  • TradingView Pine Script
    • Used to visualize the 3×3 probability matrix on charts.
  • Setup timing mentioned:
    • Skill install: ~90 seconds (Mac/Linux), 2–3 minutes (Windows)

Presenters / sources mentioned

  • Rowan
    • Quant reference for the original “hedge fund method” / thread
    • Also referenced again as “Rowan Chain, an observable marov regime model”
  • Lewis
    • Speaker name appearing in subtitles (e.g., “Well, Lewis, didn’t we just do…”)

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video