Liquidity Stress Oscillator Pro2 Liquidity Stress Oscillator Pro2
The Liquidity Stress Oscillator Pro2 is a macro risk-regime indicator designed to visualize broad market liquidity stress using a weighted composite of credit, volatility, dollar strength, funding pressure, and yield-curve conditions.
This oscillator is intended to help traders identify when macro liquidity conditions are improving, neutral, deteriorating, or entering elevated stress. In the BTC comparison shown, the oscillator highlights several major macro regime transitions that have aligned with important Bitcoin cycle shifts.
What It Measures;
LSO Pro2 combines normalized z-scores from multiple macro stress inputs:
- CCC option-adjusted spreads
- High-yield credit spreads
- MOVE bond volatility index
- U.S. Dollar Index
- SOFR / repo stress proxy
- 10Y-2Y yield curve
Each component is converted into a z-score over the selected lookback period, then blended into a weighted composite. The yield curve component is inverted so that deeper curve weakness contributes to higher stress.
Regime Levels;
The oscillator uses adjustable regime thresholds to help dial in trends on different timeframes.
Extreme Risk Off
Risk Off
Neutral
Risk On
The line color, background shading, and regime markers update automatically as the composite moves between regimes.
Features;
- Weighted macro liquidity-stress composite
- Adjustable z-score length and smoothing
- Customizable component symbols
- Optional raw composite display
- Regime background shading
- Risk On, Risk Off, and Extreme Risk Off markers
- Regime table with key component readings
- Works across assets and timeframes, especially useful for macro-sensitive markets like BTC, equities, indexes, and risk assets
How To Use;
Rising LSO values indicate increasing macro stress and tightening liquidity conditions. Falling LSO values indicate easing stress and improving risk appetite.
Risk On regimes may support stronger risk-asset environments, while Risk Off and Extreme Risk Off regimes may warn of elevated caution, deleveraging, or liquidity pressure.
This tool is best used as a macro regime filter alongside price action, trend structure, volume, and risk management. It is not designed to generate standalone buy or sell signals.
Notes;
Some symbols may depend on PulseWire data availability. If a component does not load on your chart, replace it in the indicator settings with an equivalent symbol supported by your data feed.
Default weights emphasize credit stress, especially CCC spreads, because lower-quality credit markets often react strongly during liquidity contractions.
Disclaimer;
This indicator is for educational and informational purposes only. It does not provide financial advice and should not be used as the sole basis for trading or investment decisions. Always use proper risk management and perform your own analysis. Indicator

