OPEN-SOURCE SCRIPT
업데이트됨 Big Mo’s Glaskugel — Macro Drawdown Risk (v1.1.2)

What it does / what you see
An at-a-glance drawdown-risk oscillator that blends several macro US signals.
• A smooth, color-blended line (green→orange→red) shows the scaled risk score (0–100).
• Subtle shading marks “re-steepen warning windows” (starts when the yield curve re-steepens after an inversion; ends on normalization/cool-down).
• A compact status table summarizes: overall risk level, Yield Curve (10y–3m), Credit Stress (Baa–10y), Economy (LEI), and Valuation (CAPE).
Data used & why
Important disclaimer
This is not a reliable or predictive indicator in all regimes. No guarantees or warranties of any kind are provided. It is not financial advice. Signals can be early, late, or wrong.
That said, it leans on well-studied warning factors (yield-curve dynamics, credit spreads, LEI weakness, valuation extremes) that have flagged major market downturns in the past.
Key customization / tweaks
An at-a-glance drawdown-risk oscillator that blends several macro US signals.
• A smooth, color-blended line (green→orange→red) shows the scaled risk score (0–100).
• Subtle shading marks “re-steepen warning windows” (starts when the yield curve re-steepens after an inversion; ends on normalization/cool-down).
• A compact status table summarizes: overall risk level, Yield Curve (10y–3m), Credit Stress (Baa–10y), Economy (LEI), and Valuation (CAPE).
Data used & why
- Yield Curve (10y–3m) — FRED:T10Y3M. Inversions and subsequent re-steepens often precede recessions/equity drawdowns.
- Credit Stress — FRED:BAA10Y vs its 1-year average (deviation in bps). Widening credit spreads flag tightening financial conditions.
- Economy (LEI) — ECONOMICS:USLEI. 6-month annualized growth below a cutoff highlights macro deterioration.
- Valuation (CAPE) — SHILLER_PE_RATIO_MONTH. Elevated valuations can amplify downside risk.
- VIX spikes — optional boost that recognizes sudden risk repricings.
Important disclaimer
This is not a reliable or predictive indicator in all regimes. No guarantees or warranties of any kind are provided. It is not financial advice. Signals can be early, late, or wrong.
That said, it leans on well-studied warning factors (yield-curve dynamics, credit spreads, LEI weakness, valuation extremes) that have flagged major market downturns in the past.
Key customization / tweaks
- Weights for each component (Yield, Credit, LEI, VIX, CAPE).
- Thresholds: yield inversion months, re-steepen lookback, credit-stress bps, LEI cutoff, CAPE level, VIX spike levels.
- Re-steepen boost: enable/disable, base points, half-life decay.
- Shading behavior: cool-down bars to “unwarn,” max warning duration, only shade when risk ≠ green.
- Scaling & smoothing: dynamic rolling max, EMA length, yellow/red thresholds.
- Status table: position, and a snapshot mode to view values at a chosen historical time.
릴리즈 노트
Big Mo’s Glaskugel — Macro Drawdown RiskWHAT’S ORIGINAL HERE
• Macro signals are fused into a single, smooth 0–100 risk oscillator plus a time-boxed warning window.
• Re-steepen focus: the jump of the 10y–3m curve back above 0 after an inversion is treated as a distinct, boosted event (historically a strong early warning).
• Warning/unwarning logic: a state machine shades the pane from the first re-steepen until conditions cool (or a max duration elapses). This shows not only when an alarm starts, but also when it meaningfully ends.
WHAT IT DOES
• Plots a color-blended oscillator (green → orange → red) representing composite drawdown risk (0–100, optionally scaled to a rolling max).
• Shades re-steepen warning windows in the background.
• Displays a compact status table: Risk Level, Yield Curve (10y–3m), Credit Stress (Spreads), Economy (LEI), Valuation (CAPE).
• Optimized for the US market; the inputs are US macro series and do not change with the charted symbol.
HOW IT WORKS (CALCULATION CONCEPTS)
The score is a weighted sum of five modules. Weights and thresholds are fully user-configurable.
1. Yield Curve (10y–3m, FRED\:T10Y3M)
– Sustained inversion: curve < 0 for N monthly closes.
– Re-steepen event: daily crossover back above 0 while an inversion occurred within the last L months.
– Adds base points during sustained inversion; injects an extra “re-steepen boost”.
2. Credit Stress (Spreads, FRED\:BAA10Y vs 1-year average)
– Uses deviation in basis points; bucketed HIGH / MID / OK.
3. Economy (LEI, ECONOMICS\:USLEI)
– 6-month annualized growth; readings ≤ cutoff flag weakness.
4. Valuation (CAPE, SHILLER\_PE\_RATIO\_MONTH)
– If CAPE > level, contributes to risk (valuation as amplifier, not timing tool).
5. Volatility (CBOE\:VIX, optional)
– Recognizes spikes (≥30) and extremes (≥40) from a calm base.
Boost (original touch)
• A re-steepen triggers an additive boost scaled by depth/duration/slope and then decays exponentially with a user-set half-life. This preserves punch early and fades if nothing escalates.
Smoothing & Scaling
• EMA smoothing on the composite.
• Optional dynamic scaling to a rolling maximum (user length) so cycles are comparable.
• Line color follows user thresholds for Yellow/Red.
Warning Window (Shade)
• Starts at re-steepen. Ends when: (a) score stays GREEN for N consecutive bars (cool-down), or (b) a maximum duration (in months) elapses.
• Option “shade only when not green” available.
DATA SOURCES (TRADINGVIEW TICKERS)
• Yield curve: FRED\:T10Y3M
• Credit spread: FRED\:BAA10Y
• LEI (level): ECONOMICS\:USLEI
• Valuation: SHILLER\_PE\_RATIO\_MONTH
• Volatility: CBOE\:VIX
HOW TO USE IT
• Timeframe: works best on Weekly (1W). Daily is fine but noisier (macro series are D/M).
• Interpretation: green = benign, orange = rising risk, red = elevated risk. Shaded regions mark re-steepen warning windows—context for risk management, not automatic trade signals.
• Best practice: view on SPX/SPY for macro context; combine with your own breadth/price/risk rules.
KEY SETTINGS TO TWEAK
• Weights for Yield / Credit / LEI / VIX / CAPE.
• Thresholds: inversion months, re-steepen lookback, credit bps cutoff, LEI cutoff, CAPE level, VIX spikes.
• Boost: base points and half-life decay.
• Smoothing & Scale: EMA length, dynamic scaling window, Yellow/Red thresholds.
• Warning logic: cool-down bars, max duration, shade only when not green.
• Table: position; optional snapshot mode to display values at a chosen historical time.
LIMITATIONS & INTENT
• Macro early-warning dashboard—NOT a timing oracle. Signals can be early/late/wrong. Individual stocks can diverge from macro. No warranties; educational use only.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.