MartinShkreIi

Recession Indicator

MartinShkreIi アップデート済   
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.
リリースノート:
Removed the timeframe input to simplify the script.
リリースノート:
Changed the size of the dots to small and added a zero line.

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?