Interest Rate Trading (Manually Added Rate Decisions) [TANHEF]Interest Rate Trading: How Interest Rates Can Guide Your Next Move.
How were interest rate decisions added?
All interest rate decision dates were manually retrieved from the 'Record of Policy Actions' and 'Minutes of Actions' on the Federal Reserve's website due to inconsistent dates from other sources. These were manually added as Pine Script currently only identifies rate changes, not pauses.
█ Simple Explanation:
This script is designed for analyzing and backtesting trading strategies based on U.S. interest rate decisions which occur during Federal Open Market Committee (FOMC) meetings, to make trading decisions. No trading strategy is perfect, and it's important to understand that expectations won't always play out. The script leverages historical interest rate changes, including increases, decreases, and pauses, across multiple economic time periods from 1971 to the present. The tool integrates two key data sources for interest rates—USINTR and FEDFUNDS—to support decision-making around rate-based trades. The focus is on identifying opportunities and tracking trades driven by interest rate movements.
█ Interest Rate Decision Sources:
As noted above, each decision date has been manually added from the 'Record of Policy Actions' and 'Minutes of Actions' documents on the Federal Reserve's website. This includes +50 years of more than 600 rate decisions.
█ Interest Rate Data Sources:
USINTR: Reflects broader U.S. interest rate trends, including Treasury yields and various benchmarks. This is the preferred option as it corresponds well to the rate decision dates.
FEDFUNDS: Tracks the Federal Funds Rate, which is a more specific rate targeted by the Federal Reserve. This does not change on the exact same days as the rate decisions that occur at FOMC meetings.
█ Trade Criteria:
A variety of trading conditions are predefined to suit different trading strategies. These conditions include:
Increase/Decrease: Standard rate increases or decreases.
Double/Triple Increase/Decrease: A series of consecutive changes.
Aggressive Increase/Decrease: Rate changes that exceed recent movements.
Pause: Identification of no changes (pauses) between rate decisions, including double or triple pauses.
Complex Patterns: Combinations of pauses, increases, or decreases, such as "Pause after Increase" or "Pause or Increase."
█ Trade Execution and Exit:
The script allows automated trade execution based on selected criteria:
Auto-Entry: Option to enter trades automatically at the first valid period.
Max Trade Duration: Optional exit of trades after a specified number of bars (candles).
Pause Days: Minimum duration (in days) to validate rate pauses as entry conditions. This is especially useful for earlier periods (prior to the 2000s), where rate decisions often seemed random compared to the consistency we see today.
█ Visualization:
Several visual elements enhance the backtesting experience:
Time Period Highlighting: Economic time periods are visually segmented on the chart, each with a unique color. These periods include historical phases such as "Stagflation (1971-1982)" and "Post-Pandemic Recovery (2021-Present)".
Trade and Holding Results: Displays the profit and loss of trades and holding results directly on the chart.
Interest Rate Plot: Plots the interest rate movements on the chart, allowing for real-time tracking of rate changes.
Trade Status: Highlights active long or short positions on the chart.
█ Statistics and Criteria Display:
Stats Table: Summarizes trade results, including wins, losses, and draw percentages for both long and short trades.
Criteria Table: Lists the selected entry and exit criteria for both long and short positions.
█ Economic Time Periods:
The script organizes interest rate decisions into well-defined economic periods, allowing traders to backtest strategies specific to historical contexts like:
(1971-1982) Stagflation
(1983-1990) Reaganomics and Deregulation
(1991-1994) Early 1990s (Recession and Recovery)
(1995-2001) Dot-Com Bubble
(2001-2006) Housing Boom
(2007-2009) Global Financial Crisis
(2009-2015) Great Recession Recovery
(2015-2019) Normalization Period
(2019-2021) COVID-19 Pandemic
(2021-Present) Post-Pandemic Recovery
█ User-Configurable Inputs:
Rate Source Selection: Choose between USINTR or FEDFUNDS as the primary interest rate source.
Trade Criteria Customization: Users can select the criteria for long and short trades, specifying when to enter or exit based on changes in the interest rate.
Time Period: Select the time period that you want to isolate testing a strategy with.
Auto-Entry and Pause Settings: Options to automatically enter trades and specify the number of days to confirm a rate pause.
Max Trade Duration: Limits how long trades can remain open, defined by the number of bars.
█ Trade Logic:
The script manages entries and exits for both long and short trades. It calculates the profit or loss percentage based on the entry and exit prices. The script tracks ongoing trades, dynamically updating the profit or loss as price changes.
█ Examples:
One of the most popular opinions is that when rate starts begin you should sell, then buy back in when rate cuts stop dropping. However, this can be easily proven to be a difficult task. Predicting the end of a rate cut is very difficult to do with the the exception that assumes rates will not fall below 0.25%.
2001-2009
Trade Result: +29.85%
Holding Result: -27.74%
1971-2024
Trade Result: +533%
Holding Result: +5901%
█ Backtest and Real-Time Use:
This backtester is useful for historical analysis and real-time trading. By setting up various entry and exit rules tied to interest rate movements, traders can test and refine strategies based on real historical data and rate decision trends.
This powerful tool allows traders to customize strategies, backtest them through different economic periods, and get visual feedback on their trading performance, helping to make more informed decisions based on interest rate dynamics. The main goal of this indicator is to challenge the belief that future events must mirror the 2001 and 2007 rate cuts. If everyone expects something to happen, it usually doesn’t.
RATE
Funding Rate [CryptoSea]The Funding Rate Indicator by is a comprehensive tool designed to analyze funding rates across multiple cryptocurrency exchanges. This indicator is essential for traders who want to monitor funding rates and their impact on market trends.
Key Features
Exchange Coverage: Includes data from major exchanges such as Binance, Bitmex, Bybit, HTX, Kraken, OKX, Bitstamp, and Coinbase.
Perpetual Futures and Spot Markets: Fetches and analyzes pricing data from both perpetual futures and spot markets to provide a holistic view.
Smoothing and Customization: Allows users to smooth funding rates using a moving average, with customizable MA lengths for tailored analysis.
Dynamic Candle Coloring: Option to color candles based on trading conditions, enhancing visual analysis.
In the example below, the indicator shows how the funding rate shifts with market conditions, providing clear visual cues for bullish and bearish trends.
How it Works
Data Integration: Uses a secure security fetching function to retrieve pricing data while preventing look-ahead bias, ensuring accurate and reliable information.
TWAP Calculation: Computes Time-Weighted Average Prices (TWAP) for both perpetual futures and spot prices, forming the basis for funding rate calculations.
Funding Rate Calculation: Determines the raw funding rate by comparing TWAPs of perpetual futures and spot prices, then applies smoothing to highlight significant trends.
Color Coding: Highlights the funding rate with distinct colors (bullish and bearish), making it easier to interpret market conditions at a glance.
In the example below, the indicator effectively differentiates between bullish and bearish funding rates, aiding traders in making informed decisions based on current market dynamics.
Application
Market Analysis: Enables traders to analyze the impact of funding rates on market trends, facilitating more strategic decision-making.
Trend Identification: Assists in identifying potential market reversals by monitoring shifts in funding rates.
Customizable Settings: Provides extensive input settings for exchange selection, MA length, and candle coloring, allowing for personalized analysis.
The Funding Rate Indicator by is a powerful addition to any trader's toolkit, offering detailed insights into funding rates across multiple exchanges to navigate the cryptocurrency market effectively.
MADI(Moving average deviation rate index)This script is "Moving average deviation rate" to Indexing.
index = average deviation rate / (Sigma * (input:SIgma)) * 100
It's for people who like simplicity.
Global Unemployment RateThe Global Unemployment rate estimates what is the rate of unemployment of the whole world, taking same data from multiple countries and normalizing them.
It includes the Eurozone + 19 countries from all the continents, which are some of the richest countries as well as some of the most populous.
It sadly does not include India as its unemployment data on trading view as of today (Feb 2023) is only since year 2019, which is too short
Fed Funds Rate ProjectionsThis script makes projections via drawing boxes based upon changes in the fed funds rate (FRED:EFFR).
It works by turning the change in the fed funds rate into a user defined percentage (using a multiplier, by default a 1% rate of change implies a 10% change in the chart) and then drawing a box that distance away depending on the direction of the rate of change.
The size of the multiplier should depend on the duration of the asset which this is being applied to, for example, a long duration asset such as a high beta growth stock should use a larger multiplier.
Taylor RuleThe Taylor rule is a simple formula that John Taylor devised to guide policymakers. It calculates what the federal funds rate should be, as a function of the output gap and current inflation. Here, we measure the output gap as the difference between potential output and real GDP. Inflation is measured by changes in the CPI, and we use a target inflation rate of 2%. We also assume a steady-state real interest rate of 2%.
Federal Funds Rate and Overnight Bank Fund RateAMEX:SPY
Comparison of the Overnight Bank Fund Rate and the Effective Federal Funds Rate.
The Fed sets a discount rate of 100 basis points above the effective federal funds rate to discourage ("penalize") banks from borrowing from its reserves. If lending banks have excess in their reserves, the borrowing banks have ease in negotiating a lower rate overnight to maintain its requirements. For this reason its a good indicator of the economy. If it becomes more difficult for banks to maintain the required reserve amount they may charge borrowing banks higher rates.
Both the Effective Federal Funds Rate and Overnight Bank Fund Rate use the same data. Except, the OBFR includes overnight Eurodollar transaction data and certain overnight “selected deposit” transactions that are placed at domestic bank branches controlled by a U.S. banking office.
The indicator includes the lower and upper bound target rate set by the Federal Reserve.
An interesting note:
Notice the jump in the Overnight Bank Rate followed by Fed buying to provide liquidity and lower rates in Sept 2019.
Silen's Financials P/E & P/S[x10] RatesThis script aims to give a better visualization of P/E and P/S rates compared to the build-in "Price to earnings ratio" and "Price to sales ratio" in the "Financials" Section of Tradingview. For those of you don't know, those rates compare earnings and sales with your share price in regard to market cap and outstanding shares.
The scripts differs to the build-in versions in the following points:
- P/E & P/S rates are combined in one indicator
- Negative P/E rates are displayed better: Positive P/E rates are green, Negative P/E rates are red
- For visualization reasons, the indicator will cap positive and negative P/E rates at 100. (P/E rates above those levels are not siginificant either way)
- P/E & P/S rate are directly displayed on the graph
- Both P/E and P/S rates are combined on one left scale
- For visualization reasons, P/S rate is showing 10x the actual P/S rate. Using the standard P/S rate would result in hard-to-recognize changes of the P/S line.
To sum up:
- Positive P/E rates are green
- Negative P/E rate are red
- P/S rates are multiplied by 1 0
- P/S rates are yellow
How to use P/E and P/S rates:
The US market average for P/E rates is roughly ~18 in the US right now (10/2022) while the market average for P/S rates is roughly ~3 in the US. Note that average P/E and P/S can change when the market situation changes.
P/E and P/S rates help you value your stock better and help you decide whether your stock is undervalued or overvalued compared to the market or the industry when it comes to earnings and sales. If you compare to Market averages, a positive P/E of less than 18 means that your stock is likely unvervalued. A P/S rate below 3 (30 in the chart!) means that your stock is likely undervalued as well. If your stock shows rates above those, it is likely that it is overvalued compared to market averages.
Please note that P/E and P/S rates are not the only factors that make up a stock valuation. Valuations are complex and subjective.
A positive P/E rate also means that your company is profitable.
A Negative P/E rate means that your company is unprofitable.
If you have any questions or feedback let me know!
Disclaimer: This script doesn't show the actual P/S rate. It shows the P/S rate multiplied by 10, due to visualization issues. Positive P/E Rates above 100 are displayed as 100. Positive P/E rates are green, Negative P/E rates are red and multiplied by -1.
Disclaimer2: @Tradingview_Team: I couldn't find the right category for this script but categories are mandatory. I assume that "Breadth Indicators" is still the closest there is. Please let me know if you want me to change the category.
Disclaimer3: For visualization, the opacity of the displayed image is 70%. The standard opacity for the P/E and P/S lines is 50% and can be changed in the indicator settings. I found this setting more useful when working together with other indicators on the same chart
Disclaimer4: Earnings Per Share, Total Revenue used are TTM. Total Shares Outstanding used are FQ.
Extremely high win rate FOREX swing strategyTHis is a very simple yet extremely efficient FOREX strategy .
In general it tends to work the best against NZD and AUD pairs, however other major pairs and crosses can work as well.
It's made of a time management, together with MACD , moving average , a price action rule and a risk management.
THe logic behind is the next one :
For LONG:
We have 3 ascending candles.
Histogram of MACD is positive.
Last close of a candle is was above moving average.
If all those previous condition happened before 17/18 UTC time depending if its summer time or not, we enter the trade.
For Short:
We have 3 descending candles.
Histogram of MACD is negative.
Last close of a candle is was below moving average.
If all those previous condition happened before 17/18 UTC time depending if its summer time or not, we enter the trade.
RIsk management
For risk management, since we aim to have a 95%+ win rate, we aim to have a 5:1 or 10:1 risk to reward ratio. Meaning that for each $ we can win, we can lose 5-10$.
THats why I recommend to be extremely careful when playing with leverage with this strategy.
% Divergence of RSIA simple script that plots the difference between the %ROC of price vs the %ROC of RSI, AKA the % of divergence. A simple way to analyze how strong a potential divergence is. Top reversals are above 0, bottom reversals are below. A value of 0 means price and RSI are changing by the same % value. So, if oscillator is moving up as price moves up, it means divergence is increasing. If oscillator moves down as price moves up, it means divergence is decreasing.
Moving average of 1-period Percent ChangeAnother way of finding the average range of the bars using 1 period percentage change of the price and taking an average of them. It's given in percentages and the absolute value of the average can be shown when the option is turned on, or the average including the up and down bars can be shown. Perhaps an alternative way of looking at volatility or range of the bars. If you prefer a line version over histogram, just simply change the style under the settings of the indicator.
Exponential Regression Slope Annualized with R-squared HistogramMy other indicator shows the linear regression slope of the source. This one finds the exponential regression slope and optionally multiplies it by R-squared and optionally annualizes it. Multiplying by R-squared makes sure that the price movement was significant in order to avoid volatile movements that can throw off the slope value. Annualizing the exponential slope will let you see how much percentage you will make in a year if the price continues at its current pace.
The annualized number is the number of trading days in a year. This and the length might need adjusting for the extra bars that might be in futures or other markets. The number does not have to be a year. For example, it can be a month if you set the number to 20 or so trading days to find how much you would make in a month if price continues at its current pace, etc. This can also be used as an alternative to relative strength or rate of change.
Hash Ribbons Backtest - Bitcoin Beats YT
Hello Hello Hello and welcome back to Bitcoin Beats!
This is a script written by capriole_charles
Go check out the original!
I have added leverage and stoploss % but also made it a strategy so we can look back at past trades to see patterns and profit.
Personally I feel this is not enough data to trade off as BTC is such a young asset. However I have seen other models similar to this for other assets that hold strong.
Trade safe!
Good bye from bitcoin beats!
Not Meant For The 1H! My Bad! higher timeframes are better!
The "Spring" is the confirmed Miner capitulation period:
The 1st "gray" circle is the start of Capitulation (1 month Hash Rate crosses UNDER 2 month Hash Rate)
Last "green" circle is the end of Capitulation (1 month Hash Rate crosses OVER 2 month Hash Rate)
The "greener" the spring gets (up until blue) represents Hash Rate recovery (it is increasing)
The "blue" circle is the first instance of positive momentum following recovery of Hash Rate (1m HR > 2m HR). This is historically a rewarding place to buy with limited downside.
Coppock CurveThis indicator was originally developed by Edwin "Sedge" Coppock (Barron's Magazine, October 1962).
Specially for @AlexMayorov :
1) Buy when indicator crosses the zero line upside
2) Sell when indicator crosses the zero line downside
Moving average deviation rateMoving average deviation rate
Simple moving average deviation rate and standard deviation.
The bollinger band is momentum value standard devition.
Bat the bollinger band is not normal distribution to close price.
Moving average deviation rate is normal distribution.
This indicator is draw Moving average deviation rate and fill area 2σ standard devition.
If it exceeds 2σ, it is a trading opportunity.
移動平均かい離率と、2σのバンドです。
ボリンジャーバンドは移動量の標準偏差を描画しますが、終値はボリンジャーバンドに対して正規分布を描きません。
移動平均かい離率は、標準偏差に対して正規分布を示します。
かい離率2σを超えた場合、トレードチャンスです。
Rate Of Change - Absolute ValueMeasures the period's change in terms of the instrument's value (e.g. pip, dollar, etc) instead of as a percentage. I generally use it on a daily time frame with a period=1 to see how the current day's move compares with prior days' moves in order to gain a perspective into how this move ranks historically.