Bond Yield SpreadThe Bond Yield Spread Script is developed for forex traders, offering an automated tool to calculate the bond yield spread between two countries associated with the forex pair displayed on the chart.
Functionality:
The script starts by identifying the base and quote currencies of the current forex pair and aligns them with their corresponding national bond symbols based on user-selected maturity, with options ranging from 01Y to 30Y. It calculates the yield spread by subtracting the bond yield associated with the quote country from that of the base country, following the formula:
Yield Spread = Yield(Base Country) − Yield(Quote Country)
which is then displayed as a plot line on the chart.
This script relies solely on TradingView's internal yield symbols, with the following calculation:
"currency" => "first two letters" + maturity
And maturity, in this case, is the value that is configured in the indicator settings, for example:
"EUR" => "EU" + "02Y" will result in EU02Y -> which will be used in the formula, depending on the quote or base currency.
Application in Trading:
This indicator is invaluable for traders employing carry trading strategies or assessing currency strength based on traded interest rates as an indicator. A higher yield spread typically indicates a stronger currency, because the return obtained for holding the currency is higher.
Originality and Practicality:
This script is self-developed, aiming to fill the gap in automatic bond yield comparisons within the TradingView environment. It is particularly beneficial for traders focusing on macroeconomic factors affecting forex markets. Unlike other scripts, it integrates various bond maturities into one tool, enhancing its utility and application range.
Conclusion:
Designed for traders incorporating macroeconomics in their strategy, this script will be useful to calculate the bond yield differences automatically without having to enter a new formula for every new currency pair.
Compliance and Limitations:
The script complies with TradingView scripting standards, ensuring no lookahead bias and maintaining real-time data integrity. However, its utility depends on the comprehensive availability of bond yield data within TradingView. As not all countries issue bonds for each listed maturity, this may limit the script’s application for certain currency pairs or specific maturities.
Bondyields
Odd_DVEnds Dividend True Value💸 True Value = Close Price + Accumulated Dividends
◆ Using only the time displayed on screen of the chart, the script will calculate the True Value of the symbol. (Calculations start from first bar you can see to the last bar you can see.)
Why do you need the true value?
Anytime an asset pays a dividend the current market price doesn't reflect the actual value you would have received over time from holding said asset. Without this price information fairly comparing assets is difficult.
🗻 Selectable themed legend
🎨 Highly Customizable
⚠️ As of the first release moving multiple charts on the same layout using sync will not always update all charts. Its recommended to use the bottom toolbar to move times if using indicator on multiple charts. Check for updates to see if this has been resolved.
US Bond Yield Magma CurveBond Market is the most important to monitor while investing and making macroeconomic desicions.
Inverted bond yeld curve is when short term bond yelds are greater than long term ones and this is a signal of fear for an imminent recession and disaster like a vulcano's eruption
The indicatior is applied to US Bond market but you can try to other countries like EU, China and so on. The code is free.
No further word is more powerful than a clear image as following:
Let's enjoy in making yourself decisions
Bond Yields (China)With reference to "Bond Yields eXtreme" by danarm
The bond yields from China are combined for easy reference
Live Mini Terminal 5 : MSCI Emerging Countries Change DataThis script displays relative data changes occurring in the adjustable period and/or adaptive automatic period in MSCI Emerging Countries against U.S Dollar.
Concept and design were inspired by the data terminals used by commercial traders.
Period selection can be set in the menu.
This script uses the adaptive period algorithm used by Autonomous LSTM and Relativity scripts.
Or you can set the period manually from the menu.
For more information about adaptive period:
This script works only for 1 day (1D) and 1 week (1W) time frames.
The most efficient time frame is 1 week (1W) because of countries' different time-zones .
Features
Value changes on a percentage basis (%) .
10-year government bond yields of the countries are given in the information panel.
In the information panel, the percentage values of the 10-year interest rates of the countries according to the adaptive period or the standard adjustable period are given.
INSTRUMENTS
DXY : U.S Dollar Index
BRL : Brazilian Real
CNH : Off-Shore Chineese Yuan (RMB)
INR : Indian Rupee
IDR : Indonesian Rupiah
RUB : Russian Ruble
TRY : Turkish Lira
MXN : Mexican Peso
ZAR : South African Rand
TWD : Taiwan New Dollar
PLN : Polish Zloty
Info Panel
NOTE :
* In Mexico and Russia, 10-year bond yields were not taken into account as there was no correct provision.
If data added to the site, it will be added to the system and updated.
Info Panel List
US10Y : US Government Bonds 10 Year Yield (%) and percentage change over the specified period.
BR10Y : Brazil Government Bonds 10 Year Yield (%) and percentage change over the specified period.
CN10Y : China Government Bonds 10 Year Yield (%) and percentage change over the specified period.
IN10Y : India Government Bonds 10 Year Yield (%) and percentage change over the specified period.
ID10Y : Indonesia Government Bonds 10 Year Yield (%) and percentage change over the specified period.
NZ10Y : New Zealand Government Bonds 10 Year Yield (%) and percentage change over the specified period.
TR10Y : Turkey Government Bonds 10 Year Yield (%) and percentage change over the specified period.
SA10Y : South Africa Government Bonds 10 Year Yield (%) and percentage change over the specified period.
TW10Y :Taiwan Government Bonds 10 Year Yield (%) and percentage change over the specified period.
PL10Y :Poland Government Bonds 10 Year Yield (%) and percentage change over the specified period.
USAGE
The script can be used as an indicator by putting it under the chart as shown above.
It is necessary to enlarge to see clearly.
Since it is not often looked at,such use is the best method for healthy interpretation.
Regards.
Live Mini Terminal 4 : G10 Developed Countries Change DataThis script displays relative data changes occurring in the adjustable period and/or adaptive automatic period in G10 Developed Countries against U.S Dollar.
Concept and design were inspired by the data terminals used by commercial traders.
Period selection can be set in the menu.
This script uses the adaptive period algorithm used by Autonomous LSTM and Relativity scripts.
Or you can set the period manually from the menu.
For more information about adaptive period:
This script works only for 1 day (1D) and 1 week (1W) time frames.
The most efficient time frame is 1 week (1W) because of countries' different time-zones .
Features
Value changes on a percentage basis (%)
10-year government bond yields of the countries are given in the information panel.
In the information panel, the percentage values of the 10-year interest rates of the countries according to the adaptive period or the standard adjustable period are given.
INSTRUMENTS
DXY : U.S Dollar Index
JPY : Japanese Yen
EUR : Euro
GBP : British Pound
AUD : Australian Dollar
NZD : New Zealand Dollar
CAD : Canadian Dollar
CHF : Swiss Franc
NOK : Norwegian Krone
SEK : Swedish Krona
Info Panel
NOTES :
* Germany was chosen because it had the most dominant and decisive economy for the Euro Zone.
* Swiss interests are generally not considered as they are minus and close to 0.
Info Panel List
US10Y : US Government Bonds 10 Year Yield (%) and percentage change over the specified period.
JP10Y : Japan Government Bonds 10 Year Yield (%) and percentage change over the specified period.
DE10Y : German Government Bonds 10 Year Yield (%) and percentage change over the specified period.
GB10Y : UK Government Bonds 10 Year Yield (%) and percentage change over the specified period.
AU10Y : Australia Government Bonds 10 Year Yield (%) and percentage change over the specified period.
NZ10Y : New Zealand Government Bonds 10 Year Yield (%) and percentage change over the specified period.
CA10Y : Canadian Government Bonds 10 Year Yield (%) and percentage change over the specified period.
NO10Y : Norway Government Bonds 10 Year Yield (%) and percentage change over the specified period.
SE10Y : Sweden Government Bonds 10 Year Yield (%) and percentage change over the specified period.
USAGE
The script can be used as an indicator by putting it under the chart as shown above.
It is necessary to enlarge to see clearly.
Since it is not often looked at,
such use is the best method for healthy interpretation.
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 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.
10Y Bond Yield Spread (beta)10-Year Bond Yield Spread using Quandl data
See also:
- seekingalpha.com
- www.babypips.com
- www.forexfactory.com