Yield Curve MonitorWhat you see in the preview image
The chart displays the complete US Treasury yield curve as a smooth log-scaled polyline drawn to the right of the last bar, with all eleven maturities from 1-month T-bills to 30-year bonds plotted at their actual yield values. The solid line shows today's curve; the dashed line shows the curve from 21 trading days ago for direct visual comparison. Each tenor is labeled with its name and yield in percent. To the right, a comprehensive dashboard table lists every maturity with current yield, the change in basis points versus the historical reference date, and a relative magnitude bar. Below the maturity rows the four most-watched yield-curve spreads are shown (2s10s, 3m10y, 2s30s, 5s30s) with their current value, change versus history, and inversion status. The footer classifies both the current and historical curves into one of five regimes — Steep, Normal, Flat, Inverted, or Humped — using a user-selectable slope metric.
What this indicator does
This is a complete US Treasury yield-curve workstation built into a single PulseWire pane. It solves a problem that ordinary time-series indicators cannot: the yield curve is fundamentally a cross-sectional object — yield as a function of maturity at a single moment — but standard charts plot variables against time. By rendering the curve as a polyline anchored to the right of the last bar, with maturity on a logarithmic x-axis and yield on the price axis, the indicator gives you a real, geometrically faithful view of curve shape, alongside a complete data table and historical comparison.
Eleven maturities are pulled from PulseWire's TVC feed at daily resolution: US01MY, US03MY, US06MY, US01Y, US02Y, US03Y, US05Y, US07Y, US10Y, US20Y, US30Y. Each tenor is requested twice — once for the current bar and once for a user-defined lookback offset — giving the indicator a paired snapshot that drives every visualization and metric. If a specific tenor is unavailable on your data plan (US20Y is the most common gap), that point silently drops from the curve and shows an em dash in the table — no errors are raised.
Settings explained
Display group
Curves geplottet (Curves to plot) — choose which yield curves are drawn to the right of the last bar: , , or . The dashboard table always shows both datasets regardless of this setting; this toggle controls only the visual polyline. The tenor labels next to the points always reflect the curve being plotted (or the current curve when both are shown).Current onlyHistoric onlyBoth
Slope-Metrik (Shape-Klassifikation) — selects which spread drives the Steep / Normal / Flat / Inverted / Humped classification shown in the dashboard footer. Six options are available: (the default, broadest possible measure), (classic NBER recession lead-indicator), (the Federal Reserve's preferred recession signal), (long-end steepness), (pure long-end term-premium proxy), and (full-spectrum slope excluding T-bills). Each metric has its own empirically calibrated thresholds (see the Methodology section), so the classification remains meaningful regardless of which spread you choose. Alerts also fire on the selected spread.30y - 3m10y - 2y (2s10s)10y - 3m (3m10y)30y - 5y (5s30s)30y - 10y (10s30s)30y - 2y (2s30s)
Dashboard anzeigen — show or hide the data table.
Tabellen-Position — five anchor points for the dashboard: top-left, top-right, middle-right, bottom-right, bottom-left.
Historic Lookback (Daily Bars) — the number of trading days back used for the historical comparison. Default is 21, which approximates one trading month. Useful presets: 21 ≈ 1 month, 63 ≈ 1 quarter, 126 ≈ 6 months, 252 ≈ 1 year. Maximum 504 bars (≈ 2 years).
Style group
Five customizable colors mapped to semantic roles (Bull/Steep/Current, Bear/Inversion, Neutral/Normal, Warning/Flat/Hump, Historic). One additional input controls the polyline line width (1 to 5). All defaults match a dark theme; the colors can be repointed to fit any chart style.
Alerts group
Two alert toggles: one fires when the user-selected slope metric crosses below zero (inversion event), the other when it crosses back above zero (re-steepening event). Both alerts trigger on confirmed daily-bar closes only — there is no intrabar repainting.
What the dashboard shows
The table is divided into three blocks.
Maturity block (eleven rows) — one row per tenor showing the current yield to three decimal places, the change in basis points versus the lookback date with directional color (green up, red down), and a magnitude bar built from filled and empty Unicode block characters that visualizes the yield's size relative to the highest yield in the curve. This block lets you read absolute levels and recent moves at a glance.
Key Spreads block (four rows) — the four most-watched curve spreads (2s10s, 3m10y, 2s30s, 5s30s), each with current value, change in basis points versus the lookback date, and an OK / INVERTED status flag. These four are shown unconditionally regardless of which slope metric you selected for shape classification, so you always have the full institutional toolkit visible.
Curve Shape block (one or two rows) — one row per plotted curve (Current and/or Historic, depending on the curve toggle). Each row shows the regime label (STEEP, NORMAL, FLAT, INVERTED, or HUMPED) on a colored background matching the regime, the current slope value of the selected metric, and the metric's name. This lets you compare regime states between today and the lookback date directly: the curve may have shifted from FLAT to STEEP, for example, even if both versions are visible on the chart.
Methodology — shape classification
The indicator uses the user-selected spread as its primary slope input, with four absolute thresholds calibrated empirically from US Treasury data since 1990:
30y - 3m Steep : +1.5% Normal > +0.3% Flat > -0.3% Inverted ≤ -0.3%
10y - 2y (2s10s) +1.0% +0.2% -0.2% -0.2%
10y - 3m (3m10y) +1.5% +0.3% -0.3% -0.3%
30y - 5y (5s30s) +0.7% +0.15% -0.15% -0.15%
30y - 10y (10s30s) +0.5% +0.1% -0.1% -0.1%
30y - 2y (2s30s) +1.0% +0.2% -0.2% -0.2%
The thresholds reflect each spread's historical distribution: the long-end spreads (5s30s, 10s30s) have far narrower ranges than the broad measures (30y-3m, 3m10y), so applying a single global threshold would over-classify the long-end as STEEP at almost every reading. By calibrating per metric, the classification stays meaningful no matter which spread the user selects.
A separate Hump detection runs alongside: if the maximum yield in the curve falls in the belly (2Y, 3Y, 5Y, or 7Y) and the overall slope is below twice the Normal threshold, the curve is classified as HUMPED. This identifies the canonical inverted-belly shape that often signals a near-term policy-rate peak followed by expected easing.
How to read the curve
A Steep curve typically associates with early-cycle expansions, accommodative monetary policy, or rising inflation expectations — investors demand higher compensation to lend further out. A Normal curve is the long-term default state of healthy bond markets. A Flat curve indicates near-equality of short and long expectations, typically near cyclical turning points. An Inverted curve, where long yields trade below short yields, has preceded every US recession since the 1960s with an average lead time of roughly 12 to 18 months — this is the signal to watch for. A Humped shape, where the belly trades above both ends, typically reflects market pricing of a near-term hiking cycle followed by expected cuts.
The dashed historical curve makes regime transitions visually obvious. If the solid current curve sits below the dashed reference across all tenors, yields have fallen broadly (a bond rally). If the curves cross — for example, the short end is up but the long end is down — the curve has flattened or inverted further during the lookback window. If the spread between them widens at the long end, term premium is expanding.
Repainting and data behavior
All calls use . Alerts trigger only on confirmed daily-bar closes. There is no repainting on confirmed bars.request.securitylookahead = barmerge.lookahead_off
When the chart is on an intraday timeframe, the displayed yields reflect the most recent closed daily bar — during the US trading session this means yesterday's settlement until the new daily close prints. This is correct, non-repainting behavior and is consistent with how all daily-resolution data is served on PulseWire.
The pane scales automatically to the yield range using two invisible anchor plots (min and max across both current and historical curves). This ensures the polyline always uses the full vertical space without manual axis adjustment, regardless of the absolute level of yields.
Limitations
The classification thresholds are static absolutes, not adaptive. In persistent low-rate regimes (such as 2010-2021) the STEEP threshold may register slightly too generously; in high-rate regimes the FLAT threshold may understate compression. The numerical slope value is always shown alongside the label, so you can apply your own judgment when the regime label feels off.
The Hump detection uses a simple argmax check on the belly tenors rather than a full curvature metric (such as the 2 × 5Y minus 2Y minus 10Y butterfly). It is most reliable when the selected slope metric spans the full curve (30y-3m, 3m10y, 2s10s); for narrow long-end metrics (5s30s, 10s30s) the belly lies outside the metric's span and Hump classification can be misleading. When in doubt, switch the slope metric to for the most robust shape reading.30y - 3m
Only US Treasuries are supported in this version. The architecture leaves headroom in the request.security budget (22 of 40 calls used) for adding additional sovereign curves (Bunds, Gilts, JGBs) in future updates.
Two alert conditions are exposed for the user-selected slope metric:
Selected Spread Inversion — fires when the chosen spread crosses below zero (e.g., from positive to negative 2s10s). Useful as an early-warning trigger in macro frameworks.
Selected Spread Re-Steepening — fires when the chosen spread crosses back above zero. The bull-versus-bear-steepener distinction (which end of the curve is moving) requires looking at the individual yields in the dashboard at the moment the alert fires.
Alerts respect the user's slope-metric selection — switching from 2s10s to 3m10y in the settings will redirect the alerts to the new spread automatically.
Recommended use
Place the indicator on a daily chart of a broad US equity index (SPX, ES1!, SPY) to visualize how historical yield-curve regimes have aligned with equity-market phases — the inversion shading and shape labels make prior recession signals immediately visible. For fixed-income traders, place it directly on a Treasury futures chart (ZN1!, ZB1!) to use the live curve view as a directional input alongside the underlying price action. For macro discretionary traders, the configurable slope metric lets you align the shape classification with whichever spread your framework prioritizes — Fed-watchers typically use 3m10y, recession-modelers use 2s10s, term-premium analysts use 5s30s or 10s30s.
Originality
This indicator combines three distinct visualizations of the same dataset — a cross-sectional polyline curve drawn to the right of the last bar, a comprehensive numerical dashboard with eleven tenors and four spreads, and a configurable shape classification with per-metric calibrated thresholds — into a single, self-contained workspace. The log-scaled cross-sectional curve drawing using Pine v6's polyline objects, the historical comparison overlay, and the user-selectable slope metric with empirically calibrated thresholds per spread are not, to my knowledge, available in this combination in other public yield-curve scripts on the platform.
Indicator

Yield Curve Regime Yield Curve Regime – Pro Edition
=== WHAT IT DOES ===
This indicator classifies the U.S. Treasury yield curve into six canonical
regimes by comparing the current behavior of a short-maturity yield
(default 2Y) and a long-maturity yield (default 10Y) against their values
N bars ago. It paints the chart background (or bar color) with the
regime color and renders a modular on-chart dashboard showing the active
regime, a curve-delta trend arrow, live yield snapshots, a quantitative
strength score, multi-horizon confluence, dwell-time, rolling regime
frequencies, and a transition log.
=== WHY IT IS DIFFERENT ===
Most public yield-curve scripts plot the 10Y-2Y spread or flag a single
inversion event. This script decomposes every curve move into the two
dimensions that actually matter for fixed-income interpretation:
1) Curve direction : did the spread steepen or flatten?
2) Yield direction : did short and long yields rise or fall?
Crossing these dimensions produces six distinct regimes, each with a
different macro meaning. A +10 bp move in the 2s10s spread can be a
"Bull Steepener" (Fed easing – risk-on friendly) or a "Bear Steepener"
(inflation / term-premium driven – risk-off friendly). Flagging only
the spread hides that distinction; the six-regime framework exposes it.
On top of that six-regime base, this indicator adds four analytical
layers that, to the best of our knowledge, are not combined in any
existing public yield-curve script:
• A Z-score-based Strength score (0–100) that quantifies *how
convincing* each regime is instead of treating it as a binary flag.
Calibrated so |Z| = 2.0 (the 95 % confidence band) maps to 100.
• A Multi-Horizon Confluence score (0/3, 1/3, 2/3, 3/3) computed by
running the same regime detection on three independent offsets
(fast / mid / slow) and measuring agreement across horizons.
• A Dwell-Time counter plus a rolling history of the last N regime
transitions, so the viewer can see not just the current regime
but its persistence and transition path.
• A rolling Regime-Frequency statistic showing what percentage of
the last freqLen bars each regime occupied, rendered as an inline
bar and a precise percentage in a dedicated dashboard block.
These are genuine additions to the calculation – not cosmetics.
All of them are visualized in the on-chart dashboard so the reader
can consume the extra information at a glance.
=== THE SIX REGIMES (core logic) ===
Let curve = longRate - shortRate, compared against its value "offset"
bars ago. A regime fires when all three conditions hold simultaneously:
Bull Steepener : curve widens, short falls, long falls
(short falls faster – classic early easing cycle)
Bear Steepener : curve widens, short rises, long rises
(long rises faster – inflation / term premium / supply)
Steepener Twist : curve widens, short falls, long rises
(reflation pivot / policy-vs-inflation divergence)
Bull Flattener : curve narrows, short falls, long falls
(long falls faster – flight to quality / recession bid)
Bear Flattener : curve narrows, short rises, long rises
(short rises faster – aggressive Fed tightening)
Flattener Twist : curve narrows, short rises, long falls
(stagflation signal / tightening into weakness)
Exactly one regime fires per bar (the six conditions are mutually
exclusive by construction). When none triggers, the background stays
clean.
=== HOW TO READ THE DASHBOARD ===
• Header row – ticker + timeframe context.
• Active row – the regime currently firing, tinted in its own
color, with a ▲ / ▼ / ▬ arrow showing the signed
change of the curve over the fast offset window.
• Strength bar – █-fill from 0 to 100 plus the exact score.
• Confluence row – ●●● / ●●○ / ●○○ / ○○○ plus score 0/3 … 3/3.
• Dwell row – bars elapsed inside the current regime.
• Yields block – live short, long, and curve values.
• Legend block – every enabled regime with a colored dot and a
live "● aktiv" / "○ ruhend" status.
• Frequency block – each regime's share of the last freqLen bars,
shown as a 10-step bar plus exact percentage.
• Transitions – a log of the most recent regime changes
(newest first).
• Background/bars – tinted in the active regime's color, optionally
dimmed when Strength is low.
=== HOW TO READ THE ANALYTICAL LAYERS ===
• Strength bar (█████░░░░░ 65 / 100) – the farther right it fills,
the more statistically significant the regime move is relative to
its rolling volatility. Calibrated so a Z-aggregate of 2.0 (roughly
the 95 % band of a normal distribution) maps to a score of 100.
• Confluence (●●○ 2/3) – how many of the three horizons confirm the
fast-horizon regime. 3/3 is a strong multi-timeframe signal; 1/3 is
fast-only; 0/3 means no active regime on any horizon.
• Dwell – bars elapsed inside the current regime. Useful for spotting
exhausted vs. freshly-started regimes.
• Frequency – every regime's rolling share of the freqLen window,
letting you see at a glance which regime has dominated the current
macro cycle.
• Transitions – a compact log of the most recent regime changes.
=== SETTINGS (all inputs are grouped and collapsible) ===
• Symbols & Offset – pick any two yield tickers plus three lookback
windows (fast / mid / slow) for confluence.
• Detection – rolling window for frequency statistics,
maximum stored transitions.
• Display – background vs. bar coloring, transparency,
optional strength-coupled transparency.
• Regime selection– enable/disable any subset of the six regimes.
• Color palette – fully user-overridable regime colors.
• Dashboard – master toggle, compact mode (active regime only),
independent per-section toggles for header,
active+strength, confluence, dwell, yields,
legend, frequency, and transitions, plus
configurable position and text size.
=== HOW TO USE IT ===
• As a macro / risk-regime filter on SPX, NDX, DXY, TLT, HYG, BTC,
gold or any risk-sensitive instrument: the regime in force often
explains why cross-asset correlations are behaving the way they are.
• To disambiguate yield-curve headlines: a "curve is steepening"
print means something very different if it is a Bull Steepener vs.
a Bear Steepener; this indicator answers that question at a glance.
• To study historical regime transitions: switch background mode on
and scroll back through past cycles to see how regimes clustered
around recessions, pivots, and inflation shocks.
• The offset inputs let you tune sensitivity: 1 bar for intraday
regime nowcasting, 5–20 bars for swing and macro framing.
=== NOTES & LIMITATIONS ===
• Defaults to US02Y and US10Y but accepts any two yield symbols –
not hard-coded to U.S. Treasuries; works on Bund, Gilt, JGB curves
if the data is available on your plan.
• Regimes are evaluated on bar-close comparisons and can flip
intrabar on lower timeframes; use daily or weekly for stable macro
readings.
• The Strength score relies on rolling standard deviations over a
50-bar window. On low-liquidity / low-frequency data the σ estimate
can be unstable for the first 50 bars after loading.
• Multi-Horizon Confluence runs the raw regime detection on mid and
slow offsets, so slower horizons can confirm a faster signal even
when their Δcurve is small – this is by design, not a bug.
• The Steepener Twist and Flattener Twist cases are structurally
rarer than the four main regimes and often mark transitions rather
than trends – treat them as context, not as standalone signals.
• This is an analytical / visual tool, not a buy/sell system. It does
not generate entries, exits, or forecasts.
Indicator

