MartinShkreIi

Recession Indicator

MartinShkreIi Aggiornato   
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.
Note di rilascio:
Removed the timeframe input to simplify the script.
Note di rilascio:
Changed the size of the dots to small and added a zero line.

Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?