Commitment of Traders ~ TREASURIESMy intention was to create 1 script for the Commitment of Traders report but I wasn't not aware there is a limit on how many instrument calls can be made in PineScript so I had no choice but to divide the script into instrument categories. So far I have created 4 of them: Forex, Indexes & Metals/ Commodities & Treasuries which is the one presented here. If you are interested in the other ones, feel free to do a search.
Available Instruments: Ultra(25-35yrs), Bonds(15-25yrs), 10yrs, 5yrs, 2yrs & 3 Month EuroDollar
The script calculates the ZScore of both Net Long (Money Managers / Asset Managers) and Net Long (Dealers / Swap) In some instrument categories you will also see Open Interest. It depends on whether I was maxed out or not on making security calls.
If you are not familiar with ZScore, it basically calculates the distance of price from a mean average in units of Standard Deviation. In theory when price reaches +2 it signifies overbought while if it reaches -2 is oversold. However just because it's hitting an extreme in one particular average doesn't necessarily mean it will reverse as the position of price in relation with the next longer average might not be so out of range.
Must be attached to weekly chart.
If you have any questions/suggestions, feel free to add them in the comments below
Bonds
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.
US Yield CurveDeutsch:
Die Zinsstrukturkurve ist ein wichtiges Prognosetool für Finanzakteure und dient unter anderem als Konjunkturindikator.
Es handelt sich hierbei um eine grafische Darstellung der Zinssätze von Anleihen mit unterschiedlicher Laufzeit.
3 Ansichtsmöglichkeiten sind verfügbar:
Linien Modus
Histogramm Modus
Verlaufs Modus
Sobald Teile der Zinsstrukturkurve invers stehen erscheint ein Warnsymbol zwischen den entsprechenden Laufzeiten
Über die Einstellungen kann man Alarme erstellen wenn definierte Zinssätze erreicht / unterschritten worden.
Alarme für die Kreuzung von Zinssätzen mit verschiedenen Laufzeiten sind ebenfalls möglich.
Im Verlaufs Modus können einzelne Laufzeiten ausgewählt und dann miteinander verglichen werden.
English:
The yield curve is an important forecasting tool for financial players and serves as an economic indicator.
It is a graphical representation of the interest rates on bonds with different maturities.
3 viewing options are available:
Line Mode
Histogram Mode
History Mode
As soon as parts of the yield curve are inverted, a warning symbol appears between the corresponding maturities
The settings can be used to create alarms if defined interest rates have been reached / fallen below.
Alarms for the crossing of interest rates with different maturities are also possible.
In the history mode, individual runtimes can be selected and then compared with one another.
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.
10-Year Korea Gov Bond Minus 3-Year Korea Gov BondInterest rate spread between 10yr and 3yr Korean Gov. Bonds
Fake-out ReversalsThis script combines two simple concepts, stop running and short term momentum, into a simple visual signal that can be applied to any market and any timeframe with some adjustment. It looks for price to violate a prior extreme within a certain lookback window, followed by price triggering a momentum filter that helps put the proverbial 'wind at your back' for the user. Users have the ability to customize three inputs; 1) Bars used to calculate price extremes 2)Bars since price violated that extreme 3)The sensitivity of the momentum filter.
You will find that these signals work best in choppy and rangebound price action, less so in trending/grinding markets. For entertainment/educational purposes only.
Enjoy!
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.
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.
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 Curve Version 2.0Hello and welcome to "Yield Curve Version 2.0"
Please read as it might help you understand what information is being displayed and where it can be located.
Please note - this script will not generate accurately if loaded while the Bond Market is closed. It requires one real time update before the script will work.
** FEATURES**
* Plots the Yield Curve of the US01M, US02M. US03M, US01Y , US02Y , US03Y , US05Y , US10Y and US30Y
* Displays the Current Yield and Spread
* Displays the Average of the Entire Yield Curve
* Displays messages based off Inversions
* Displays Warning Message if 2-10 become Inverted
* Displays 4 Yield Curve Stability Figures (Based off my own algorithm)
* "View it your way" Ability to turn On/Off features via Input Settings
* All features are turned on by default
** Notes**
* Curve Yield and Labels change colors based on direction of the movement.
* BLUE line indicates the Average of the Entire Yield Curve
* There are 4 Stability figures plotted at the bottom, again based off and algorithm I have created. 1 - Stability Max Overload (read as the 4th number from the right at top). 2 - Stability Overload(3rd number from the right). 3 - Stability(2rd number from the right), 4 - Stability Max Overload Average(top most right figure) plotted as white line.
**What This Means**
* "STABILITY" I have created an Algorithm that tries to read the Stability of the Yield Curve. This was created with inversion data and weighted based off certain criteria. The Stability bar is the most visible bar on the bottom and value ranges from 0 to 1. 0 indicating the MOST Stable Yield Curve and 1 indicating the MOST Unstable Yield Curve. A Green Move indicates a "MORE STABLE" Yield Curve vs prior resolution. Red indicates a "MORE UNSTABLE" Yield Curve vs prior resolution.
* "STABILITY OVERLAD" This figure is plotted as the middle section of the lower columns. This is typically a very small number as its based off and average I recovered from the STABILITY figure. It is then added to the STABILITY.
* "STABILITY MAX OVERLOAD* This figure is plotted at the top of the columns and less visible. This figure is typically larger as the number was based off a total figure I recovered from the STABILITY figure.
* The best possible Yield Curve would generate a value of "0" for each of the Stability figures listed above and therefore would not even display the columns. The worst possible Yield Curve would generate a number (at minimum) greater than 1 as again the STABILITY figure itself has a max value of 1.
* The two figures in tracking are STABILITY and STABILITY MAX OVERLOAD. The greater the STABILTY number indicates the state of the Yield Curve itself and STABILTY MAX OVERLOAD number indicates a total value of that stability. Again 0 being the most stable Yield Curve.
* There is also a very light White plotted line at the bottom (inside the columns) This line indicates the average of the STABILITY MAX OVERLOAD
**Remember**
* Input settings will allow you to customize the entire display so you can view it the way you want.
Thank you and I look forward to adding more to this script soon!!!
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.
Bond Yield Recession IndicatorThis model uses the difference between 10-year and 3-month Treasury rates to calculate the probability of a recession in the United States twelve months ahead.
By a simple gimpse, it has been correct for the last two recessions of 2000 and 2008.
www.newyorkfed.org
fred.stlouisfed.org
Yield Inversion Curve DifferenceDisplays the yield inversion difference on bonds between short term and long term bonds.
PerPro V7 V3 STOCK AND INDICESin this version Perpro V7 is only for trade indices and stock, the algorithm only send buy signal, the bes performance is in 1h time frame, 1 day and 1 w.
you need to find the best money management for stock or indices.