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.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.