MartinShkreIi

Recession Indicator

MartinShkreIi Zaktualizowano   
This script attempts to predict recessions four quarters ahead.

According to the New York Fed, "The yield curve—specifically, the spread between the interest rates on the ten-year Treasury
note and the three-month Treasury bill—is a valuable forecasting tool. It is simple to use
and significantly outperforms other financial and macroeconomic indicators in predicting
recessions two to six quarters ahead."

The paper offers Estimated Recession Probabilities Using the Yield Curve Spread:
Four Quarters Ahead

Recession Probability Value of Spread
(Percent) (Percentage Points)
5 1.21
10 0.76
15 0.46
20 0.22
25 0.02
30 -0.17
40 -0.50
50 -0.82
60 -1.13
70 -1.46
80 -1.85
90 -2.40

"Note: The yield curve spread is defined as the spread between the
interest rates on the ten-year Treasury note and the three-month
Treasury bill."

You can choose at which Recession Probability (percent) you want to display the signal (default value is 25%), as well as choose if you want to only display the signal at inversion (default) or at all times when the yield curve is inverted.

To use, just select your current timeframe from the menu.

Includes an option for repainting -- default value is true, meaning the script will repaint the current bar.

False = Not Repainting = Value for the current bar is not repainted, but all past values are offset by 1 bar.

True = Repainting = Value for the current bar is repainted, but all past values are correct and not offset by 1 bar.

In both cases, all of the historical values are correct, it is just a matter of whether you prefer the current bar to be realistically painted and the historical bars offset by 1, or the current bar to be repainted and the historical data to match their respective price bars.

As explained by TradingView,`f_security()` is for coders who want to offer their users a repainting/no-repainting version of the HTF data.
Informacje o Wersji:
Removed the timeframe input to simplify the script.
Informacje o Wersji:
Changed the size of the dots to small and added a zero line.

Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?