Federal Funds ForecastThe Federal Funds Forecast is an all-in-one, forward-looking interest rate monitoring tool that tracks market expectations for the federal funds rate. It provides a comprehensive view of the Federal Reserve’s policy structure, overnight funding markets, and future rate expectations within a single framework, enabling real-time monitoring of funding conditions and evolving policy expectations. It features adjustable parameters and a clear, color-coded table that allows users to quickly assess the current market outlook and how expectations have evolved over time.
At its core, the model displays the main rates that define the US overnight funding system. The Federal Reserve implements monetary policy by establishing a target range for the federal funds rate. This range is maintained through a policy corridor defined by the Standing Repo Facility (SRF) rate at the upper bound and the Reverse Repo (RRP) rate at the lower bound, which serve as a ceiling and floor for overnight funding rates. Within this corridor, the Effective Federal Funds Rate (EFFR), Secured Overnight Financing Rate (SOFR), and Interest on Reserve Balances (IORB) are plotted to show how market rates trade relative to the Federal Reserve’s target range:
SOFR = Volume-weighted average rate of overnight borrowing backed by US Treasury collateral in the repo market, representing the broadest measure of secured funding.
EFFR = Volume-weighted average rate of overnight unsecured lending between banks in the federal funds market, which the Federal Reserve targets to implement monetary policy.
IORB = Interest rate paid by the Federal Reserve on reserve balances held at the Fed, acting as the primary anchor for overnight rates, as eligible banks can earn this rate risk-free.
Stress in the overnight funding market is measured as the spread between SOFR and IORB. Negative spreads typically reflect ample liquidity, as cash-rich lenders without access to IORB compete to lend in the repo market, pushing SOFR below IORB. Positive spreads typically reflect tighter conditions, as strong demand for funding pushes SOFR above IORB, creating an incentive to lend reserves. Sustained positive spreads typically signal funding stress, as persistent demand for cash is not met by sufficient lending supply, reflecting constraints that prevent full arbitrage of the spread. Persistent stress conditions are highlighted using optional background shading.
In addition to current conditions, the indicator displays the market’s implied path for future policy rates based on the Fed funds futures market. This forward path is shown as a dotted projection line extending from the current EFFR over the selected horizon, providing a clear view of whether the market is pricing in rate cuts, hikes, or a relatively stable policy path. The projection label summarizes the expected move in basis points and translates it into an approximate number of cuts or hikes, while the table provides a more detailed breakdown across multiple time horizons.
The table is divided into two main sections following the first row, which displays the current SOFR–IORB spread in basis points. The first section displays the implied difference between expected future rates and the current EFFR across 3M, 6M, 9M, 12M, 15M, and 18M horizons. Green indicates lower implied future rates, while red indicates higher implied future rates. The second section displays the difference between current expectations and prior expectations 1W, 2W, 3W, or 4W ago, based on the repricing period selected in the menu. Green reflects a shift in expectations toward easier policy, while red reflects a shift in expectations toward tighter policy.
In summary, the Federal Funds Forecast is a comprehensive monetary policy tool designed to provide investors with a clear view of the current US policy rate environment, overnight funding conditions, and market expectations for future Federal Reserve policy. While the model offers valuable insight into expectations derived from trading activity in the Fed funds futures market, these expectations reflect conditions at a specific point in time and can change rapidly as incoming data and Federal Reserve communication reshape the US monetary policy outlook. Indicator

