TraderLeibniz

SPX Fair Value Bands V2

TraderLeibniz 已更新   
An updated version of the SPX Fair Value Bands script from dharmatech and based on the net liquidity concept by MaxJAnderson.

Now with full customization of parameters through the settings (Dialog Box) and allowing the options to the use of
1) Standard Bands based on Offsets of the Fair Value
2) Bollinger Bands
3) Keltner Channels
to better capture buy/sell areas rather than relying on noisy unreliably (and unevenly) updated data from the Treasury/Fed.

==================================

Net Liquidity's importance in the new post-COVID QE to QT regime as described MaxJAnderson

----------------

" In past cycles, size of Fed's balance sheet changed a lot, while TGA and RRP changed relatively little. So size of balance sheet roughly equated Net Liquidity.

(The Treasury General Account) TGA and (Reverse Repo) RRP didn't matter. They were rounding errors by comparison.
But starting in 2020, relative changes in TGA and RRP have been THREE TIMES LARGER than the change in size of the Fed's balance sheet. As result, changes in TGA and RRP have taken over as the primary drivers Net Liquidity.

This is new, and changes the game significantly. Again - the size of the Fed's balance sheet doesn't matter.
What matters is the portion of it that's available to circulate in the economy (Net Liquidity).

And ever since 2020, the Treasury and Reverse Repo have become what controls that. Not the size of Fed's balance sheet.

----------------

The idea that follows is simple,short when $SPX reaches extreme levels of overvaluation, and close out when SPX returns to being undervalued. Here's the formulas I currently use to determine fair value:

Fair Value = (Fed Bal Sheet - TGA - RRP)/1.1 - 1625
And here's the trading rules I currently follow:

Short when diff of $SPX - Fair Value > 350
Close when diff of $SPX - Fair Value < 150

When one of these rules is triggered upon market close on a given day, trades are entered at open of the following day "
版本注释:
Fixed Two Bugs:
  • "netliq_expr" user input string for the "Net Liquidity Expression" configuration was not being used in "request.security(...)" statements.
    "reg_offset" "input.float(...)" title='Regression Slope' was mislabeled.

Improvements:
  • User Configuration Organization with "groups"
  • Multi-timeframe Configurability of the bands under the "Band Timeframe Settings" grouping.
版本注释:
Adding band colour controls for each type: Standard (Std) (as defined by Max J. Anderson), Bollinger Band (BB), and Keltner Channel (KC).

The colour can also be configured based on the close of the current bar (or another configurable TradingView allowable bar source arg---including another indicator). The four colours are chosen as follows:
  • if close BELOW Band
  • else close ABOVE Band
  • else close BELOW Fair Value (FV)
  • else close ABOVE Fair Value (FV)
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?