-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.html
More file actions
323 lines (313 loc) · 20.7 KB
/
Copy pathdashboard.html
File metadata and controls
323 lines (313 loc) · 20.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="data:,"><meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Deep-Risk-OPP · Live Macro Dashboard</title>
<style>
/* Design System: Cyberpunk Terminal HUD — ui-ux-pro-max output */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
:root{
--color-primary:#1e40af; /* blue primary */
--color-secondary:#3b82f6; /* blue secondary */
--color-accent:#d97706; /* amber accent (WCAG 3:1) */
--color-destructive:#dc2626; /* red */
--color-success:#16a34a; /* green */
--bg:#05070d; /* deep terminal black */
--card:#0d1117;
--line:#1f2a40;
--text:#e0e6ed;
--muted:#7a8a9a;
--gold:#f0c040;
}
body{background:var(--bg);color:var(--text);font-family:'Fira Sans',-apple-system,'PingFang SC',sans-serif;min-height:100vh;padding:20px}
.wrap{max-width:1200px;margin:0 auto}
header{text-align:center;padding:30px 0 20px}
header h1{font-size:32px;color:var(--gold);letter-spacing:3px;font-family:'Fira Code',monospace;text-shadow:0 0 24px rgba(240,192,64,.35)}
header .sub{color:var(--muted);font-size:13px;margin-top:6px;font-family:'Fira Code',monospace}
.grid{display:grid;gap:16px;margin-top:20px}
.row2{grid-template-columns:1fr 1fr}
.row3{grid-template-columns:1fr 1fr 1fr}
@media(max-width:800px){.row2,.row3{grid-template-columns:1fr}}
.card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:20px;transition:border-color .2s ease, transform .2s ease}
.card:hover{border-color:#334155}
.card h2{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:1.5px;margin-bottom:14px;border-bottom:1px solid var(--line);padding-bottom:10px;font-family:'Fira Code',monospace}
.big-num{font-size:46px;font-weight:700;font-family:'Fira Code',monospace;line-height:1;color:#fff;text-shadow:0 0 18px rgba(255,255,255,.15)}
.big-num small{font-size:14px;font-weight:400;color:var(--muted);text-shadow:none}
.gauge-track{height:10px;background:#1e293b;border-radius:5px;margin:12px 0 6px;overflow:hidden;position:relative}
.gauge-fill{height:100%;border-radius:5px;transition:width 1s ease;box-shadow:0 0 12px rgba(239,68,68,.5)}
.gauge-labels{display:flex;justify-content:space-between;font-size:9px;color:#475569;font-family:'Fira Code',monospace}
.kv{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid #1a2336;font-size:14px}
.kv:last-child{border-bottom:none}
.kv .k{color:var(--muted)}
.kv .v{font-weight:600;font-family:'Fira Code',monospace}
.alloc-bar{display:flex;height:36px;border-radius:8px;overflow:hidden;margin:14px 0 8px}
.alloc-seg{display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;font-family:'Fira Code',monospace;color:#0a0e1a;min-width:40px;transition:flex .6s ease}
.legend{display:flex;flex-wrap:wrap;gap:14px;font-size:11px;color:var(--muted);font-family:'Fira Code',monospace}
.legend span{display:inline-flex;align-items:center;gap:5px}
.dot{width:9px;height:9px;border-radius:50%;display:inline-block}
.alert{background:#4c0519;border:1px solid #7f1d1d;border-radius:8px;padding:10px 14px;margin:8px 0;font-size:13px}
.alert.warn{background:#1c1917;border-color:#78350f}
.status-badge{display:inline-block;padding:4px 12px;border-radius:20px;font-size:12px;font-weight:700;font-family:'Fira Code',monospace}
footer{text-align:center;color:#475569;font-size:10px;margin:30px 0;font-family:'Fira Code',monospace}
footer a{color:var(--muted)}
.loading{text-align:center;color:var(--muted);padding:60px;font-family:'Fira Code',monospace}
.flow-step{display:inline-block;background:#1e293b;border:1px solid #334155;border-radius:8px;padding:8px 14px;font-size:12px;margin:4px;font-family:'Fira Code',monospace}
.flow-arrow{color:#475569;font-size:16px}
</style>
<style>.dq-banner{margin:0 0 16px;padding:10px 16px;background:#452a03;border:1px solid rgba(251,191,36,.4);border-radius:10px;color:#fbbf24;font-family:'Fira Code',monospace;font-size:13px}</style>
<link rel="manifest" href="manifest.json">
<style id="bd-sub-css">
.bd-sub{margin:26px auto 0;text-align:center}
.bd-sub .t{color:#f0c040;font-family:'Fira Code',monospace;font-size:12px;letter-spacing:2px;margin-bottom:10px}
.bd-sub form{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.bd-sub input[type=email]{background:#0d1117;border:1px solid #1f2a40;border-radius:8px;padding:9px 14px;color:#e0e6ed;font-family:'Fira Code',monospace;font-size:12px;width:230px;max-width:80vw}
.bd-sub input[type=email]:focus{outline:none;border-color:#f0c040}
.bd-sub input[type=submit]{background:#f0c040;color:#05070d;border:none;border-radius:8px;padding:9px 18px;font-family:'Fira Code',monospace;font-size:12px;font-weight:700;cursor:pointer}
.bd-sub input[type=submit]:hover{box-shadow:0 0 18px rgba(240,192,64,.4)}
</style><style id="fi-alt-css">
.bd-sub .fi-alt{display:inline-block;margin-top:10px;color:#7a8a9a;text-decoration:none;font-family:'Fira Code',monospace;font-size:11px;border:1px solid #1f2a40;border-radius:8px;padding:7px 14px;transition:all .2s}
.bd-sub .fi-alt:hover{color:#4da3ff;border-color:#4da3ff}
</style>
</head>
<body>
<style id="dr-nav-css">
.dr-nav{position:sticky;top:0;z-index:999;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 20px;background:rgba(5,7,13,.93);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid #1f2a40;font-family:'Fira Code','PingFang SC','Microsoft YaHei',monospace;font-size:12px;letter-spacing:.5px}
.dr-nav .dr-brand{color:#f0c040;font-weight:700;letter-spacing:2px;text-decoration:none;text-shadow:0 0 14px rgba(240,192,64,.45);white-space:nowrap;font-size:13px}
.dr-nav .dr-links{display:flex;gap:2px;flex-wrap:wrap;justify-content:center}
.dr-nav .dr-links a{color:#7a8a9a;text-decoration:none;padding:6px 11px;border-radius:6px;transition:all .2s;white-space:nowrap}
.dr-nav .dr-links a:hover{color:#e0e6ed;background:#101826}
.dr-nav .dr-links a.on{color:#f0c040;background:rgba(240,192,64,.08);box-shadow:inset 0 0 0 1px rgba(240,192,64,.3)}
.dr-nav .dr-side{display:flex;align-items:center;gap:10px;white-space:nowrap}
.dr-nav .dr-gor{color:#6ee7b7;background:#064e3b;border:1px solid rgba(110,231,183,.35);padding:5px 10px;border-radius:6px;font-weight:700;font-size:11px;letter-spacing:.5px;text-decoration:none;display:inline-block}
.dr-nav .dr-gor.alert{color:#fbbf24;background:#452a03;border-color:rgba(251,191,36,.4)}
.dr-nav .dr-lang a{color:#7a8a9a;text-decoration:none;padding:5px 9px;border-radius:6px}
.dr-nav .dr-lang a.on{color:#05070d;background:#f0c040;font-weight:700}
@media(max-width:820px){.dr-nav{flex-direction:column;gap:8px;padding:9px 12px}.dr-nav .dr-links{order:2}.dr-nav .dr-side{order:3}}
</style>
<nav class="dr-nav">
<a class="dr-brand" href="./index.html">⌬ DEEP-RISK-OPP</a>
<div class="dr-links"><a href="dashboard.html" class="on">GOR LIVE</a><a href="en/decision-board.html">Decision Board</a><a href="en/capital-flows.html">Capital Flows</a><a href="en/hedge-playbook.html">Hedge Playbook</a><a href="docs/track-record.md">Track Record</a></div>
<div class="dr-side">
<a class="dr-gor" id="drGor" href="dashboard.html" title="GOR Live">GOR …</a>
<div class="dr-lang"><a href="zh/">中文</a><a href="en/" class="on">EN</a></div>
</div>
</nav>
<script id="dr-nav-js">
(function(){
var e=document.getElementById("drGor");if(!e)return;
fetch("gor_latest.json").then(function(r){return r.json()}).then(function(d){
var g=d.gor_wti;
e.textContent="GOR "+g.toFixed(1)+(g>=45?" ⚠":"")+" · "+d.updated.slice(5);
if(d.data_quality&&!d.data_quality.ok){e.textContent+=" ⚠DQ";e.title="degraded: "+d.data_quality.degraded_fields.join(", ");e.className="dr-gor alert";}else{e.className="dr-gor"+(g>=45?" alert":"");}
}).catch(function(){e.textContent="GOR —";});
})();
</script>
<div class="wrap">
<header>
<h1>DEEP-RISK-OPP</h1>
<div class="sub">One number that tells you when oil is historically cheap · GOR = Gold ÷ Oil</div>
</header>
<div id="app"><div class="loading">Loading live data…</div></div>
<div class="bd-sub">
<div class="t">📮 Get the daily signal by email</div>
<form action="https://buttondown.com/api/emails/embed-subscribe/chenjia2007" method="post" target="popupwindow" onsubmit="window.open('https://buttondown.com/chenjia2007', 'popupwindow')">
<input type="email" name="email" placeholder="you@example.com" required>
<input type="submit" value="Subscribe">
</form>
<a class="fi-alt" href="https://follow.it/deep-risk-opp?leanpub" target="_blank">🔔 or subscribe via follow.it (RSS to email)</a>
</div>
<footer>
Research framework · Not investment advice · <a href="https://github.com/Justinjchen-Cornell/Deep-Risk-OPP">GitHub</a><br>
Data: WTI/Gold/Sina futures · 10Y/30Y/VIX/Fed = FRED · DXY = yfinance/web fallback · Auto-updated daily (00:00 UTC)
</footer>
</div>
<script>
async function load(){
try{
const [gorR, cfR, gmR] = await Promise.all([
fetch('./gor_latest.json').then(r=>r.json()),
fetch('./capital_flows_latest.json').then(r=>r.json()).catch(()=>null),
fetch('./goldmac_latest.json').then(r=>r.json()).catch(()=>null)
]);
render(gorR, cfR, gmR);
}catch(e){
document.getElementById('app').innerHTML = '<div class="loading">Data files not found. Run scripts/gor_daily.py first.</div>';
}
}
function render(g, cf, gm){
const d = g.data || {};
const alloc = g.allocation || {};
const gw = g.gor_wti || 0, gb = g.gor_brent || 0;
const gold = (d['黄金期货']||{}).price ?? 0;
const wti = (d['WTI原油']||{}).price ?? 0;
const dxy = (d['美元指数DXY']||{}).price ?? 0;
const y10 = (d['10Y美债收益率']||{}).price ?? 0;
const vix = (d['VIX恐慌指数']||{}).price ?? 0;
const copper = (d['COMEX铜']||{}).price ?? 0;
const regime = g.regime || 'unknown';
const fmt = v => (v == null) ? '—' : v;
const dxyS = (dxy != null) ? dxy.toFixed(2) : '—';
const y10S = (y10 != null) ? y10.toFixed(2)+'%' : '—';
const vixS = (vix != null) ? vix.toFixed(2) : '—';
const wtiS = (wti != null) ? '$'+wti.toFixed(2) : '—';
const zone = gw >= 45 ? 'EXTREME OPPORTUNITY' : (gw >= 30 ? 'RECOVERY CYCLE' : (gw >= 20 ? 'FAIR VALUE' : 'OIL BUBBLE'));
const zoneColor = gw >= 45 ? '#ef4444' : (gw >= 30 ? '#f59e0b' : (gw >= 20 ? '#22c55e' : '#3b82f6'));
const alerts = g.alerts || [];
const gaugePct = Math.min(gw/80*100, 100);
const allocArr = [
['Oil', alloc['油气']||0, '#ef4444'],
['Gold', alloc['黄金']||0, '#f0c040'],
['A-Shares', alloc['A股']||0, '#3b82f6'],
['Cash', alloc['现金']||0, '#475569'],
];
const allocBar = allocArr.filter(a=>a[1]>0).map(a=>
'<div class="alloc-seg" style="background:'+a[2]+';flex:'+a[1]+'">'+a[0]+' '+a[1]+'%</div>'
).join('');
const alertHtml = alerts.length ? alerts.map(a=>
'<div class="alert'+(a.level==='warning'?' warn':'')+'"><b>'+(a.level==='critical'?'🔴':'⚠️')+' '+a.title+'</b><br><span style="font-size:11px;color:#aaa">'+a.detail+'</span></div>'
).join('') : '<div style="color:#475569;font-size:12px">No active alerts</div>';
const ctf = g.capital_three_flows || {};
const speed = {signal: ctf.speed || ''};
const direction = {signal: ctf.direction || '', us30y: ctf.thirtyyear, fed_rate: ctf.fed_rate};
const hy = null, ig = null, em = null;
const us30y = ctf.thirtyyear, fedRate = ctf.fed_rate;
const fed_bs = ctf.fed_balance, m2 = ctf.m2;
const dq = g.data_quality || null;
const dqBanner = (dq && !dq.ok) ? `<div class="dq-banner">⚠️ DATA DEGRADED: ${dq.degraded_fields.join(', ')} — signals may be unreliable</div>` : '';
// --- Today's three takeaways (今日三句话) ---
const t1 = `GOR ${gw.toFixed(1)} is in the ${zone} zone. Since 1998 it has crossed 45 four times — oil gained 54–167% within 12–24 months each time.`;
const t2 = alerts.length
? `Active alerts (${alerts.length}): ${alerts[0].title}${alerts[1] ? ' · ' + alerts[1].title : ''}`
: `No active alerts. WTI $${wti.toFixed(2)} is ${(wti - 75).toFixed(2)} away from the $75 hard-stop line.`;
let goldLine = null;
if (gm && typeof gm.score === 'number') {
const eHigh = (gm.zone === 'strong_ease' || gm.zone === 'mild_ease');
let gact;
if (gw >= 45) { gact = eHigh ? 'oil leads, gold holds (base kept)' : 'do NOT add gold — oil on its own supply story'; }
else if (gw >= 30) { gact = eHigh ? 'gold re-rating window — tier can be raised' : 'double headwind — stand aside, cash'; }
else { gact = 'easing sets gold tier only (GOR neutral)'; }
goldLine = '🥇 Gold validator: easing ' + (gm.score >= 0 ? '+' : '') + gm.score.toFixed(2) + ' (' + (gm.zone || '') + ') → ' + gact;
}
const t3 = (dq && !dq.ok)
? `Data degraded: ${dq.degraded_fields.join(', ')} — treat signals with extra caution today.`
: (goldLine ? goldLine
: `Data complete (FRED · Sina · akshare). Today's posture: ${gw >= 45 ? 'discipline first — build positions gradually, no chasing' : (gw >= 30 ? 'hold and let the trade work' : 'light positions, wait')}.`);
const takeaways = [t1, t2, t3];
const takeawayHtml = `<div class="card"><h3 style="margin-bottom:10px">Today in three lines</h3>${takeaways.map((t, i) => `<div style="padding:8px 0;border-bottom:${i < 2 ? '1px dashed #1f2a40' : 'none'};line-height:1.7"><span style="color:#f0c040;font-family:'Fira Code',monospace;font-weight:700;margin-right:8px">${i + 1}.</span>${t}</div>`).join('')}</div>`;
// ---- Gold Macro Validator (easing) card ----
let gmHtml = '';
if (gm && typeof gm.score === 'number') {
const ezMeta = {
strong_ease: { c: '#22c55e', t: 'STRONG EASING' },
mild_ease: { c: '#a3e635', t: 'MILD EASING' },
mild_tight: { c: '#f59e0b', t: 'MILD TIGHTENING' },
strong_tight:{ c: '#ef4444', t: 'STRONG TIGHTENING' }
};
const ez = ezMeta[gm.zone] || { c: '#94a3b8', t: gm.zone || '—' };
const t3 = gm.trend_3m, t6 = gm.trend_6m;
const up3 = t3 >= 0 ? '▲' : '▼', up6 = t6 >= 0 ? '▲' : '▼';
const c3 = t3 >= 0 ? '#22c55e' : '#ef4444', c6 = t6 >= 0 ? '#22c55e' : '#ef4444';
const compLab = { cpi_gap: 'CPI gap', core6_gap: 'Core PCE', unemp_rise: 'Unemployment',
sloos: 'Credit (SLOOS)', house_short: 'Real house' };
const comp = gm.components || {};
const chips = Object.keys(compLab).map(function (k) {
const z = comp[k] && comp[k].z;
if (z == null) return '';
const c = z >= 0 ? '#22c55e' : '#ef4444';
return '<span style="display:inline-block;background:#0f172a;border:1px solid #1f2a40;border-radius:6px;padding:3px 8px;margin:2px 4px 2px 0;font-size:11px;color:' + c + '">' + compLab[k] + ' ' + (z >= 0 ? '+' : '') + z.toFixed(2) + '</span>';
}).join('');
const eHigh = (gm.zone === 'strong_ease' || gm.zone === 'mild_ease');
let act;
if (gw >= 45) { act = eHigh ? 'Oil leads, gold holds — double-confirm (gold base kept)' : 'Do NOT add gold — oil runs on its own supply story'; }
else if (gw >= 30) { act = eHigh ? 'Gold re-rating window — gold tier can be raised' : 'Double headwind — stand aside, cash'; }
else { act = 'Observe only — slow signal, sets gold tier, not timing'; }
gmHtml = '<div class="grid" style="grid-template-columns:1fr">' +
'<div class="card"><h2>🥇 Gold Macro Validator (easing)</h2>' +
'<div class="kv"><span class="k">easing score</span><span class="v" style="color:' + ez.c + ';font-weight:700">' + (gm.score >= 0 ? '+' : '') + gm.score.toFixed(2) + ' · ' + ez.t + '</span></div>' +
'<div class="kv"><span class="k">Trend 3m / 6m</span><span class="v"><span style="color:' + c3 + '">' + up3 + ' ' + (t3 >= 0 ? '+' : '') + t3.toFixed(2) + '</span> / <span style="color:' + c6 + '">' + up6 + ' ' + (t6 >= 0 ? '+' : '') + t6.toFixed(2) + '</span></span></div>' +
'<div style="margin:8px 0 4px;font-size:11px;color:var(--muted)">Components (z, trailing 10y):</div>' +
'<div>' + (chips || '—') + '</div>' +
'<div style="margin-top:10px;padding:8px 10px;border-left:3px solid ' + ez.c + ';background:#0f172a;border-radius:0 6px 6px 0;font-size:12px;line-height:1.6">⚡ ' + act + '</div>' +
'<div style="margin-top:8px;font-size:10.5px;color:var(--muted)">FRED monthly · as of ' + (gm.as_of || '—') + ' · quarterly hit 67.5% (10y sample 2016+; release-lag checks 65-67.5%) · slow signal: gold position tier, not timing</div>' +
'</div></div>';
}
document.getElementById('app').innerHTML = `
${dqBanner}
${takeawayHtml}
<div class="grid row2">
<div class="card">
<h2>📊 GOR Seismograph</h2>
<div class="big-num">${gw.toFixed(1)} <small>/ WTI</small></div>
<div style="margin-top:4px"><span class="status-badge" style="background:${zoneColor}22;color:${zoneColor}">${zone}</span></div>
<div class="gauge-track"><div class="gauge-fill" style="width:${gaugePct}%;background:${zoneColor}"></div></div>
<div class="gauge-labels"><span>20<br>Bubble</span><span>30<br>Fair</span><span>45<br>Extreme</span><span>60<br>!</span><span>80<br>ATH</span></div>
<div class="kv"><span class="k">GOR (Brent)</span><span class="v">${gb.toFixed(1)}</span></div>
<div class="kv"><span class="k">Regime</span><span class="v">${regime}</span></div>
</div>
<div class="card">
<h2>🛢️ Market Snapshot</h2>
<div class="kv"><span class="k">Gold</span><span class="v" style="color:#f0c040">$${gold.toLocaleString()}</span></div>
<div class="kv"><span class="k">WTI Crude</span><span class="v">${wtiS}</span></div>
<div class="kv"><span class="k">DXY</span><span class="v">${dxyS}</span></div>
<div class="kv"><span class="k">US 10Y</span><span class="v">${y10S}</span></div>
<div class="kv"><span class="k">VIX</span><span class="v">${vixS}</span></div>
<div class="kv"><span class="k">Copper</span><span class="v">$${copper.toFixed(2)}/lb</span></div>
</div>
</div>
${gmHtml}
<div class="grid" style="grid-template-columns:1fr">
<div class="card">
<h2>💰 Allocation</h2>
<div class="alloc-bar">${allocBar}</div>
<div class="legend">
<span><span class="dot" style="background:#ef4444"></span>Oil</span>
<span><span class="dot" style="background:#f0c040"></span>Gold</span>
<span><span class="dot" style="background:#3b82f6"></span>A-Shares</span>
<span><span class="dot" style="background:#475569"></span>Cash</span>
</div>
${alertHtml}
</div>
</div>
<div class="grid row3">
<div class="card">
<h2>🌊 Capital Flows</h2>
<div class="kv"><span class="k">Total</span><span class="v" style="color:${ctf.total==='收缩'?'#ef4444':'#22c55e'}">${ctf.total || '—'}</span></div>
<div class="kv"><span class="k">Direction</span><span class="v" style="color:${ctf.direction==='向心坍缩'?'#ef4444':'#22c55e'}">${ctf.direction || '—'}</span></div>
<div class="kv"><span class="k">Speed</span><span class="v">${ctf.speed || '—'}</span></div>
<div class="kv"><span class="k">Fed Balance Sheet</span><span class="v">$${fed_bs ? fed_bs.toFixed(1) : '—'}T</span></div>
<div class="kv"><span class="k">M2</span><span class="v">$${m2 ? m2.toFixed(1) : '—'}T</span></div>
</div>
<div class="card">
<h2>🧭 Rates & Dollar</h2>
<div class="kv"><span class="k">DXY</span><span class="v">${dxy.toFixed(2)}</span></div>
<div class="kv"><span class="k">US 30Y</span><span class="v">${us30y ? us30y.toFixed(2)+'%' : '—'}</span></div>
<div class="kv"><span class="k">Fed Rate</span><span class="v">${fedRate ? fedRate.toFixed(2)+'%' : '—'}</span></div>
<div class="kv"><span class="k">Warsh Alert</span><span class="v" style="color:${ctf.warsh_alert?'#ef4444':'#22c55e'}">${ctf.warsh_alert ? '⚠️ ACTIVE' : '✓ calm'}</span></div>
</div>
<div class="card">
<h2>⏱️ How It Works</h2>
<div class="flow-step">GOR≥45<br><b style="color:#ef4444">Oil cheap</b></div><span class="flow-arrow">→</span>
<div class="flow-step">Risk<br>corrections</div><span class="flow-arrow">→</span>
<div class="flow-step">Hard<br>stops</div><span class="flow-arrow">→</span>
<div class="flow-step">1 decision<br>card</div>
<div style="margin-top:14px;font-size:11px;color:var(--muted);line-height:1.7">
11 frameworks · 6 masters · 1 ratio.<br>
Open source. Run it locally with:<br>
<code style="background:#1e293b;padding:2px 8px;border-radius:4px">python run.py --mode daily</code>
</div>
</div>
</div>`;
}
load();
</script>
<script data-goatcounter="https://justinjchen.goatcounter.com/count"
async src="/Deep-Risk-OPP/assets/count.js"></script>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js').catch(function() {});
}
</script>
</body>
</html>