Indicator

Macro Return ForecastWhen the macro environment was similar, what annualized return did the market usually deliver next?
Before using the indicator, make sure your chart is set to any US-market symbol (SPX, QQQ, DIA, etc.).
This requirement is simple: the indicator pulls macro series from US data (yields, TIPS, credit spreads, breadth of US indices).
Because these series are independent from the chart’s price series, the chart symbol itself does not affect the internal calculations.
Any US symbol works, and the output of the model will be identical as long as you are on a US asset with daily, weekly or monthly timeframe.
The plotted price does not matter: the macro engine is fully exogenous to the chart symbol.
1. What the indicator does relative to selected assets
In the settings you choose which market you want to analyze:
- S&P500
- Nasdaq or NQ100
- Dow Jones
- Russell 2000
- US-wide (VTI)
- S&P500 sectors (XLF, XLY, XLP, etc.)
For each one, the indicator loads:
- Its internal breadth series (percentage of constituents above MA200)
- Its price history to compute forward log-returns at multiple horizons
- Its regime position relative to its own MA200 (for bull/bear filtering)
This means the tool is not tied to the chart symbol you display.
If your chart is SPX but the indicator setting is “S&P500 Technology”, the expected return projection is computed for the Technology sector using its own data, not the chart’s data.
You can therefore:
- Visualize macro-driven expected returns for any major US index or sector.
- Compare how different parts of the market historically reacted to similar macro states.
- Switch assets instantly to see which segment historically behaved better in comparable macro conditions.
The indicator becomes an analyzer of macro sensitivity, not a chart-dependent indicator.
2. Method overview
The model answers a statistical question:
“When macro conditions looked like they do today, what forward annualized return did this asset usually deliver?”
To do this it combines four macro pillars:
- Market breadth of the selected asset
- Yield curve slope (US 10Y minus 2Y)
- US credit spread (high yield minus gov)
- US real rate (TIPS 10Y)
It normalizes each metric into a 0–100 score, groups similar historical states into bins, and examines what the asset did next across six horizons (from ~9 months to ~5 years).
This produces a historical map connecting macro states to realized forward returns.
It is not a forecast model.
It is a conditional-distribution estimator: it tells you what has historically happened from similar setups.
3. Why this produces useful insights on assets
For any chosen asset (SPX, Nasdaq, sectors…), the indicator computes:
- Its forward return distribution in similar macro states.
- How often these states occurred (n).
- Whether the macro environment that preceded positive returns in the past resembles today’s.
- Whether the asset tends to be more sensitive or more resilient than the broad index under given macro configurations.
- Whether a given sector historically benefited from specific yield-curve, credit or real-rate environments.
This lets you answer questions such as:
- Does this sector usually outperform in an inverted yield curve environment?
- Does the Nasdaq historically recover strongly after breadth collapses?
- How did the S&P500 behave historically when real rates were this high?
- Is today’s credit-spread environment typically associated with positive or negative forward returns for this index?
These insights are not predictions but statistical context backed by past market behavior.
4. Why the technique is robust (and why it matters)
The engine uses strict, non-optimistic data processing:
- Winsorization of returns to neutralize extreme outliers without deleting information.
- Shrinkage estimators to avoid overfitting when bins contain few occurrences.
- Adaptive or static bounds for scaling macro indicators, ensuring comparability across cycles.
- Inverse-variance weighting of horizons with penalties for horizon redundancy.
- HAC-style adjustments to reduce autocorrelation bias in return estimation.
Each method aims to prevent artificial inflation of expected-return values and to keep the estimator stable even in unusual macro states.
This produces a result that is not “optimistic”, not curve-fit, not dependent on chart tricks, and not sensitive to isolated historical anomalies.
5. What you get as a user
A single clean line:
Expected Annual Return (%)
This line reflects how the chosen asset historically performed after macro environments similar to today’s.
The color gradient and confidence indicator (n) show the density of comparable episodes in history.
This makes the output extremely simple to read:
- High, stable expectation: historically supportive macro environment.
- Low or negative expectation: historically weaker environments.
- Low confidence: the macro state is rare and historical comparisons are limited.
The tool therefore adds context, not signals.
It helps you understand the environment the asset is currently in, based on how markets behaved in similar conditions across US market history. Indicator

