Yield Curve SpaghettiDisplays the difference in yield between multiple bond pairs for a given country.
Currently supports US, DE, and GB bonds
Bonds
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.
Treasury Yields Heatmap [By MUQWISHI]▋ INTRODUCTION :
The “Treasury Yields Heatmap” generates a dynamic heat map table, showing treasury yield bond values corresponding with dates. In the last column, it presents the status of the yield curve, discerning whether it’s in a normal, flat, or inverted configuration, which determined by using Pearson's linear regression coefficient. This tool is built to offer traders essential insights for effectively tracking bond values and monitoring yield curve status, featuring the flexibility to input a starting period, timeframe, and select from a range of major countries' bond data.
_______________________
▋ OVERVIEW:
______________________
▋ YIELD CURVE:
It is determined through Pearson's linear regression coefficient and considered…
R ≥ 0.7 → Normal
0.7 > R ≥ 0.35 → Slight Normal
0.35 > R > -0.35 → Flat
-0.35 ≥ R > -0.7 → Slight Inverted
-0.7 ≥ R → Inverted
_______________________
▋ INDICATOR SETTINGS:
#Section One: Table Setting
#Section Two: Technical Setting
(1) Country: Select country’s treasury yields data
(2) Timeframe: Time interval.
(3) Fetch By:
(3A) Date: Retrieve data by beginning of date.
(3B) Period: Retrieve data by specifying the number of time series back.
Enjoy. Please let me know if you have any questions.
Thank you.
CE - 42MACRO Fixed Income and Macro This is Part 2 of 2 from the 42MACRO Recreation Series
However, there will be a bonus Indicator coming soon!
The CE - 42MACRO Fixed Income and Macro Table is a next level Macroeconomic and market analysis indicator.
It aims to provide a probabilistic insight into the market realized GRID Macro regimes,
track a multiplex of important Assets, Indices, Bonds and ETF's to derive extra market insights by showing the most important aggregates and their performance over multiple timeframes... and what that might mean for the whole market direction.
For traders and especially investors, the unique functionalities will be of high value.
Quick guide on how to use it:
docs.google.com
WARNING
By the nature of the macro regimes, the outcomes are more accurate over longer Chart Timeframes (Week to Months).
However, it is also a valuable tool to form an advanced,
market realized, short to medium term bias.
NOTE
This Indicator is intended to be used alongside the 1nd part "CE - 42MACRO Equity Factor"
for a more wholistic approach and higher accuracy.
Methodology:
The Equity Factor Table tracks specifically chosen Assets to identify their performance and add the combined performances together to visualize 42MACRO's GRID Equity Model.
For this it uses the below Assets:
Convertibles ( AMEX:CWB )
Leveraged Loans ( AMEX:BKLN )
High Yield Credit ( AMEX:HYG )
Preferreds ( NASDAQ:PFF )
Emerging Market US$ Bonds ( NASDAQ:EMB )
Long Bond ( NASDAQ:TLT )
5-10yr Treasurys ( NASDAQ:IEF )
5-10yr TIPS ( AMEX:TIP )
0-5yr TIPS ( AMEX:STIP )
EM Local Currency Bonds ( AMEX:EMLC )
BDCs ( AMEX:BIZD )
Barclays Agg ( AMEX:AGG )
Investment Grade Credit ( AMEX:LQD )
MBS ( NASDAQ:MBB )
1-3yr Treasurys ( NASDAQ:SHY )
Bitcoin ( AMEX:BITO )
Industrial Metals ( AMEX:DBB )
Commodities ( AMEX:DBC )
Gold ( AMEX:GLD )
Equity Volatility ( AMEX:VIXM )
Interest Rate Volatility ( AMEX:PFIX )
Energy ( AMEX:USO )
Precious Metals ( AMEX:DBP )
Agriculture ( AMEX:DBA )
US Dollar ( AMEX:UUP )
Inverse US Dollar ( AMEX:UDN )
Functionalities:
Fixed Income and Macro Table
Shows relative market Asset performance
Comes with different Calculation options like RoC,
Sharpe ratio, Sortino ratio, Omega ratio and Normalization
Allows for advanced market (health) performance
Provides the calculated, realized GRID market regimes
Informs about "Risk ON" and "Risk OFF" market states
Visuals - for your best experience only use one (+ BarColoring) at a time:
You can visualize all important metrics:
- GRID regimes of the currently chosen calculation type
- Risk On/Risk Off with background colouring and additional +1/-1 values
- a smoother GRID model
- a smoother Risk On/ Risk Off metric
- Barcoloring for enabled metric of the above
If you have more suggestions, please write me
Fixed Income and Macro:
The visualisation of the relative performance of the different assets provides valuable information about the current market environment and the actual market performance.
It furthermore makes it possible to obtain a deeper understanding of how the interconnected market works and makes it simple to identify the actual market direction,
thus also providing all the information to derive overall market health, market strength or weakness.
Utility:
The Fixed Income and Macro Table is divided in 4 Columns which are the GRID regimes:
Economic Growth:
Goldilocks
Reflation
Economic Contraction:
Inflation
Deflation
Top 5 Fixed Income/ Macro Factors:
Are the values green for a specific Column?
If so then the market reflects the corresponding GRID behavior.
Bottom 5 Fixed Income/ Macro Factors:
Are the values red for a specific Column?
If so then the market reflects the corresponding GRID behavior.
So if we have Goldilocks as current regime we would see green values in the Top 5 Goldilocks Cells and red values in the Bottom 5 Goldilocks Cells.
You will find that Reflation will look similar, as it is also a sign of Economic Growth.
Same is the case for the two Contraction regimes.
******
This Indicator again is based to a majority on 42MACRO's models.
I only brought them into TV and added things on top of it.
If you have questions or need a more in-depth guide DM me.
GM
Global Yield SpreadThe Global Yield Spread is a simple indicator that can help to identify economic wellbeing and thus allows traders and investors alike to derive a rough estimation onto where the market is likely to go.
----------
Please note that things like Yield Spread generally influence the market only over longer time horizons of a couple weeks to many months.
Also be aware that the Yield Spread is only capable of measuring the Yields on Bonds and is thus limited to only changes that are reflected in the interest rates on the Bonds.
----------
The Normal Yield Spread is widely recognized for it's signal abilities for recessions or general economic well being...
However, since the rates have decreased drastically in the US something else has been proposed: The Global Yield Spread
As the normal US Yield Spread is loosing signal capacity because the US government can easily borrow money from overseas,
thus reducing the need to increase interest rates.
By monitoring and analyzing the Global Yield spread, traders and investors can gain insights into relative valuations, economic movements, market sentiment, and opportunities.
It can help inform their investment decisions and strategies, allowing them to allocate capital more effectively and potentially generate better returns.
You have options to visually represent a diversity of Countries and their according Yield Spreads.
Furthermore there are Global Yield Spreads for:
10Y-03MY
10Y-02Y
30Y-10Y
The Average Global Yield Spread encompasses the 3 options above to get an average reading.
Market Relative Candle Ratio ComparatorIntroducing the Market Relative Candle Ratio Comparator, a visually captivating script that eases the way you compare two financial assets, such as cryptocurrencies and market indices. Leveraging a distinctive calculation method based on percentage changes and their averages, this tool presents a crystal-clear view of how your chosen assets perform in relation to each other, both for individual candles and over a range of previous candles.
Tailoring the script to your preferences is a walk in the park, as it allows you to easily adjust input symbols, moving average lengths, and other parameters to match your analytical approach. The visually arresting column chart it creates employs vivid red and green colors to underscore the differences between the two assets on each candle. Simultaneously, the lower-opacity columns depict the accumulated differences over a specified lookback period. This vibrant blend of colors and opacities results in a dynamic visual experience, enabling you to better grasp market trends relative to each other.
The reverse bool input is a handy feature that lets you invert the effect of the input symbol (DXY by default) in the comparison. When you set the reverse input to true, the script multiplies the calculated DXY percentage change by -1, effectively reversing the comparison. This is particularly useful when examining assets with an inverse relationship or when you'd like to analyze the input symbol's impact in the opposite direction.
For instance, if the input symbol represents a market index that generally moves in the opposite direction of the selected cryptocurrency, enabling the reverse input will help you better visualize and understand the relationship between the two assets by inverting the input symbol's effect on the comparison.
In the accompanying chart, you can observe the comparison of Bitcoin's movement relative to the Dollar, Gold, Bonds, and the S&P 500. The indicator reveals that in the last day, Bitcoin outperformed Bonds, Gold, and the Dollar but not the S&P 500!
Yield Curve (1-10yr)Yield curve of the 1-10 year US Treasury Bonds, with over 60 years of history.
The Yield Curve is the interest rate on the 10 year bond minus the 1 year bond.
When it inverts (crosses under 0) a recession usually follows 6-12 months later.
It's a great leading indicator to identify risk in the macroeconomic environment.
Yield curves can be constructed on varying durations. Using a 1-year as the short-term bond provides a slightly faster response than the 2-year bond; and the 1-year has more historical data on TradingView.
Yield Curve (2-10yr)Yield curve of the 2-10 year US Treasury Bonds, with over 50 years of history.
The Yield Curve is the interest rate on the 10 year bond minus the 2 year bond.
When it inverts (crosses under 0) a recession usually follows 6-12 months later.
It's a great leading indicator to identify risk in the macroeconomic environment.
10-Year Bond Yields (Interest Rate Differential)With this little script, I have attempted to incorporate fundamental data (in this case, 10-year bond yields) into technical analysis . When pairing two currencies, the one with a higher bond interest rate usually appreciates when the interest rate differential widens, or, to use a simple example: in a currency pair A vs. B, with A showing a higher bond yield than B, a widening interest rate gap is likely to help A and create a buying opportunity (shown as a blue square at the bottom of the chart), while the opposite is true when the gap tightens (sell signal, red square).
While long-term investors know about and make use of the importance of bond yield fluctuations, most short-term traders tend to dismiss the idea of using fundamental data, mostly for lack of quantifiability and limited impact in an intraday environment. After extensive backtesting on daily and intraday charts (6-12 hours), however, I realized this indicator still managed to produce useful results (less useful than on monthly and yearly charts, to be fair, but still useful enough), especially when paired with simple price-driven indicators, such as Heikin Ashi or linear regression .
My personal (and thus subjective) thoughts: worth a try. Buy and sell signals frequently contradicted both more popular indicators and my gut feeling and managed to take out losing trades that I had considered trades with a high winning probability. In other words, when the market lures traders into seemingly promising trading decisions, this indicator might give you an early warning, especially when you manage to adjust period and continuity parameters to your trading strategy.
Currency pairs used in this script are all possible combinations of the eight majors. Each security has been assigned a name ("inst01" to "inst08" in the code) and a broker; if you make changes to the code, be sure not to mess with currency and broker names as this would render the entire script useless. Good luck trading, and feel free to suggest improvements!
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.
US/CA Bond Yield CurveEasy Viewing of 4 different duration bond yields for US and Canada. Bond prices and bond yields are excellent indicators of the economy as a whole, and of inflation in particular. A bond's yield is the discount rate that can be used to make the present value of all of the bond's cash flows equal to its price. Good as part of a macro set.
intraday_bondsStatistics for assisting with intraday bond trading, using five minute periods and one hour ranges. There are two tables, a volatility table and a correlation table. The correlation table shows the correlation of five minute returns (absolute) between the four different bond contracts that trade on the CME. The volatility table shows for each contract:
- The current realized volatility, based on the previous one hour of realized volatility. This figure is annualized for easy comparison with options contracts.
- The current realized volatility's z-score, based on all available data.
- The tick range of an "N" standard deviation move over one hour. Choose "N" using the stdevs input.
- The previous hour's true range (high - low).
The ranges are expressed in ticks.
US Treasury All Yield Curve IORB WeightedI've updated my US Treasury All Yield Curve indicator to use the new FRED:IORB (interest on reserve balances), instead of the FRED:FEDFUNDS which is only updated monthly.
The new IORB doesn't provide very long lookback for data, so I'm publishing this as a new version and not an update, making it possible for users to choose which version best suits their needs.
Bond Yeild CurveBond Yeild Curve
A bond yeild curve is a line that plot the interest rate of bonds of each maturity dates.
The slope of the curve give the future of economy cycle.
if the slope could be normal (positive), flat or even inverted.
This indicator aquired data of bond yeild provided by TradingView.
How to use it.
Select the country of the bond / another country to compare.
Select the maturity of bond (this indicator set 2Y, 5Y, 10Y and 20Y as default).
You can toggle to 3 different data set; Yeild, Spread (10Y-2Y) and Yeild Curve.
In case that you select the "Yeild Curve", you can customize the desired past period to compare.
How we can get the benefit.
- If the current spread is greater than 1.0, it suppose that the economy of that country probably is ok.
- if the current spread is between 0 - 1.0, it suppose to be flatted and probably turn to invert and the economy cound be in a recession soon.
- if the current spread is below 0, it suppose to be inverted and economy is in recession.
when knowing the state of economy, it would help us to manage our investment.
When you select "Yeild"
When you select "Spread"
When you select "Yeild Curve"
I'm new for this.
if any idea, correction and suggestion, i do appreciate it.
US Treasury All Yield CurveRather than using one pair of treasuries, this indicator weighs them all in an overlapping fashion, to produce a composite yield curve that indicates the level of stress in the bond market.
Abz Bonds/BTC divergenceDraft release: This indicator shows the comparative returns from US bonds vs BTC.
I was inspired by this Twitter thread: twitter.com
If you compare the price action of Bitcoin against bond returns over the last year, there's an extraordinary degree of correlation. This may give insights into what's coming next for BTC , but at some point the relationship will inevitably break down. In the meantime, there's much to gain.
DYOR.
Feedback welcome though it may take a while for me to respond.
Abz Bond returnsDraft release: This indicator shows the US 10year bond returns.
I was inspired by this Twitter thread: twitter.com
If you compare the price action of Bitcoin against bond returns over the last year, there's an extraordinary degree of correlation. This may give insights into what's coming next for BTC, but at some point the relationship will inevitably break down. In the meantime, there's much to gain.
DYOR.
Feedback welcome though it may take a while for me to respond.
Gov Bonds Real Rates 10/05Y, FED RATEs, CPIGov Bonds Real Rates 10/05Y, FED RATEs, CPI。美国经济数据10年债和5年债实际收益率,美国目标利率和实际利率,CPI消费者物价指数
US Treasury All Yield Curve FEDFUNDS WeightedRather than picking a benchmark pair of treasuries to express a yield curve, this indicator weighs all (excluding the new 20 Year) durations, each against the next, and weights that against the FEDFUNDS rate.
MOVE/VXTLT CorrelationMany know of the VIX for equity trading. Yet, many are unaware that there is the same kind of volatility measure for trading bonds, called the MOVE Index.
"The Merrill Lynch Option Volatility Estimate (MOVE) Index is a yield curve weighted index of the normalized implied volatility on 1-month Treasury options which are weighted on the 2, 5, 10, and 30 year contracts."
With this script one can see the the correlation and divergences between bonds and its volatility measure to make educated decisions in trading or hedging.
The idea of this script comes from NicTheMajestic.
Velocity To Inverse Correlation to VIX/Bonds Strategy (2020)This strategy measures and creates a signal when an asset is moving out of a correlation with high yield bonds or the CBOE VIX into an inverse correlation, as well as when an asset is losing correlation with a top corporate bonds ETF. When this signal is triggered, the simulation has the portfolio asset go long.
Additionally, exits are based on a 2% stop loss and a 2% take profit for simplicity sake to indicate whether the direct next move in the asset is up or down.
This was originally tested as a descent indicator for Ethereum's 2020 moves as institutional investors moved into the market.
Yield Curve Inversion MonitorIdentifies when the US Treasury Yield Curve inverts (2 and 10 year bond rates).
When they ‘invert’ long-term bonds have a lower interest rate than short-term bonds. In other words, the bond market is pricing in a significant drop in future interest rates (which might be caused by the US Fed fighting off a recession in the future).
In the last 50 years, every time the US treasury yield curve inverted a recession followed within 3 years. On average the S&P500 gained 19.1% following the inversion and peaked 13 months later. In other words, as far as investors are concerned, the recession began roughly one year later.
However, once the market peaks, it then drops 37.6% on average, wiping out all those gains and more.
...Looks like 2020 is shaping up to be another prime example.