In today’s hyper-connected financial markets, the sheer volume of data, news, and noise can be overwhelming. As investors, we are constantly bombarded with conflicting narratives: one analyst predicts a booming AI-driven supercycle, while another warns of an imminent macroeconomic collapse. I always get asked questions like – “Do you think there will be a major correction?” “When will there be a market crash?” “What indicators should be looking at to derisk my portfolio?” To which my answer is – “it depends. on many factors”
To navigate this environment, I realized I myself needed a system that strips away the emotion and the headlines. I didn’t need more opinions; I needed objective, quantifiable data aggregated into a single pane of glass. I needed a way to measure the actual, underlying stress in the financial system. I needed KPIs.
That’s why I built the Market Extreme Risk Dashboard. Go ahead and check it out
This article outlines the philosophy behind the dashboard, the specific macro and sentiment indicators it tracks, the math behind its risk scoring engine, and the technical architecture that allows it to run automatically.
Part 1: The Core Philosophy – Systemic Risk vs. Normal Volatility
The stock market experiences routine corrections (drawdowns of 10% to 15%) every few years. These are normal, healthy functions of price discovery. However, severe market crashes—the ones that wipe out years of wealth and take a decade to recover from—are almost always accompanied by systemic macroeconomic deterioration or severe credit market stress.
The goal of this dashboard is not to predict everyday market wiggles or day-trade the S&P 500. The goal is to detect systemic fragility.
If the market drops 5%, but credit spreads are tight, the yield curve is healthy, and unemployment is low, it’s likely just a routine pullback. But if the market is hitting all-time highs while credit markets are freezing, the yield curve is deeply inverted, and investors are quietly bidding up crash protection (SKEW), the system is incredibly fragile.
By tracking a diverse basket of macro and sentiment indicators, the dashboard acts as an early warning radar for systemic fragility.
Part 2: The Macroeconomic Foundation (The “Slow” Data)
The foundation of the dashboard is built on macroeconomic data sourced directly from the Federal Reserve Economic Data (FRED) database. These metrics move slowly, but they dictate the gravity of the financial universe.
1. Credit Stress (High Yield, BB, and CCC Spreads)
Corporate bond spreads are arguably the most important indicators on the dashboard. A “spread” is the difference in yield between risky corporate debt (junk bonds) and safe U.S. Treasury bonds.
- Why it matters: When spreads are low, credit is flowing freely, and corporations can easily refinance debt. When spreads blow out (e.g., HY Spreads > 5% or CCC Spreads > 13%), it means lenders are terrified of defaults. A market crash rarely happens without credit markets freezing first.
2. The Yield Curve (10Y-3M and 10Y-2Y)
The dashboard tracks the difference in yield between long-term (10-year) and short-term (3-month and 2-year) U.S. Treasuries.
- Why it matters: In a healthy economy, long-term bonds yield more than short-term bonds. When the curve “inverts” (short-term yields rise above long-term yields), it is historically the most accurate predictor of an impending recession. The dashboard triggers a warning the moment the 10Y-3M curve drops below 0%.
3. Growth & Labor (Unemployment & Claims)
The labor market is the engine of the consumer economy. We track the headline Unemployment Rate, alongside leading indicators like Initial and Continuing Jobless Claims.
- Why it matters: Job losses have a cascading effect on consumer spending and corporate earnings. We look for sudden, sustained inflections. A trigger fires if unemployment rapidly crosses the 5.5% threshold.
4. Rates, Liquidity, and Inflation
We monitor the Federal Funds Rate, SOFR, M2 Money Supply, and inflation expectations (10-Year Breakeven). This paints a picture of central bank liquidity. If financial conditions tighten too rapidly (measured by the Chicago Fed National Financial Conditions Index), it starves the market of the capital needed to sustain high valuations.
Part 3: Market Sentiment & Breadth (The “Fast” Data)
While macro data tells us the underlying state of the economy, it is often lagging. To get a real-time pulse on investor psychology and institutional positioning, the dashboard tracks a suite of highly sensitive market sentiment ratios.
1. The SKEW Index (Tail Risk Pricing)
The CBOE SKEW Index measures the perceived tail risk in the S&P 500 options market.
- The Signal: While the VIX measures general, at-the-money volatility, the SKEW measures the demand for deep out-of-the-money put options. A high SKEW (>= 140) means institutional investors are quietly paying massive premiums for “Black Swan” crash protection.
2. High-Beta vs. Low-Volatility Ratio
By tracking the ratio of the S&P 500 High Beta ETF (SPHB) to the Low Volatility ETF (SPLV), we can see exactly where money is flowing under the surface.
- The Signal: A rising ratio means investors are chasing risky, high-reward stocks (Risk-On). A declining ratio that falls below its 10-day moving average triggers a warning on the dashboard, signaling a panicked rotation into safe-haven defensive stocks (Risk-Off).
3. AI & Semiconductor Breadth
In the modern market, the semiconductor sector (and AI capital expenditure) is the undisputed leader of growth. The dashboard tracks the VanEck Semiconductor ETF (SMH) against its 200-day moving average.
- The Signal: If the broad market is rising, but semiconductors decisively break below their 200DMA, it signals a massive exhaustion in the prevailing tech cycle.
4. The Classic Macro Ratios: Copper/Gold & Lumber/Gold
These are two of the oldest and most reliable macro sentiment indicators:
- Copper vs. Gold: Copper (often called “Dr. Copper”) is highly correlated with global industrial growth. Gold is the ultimate safe haven. When the Copper/Gold ratio falls, it means the market is pricing in an economic slowdown.
- Lumber vs. Gold: Lumber is tied heavily to housing construction and domestic growth. A falling Lumber/Gold ratio is a classic risk-off indicator.
Part 4: The Scoring Engine
Having 20+ indicators is great, but looking at a massive wall of data can induce analysis paralysis. To solve this, the dashboard features a custom Risk Scoring Engine that digests all of these inputs and outputs two simple metrics.
1. The Extreme Risk Score (0 – 100%)
This is the master gauge. The algorithm evaluates a basket of 15 highly sensitive indicators (including the VIX, High Yield Spreads, SKEW, and the Sentiment Ratios). It maps each indicator to a severity level:
- Normal: 0 points
- Watch: 1 point
- Warning: 2 points
- Crisis: 3 points
The total points are summed and divided by the maximum possible score to generate a 0-100% reading. If the score is below 25%, the coast is clear. If it crosses 75%, you are in the danger zone.
2. The Recession State Composite (Panic Meter)
While the Extreme Risk Score is dynamic and sensitive to early warnings, the Recession State Composite is incredibly rigid. It is a hard-coded 0-10 scale that only evaluates 5 indicators (like Unemployment > 5% and VIX > 30).
It is designed to stay at zero during normal bull markets and mild corrections, and only lights up when a major, undeniable macroeconomic crisis is actively unfolding.
Part 5: The Technical Architecture
When designing the software architecture for this dashboard, I had two strict requirements: it had to run automatically without my intervention, and it had to cost absolutely nothing to host.
I initially considered building a complex web app using frameworks like Streamlit or React, backed by a persistent database and hosted on an AWS VPS. However, I realized that a dashboard like this is inherently static at any given moment—it only needs to be updated a few times a day.
So this is what I landed on:
The Data Layer: yfinance & FRED API
All data is fetched using pure Python.
- Live market quotes and sentiment ratios (like SPHB/SPLV) are pulled dynamically using the free
yfinancelibrary. - Macroeconomic data is pulled using the Federal Reserve’s free FRED API. Because the data is fetched directly during the build process, there is no need for an expensive, persistent database.
The Presentation Layer: Jinja2 & Plotly
Instead of hosting a live Python server, the dashboard script acts as a static site generator. Once the data is fetched and the risk scores are computed, the Python script injects the values into an HTML template using Jinja2. Interactive charts for the yield curve and credit spreads are generated dynamically using Plotly, which natively exports them as embeddable HTML snippets. The script then outputs a single, beautiful, standalone market_risk.html file.
The Automation Engine: GitHub Actions
This is where the magic happens. Instead of paying for a server or a VPS to run cron jobs, the entire repository is hosted on GitHub. I wrote a simple GitHub Actions workflow that runs the script and generates the dashboard – everyday at 10:30 AM EST
Conclusion
The Market Extreme Risk Dashboard is a counterweight to financial news that is accompanied by hype. It doesn’t care about what a pundit thinks the Federal Reserve might do next month, and it doesn’t care about the latest stock market hype cycle.
It cares about whether credit is flowing, whether the yield curve is healthy, and whether institutional money is quietly hedging against disaster.
By combining robust macroeconomic data with real-time sentiment breadth, wrapping it in a unified scoring engine, and automating the entire process via GitHub Actions, I’ve tried to create a financial early warning system that can objectively surface danger signals that might be leading to a market crash.
Give it a try, and I hope you find it useful.