Recession Warning Model [BackQuant]Recession Warning Model
Overview
The Recession Warning Model (RWM) is a Pine Script® indicator designed to estimate the probability of an economic recession by integrating multiple macroeconomic, market sentiment, and labor market indicators. It combines over a dozen data series into a transparent, adaptive, and actionable tool for traders, portfolio managers, and researchers. The model provides customizable complexity levels, display modes, and data processing options to accommodate various analytical requirements while ensuring robustness through dynamic weighting and regime-aware adjustments.
Purpose
The RWM fulfills the need for a concise yet comprehensive tool to monitor recession risk. Unlike approaches relying on a single metric, such as yield-curve inversion, or extensive economic reports, it consolidates multiple data sources into a single probability output. The model identifies active indicators, their confidence levels, and the current economic regime, enabling users to anticipate downturns and adjust strategies accordingly.
Core Features
- Indicator Families : Incorporates 13 indicators across five categories: Yield, Labor, Sentiment, Production, and Financial Stress.
- Dynamic Weighting : Adjusts indicator weights based on recent predictive accuracy, constrained within user-defined boundaries.
- Leading and Coincident Split : Separates early-warning (leading) and confirmatory (coincident) signals, with adjustable weighting (default 60/40 mix).
- Economic Regime Sensitivity : Modulates output sensitivity based on market conditions (Expansion, Late-Cycle, Stress, Crisis), using a composite of VIX, yield-curve, financial conditions, and credit spreads.
- Display Options : Supports four modes—Probability (0-100%), Binary (four risk bins), Lead/Coincident, and Ensemble (blended probability).
- Confidence Intervals : Reflects model stability, widening during high volatility or conflicting signals.
- Alerts : Configurable thresholds (Watch, Caution, Warning, Alert) with persistence filters to minimize false signals.
- Data Export : Enables CSV output for probabilities, signals, and regimes, facilitating external analysis in Python or R.
Model Complexity Levels
Users can select from four tiers to balance simplicity and depth:
1. Essential : Focuses on three core indicators—yield-curve spread, jobless claims, and unemployment change—for minimalistic monitoring.
2. Standard : Expands to nine indicators, adding consumer confidence, PMI, VIX, S&P 500 trend, money supply vs. GDP, and the Sahm Rule.
3. Professional : Includes all 13 indicators, incorporating financial conditions, credit spreads, JOLTS vacancies, and wage growth.
4. Research : Unlocks all indicators plus experimental settings for advanced users.
Key Indicators
Below is a summary of the 13 indicators, their data sources, and economic significance:
- Yield-Curve Spread : Difference between 10-year and 3-month Treasury yields. Negative spreads signal banking sector stress.
- Jobless Claims : Four-week moving average of unemployment claims. Sustained increases indicate rising layoffs.
- Unemployment Change : Three-month change in unemployment rate. Sharp rises often precede recessions.
- Sahm Rule : Triggers when unemployment rises 0.5% above its 12-month low, a reliable recession indicator.
- Consumer Confidence : University of Michigan survey. Declines reflect household pessimism, impacting spending.
- PMI : Purchasing Managers’ Index. Values below 50 indicate manufacturing contraction.
- VIX : CBOE Volatility Index. Elevated levels suggest market anticipation of economic distress.
- S&P 500 Growth : Weekly moving average trend. Declines reduce wealth effects, curbing consumption.
- M2 + GDP Trend : Monitors money supply and real GDP. Simultaneous declines signal credit contraction.
- NFCI : Chicago Fed’s National Financial Conditions Index. Positive values indicate tighter conditions.
- Credit Spreads : Proxy for corporate bond spreads using 10-year vs. 2-year Treasury yields. Widening spreads reflect stress.
- JOLTS Vacancies : Job openings data. Significant drops precede hiring slowdowns.
- Wage Growth : Year-over-year change in average hourly earnings. Late-cycle spikes often signal economic overheating.
Data Processing
- Rate of Change (ROC) : Optionally applied to capture momentum in data series (default: 21-bar period).
- Z-Score Normalization : Standardizes indicators to a common scale (default: 252-bar lookback).
- Smoothing : Applies a short moving average to final signals (default: 5-bar period) to reduce noise.
- Binary Signals : Generated for each indicator (e.g., yield-curve inverted or PMI below 50) based on thresholds or Z-score deviations.
Probability Calculation
1. Each indicator’s binary signal is weighted according to user settings or dynamic performance.
2. Weights are normalized to sum to 100% across active indicators.
3. Leading and coincident signals are aggregated separately (if split mode is enabled) and combined using the specified mix.
4. The probability is adjusted by a regime multiplier, amplifying risk during Stress or Crisis regimes.
5. Optional smoothing ensures stable outputs.
Display and Visualization
- Probability Mode : Plots a continuous 0-100% recession probability with color gradients and confidence bands.
- Binary Mode : Categorizes risk into four levels (Minimal, Watch, Caution, Alert) for simplified dashboards.
- Lead/Coincident Mode : Displays leading and coincident probabilities separately to track signal divergence.
- Ensemble Mode : Averages traditional and split probabilities for a balanced view.
- Regime Background : Color-coded overlays (green for Expansion, orange for Late-Cycle, amber for Stress, red for Crisis).
- Analytics Table : Optional dashboard showing probability, confidence, regime, and top indicator statuses.
Practical Applications
- Asset Allocation : Adjust equity or bond exposures based on sustained probability increases.
- Risk Management : Hedge portfolios with VIX futures or options during regime shifts to Stress or Crisis.
- Sector Rotation : Shift toward defensive sectors when coincident signals rise above 50%.
- Trading Filters : Disable short-term strategies during high-risk regimes.
- Event Timing : Scale positions ahead of high-impact data releases when probability and VIX are elevated.
Configuration Guidelines
- Enable ROC and Z-score for consistent indicator comparison unless raw data is preferred.
- Use dynamic weighting with at least one economic cycle of data for optimal performance.
- Monitor stress composite scores above 80 alongside probabilities above 70 for critical risk signals.
- Adjust adaptation speed (default: 0.1) to 0.2 during Crisis regimes for faster indicator prioritization.
- Combine RWM with complementary tools (e.g., liquidity metrics) for intraday or short-term trading.
Limitations
- Macro indicators lag intraday market moves, making RWM better suited for strategic rather than tactical trading.
- Historical data availability may constrain dynamic weighting on shorter timeframes.
- Model accuracy depends on the quality and timeliness of economic data feeds.
Final Note
The Recession Warning Model provides a disciplined framework for monitoring economic downturn risks. By integrating diverse indicators with transparent weighting and regime-aware adjustments, it empowers users to make informed decisions in portfolio management, risk hedging, or macroeconomic research. Regular review of model outputs alongside market-specific tools ensures its effective application across varying market conditions. Indicator

