[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-77683":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":14,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":28,"discoverSource":29},77683,"markov-hedge-fund-method","jackson-video-resources\u002Fmarkov-hedge-fund-method","jackson-video-resources","Markov regime detection skill + one-shot install prompt + Pine indicator. Companion to Quant Series video 1. Framework by Roan (@RohOnChain).",null,"Python",276,169,19,2,0,20,211,9,70.69,"Other",false,"main",true,[],"2026-06-12 04:01:22","# Markov Hedge Fund Method\n\nSkill from **video 1 of the Quant Series**: *How To Use The Hedge Fund Method To Win Every Single Trade*.\n\nFramework by **Roan** ([@RohOnChain](https:\u002F\u002Fx.com\u002FRohOnChain)) — I'm the guy installing it on camera.\n\n---\n\n## Install (the headline path — two commands)\n\nIn Claude Code:\n\n```\n\u002Fplugin marketplace add jackson-video-resources\u002Fmarkov-hedge-fund-method\n\u002Fplugin install markov-hedge-fund-method@markov-hedge-fund-method\n```\n\nThat's it. The skill is now installed. Invoke it any time, on any asset:\n\n```\n\u002Fmarkov-hedge-fund-method:regime\n```\n\n…or just ask in plain English: *\"detect the regime on BTC-USD\"*,\n*\"add a regime confirmation filter to my SPY momentum strategy\"*,\n*\"what's the long-run regime mix of AAPL — is it too tail-heavy to trade?\"*\nClaude fires the `regime` skill automatically.\n\nNo API keys. No accounts. No `sudo`. Dependencies are resolved on first run by\n`uv` (PEP 723 inline metadata) — nothing to pip-install yourself.\n\n---\n\n## What the skill does\n\nIt answers one question for **any asset**: what regime are we in, how sticky is\nit, and what does that imply for risk and direction?\n\n- Labels every day Bull \u002F Bear \u002F Sideways via a rolling-return rule (default 20-day, ±5%)\n- Builds a 3×3 transition matrix from the asset's history (maximum-likelihood)\n- Forecasts n-steps ahead by raising the matrix to powers (Chapman-Kolmogorov)\n- Computes the long-run stationary distribution (baseline regime mix)\n- Emits a signed signal: `bull_prob − bear_prob` → direction + conviction\n- Runs a walk-forward backtest (no lookahead) → reports Sharpe + max drawdown\n- Optionally fits a Hidden Markov Model via `hmmlearn` (graceful degrade if it can't compile)\n\nIt takes **either a ticker** (`--ticker BTC-USD`, fetched via `yfinance`) **or\nyour own CSV** (`--csv my_prices.csv`, just a date + close column) — so it drops\ninto whatever data pipeline you already run, on whatever asset you trade.\n\nIt's built to **compose**: slot it into a trading agent you already have as a\nconfirmation layer, a standalone signal, or a tail-risk filter — without\nrewriting your strategy. See [`skills\u002Fregime\u002FSKILL.md`](.\u002Fskills\u002Fregime\u002FSKILL.md)\nfor the JSON contract and three worked composition patterns.\n\n---\n\n## The on-camera build \u002F zero-trust manual path\n\n[`markov-hedge-fund-method.md`](.\u002Fmarkov-hedge-fund-method.md) is the original\none-shot onboarding prompt — the version built **live on camera**. Paste it\ninto Claude Code (agent mode) and it builds the whole skill from scratch in\nfront of you: detects your OS, installs `uv`, writes every file, runs the\nsanity check.\n\nIt's kept here as the **zero-trust path**: if you don't want to install a\nplugin from a marketplace, this builds the identical logic locally so you can\nread every line as it's written. Most people should use the two-command plugin\ninstall above — this is the transparent fallback and the on-camera artifact.\n\n---\n\n## Pine Script bonus\n\n[`pine-script\u002Fmarkov-hedge-fund-method.pine`](.\u002Fpine-script\u002Fmarkov-hedge-fund-method.pine)\n— TradingView v5 indicator that paints the framework live on a chart: regime\nribbon, live 3×3 transition matrix in the corner, stationary-distribution\ntable, current-regime banner. Inputs: lookback window (default 20), Bull\u002FBear\nthresholds (default ±5%), table toggles.\n\nOpen TradingView → Pine Editor → paste the `.pine` → Save → Add to Chart.\n\n---\n\n## Credit\n\n- **Framework:** Roan ([@RohOnChain](https:\u002F\u002Fx.com\u002FRohOnChain)) — read his original article for the underlying maths.\n- **Plugin + installer + animations:** [Lewis Jackson](https:\u002F\u002Fwww.youtube.com\u002F@lewisjackson).\n\n## License\n\nMIT — see the umbrella [LICENSE](..\u002FLICENSE).\n","该项目提供了一种基于马尔可夫状态检测的对冲基金方法，旨在帮助用户识别资产当前所处的市场状态（牛市、熊市或横盘），并预测未来市场走向。核心功能包括通过滚动收益率规则给每一天打上市场状态标签、构建历史数据的转移矩阵以预测未来n步的状态、计算长期稳定分布以及发出方向性信号等。此外，项目还支持使用yfinance获取股票数据或自定义CSV文件输入，并且可以无缝集成到现有的交易策略中作为确认层或尾部风险过滤器。适合于需要增强其量化交易策略稳健性的投资者和技术分析师使用。","2026-06-11 03:55:44","CREATED_QUERY"]