Skip to content

Instantly share code, notes, and snippets.

@dharmatech
Last active January 27, 2024 22:28
Show Gist options
  • Star 34 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save dharmatech/c2dc1154167f3d1aed003aba7628a41e to your computer and use it in GitHub Desktop.
Save dharmatech/c2dc1154167f3d1aed003aba7628a41e to your computer and use it in GitHub Desktop.

Net Liquidity

Net Liquidity formula:

Net Liquidity = Federal Reserve Balance sheet - Treasury General Account - Reverse Repo

Twitter thread by Max Anderson:

https://twitter.com/maxjanderson/status/1546472693234470912

SPX Fair Value thread by Max Anderson:

https://twitter.com/maxjanderson/status/1576609692675362817

WALCL

WALCL data available at:

https://fred.stlouisfed.org/series/walcl

Updated Thursday at 4:30 PM Eastern.

Reverse Repo

Reverse Repo data available at:

https://www.newyorkfed.org/markets/desk-operations/reverse-repo

Updated daily at 1:15 PM Eastern.

TGA

TGA data available at:

https://fiscaldata.treasury.gov/datasets/daily-treasury-statement/operating-cash-balance

https://fsapps.fiscal.treasury.gov/dts/issues

Updated daily at 4:00 PM Eastern. Value is for the previous day.

TradingView - Net Liquidity

The following can be used to view Net Liquidity on TradingView:

WALCL-WTREGEN-RRPONTSYD

image

TradingView - SPX Fair Value

The following can be used to view SPX Fair Value on TradingView:

(FRED:WALCL-FRED:WTREGEN-FRED:RRPONTSYD)/1000/1000/1000/1.1-1625

image

TradingView Indicator - SPX Fair Value Bands

TradingView indicator for SPX Fair Value Bands:

https://www.tradingview.com/script/Q3uMZHHU-SPX-Fair-Value-Bands/

PowerShell Script net-liquidity.ps1

https://github.com/dharmatech/net-liquidity.ps1

Why use the script instead of the indicator?

The TGA value on TradingView comes from FRED:

https://fred.stlouisfed.org/series/WTREGEN

which is a weekly average.

The script retrieves the most recent TGA value directly from treasury.gov via API:

https://fiscaldata.treasury.gov/datasets/daily-treasury-statement/operating-cash-balance

How to manually check the reverse repo daily change

Go to:

https://www.newyorkfed.org/markets/desk-operations/reverse-repo

Click on this button:

Note the Accepted value of the two most recent entries:

In this case, RRP increased:

$2,158 - $2,146 = $12

How to manually check the TGA daily change

Go to:

https://fiscaldata.treasury.gov/datasets/daily-treasury-statement/operating-cash-balance

Change Rows Per Page to 10:

image

Note the two most recent values for Treasury General Account (TGA) Closing Balance:

image

In this case, the TGA dropped:

$343,699 - $370,897 = -$27,198

SPX Fair Value - will it work forever?

The SPX Fair Value starts to breakdown before Jan 2022. It's likely it will stop working at some point in the future.

Do not rely on it as a sole signal for your trading.

That said, the three components of Net Liquidity (WALCL, TGA, RRP) will always be something to keep an eye on.

Criticisms of Net Liquidity and its deriviative formulas (SPX Fair Value)

https://twitter.com/dampedspring/status/1604467327768018945

TGA - SSA - Benefits Payments

Significant dates for SSA - Benefits Payments:

  • 3rd
  • 2nd Wed
  • 3rd Wed
  • 4th Wed

The periodicity can be viewed here:

image

Thanks to John Comiskey who pointed out the pattern here:

https://twitter.com/Johncomiskey77/status/1626440181883494402

image

TGA - Periodicity

The TGA tends to experience a large withdrawal on the 1st of every month, largely due to:

  • HHS - Federal Supple Med Insr Trust Fund
  • HHS - Federal Hospital Insr Trust Fund

Every 3 months, there's a large withdrawal on the 15th due to:

  • Interest on Treasury Securities

image

Article - Market and Net Liquidity correlation

Article by John Comiskey on the correlation behind markets and Net Liquidity:

https://johncomiskey.substack.com/p/the-true-cause-behind-net-liquidity

TGA projection for Q1 and Q2 2023

https://johncomiskey.substack.com/p/projecting-the-debt-ceilings-impact

RRP end-of-month changes

RRP tends to increase at end-of-month and then decrease right after.

image

image

https://twitter.com/dharmatrade/status/1598140777280180224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment