OPEN-SOURCE SCRIPT
Financial Conditions Index

# Financial Conditions Index — Real Yields + Credit + Dollar + Vol
## What it does
This indicator condenses the four pillars of market financial conditions into a single, readable composite: **are conditions tight or loose right now versus their recent norm — and which factor is driving it?**
It takes four inputs that each tighten or loosen the screws on risk assets — the real yield, high-yield credit spreads, the dollar, and equity volatility — standardizes them onto a common scale, and combines them. A single number tells you the regime; a breakdown table tells you the cause.
## What it plots
The composite plots as **zero-centered columns**:
- **Red, above the band** — conditions TIGHTER than their rolling norm (a risk-off lean).
- **Green, below the band** — conditions LOOSER than normal (a risk-on lean).
- **Faint grey, inside the band** — neutral / near the norm.
Zero is the rolling-window average, so the indicator reads *relative tightness*, not an absolute level. The dotted lines mark the status band.
## The four components
Each is pulled from public data, z-scored over a rolling window, and sign-aligned so that **positive always means tighter**:
- **Real Yield** — the 10-year TIPS real yield (FRED: DFII10). Higher real rates = tighter.
- **Credit (HY)** — the high-yield option-adjusted spread (FRED: BAMLH0A0HYM2). Wider spreads = tighter.
- **Dollar** — the US Dollar Index (TVC: DXY). A stronger dollar = tighter global conditions.
- **Equity Vol** — the VIX (TVC: VIX). Higher vol = tighter.
The composite is an equal-weighted average of these by default, and the weights are inputs you can change.
## The table ("FIN CONDITIONS")
- **FCI** — the headline composite z-score and its status: TIGHT (risk-off), LOOSE (risk-on), or NEUTRAL.
- **Real Yield / Credit (HY) / Dollar / Equity Vol** — each component's own z-score and whether it is currently *tightening*, *easing*, or *neutral*.
This breakdown is the point of the tool. A one-line conditions index can only say "tight" or "loose"; this one shows you *why*. A reading driven by real yields and the dollar is a very different animal from one driven by credit spreads and volatility blowing out — the first is often a benign, rates-led tightening, the second is genuine market stress. Reading the components keeps you from mistaking one for the other.
## How to use it
1. **Read the composite as the regime.** Above the band = a tighter-than-normal backdrop that tends to pressure risk; below = a looser, more supportive one.
2. **Always check the breakdown.** When the composite flags tight, look at which components are carrying it. Rates/dollar tightness while credit and vol stay loose is a different signal than a broad-based tightening across all four.
3. **Watch for divergence within the components.** When one factor pulls hard against the others, that disagreement is information — it often marks transitions and tells you what the market is actually reacting to.
4. **Pair it with your chart.** Add it beneath any asset to gauge the macro backdrop your instrument is trading into.
## Settings
- **Z-Score Window** — rolling lookback for standardizing each component (default 252 ≈ one year). Longer windows (504/756) anchor to a broader norm and better capture persistent regimes, at the cost of responsiveness.
- **Status Band** — how far from zero (in z units) a reading must be to flag TIGHT/LOOSE rather than NEUTRAL (default 0.5).
- **Component Weights** — equal (1.0 each) by default; raise or lower any factor's influence without touching the code.
## Methodology and honest limitations
- **This is a transparent, equal-weight z-score composite — not a regression- or PCA-estimated index** like the Chicago Fed NFCI or the Goldman Sachs FCI. It's an honest "tight vs loose versus the recent norm" read built from public series, not an econometrically weighted institutional index. Treat the equal weighting as a sensible default, not an optimized one.
- **The rolling window has a tradeoff baked in.** A regime that stays tight for a long stretch slowly normalizes toward zero, because it becomes the new "normal." That is the nature of a rolling z-score; lengthen the window if you would rather it keep flagging a persistent regime.
- **It is asset- and timeframe-independent by construction.** Every component is pulled at its own daily resolution and standardized there, so the window is measured in the components' (business-day) bars — not your chart's. It reads the same whether you place it under a 24/7 asset or a regular-hours one; you never need to retune the window per symbol.
- **History is bounded** by the 10-year real-yield series (begins 2003) plus the window's warm-up period; earlier bars read n/a.
## Data
All series are pulled live via `request.security`: FRED DFII10 (10-year TIPS real yield), FRED BAMLH0A0HYM2 (high-yield OAS), TVC DXY (US Dollar Index), and TVC VIX (equity volatility). Nothing is hard-coded — the composite and every table value are computed from these public sources.
## Disclaimer
For educational and informational purposes only. This is not investment advice or a recommendation to buy or sell any asset. Markets involve risk; do your own research.
## What it does
This indicator condenses the four pillars of market financial conditions into a single, readable composite: **are conditions tight or loose right now versus their recent norm — and which factor is driving it?**
It takes four inputs that each tighten or loosen the screws on risk assets — the real yield, high-yield credit spreads, the dollar, and equity volatility — standardizes them onto a common scale, and combines them. A single number tells you the regime; a breakdown table tells you the cause.
## What it plots
The composite plots as **zero-centered columns**:
- **Red, above the band** — conditions TIGHTER than their rolling norm (a risk-off lean).
- **Green, below the band** — conditions LOOSER than normal (a risk-on lean).
- **Faint grey, inside the band** — neutral / near the norm.
Zero is the rolling-window average, so the indicator reads *relative tightness*, not an absolute level. The dotted lines mark the status band.
## The four components
Each is pulled from public data, z-scored over a rolling window, and sign-aligned so that **positive always means tighter**:
- **Real Yield** — the 10-year TIPS real yield (FRED: DFII10). Higher real rates = tighter.
- **Credit (HY)** — the high-yield option-adjusted spread (FRED: BAMLH0A0HYM2). Wider spreads = tighter.
- **Dollar** — the US Dollar Index (TVC: DXY). A stronger dollar = tighter global conditions.
- **Equity Vol** — the VIX (TVC: VIX). Higher vol = tighter.
The composite is an equal-weighted average of these by default, and the weights are inputs you can change.
## The table ("FIN CONDITIONS")
- **FCI** — the headline composite z-score and its status: TIGHT (risk-off), LOOSE (risk-on), or NEUTRAL.
- **Real Yield / Credit (HY) / Dollar / Equity Vol** — each component's own z-score and whether it is currently *tightening*, *easing*, or *neutral*.
This breakdown is the point of the tool. A one-line conditions index can only say "tight" or "loose"; this one shows you *why*. A reading driven by real yields and the dollar is a very different animal from one driven by credit spreads and volatility blowing out — the first is often a benign, rates-led tightening, the second is genuine market stress. Reading the components keeps you from mistaking one for the other.
## How to use it
1. **Read the composite as the regime.** Above the band = a tighter-than-normal backdrop that tends to pressure risk; below = a looser, more supportive one.
2. **Always check the breakdown.** When the composite flags tight, look at which components are carrying it. Rates/dollar tightness while credit and vol stay loose is a different signal than a broad-based tightening across all four.
3. **Watch for divergence within the components.** When one factor pulls hard against the others, that disagreement is information — it often marks transitions and tells you what the market is actually reacting to.
4. **Pair it with your chart.** Add it beneath any asset to gauge the macro backdrop your instrument is trading into.
## Settings
- **Z-Score Window** — rolling lookback for standardizing each component (default 252 ≈ one year). Longer windows (504/756) anchor to a broader norm and better capture persistent regimes, at the cost of responsiveness.
- **Status Band** — how far from zero (in z units) a reading must be to flag TIGHT/LOOSE rather than NEUTRAL (default 0.5).
- **Component Weights** — equal (1.0 each) by default; raise or lower any factor's influence without touching the code.
## Methodology and honest limitations
- **This is a transparent, equal-weight z-score composite — not a regression- or PCA-estimated index** like the Chicago Fed NFCI or the Goldman Sachs FCI. It's an honest "tight vs loose versus the recent norm" read built from public series, not an econometrically weighted institutional index. Treat the equal weighting as a sensible default, not an optimized one.
- **The rolling window has a tradeoff baked in.** A regime that stays tight for a long stretch slowly normalizes toward zero, because it becomes the new "normal." That is the nature of a rolling z-score; lengthen the window if you would rather it keep flagging a persistent regime.
- **It is asset- and timeframe-independent by construction.** Every component is pulled at its own daily resolution and standardized there, so the window is measured in the components' (business-day) bars — not your chart's. It reads the same whether you place it under a 24/7 asset or a regular-hours one; you never need to retune the window per symbol.
- **History is bounded** by the 10-year real-yield series (begins 2003) plus the window's warm-up period; earlier bars read n/a.
## Data
All series are pulled live via `request.security`: FRED DFII10 (10-year TIPS real yield), FRED BAMLH0A0HYM2 (high-yield OAS), TVC DXY (US Dollar Index), and TVC VIX (equity volatility). Nothing is hard-coded — the composite and every table value are computed from these public sources.
## Disclaimer
For educational and informational purposes only. This is not investment advice or a recommendation to buy or sell any asset. Markets involve risk; do your own research.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.