Gold ÷ Oil = one number that tells you when oil is historically cheap. Daily macro decision card · public audit · falsifiable contract.
👉 See today's card | 📮 Subscribe free | 📈 Track record
Daily since Jun 2026 · 30 posts · 13.7k LinkedIn impressions · public audit · falsifiable contract
Who it's for: macro investors, energy traders, family offices, and operators who want one number instead of a feed.
What you get: one daily card — GOR zone, allocation, hard stops, panic gate, contract progress — plus a weekly recap and a public track record. No black box; every threshold is in config.py.
Free starter: 2026 Q4 Crisis Checklist — 10 pre-registered signals.
Honesty audit (Sep 2026): GOR ≥ 45 is a tail marker, not a probability law. The direction survives, but independent episodes ≈ 2–3; panic is the necessary condition. Details:
frameworks/01-GOR方向框架.md· full audit.
🌐 Live Site · 🇨🇳 中文版 · English · 📡 Dashboard · 📈 Track Record · 📮 Subscribe
Deep-Risk-OPP turns one ratio into a daily macro decision. It watches the Gold/Oil Ratio (GOR) as a seismograph for systemic stress, maps global capital flows as fault-line scans, and runs 12 decision frameworks + 6 legendary-investor mindsets through a priority engine — producing a single allocation card every day, published automatically to a public website. Two diagnostic appendices (stage layer, crisis checklist) explain the card without ever changing it.
- The claim (audited Sep 2026): GOR ≥ 45 has historically preceded large oil rallies, but the independent evidence is thinner than it sounds — treat it as a tail marker, not a probability law.
- The state (Oct 2026): GOR(WTI) = 41.11 — below 45 after five weeks of crossings; WTI $101.84, Gold $4,186.5, VIX 19.99.
- The output: a live bilingual website updated daily by GitHub Actions. Zero black-box AI. Every threshold is in
config.py.
Acknowledgments: The gold-to-oil ratio theory derives from Mr. Lu Qiyuan's macro analysis system. The "Three Capital Flows" framework draws on liquidity models by various analysts. The "Six Masters Mapping" is the author's synthesis of six investors' public statements. Hard stops, risk modifiers, automation, and Claude Code integration are original work. Data: FRED, akshare, yfinance.
index.html (language chooser)
├── zh/index.html ── 中文指挥中心 ──┐
└── en/index.html ── EN Command Center ──┤
▼
┌──────────────────────────────────────────────┐
│ 📡 GOR Live Dashboard — 全市场实时读数+仓位 │
│ 📊 Decision Board — GOR区间+硬规则+框架 │
│ 🌊 Capital Flows — 三流断层扫描 │
│ 🛡️ Hedge Playbook — 五策略对冲工具箱 │
│ 📈 Track Record — 实盘记录(含认错) │
└──────────────────────────────────────────────┘
- Every page carries a unified HUD navigation bar with a live GOR badge — jump between pages from anywhere.
- Every page fetches
gor_latest.jsonon load — the data you see is always the latest daily run. - Data pipeline: GitHub Actions cron (21:15 UTC, after US close) → fetch FRED/akshare/yfinance → compute GOR + allocation → commit JSON → auto-deploy to GitHub Pages. Zero manual steps.
┌──────────────────────────────────────────────────────────────┐
│ │
│ SURFACE LAYER (what everyone sees) │
│ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ │
│ Prices. Headlines. CPI prints. Fed minutes. │
│ │
│ ──────────────────── ⚡ FRACTURE ⚡ ──────────────────── │
│ │
│ DEEP LAYER (what Deep-Risk-OPP sees) │
│ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ │
│ GOR divergence. Capital centripetal collapse. │
│ Supply-chain severance. Liquidity freeze. │
│ │
│ The system detects stress accumulating in the deep layer │
│ BEFORE it erupts through the surface. │
│ │
│ Seismograph: GOR ratio (Gold/Oil) │
│ Fault scan: Capital Three-Flows (Total/Direction/Speed) │
│ Analysts: 12 frameworks + 6 investment masters │
│ Output: 1 early-warning decision card │
│ │
└──────────────────────────────────────────────────────────────┘
| Zone | GOR Range | Risk Signal | Action |
|---|---|---|---|
| 🔴 Extreme Opportunity | ≥ 45 | Oil deeply undervalued — if the mechanism screener agrees (see audit note). | Accumulate energy — 🟢/🟡/🔴 gated. Reduce gold. |
| 🟠 Recovery Cycle | 30–45 | Ratio normalizing. Crisis abating. | Hold. Let the trade work. |
| 🟢 Fair Value | 20–30 | Historical equilibrium. No structural mispricing. | Light positions. Wait. |
| 🔵 Oil Bubble | < 20 | Gold cheap. Oil expensive. Inflation fear peaked. | Cash + gold. No energy exposure. |
| Breaker | Condition | Action |
|---|---|---|
| WTI Hard Stop | WTI < $75 | Oil forced ≤ 5% |
| DXY Surge | DXY > 99 | Total position -10% |
| Rate Spike | 10Y > 4.3% | Total position -10% |
| Vol Explosion | VIX > 25 | All risk positions -50% |
| PBoC Floor | Monthly gold buy ≥ 2T | Gold floor locked ≥ 15% |
| Dimension | What It Measures | Current (Aug 2026) |
|---|---|---|
| Total | Global liquidity: expanding or contracting? | 🔴 Contracting (Fed QT, BS $6.75T) |
| Direction | Capital flowing to USD or away? | 🔴 Centripetal (DXY 100.0) |
| Speed | Panic or calm? | 🟡 Calm (VIX 15.3) |
Centripetal Collapse Alert: When Total contracts + Direction pulls inward + Speed accelerates → systemic liquidity event is imminent. Current speed is calm — the collapse is building in slow motion.
Every framework answers one question. Together they form a 360-degree risk assessment.
| # | Framework | Core Question | Trigger | File |
|---|---|---|---|---|
| 01 | GOR Direction | What to allocate today? | Daily | frameworks/01-GOR方向框架.md |
| 01A | Stage Layer (appendix) | Which debt-cycle stage are we in? | Monthly | frameworks/01A-GOR阶段解释层.md |
| 01B | Crisis Checklist (diagnostic) | Is it the same this time? | Quarterly | frameworks/01B-危机检查表.md |
| 02 | Deep Diligence | Which specific asset? | On-demand | frameworks/02-个股四维研判.md |
| 03 | Bagholder Theory | What market phase are we in? | Event | frameworks/03-接盘论框架.md |
| 04 | Token Dollar | Where is USD hegemony? | Monthly | frameworks/04-Token美元进度.md |
| 05 | Hedging Strategy | How to protect positions? | Per position | frameworks/05-对冲策略选择.md |
| 06 | Risk Calendar | What time nodes lie ahead? | Weekly | frameworks/06-风控日历.md |
| 07 | Decision Audit | Was that luck or skill? | Monthly | frameworks/07-决策审计框架.md |
| 08 | Six Masters | What would the legends say? | Events | frameworks/08-六大师映射.md |
| 09 | Capacity Cycle | Where in the industrial cycle? | On-demand | frameworks/09-产能周期框架.md |
| 10 | Catalyst Calendar | What events will move markets? | On-demand | frameworks/10-催化剂日历框架.md |
| 11 | Capital Three Flows | Where is money flowing? | Daily+Weekly | frameworks/11-资本三流框架.md |
| 12 | Miners Lead (validation layer) | Are miners confirming the commodity supercycle? | Weekly | frameworks/12-矿业股领先指标.md |
Level 1: Circuit Breaker — WTI < $75 → oil forced ≤ 5%
Level 2: Risk Calendar Node — FOMC / OPEC+ / election overrides
Level 3: Bagholder >= 7 — All positions × 0.7
Level 4: Capital Flow Signal — Centripetal → raise cash ≥ 40%
Level 5: GOR Direction — Default allocation baseline
Level 6: Master Consensus — Advisory only, does not override
Lower number = higher priority. Circuit breakers always win.
Not predictions. Risk philosophies. Each master's framework is mapped onto current data to produce a risk posture (refreshed in the monthly audit).
| Master | Risk Philosophy | Posture (latest scan) | Signal |
|---|---|---|---|
| Buffett | "Be fearful when others are greedy." $397B in cash. | Cash is the position. Energy is the watchlist. | DEFENSIVE |
| Burry | "The bond market is screaming." 30Y at 5.24%. | Systemic credit event brewing. | DEFENSIVE |
| Druckenmiller | "Liquidity drives everything." Three CBs tightening. | Tactical oil long. Strategic cash. | SELECTIVE |
| Damodaran | "Price is what you pay. Value is what you get." | Energy majors 40% undervalued. Gold 32% overvalued. | BULLISH ENERGY |
| Taleb | "The tails are fat." Hallmuz + BOJ + US auction risks. | Barbell: 90% ultra-safe + 10% convex bets. | HEDGED |
| Li Ka-shing | "未买先想卖." 90% of brain on what can go wrong. | Direction is right. Sweetest fruit already picked at GOR=78. Wait for forced sellers. | PATIENT |
For detailed master mappings, see frameworks/08-六大师映射.md.
DATA SOURCES PIPELINE OUTPUT
┌──────────────┐ ┌────────────────────┐ ┌──────────────────────────────┐
│ FRED (Fed) │ │ gor_daily.py │ │ gor_latest.json │
│ akshare │──▶│ (GitHub Actions │──▶│ capital_flows_latest.json │
│ yfinance │ │ cron, 21:15 UTC) │ │ wti_history.json │
└──────────────┘ │ Pull → Compute GOR │ │ ALERT_YYYY-MM-DD.md │
│ → Classify → Save │ └──────────────┬───────────────┘
└────────────────────┘ │ auto-deploy
▼
┌─────────────────────────────────────────────────────────────────────┐
│ run.py decision engine (8 modes) Pages site (all pages │
│ frameworks → priority chain → card fetch JSON on load) │
└─────────────────────────────────────────────────────────────────────┘
- Data layer — FRED (12 macro series), akshare (commodities), yfinance (DXY), each with fallbacks.
- Daily pipeline —
scripts/gor_daily.pyruns on GitHub Actions at 21:15 UTC (after US close), writes fresh JSONs, commits them, and Pages auto-deploys. - Decision engine —
run.pyloads the 12 frameworks, applies the priority chain, and outputs the daily decision card. - Presentation — every web page fetches
gor_latest.jsonon load; embedded data blocks serve as offline fallback.
Never check the site again — let the signal come to you:
| Channel | How |
|---|---|
| buttondown.com/chenjia2007 — one email every morning | |
| 🔔 RSS to email | follow.it/deep-risk-opp |
| 📡 Raw RSS | feed.xml — any reader |
| 📱 PWA | open the site on your phone → "Add to Home Screen" |
Daily pipeline: 21:15 UTC data pull (05:15 Beijing) → signal → push to configured channels (Feishu/DingTalk/ServerChan/Telegram) → RSS → auto-deploy.
- Feishu group → Settings → Bots → Custom bot → copy webhook.
- GitHub → Settings → Secrets → Actions → add
FEISHU_WEBHOOK. - Actions → Feishu Test → Run workflow.
Or run python scripts/feishu_setup.py — it sends a test and stores the secret via gh.
P0/P1 alerts also open a GitHub Issue as a zero-config fallback.
Level 0 — just look. No installation. Open the live site — it updates itself daily.
Level 1 — run the data pipeline locally.
git clone https://github.com/Justinjchen-Cornell/Deep-Risk-OPP.git
cd Deep-Risk-OPP
pip install -r requirements.txt
# create .env with your API keys (see "API Keys" below)
python scripts/gor_daily.py # one full daily updateLevel 2 — run the decision engine.
python run.py --mode daily # today's signal card
python run.py --mode masters # all six master postures on current data
python run.py --mode weekly --compare last-week # weekly change report
python run.py --mode backtest --from 2020-01 --to 2026-08Level 3 — natural language (via Claude Code).
"What's the macro risk posture today?" → GOR + flows + calendar card
"Hedge my oil position." → WTI $75 Put recommendation
"Is this a market top?" → Bagholder 10-point checklist
"Should I rotate from gold to oil?" → GOR + masters + flows cross-check
"What did we get right and wrong last month?" → decision audit scores
Prerequisites: Python ≥ 3.11; Claude Code only for Level 3.
# config.py — Shared parameters for all frameworks
# GOR Seismograph
GOR_EXTREME = 45 # Extreme opportunity threshold
GOR_RECOVERY = 30 # Recovery cycle floor
GOR_FAIR_VALUE = 20 # Fair value floor
# Circuit Breakers
WTI_HARD_STOP = 75 # Oil forced ≤ 5% below this
DXY_THRESHOLD = 99 # Strong USD: total position -10%
YIELD_THRESHOLD = 4.3 # High rates: total position -10%
VIX_PANIC = 25 # Vol explosion: risk positions -50%
# Priority Weights
CIRCUIT_BREAKER_PRIORITY = 1 # Always wins
RISK_CALENDAR_PRIORITY = 2
BAGHOLDER_PRIORITY = 3
CAPITAL_FLOW_PRIORITY = 4
GOR_DIRECTION_PRIORITY = 5
MASTER_CONSENSUS_PRIORITY = 6
# Data Sources (3-layer: FRED primary → yfinance → web fallback)
GOLD_SOURCE = "akshare (GC=F)"
WTI_SOURCE = "akshare (CL=F)"
DXY_SOURCE = "yfinance (DX-Y.NYB) + web fallback"
YIELD_10Y_SOURCE = "FRED (DGS10) + akshare fallback"
YIELD_30Y_SOURCE = "FRED (DGS30)"
VIX_SOURCE = "FRED (VIXCLS) + TradingView/CBOE fallback"
FED_SOURCE = "FRED (DFF/WALCL/M2SL/CPIAUCSL/PCEPILFE/GFDEBTN)"Full configuration guide: config.py
The daily pipeline needs two free API keys. Register them yourself — each takes ~2 minutes:
| Key | Service | Register at | Used for |
|---|---|---|---|
FRED_API_KEY |
FRED (Federal Reserve Economic Data, St. Louis Fed) | https://fred.stlouisfed.org/docs/api/api_key.html | US macro series: DGS10/30, DFF, WALCL, M2SL, VIXCLS, CPI, PCE, debt |
OPENFIGI_API_KEY |
Bloomberg OpenFIGI | https://www.openfigi.com/user/profile | Security identifier mapping (ticker/ISIN/CUSIP → FIGI), A/H-share cross-reference |
ADANOS_API_KEY |
Adanos Reddit sentiment (optional, local only) | See its official site (api.adanos.org) | Reddit sentiment scan (--mode sentiment) |
Local setup — create .env in the project root (never committed):
FRED_API_KEY=your-32-char-hex-key
OPENFIGI_API_KEY=your-uuid-key
ADANOS_API_KEY=sk_your-key # optionalGitHub Actions setup (for the daily auto-update) — add two repository secrets at Settings → Secrets and variables → Actions → New repository secret:
FRED_API_KEYOPENFIGI_API_KEY
Key formats: FRED = 32-char lowercase hex; OpenFIGI = UUID. Both are free-tier, read-only data keys — safe to store as Actions secrets (encrypted at rest, masked in logs). You can rotate them anytime from each provider's site.
Signals and outcomes are public — including the mistakes. See the full record: docs/track-record.md
| Date | GOR | Signal | Subsequent Market Move | ✓ |
|---|---|---|---|---|
| 2020.04 | 69.5 | Extreme: accumulate oil | WTI +167% in 12 months | ✅ |
| 2016.01 | ~39 | Recovery: hold oil | WTI +54% in 12 months | ✅ |
| 2008.12 | ~30 | Recovery: hold oil | WTI +78% in 12 months | ✅ |
| 2026.06.25 | 53.33 | Circuit breaker: WTI < $75 → oil 5% | WTI fell to $68.76. Capital preserved. | ✅ |
| 2026.07.15 | 50.85 | Hard stop released. Accumulate oil 27%. | Resolved — WTI $101.84 by Oct 17 (+28% from $79.49). | ✅ |
| 2026.09.17 | 44.2 | Regime switch: GOR below 45 → position 30% | Oil leg re-fired; GOR 41.1 by Oct 17. | ✅ |
| 2026.10.17 | 41.11 | Contract: +45.8% (84.7% of target) | WTI $101.84; $5.76 to $107.60; 256 days left. | ⏳ |
Past signals are backtested on historical data. Real-time signals are tracked live. Daily snapshots and alerts are archived locally and auditable in commit history.
2026-10 audit: the capitulation trigger was stress-tested over 8 episodes (2006–2026). 12-month WTI median +18.0%, 6 of 8 positive; 3-month median −2.9% (2008/2020 fell ~35% first). A distress marker, not a timing tool. Report
Three additions — public, dated, reproducible. None of them changes the card, the trigger, or gor_latest.json.
- Stage explanatory layer — crosses the four GOR zones with the seven debt-cycle stages. It answers "why is the ratio in the recovery zone while the system is late-cycle?" Explanatory only: narrative, never position.
- Crisis checklist — 10 questions, scored quarterly and pre-registered. 2026Q4 reading: policy/flows 3/3, valuation partial, leverage mostly unknown → "top → repricing", not a broad bubble and not a depression. Scorecard.
- Trigger stress test — VIX ≥ 22.5 + oil in the bottom quartile of its trailing decade, 2006–2026: 8 episodes. 12-month WTI median +18.0%, 6 of 8 positive; 3-month median −2.9% (2008 and 2020 both fell ~35% first). A distress marker, not a timing tool. Episodes · Reproduce.
Deep-Risk-OPP/
├── index.html # Language chooser landing
├── dashboard.html # 📡 Live GOR dashboard (fetch JSON)
├── 📊 投资决策看板.html # 中文决策看板(动态渲染)
├── 🌊 资本三流观测站.html # 中文资本三流(含LIVE数据条)
├── 🛡️ 对冲作战手册.html # 中文对冲手册(动态渲染)
├── zh/index.html # 中文Hub(指挥中心)
├── en/ # English hub + 3 pages
├── gor_latest.json # Latest signal (auto-updated daily)
├── capital_flows_latest.json # Latest capital flows (auto-updated)
├── wti_history.json # Rolling WTI history → dynamic hard stop
├── config.py # All thresholds & parameters
├── run.py # CLI decision engine (8 modes)
├── scripts/
│ ├── gor_daily.py # Daily pipeline (Actions cron 21:15 UTC)
│ ├── weekly_data_pull.py # Weekly change report generator
│ └── figi_mapper.py # OpenFIGI identifier mapping
├── frameworks/ # 12 decision frameworks (zh) + 01A/01B appendices
├── docs/
│ ├── track-record.md # Live track record (incl. mistakes)
│ ├── promo-pack.md # Launch copy for social platforms
│ ├── code_review_2026-08.md # First systematic code review
│ ├── trigger-stress-test-2026-10.md # Trigger stress test (VIX + oil quartile)
│ └── crisis-checklist-2026Q4.md # Pre-registered crisis checklist
├── 看板日志/ (local only) # Daily snapshots, content archive & alerts — gitignored
├── 管理/ (local only) # Handoffs, content contract, audit log — gitignored
├── 研究专题/ (local only) # RMB analysis & gold macro replication — not in repo
└── .github/workflows/
├── daily.yml # Daily data update
└── static.yml # GitHub Pages deploy
| Milestone | Description | Status |
|---|---|---|
| v1.0 | GOR seismograph + daily signal card | ✅ Shipped |
| v1.1 | Capital flow fault-line scan integration | ✅ Shipped |
| v1.2 | Six masters mapping + consensus engine | ✅ Shipped |
| v1.3 | Second/third-order opportunity detection | ✅ Shipped |
| v2.0 | Full priority chain with circuit breakers | ✅ Shipped |
| v2.1 | Weekly automated change reports + dynamic hard stop (60D SMA × 0.85) | ✅ Shipped |
| v2.2 | Public product: bilingual live site + daily auto pipeline + unified HUD nav | ✅ Shipped (Aug 2026) |
| v2.3 | Historical backtest & rule audit (2000–2026): 56-year claim audit + 55-event cross-market study → mechanism screener upgrades the GOR trigger | ✅ Shipped (Sep 2026) |
| v2.4 | Codebase health: split run.py into modes/, merge gor_daily + weekly_data_pull, pytest for core functions, refresh risk calendar |
🔄 In progress |
| v2.5 | Public research layer: stage explanatory layer (01A), crisis checklist (01B), trigger stress test (8 episodes, 2006–2026) | ✅ Shipped (Oct 2026) |
| v2.6 | Data quality: real Brent feed (Yahoo BZ=F → Tencent → EIA/FRED → akshare; synthetic only as last resort) + GOR(Brent) rebase · model portfolio benchmarks/costs · performance log | ✅ 2026-10-18 |
| v2.7 | Mining-stock leading indicators (GDX / COPX / XAU-Gold ratio / silver) tracked in daily pipeline | 📋 Next |
| v2.8 | Content & feedback loop: 2 long + 3 short/week; 90-day falsification window (to 2027-01-14); weekly newsletter digest | 🔄 In progress |
| v3.0 | Real-time alerting: state-diff engine, intraday quotes, Feishu delivery, 08:30 P1/P2 digest, 15-min workflow | 🔄 In progress (Feishu live; shadow mode) |
| v3.1 | Feishu subscription app: QR → H5 preferences (cards / frequency / time) → per-user DM via Feishu Open API; requires a self-built app + backend (Cloudflare Worker + D1); same-tenant only | 📋 Backlog |
| v4.0 | Multi-asset portfolio simulation | 📋 Later |
- Feishu subscription app (v3.1) — QR → H5 form (card options / frequency / time) → per-user DM. Requires a Feishu self-built app + backend (Cloudflare Worker + D1); works only within the same Feishu tenant. External readers would need an ISV app/store review — evaluate email/Telegram first. Design not started.
🚀 Product launch (in progress): Xueqiu debut · LinkedIn GOR Pulse #004 · HelloGitHub · Hacker News Show HN · X hook thread — launch copy in docs/promo-pack.md.
Deep-Risk-OPP is a personal research framework shared openly. If you want to:
- Report a bug: Open an issue with the signal date and framework involved.
- Suggest a framework: Propose a new decision framework with its core question and trigger logic.
- Improve the backtest: Submit a PR with verified historical data and methodology.
- Translate: English and Chinese are maintained. Other languages welcome.
All framework parameters are in config.py. Circuit breaker thresholds should only be changed with strong historical evidence.
DEEP-RISK-OPP IS A MACRO RESEARCH FRAMEWORK — NOT INVESTMENT ADVICE.
This system is a tool for structural risk awareness and scenario analysis.
It does not predict market movements. It does not recommend specific securities.
It does not guarantee outcomes. All signals are probabilistic, not deterministic.
The GOR ratio, capital flow scans, master consensus, and all framework outputs
are research artifacts. They carry no warranty of accuracy.
Past signals and backtests do not guarantee future results.
All investment decisions remain entirely your responsibility.
By using this framework, you acknowledge that you are engaging with
independent macro research — not receiving financial advice.
Apache License 2.0 © 2026 Justinjchen (Justinjchen-Cornell)
Deep-Risk-OPP synthesizes insights from:
- Gold/Oil Ratio theory — a single-ratio macro allocation framework
- Capital Three-Flows theory (资本三流) — global liquidity total/direction/speed analysis
- The Centripetal Collapse thesis (向心坍缩) — structural USD liquidity concentration
- Six legendary investors — Buffett, Burry, Druckenmiller, Damodaran, Taleb, Li Ka-shing
- Claude Code — the AI platform that makes multi-framework orchestration possible
Built with Python, Claude MCP, Yahoo Finance API, CBOE, FRED, and ICE data.
"The GOR ratio is the seismograph. Capital flows are the fault-line scan. The frameworks are the analysts. Deep-Risk-OPP is the early-warning system. What you do with the signal — that's yours."
