OPEN-SOURCE SCRIPT
RichmondHillCM - Liquidity Stress Index V 1.2

RichmondHillCM - Liquidity Stress Index V 1.2
The LSI tracks the spread between SOFR (Secured Overnight Financing Rate — the cost of borrowing cash overnight against Treasuries in the repo market) and IORB (Interest on Reserve Balances — the risk-free rate the Fed pays banks on reserves held at the Fed), expressed in basis points.
Why it matters
IORB acts as a soft floor for money-market rates: a bank has little incentive to lend cash below what it can earn risk-free at the Fed. So the position of SOFR relative to IORB is a direct read on how scarce cash is in the funding system.
LSI below 0 (aqua): SOFR trades under the IORB floor. Reserves are abundant, repo plumbing is easy, funding conditions are comfortable.
LSI above 0 (red): SOFR is bid above the floor. Cash is getting scarce, balance-sheet and repo capacity are starting to bind, and reserves are sliding from "abundant" toward "scarce."
Sustained positive prints are a classic early-warning signal of funding stress — the September 2019 repo blow-up being the textbook example. Watching this spread helps anticipate when the Fed's reserve backdrop is tightening enough to force a policy response (standing repo facility usage, balance-sheet adjustments, or an end to QT).
How to read it
Zero line = the IORB floor.
Dashed line = a configurable stress threshold (default 5 bps). When LSI breaks above it, the background shades red to flag an elevated-stress regime.
The further and longer LSI stays positive, the more acute the funding pressure.
Inputs
Smoothing (SMA length): 1 = raw daily spread; raise to filter day-to-day noise.
Stress threshold (bps): the level above which funding stress is flagged.
Notes
SOFR and IORB are sourced from FRED and published daily, with IORB stepping only on FOMC decisions — so on intraday charts the daily values hold flat. The daily timeframe is the honest resolution for this gauge. Each leg is requested separately and differenced in-script for robust alignment rather than relying on a spread symbol.
Original concept credit: @gstoyanov. Released under the Mozilla Public License 2.0.
The LSI tracks the spread between SOFR (Secured Overnight Financing Rate — the cost of borrowing cash overnight against Treasuries in the repo market) and IORB (Interest on Reserve Balances — the risk-free rate the Fed pays banks on reserves held at the Fed), expressed in basis points.
Why it matters
IORB acts as a soft floor for money-market rates: a bank has little incentive to lend cash below what it can earn risk-free at the Fed. So the position of SOFR relative to IORB is a direct read on how scarce cash is in the funding system.
LSI below 0 (aqua): SOFR trades under the IORB floor. Reserves are abundant, repo plumbing is easy, funding conditions are comfortable.
LSI above 0 (red): SOFR is bid above the floor. Cash is getting scarce, balance-sheet and repo capacity are starting to bind, and reserves are sliding from "abundant" toward "scarce."
Sustained positive prints are a classic early-warning signal of funding stress — the September 2019 repo blow-up being the textbook example. Watching this spread helps anticipate when the Fed's reserve backdrop is tightening enough to force a policy response (standing repo facility usage, balance-sheet adjustments, or an end to QT).
How to read it
Zero line = the IORB floor.
Dashed line = a configurable stress threshold (default 5 bps). When LSI breaks above it, the background shades red to flag an elevated-stress regime.
The further and longer LSI stays positive, the more acute the funding pressure.
Inputs
Smoothing (SMA length): 1 = raw daily spread; raise to filter day-to-day noise.
Stress threshold (bps): the level above which funding stress is flagged.
Notes
SOFR and IORB are sourced from FRED and published daily, with IORB stepping only on FOMC decisions — so on intraday charts the daily values hold flat. The daily timeframe is the honest resolution for this gauge. Each leg is requested separately and differenced in-script for robust alignment rather than relying on a spread symbol.
Original concept credit: @gstoyanov. Released under the Mozilla Public License 2.0.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.