Multi Yield CurveAn inversion between the 2 year and 10 year US treasury yield generally means a recession within 2 years. But the yield curve has more to it than that. This script helps analysis of the current and past yield curve (not limited to US treasury) and is very configurable.
"A yield curve is a line that plots yields (interest rates) of bonds having equal credit quality but differing maturity dates. The slope of the yield curve gives an idea of future interest rate changes and economic activity." (Investopedia)
When the slope is upward (longer maturity bonds have a higher interest rate than shorter maturity bonds), it generally means the economy is doing well and is expanding. When the slope is downward it generally means that there is more downside risk in the future.
The more inverted the curve is, and the more the inversion moves to the front, the more market participants are hedging against downside risk in the future.
The script draws up to 4 moments of a yield curve, which makes it easy to compare the current yield curve with past yield curves. It also draws lines in red when that part of the curve is inverted.
The script draws the lines with proper length between maturity (which most scripts do not) in order to make it more representative of the real maturity duration. The width cannot be scaled because TradingView does not allow drawing based on pixels.
This script is the only free script at time of writing with proper lengths, showing multiple yield curves, and being able to show yield curves other than the US treasury.
█ CONFIGURATION
(The following can be configured by clicking "Settings" when the script is added to a chart)
By default the script is configured to show the US treasury (government bond) yields of all maturities, but it can be configured for any yield curve.
A ticker represents yield data for a specific maturity of a bond.
To configure different tickers, go to the "TICKERS" section. Tickers in this section must be ordered from low maturity to high maturity.
• Enable: draw the ticker on the chart.
• Ticker: ticker symbol on TradingView to fetch data for.
• Months: amount of months of bond maturity the ticker represents.
To configure general settings, go to the "GENERAL" section.
• Period: used for calculating how far back to look for data for past yield curve lines. See "Times back" further in this description for more info.
• Min spacing: minimum amount of spacing between labels. Depending on the size of the screen, value labels can overlap. This setting sets how much empty space there must be between labels.
• Value format: how the value at that part of the line should be written on the label. For example, 0.000 means the value will have 3 digits precision.
To configure line settings per yield curve, each has its own "LINE" section with the line number after it.
• Enable: whether to enable drawing of this line.
• Times back: how many times period to go back in time. When period is D, and times value is 2, the line will be of data from 2 days ago.
• Color: color of the line when not inverted.
• Style: style of the line. Possible values: sol, dsh, dot
• Inversion color: color of the line when the curve inverses between the two maturities at that part of the curve.
• Thickness: thickness of the line in pixels.
• Labels: whether to draw value labels above the line. By default, this is only enabled for the first line.
• Label text color: text color of value label.
• Label background color: background color of value label.
To configure the durations axis at the bottom of the chart, go to the "DURATIONS" section.
• Durations: whether to show maturity term duration labels below the chart.
• Offset: amount to offset durations label to be below chart.
█ MISC
Script originally inspired by the US Treasury Yield Curve script by @longfiat but has been completely rewritten and changed.
Governmentbondyields
Government Bonds Yield Spread (Multiple Selection)This indicator shows Government bonds yield spread which is the difference between two government bonds yield.
Country codes and terms(year) are parameterized as listed below so you can combine & compare multiple government bonds as per your needs.
Country:
U.S.
Japan
Australia
New Zealand
U.K.
Germany
Canada
Switzerland
Terms:
2 year
5 year
10 year
20 year
30 year
Sample chart
AUDNZD Daily Chart
As RBNZ’s rate hike has been expected, the yield spread between Australia’s bond and New Zealand’s bond has been increasing with a downtrend of AUDNZD
———————
国債利回りの金利差を表示するインジケーターです。
国と国債の期間を変数化しているので、必要に応じて複数の国の異なる期間の国債利回りの金利差を表示することができます。
国:
アメリカ
日本
オーストラリア
ニュージーランド
イギリス
ドイツ
カナダ
スイス
期間:
2年債
5年債
10年債
20年債
30年債
サンプルチャート
AUDNZDの日足チャートです。
RBNZによる利上げ期待が高まる中、両国の金利差が広がり、下降トレンドを形成しています。
U.S. 10 Year Treasury Yield Changes MonitorJapanese below / 日本語説明は下記
Hello traders,
I guess not a few traders have difficulties these days in market due to US government bond’s yield fluctuation.
Yesterday dollars strong, today dollars weak… so what’s next?
In order to catch up US treasury yield situation, I have developed this indicator which shows changes in 10 year treasury yield.
It calculate changes from last candle stick in percentage based on timeframe you open.
If changes(%) cross over/under upper band/lower band(can be parameterized), signal will be shown. (Alert can be set, too)
The following chart is AUDUSD 4 hour chart.
It’s been sideways since begining of Mar.
Looking at this, some tendencies can be observed.
If 10 year treasury yield changes more than 2%(upper band/lower band), rates tend to turn the way most probably due to US dollars’ strong buying/selling pressure.
This trend might go on until the yield situation gets stable and what we can do is to closely monitor this yield changes and try
not to enter a trade within sideways until the market signal clear directional movement.
Hope this helps.
—————
昨今の米国長期金利の動向に左右される相場の状況を踏まえ、米国10年国債利回りの変動率を表示するインジケーターを作成しました。
表示しているタイムフレームに応じて、最後のローソク足からの変化率をオシレーターとして表示します。(必然的に分足等の短い時間軸では意味をなさないと思いますので最低でも1時間、基本は4時間足以上で見るのが適していると思います。)
変動率がアッパーバンド、ロワーバンド(設定可能)を超えた時にシグナル、アラートを設定することが可能です。
以下のチャートは豪ドル/ドル(AUD/USD)の4時間足です。
3月月初からはレンジであることが見て取れると思います。
3月以降の利回り変化率とレートの兼ね合いを見ると、変動率がプラスマイナス2%(上下バンドのライン)を超える変動があると、ドル買い方向、ドル安方向に転換していくこと傾向を見ることができます。
長期金利の動向が安定するまではこうしたレンジの状態が続く可能性もあり、明確な方向性が出るまで手を出さないというのも手かもしれません。