This is a strategy using an index's (SPX, NDX, RUT) Fair Value derived from Net Liquidity.
Net Liquidity function is simply: Fed Balance Sheet - Treasury General Account - Reverse Repo Balance
Formula for calculating the fair value of and Index using Net Liquidity looks like this: net_liquidity/1000000000/scalar - subtractor
The Index Fair Value is then subtracted from the Index value which creates an oscillating diff value.
When diff is greater than the overbought threshold, Index is considered overbought and we go short/sell.
When diff is less than the oversold signal, Index is considered oversold and we cover/buy.
The net liquidity values I calculate outside of TradingView. If you'd like the strategy to work for future dates, you'll need to update the reference to my NetLiquidityLibrary, which I update daily.
Parameters:
Index: SPX, NDX, RUT
Strategy: Short Only, Long Only, Long/Short
Inverse (bool): check if using an inverse ETF to go long instead of short.
Scalar (float)
Subtractor (int)
Overbought Threshold (int)
Oversold Threshold (int)
Start After Date: When the strategy should start trading
Close Date: Day to close open trades. I just like it to get complete results rather than the strategy ending with open trades.
Optimal Parameters:
I've optimized the parameters for each index using the python backtesting library and they are as follows =>
SPX Scalar: 1.1 Subtractor: 1425 OB Threshold: 0 OS Threshold: -175
NDX Scalar: 0.5 Subtractor: 250 OB Threshold: 0 OS Threshold: -25
RUT Scalar: 3.2 Subtractor: 50 OB Threshold: 25 OS Threshold: -25
Hello. The strategy looks very good. Repaint this strategy? Thanks :)
dagekko
⋅
How do we update the library ourselves? It hasn't been updated since 1/23/2023
wholemealjoelmeal
⋅
Hey. Why does the strategy not print anything before June 2021?
glashrod_trading
⋅
repaint
nurullahsucu84675
⋅
Its only working Day and higher, is it possible to have small timeframes such as 15min or 1hr, Thank you
marciojbmathias
⋅
Amazing work. How to optmize to UPRO/SOXL/TECL?
sjruss
⋅
HI, Caleb. Well done on this - and thanks! I am a not close to a TZ power user and wonder how to get the excellent "Net Liquidity Stats" info box into one of my chart views (also using your Bridge Bands script). I can only find your "Net Liq" in the public scripts, which ends 9Nov22. Is there a way to get the cool info box from "Net Liquidity Stats"?