BBS – Bond Breadth Signal"When bonds scream, breadth collapses, and fear spikes — BBS listens."
🧠 BBS – Bond Breadth Signal
A reversal timing tool built on macro conviction, not price noise.
The Bond Breadth Signal (BBS) was developed to identify major market inflection points by combining four key market stress indicators:
1) 10-Year Yield ROC – Measures sharp moves in the bond market
2) Z-Score of the 10Y – Captures statistical extremes
3) NSHF (Net Highs–Lows) – Signals internal market strength or weakness
4) TLT ROC + VIX – Confirmations of flight to safety and volatility-driven fear
When all conditions align, BBS marks either a For-Sure Buy or For-Sure Sell — these are rare, high-confidence signals designed to cut through noise and focus on true market dislocations.
🔧 Features:
-Background color and signal arrows on confirmation days
-Signals remain visually active for 3 days for added clarity
-Fully adjustable thresholds and alert toggles
-Plot panel for yield, TLT, NSHF, VIX, and Z-score visuals
This tool isn’t designed to fire every day. It’s meant to wait for those moments when the market truly bends — not just wiggles.
Best used on major indices (SPY, QQQ, IWM) to assess macro turning points. Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

US Recession IndicatorThe US Recession Indicator is designed to identify recessions as they happen, using two reputable indicators that have accurately foreseen all past recessions since 1969. Unlike the National Bureau of Economic Research (NBER) which determines recession dates after the fact, this indicator seeks to spot recessions in real-time. When both of these distinct metrics meet certain criteria, the chart's background becomes shaded, signifying a strong likelihood that the economy is in a recession. Furthermore, a built-in alert system keeps users updated without constant monitoring.
The first metric is the Smoothed Recession Probabilities developed by Marcelle Chauvet. It is based on a dynamic-factor markov-switching model that assesses four monthly coincident variables: non-farm payroll employment, the index of industrial production, real personal income excluding transfer payments and real manufacturing and trade sales. It offers a mathematical analysis of how recessions deviate from expansions. In essence, this index mirrors the probability of the prevailing true economic situation being a recession, grounded on the current GDP data.
The second metric is the Sahm Rule Recession Indicator developed by Claudia Sahm. It operates on the principle that changes in the unemployment rate can be used to identify the onset of a recession. According to this rule, if the three-month moving average of the unemployment rate rises by 0.5 percentage points or more above its lowest point from the preceding year, it flags a potential recession.
For this combined indicator, the thresholds are intentionally set lower than when each metric is used individually. Both metrics must simultaneously suggest a potential recession in order to send a signal. This stems from the realisation that neither metric is infallible and has, on occasion, sent false signals in the past. By requiring both to align, the likelihood of a false positive is reduced. However, it's crucial to understand that past performance does not guarantee future results, leaving the door open for potential false alerts which may not be confirmed by the NBER. Indicator

