USTS Yield Curve InversionsVisualization of the inverted portions of the USTS yield curve.
Red means that portion of the curve is inverted.
If 1M is red, it means it's less than RRP%.
Treasurybonds
US Treasury Constant Maturity SpreadsPlots and tabulates constant maturity treasury yield spreads
// colours per curve type for the plots and table headers
C_30Y_20Y=color.orange
C_10Y_5Y=color.purple
C_10Y_2Y=color.blue
C_7Y_5Y=color.gray
C_5Y_2Y=color.red
C_3Y_2Y=color.yellow
C_10Y_1Y=color.olive
10-2 Year Treasury Yield Spread by zdmreLong-term bond yield reflects inflation. Short-term bond yields are tools used to predict Fed's interest rate policy. Spread between the two represents four cycles of an economy.
1. Growth
Short-term yield rises as interest rates rise. Spread narrows.
2. Slow growth
Central bank raises interest rates faster and short-term yield exceeds long-term yield. Spread turns negative.
3. Recession
High interest rates lead to more defaults. Inflation caps consumption. Central bank lowers interest rate to stimulate the economy and short-term yield falls. Spread widens.
4. Recovery
Central bank continues easing. Spread remains wide and yield curve remains steep.
0 = Recession Risk
2.6 = Recovery Plan
DYOR
S&P 500 Earnings Yield SpreadThis indicator compares the attractiveness of equities relative to the risk-free rate of return, by comparing the earnings yields of S&P 500 companies to the 10Y treasury yields. "Earnings yield" refers to the net income attributable to shareholders divided by the stock's price - effectively the inverse of the PE ratio. The tangible meaning of this metric is "the annual income received by (attributable to) shareholders as a percent of the price paid to receive said income." Therefore, earnings yield is comparable to bond yields, which are "the annual income received by bond holders as a percent of the price paid to receive said income."
This indicator subtracts the earnings yield of S&P 500 companies from the current 10-year treasury bond yield, creating a "spread" between the yields that determines whether equities are currently an attractive investment relative to bonds. That is, if the S&P 500 earnings yield exceeds the 10Y treasury yield, then equity investors are receiving more attributable income per dollar paid than bondholders, which could be an indication that equities are an attractive purchase relative to the risk-free rate. The same applies vice-versa; if the 10Y treasury yield exceeds that of the S&P 500 earnings yield, then equities may not be an attractive investment relative to the risk-free rate.
Since data on S&P 500 companies' earnings yields are pulled on a monthly basis, this indicator should be used on a monthly timeframe or longer. Historical data has shown that the critical zones for the indicator are at -4% and +3%, i.e. when equities are trading with a 4% greater yield than 10Y T-bonds and when equities are trading with a 3% lower yield than 10Y T-bonds, respectively. In the "Oversold" case (-4%), equities are trading at a steep discount to the risk-free rate and has often represented a strong buying opportunity. In the "Overbought" case (+3%), equities are trading at a premium to the risk-free rate, which may be an indication that caution should be exercised within the stock market. When the indicator first crosses into "Oversold" territory, this has historically been near a the bottom of a crash on the S&P 500. When the indicator first crosses into the "Overbought" territory, this has often precipitated a correction of 15% on the S&P 500.
Some notable "misses," crashes that this indicator missed, include the 1973 stock market crash and the 2008 global recession. However, both of these cases were largely precipitated by unprecedented economic events, as opposed to stocks simply being "Overbought" relative to treasury yields. Nonetheless, this indicator should form only a small portion of your fundamental analysis, as there are many macroeconomic factors that could lead to major corrections besides the impact of treasury yields. Furthermore, it should also be noted that since markets are "forward looking," future earnings growth or interest rate hikes may become "priced into" both the stock and bond markets, affecting the outputs of this indicator. However, since both the stock and bond markets should account for these factors simultaneously, the impact has historically been minimized.
I hope you find this indicator to be beneficial to your strategies. Stay safe, and happy trading.
Nifty yield curveREAL-CASE SCENARIO:-
IN10Y(10yr yield t- bill) are govt. backed bonds provide basic interest or coupon rate. If the coupon rate falls below (yield =(1/price) the coupon rates of 3 month bond IN03MY(3m yield t- bill), investors are pessimistic about future growth of the economy.
This pessimistic behavior can be seen in the graph when change in background color.
While optimistic behavior scenario when investors no longer interested in long-term bonds and dumping 10Y T-bills causing yields to raise above short term 3m T-bill .
Yield CurveThis script tracks the U.S. 2Yr/10Yr Spread and uses inversions of the curve to predict recessions. Whenever a red arrow appear on the yield curve, expect a recession to begin within the next 2 years. Use this signal to either exit the market, or hedge current positions. Whenever a green arrow appears on the yield curve, expect a recession to have nearly ended. Use this signal to enter the market, or cut current hedges against a recession. (I may update this script in the future to better incorporate the effective federal funds rate into exit points, but for now I am satisfied with the results).
Turkey Yield Curve SpreadYield spreads are used to see investors' perception of future risk and predict a recession. The spread is the value obtained by subtracting the near term bond from the distant one. This indicator plots this value historically. I used 3-year and 10-year Turkey treasury bond yields instead of 2-year and 10-year Turkey treasury bond yields due to lack of historical data on Tradingview.
Stability Max OverloadStability Max Overload was created in another script I have been working on found below.
I have broken the code down to only display the Stability features.
What this is:
I was trying to find a way that could in some form display the Stability or Instability of the US Treasuries Bond Market. To try and help me do that, I came up with 3 values.
*Stability
*Stability Overload
*Stability Max Overload.
I started with STABILITY. This value is generated based off the number of side by side inversions in the Bond Market. I wanted this value to range between 0 and 1 while 1 equaling all Bonds inverted and 0 equaling no Bonds inverted and any number of inversions in between would equal a percentage value based off the actual number.
STABILITY OVERLOAD was created based off the average of each inversion.
STABILITY MAX OVERLOAD was then created based off the total of each inversion.
The most stable Yield Curve would have no inversions and therefore would generate a 0 for Stability, Stability Overload and Stability Max Overload. The more inversions the Yield Curve has the higher in value Stability itself would have as Stability is weighted more per inversion. With each inversion, data is taken based off the amount with which the Yields are inverted.
This display shows where we currently stand since Dec 2018. It's a telling story so say the least. I do plan on continuing the mentioned above script but again wanted to release a standalone of the data generated.
Hope you enjoy,
OpptionsOnly
Yield Curve Version 2.55.2Welcome to Yield Curve Version 2.55.2
US10Y-US02Y
* Please read description to help understand the information displayed.
* NOTE - This script requires 1 real time update before accurate information is displayed, therefore WILL NOT display the correct information if the Bond Market is Closed over the Weekend.
* NOTE - When values are changed Via Input setting they do take a bit to display based off all the information that is required to display this script.
**FEATURES**
* Input Features let you view the information the way YOU like via Input Settings
* Displays Current Version Title - Toggleable On/Off via Input Settings - Default On
* Plots the Yield Curve of the Bonds listed (Middle Green and Red Line)
* Displays the Spread for each Bond (Top Green and Red Labels) - Toggleable On/Off via Input Settings - Change Size via Input Settings - Default On
* Displays the current Yield for each Bond (Bottom Green and Red Labels) - Toggleable On/Off via Input Settings - Change Size via Input Settings - Default On - Large Size
* Plots the Average of the Entire Yield Curve (BLUE Line within the Yield Curve) - Toggleable On/Off via Input Settings - Default On
* Displays messages based off Yield Inversions (Orange Text) - Toggleable On/Off via Input Settings - Default On if Applicable
* Displays 2 10 Inversion Warning Message (Orange Text) - Toggleable On/Off via Input Settings - Default On if Applicable
* Plots Column Data at the Bottom that tries to help determine the Stability of the Yield Curve (More information Below about Stability) - Toggleable On/Off via Input Settings - Default On
* Plots the 7,20 and 100 SMA of the STABILITY MAX OVERLOAD (More information Below about Stability Max Overload) - Toggleable On/Off via Input Settings - Default On for 100 SMA , 20 SMA and 7 SMA
* Ability to Display Indicator Name and Value via Input Settings - Default On - Displays Stability Max Overload SMA Labels. Toggleable to Non SMA Values. See Below.
**Bottom Columns are all about STABILITY**
* I have tried to come up with an algorithm that helps understand the Stability of the Yield Curve. There are 3 Sections to the Bottom Columns.
* Section 1 - STABILITY (Displayed as the lightest Green or Red Column) Values range from 0 to 1 where 1 equals the MOST UNSTABLE Curve and 0 equals the MOST STABLE Curve
* Section 2 - STABILITY OVERLOAD (Displayed just above the Stability Column a shade darker Green or Red Column)
* Section 3 - STABILITY MAX OVERLOAD (Displayed just above the Stability Overload Column a shade darker Green or Red Column)
What this section tries to do is help understand the Stability of the Curve based on the inversions data. Lower values represent a MORE STABLE curve. If the Yield Curve currently has 0 Inversions all Stability factors should equal 0 and therefore not plot any lower columns. As the Yield Curve becomes more inverted each section represents a value based off that data. GREEN columns represent a MORE Stable Curve from the resolution prior and vise versa.
(S SO SMO)
STABILITY - tests the current Stability of the Curve itself again ranging from 0 to 1 where 0 equals the MOST Stable Curve and 1 equals the MOST Unstable Curve.
STABILIY OVERLOAD - adds a value to STABLITY based off STABILITY itself.
STABILITY MAX OVERLOAD - adds the Entire value to STABILITY derived again from STABILITY.
This section also allows us to see the 7,20 and 100 SMA of the STABILITY MAX OVERLOAD which should always be the GREATEST of ALL STABILTY VALUES.
*Indicator Labels How to use*
Indicator Labels by default are turned On and will display Name and Value Labels for Stability Max Overload SMA values. To switch to (S SO SMO) Labels, toggle "Indicator Labels / SMO SMA Labels", via Input Settings. This button allows you to switch between the two Indicator Label Display options. You must have "Indicators" turned On to view the Labels and therefore is turned On by Default. To turn all of the Indicator Labels Off, simply disable "Indicators" via Input Settings.
Remember - All information displayed can be tuned On or Off besides the Curve itself. There are also other Features Accessible Via the Input Settings.
I will continue to update this script as there is more information I would like to gather and display!
I hope you enjoy,
OpptionsOnly
Yield Curve Version 2.41Welcome to Yield Curve Version 2.41
* Please read description to help understand the information displayed.
* NOTE - This script requires 1 real time update before accurate information is displayed, therefore WILL NOT display the correct information if the Bond Market is Closed over the Weekend.
* NOTE - When values are changed Via Input setting they do take a bit to display based off all the information that is required to display this script.
**FEATURES**
* Input Features let you view the information the way YOU like via Input Settings
* Displays Current Version Title - Toggleable On/Off via Input Settings - Default On
* Plots the Yield Curve of the Bonds listed (Middle Green and Red Line)
* Displays the Spread for each Bond (Top Green and Red Labels) - Toggleable On/Off via Input Settings - Change Size via Input Settings - Default On
* Displays the current Yield for each Bond (Bottom Green and Red Labels) - Toggleable On/Off via Input Settings - Change Size via Input Settings - Default On - Large Size
* Plots the Average of the Entire Yield Curve (BLUE Line within the Yield Curve) - Toggleable On/Off via Input Settings - Default On
* Displays messages based off Yield Inversions (Orange Text) - Toggleable On/Off via Input Settings - Default On if Applicable
* Displays 2 10 Inversion Warning Message (Orange Text) - Toggleable On/Off via Input Settings - Default On if Applicable
* Plots Column Data at the Bottom that tries to help determine the Stability of the Yield Curve (More information Below about Stability) - Toggleable On/Off via Input Settings - Default On
* Plots the 7,20 and 100 SMA of the STABILITY MAX OVERLOAD (More information Below about Stability Max Overload) - Toggleable On/Off via Input Settings - Default On for 100SMA Off for 7 and 20 SMA
**Bottom Columns are all about STABILITY**
* I have tried to come up with an algorithm that helps understand the Stability of the Yield Curve. There are 3 Sections to the Bottom Columns.
* Section 1 - STABILITY (Displayed as the lightest Green or Red Column) Values range from 0 to 1 where 1 equals the MOST UNSTABLE Curve and 0 equals the MOST STABLE Curve
* Section 2 - STABILITY OVERLOAD (Displayed just above the Stability Column a shade darker Green or Red Column)
* Section 3 - STABILITY MAX OVERLOAD (Displayed just above the Stability Overload Column a shade darker Green or Red Column)
What this section tries to do is help understand the Stability of the Curve based on the inversions data. Lower values represent a MORE STABLE curve. If the Yield Curve currently has 0 Inversions all Stability factors should equal 0 and therefore not plot any lower columns. As the Yield Curve becomes more inverted each section represents a value based off that data. GREEN columns represent a MORE Stable Curve from the resolution prior and vise versa.
STABILITY tests the current Stability of the Curve itself again ranging from 0 to 1 where 0 equals the MOST Stable Curve and 1 equals the MOST Unstable Curve.
STABILIY OVERLOAD adds a value to STABLITY based off STABILITY itself.
STABILITY MAX OVERLOAD adds the Entire value to STABILITY derived again from STABILITY.
This section also allows us to see the 7,20 and 100 SMA of the STABILITY MAX OVERLOAD which should always be the GREATEST of ALL STABILTY COLUMNS.
Remember - All information displayed can be tuned On or Off besides the Curve itself. There are also other Features Accessible Via the Input Settings.
I will continue to update this script as there is more information I would like to gather and display!
I hope you enjoy,
OpptionsOnly
Yield CurveThanks to @gwaaf for his post on how to draw the curve!!
* Charts and displays the current Treasury Yield Curve and the Spread.
* Colors Lines and Labels based off price.
* Dynamically adjusts the position of the labels as prices change.
Top Labels:
Top labels display the Spread between listed bonds in regards to Longer term Bonds minus Shorter term Bonds. This label points to the mid point on the curve. If the Spread is greater than the previous Spread at the current resolution, the label and line color on the curve turn Green. If the Spread is less than the previous Spread at the current resolution, the line on the curve and label will turn Red.
Bottom Labels:
Bottom labels display the current for each bond listed. This label points to the (POINT) in the curve that corresponds with the current price of the Bond. The label will turn Green if the current price is higher than the previous price at the current resolution and vise versa!
Known issues:
There seems to be a color swapping issues when the changed is very small. I believe I can fix this with rounding the numbers and will leave that for another time.
US Treasury Yield CurveThis indicator plots the US treasury yield curve as maturity (x-axis/time) vs yield (y-axis/price)