git404hub

what is markov-hedge-fund-method fr?

jackson-video-resources/markov-hedge-fund-method — explained in plain English

Analysis updated 2026-05-18

120PythonAudience · developerComplexity · 3/5LicenseSetup · easy

tl;dr

Claude Code plugin that labels price history into Bull, Bear, Sideways days, builds a transition matrix, and runs a walk-forward backtest with Sharpe and drawdown.

vibe map

mindmap
  root((markov-hedge-fund))
    Inputs
      Ticker symbol
      CSV price file
      Window size
    Outputs
      Regime labels
      Transition matrix
      Backtest report
    Use Cases
      Quant tutorial
      Regime detection
      Walk-forward test
    Tech Stack
      Python
      Claude Code
      yfinance
      hmmlearn

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Install a quant analysis idea as a Claude Code slash-command plugin and run it on any ticker.

VIBE 2

Run a walk-forward backtest of a Markov regime signal and inspect Sharpe and max drawdown.

VIBE 3

Apply the bonus Pine Script v5 indicator to a TradingView chart to view the regime ribbon.

VIBE 4

Paste the zero-trust Markdown prompt into Claude Code agent mode to rebuild the skill from scratch.

what's the stack?

PythonClaude Codeyfinancehmmlearnuv

how it stacks up fr

jackson-video-resources/markov-hedge-fund-methodshiroeirin/comfyui-good-anima2417467487-hub/worldcuproi
Stars120120121
LanguagePythonPythonPython
Setup difficultyeasyhardmoderate
Complexity3/54/54/5
Audiencedevelopergeneralpm founder

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

Dependencies resolve on first run via uv PEP 723 inline metadata, no API keys needed.

MIT license, very permissive, use freely with attribution.

in plain english

This repository is the companion code for the first video in a quant trading series. It packages a single analysis idea as a Claude Code plugin so that a user can install it with two slash commands and then ask Claude in plain English to run it against any asset. The framework was designed by someone named Roan, and the repo owner is the person installing it on camera. The analysis is a Markov regime detector. For a given price series it labels each day as Bull, Bear, or Sideways based on rolling returns over a configurable window with a default of 20 days and plus or minus 5 percent. From that history it builds a 3 by 3 transition matrix using maximum likelihood, raises the matrix to powers to forecast several steps ahead, and computes the long-run stationary distribution. It then emits a signed signal equal to the probability of bull minus the probability of bear, runs a walk-forward backtest without lookahead and reports Sharpe ratio and maximum drawdown, and can optionally fit a Hidden Markov Model using the hmmlearn library. Input data can come from a ticker symbol fetched through yfinance or from a user-supplied CSV with a date and close column. No API keys or accounts are needed because the dependencies are resolved on first run by uv through PEP 723 inline metadata. The README also offers a zero-trust alternative: a single Markdown prompt file that, when pasted into Claude Code in agent mode, builds the same skill from scratch on the user's own machine, which was the version recorded in the on-camera demo. A bonus folder contains a Pine Script v5 indicator for TradingView that paints the regime ribbon and shows the transition matrix and stationary distribution on a chart. License is MIT.

prompts (copy fr)

prompt 1
Install markov-hedge-fund-method as a Claude Code plugin and run the regime detector against SPY for the past 5 years with a 20-day window.
prompt 2
Modify the Markov regime thresholds from plus or minus 5 percent to 3 percent and re-run the backtest on QQQ. Show the new Sharpe and drawdown.
prompt 3
Write a Python script that loads a CSV of BTC daily closes, feeds it to this plugin, and forecasts the regime probability 10 days ahead.
prompt 4
Walk me through how the transition matrix is raised to powers to forecast multi-step regime probabilities. Use the code in this repo.
prompt 5
Compare the Markov 3-state classifier in this repo with the optional hmmlearn HMM fit. When does each give a better signal?

Frequently asked questions

what is markov-hedge-fund-method fr?

Claude Code plugin that labels price history into Bull, Bear, Sideways days, builds a transition matrix, and runs a walk-forward backtest with Sharpe and drawdown.

What language is markov-hedge-fund-method written in?

Mainly Python. The stack also includes Python, Claude Code, yfinance.

What license does markov-hedge-fund-method use?

MIT license, very permissive, use freely with attribution.

How hard is markov-hedge-fund-method to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is markov-hedge-fund-method for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.