Indicator

Recession Warning Traffic LightThis is an indicator that uses 6 different metrics to determine the combined probability of a recession and compares the high probability warning periods against actual historical periods of recession.
GREEN tells us that the referenced recession indicators are not exhibiting any warning. Observe the long stretches of “all-green” in between recessionary periods in the chart above.
RED will show a full-on warning level for that particular recession indicator, signaling that monitoring of this sector is clearly showing a problem – which has in the past, reliably exhibited itself as a forewarning of recessions.
Adding green and red together can help determine a combined probability of recession.
IMPORTANT: Your chart should be on 1d and set to SPX , DJI ,or NDQ indices
Precious metals: This indicator calculates the relative prices of Gold & rhodium. Gold is a flight-to-quality asset. Rhodium is the rarest of precious industrial metals and prices spike when the economy is heating up. In front of a recession, the upper relative movement of rhodium precedes gold.
Stock markets: This indicator compares closing prices to growth rate curves of the SPX. This indication is the noisiest but tells us very well when the recession has ended. Stock market indices, which respond to “smart money” moving out of markets when the other indicators begin to warn of recession, or when markets become overheated and rise to historically unsustainable levels.
Yield curve: This indicator compares the 3m & 10y treasuries and detects yield curve inversions. Interest rates are controlled by the Federal Reserve and by the purchasers in the Federal Treasury auction markets, which together create the treasury yield curve. This inversion is the most reliable recession indicator. These happen during a flight to quality.
Federal Reserve: This indicator measures GDP and detects contraction which is technically a recession. This is usually one of the last indicators to enter a Warning state, and it could be 6 months delayed simply confirming what may have already been projected.
Money Supply. This indicator measures the M2 money supply, which typically grows about 1% per calendar quarter. When this shrinks, it's tapping the brakes on the economy. This can also lead to yield curve inversion. This is also a measure of inflation and its effects on the aggregate money supply (liquid capital) available for short-term economic activity, or which can be directed into the purchase of long-term, less liquid assets.
Leading Economic factors: There is a whole basket of leading economic indicators that, as collections, reflect overall growth or contraction of economic activity. These indicators include measures of level and growth in productivity, employment, housing, consumer confidence, industrial purchasing confidence, and much more. These indicators may or may not be detached from the broader economy, and often provide up to 6 months of foresight. For more information please visit www.conference-board.org
Actual Recession: Central Bank indicators are published by the Federal Reserve and reflect their own analysis of national and regional economic health, as well as their calculations of the likelihood of a recession. The Federal Reserve has a recession ticker which is used to plot periods of actual recessions on this indicator for comparison. Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

Indicator
