Seasonality: U.S. Treasuries [invincible3]Seasonality: U.S. Treasuries
Seasonality: U.S. Treasuries is a visual dashboard-style indicator designed to display historical seasonal tendencies for major U.S. Treasury futures directly on the price chart.
The indicator includes three separate seasonal mini-charts:
U.S. 10-Year Treasury Note — seasonal data from 1983 to 2020
U.S. 5-Year Treasury Note — seasonal data from 1989 to 2020
U.S. Treasury Bond — seasonal data from 1978 to 2020
Each panel shows a full 365-day seasonal curve, allowing traders to observe how these Treasury instruments have historically behaved throughout the calendar year. The indicator plots both the long-term **All Years average** and a **Weighted Average** curve, making it easier to compare broad historical behavior with a more weighted seasonal tendency.
The dashboard is built to be clean, compact, and flexible. Users can adjust the widget width, distance from candles, panel height, row spacing, column gap, and placement on either the right or left side of the chart. This helps keep the seasonal panels separated from price action while still making the seasonal structure easy to read.
Automatic theme detection is included, so the dashboard adapts to both dark and light TradingView chart themes. Users can also manually customize colors for the grid, background, text, All Years line, and Weighted Average line.
This indicator is useful for traders, analysts, and macro-market observers who want to study historical seasonal patterns in U.S. Treasury markets and compare current market behavior with long-term seasonal tendencies.
Key Features:
Seasonal mini-dashboard for U.S. Treasury markets
Includes 10Y Note, 5Y Note, and Treasury Bond
365-day seasonal curves
All Years average line
Weighted Average line
Adjustable widget size and placement
Clean layout placed away from candles
Auto dark/light theme support
Manual color customization
Designed for visual seasonal analysis
This indicator is intended for educational and analytical purposes only. It does not provide financial advice, investment recommendations, or direct buy/sell signals. Seasonal tendencies are based on historical data and do not guarantee future market performance.
Indicator

Endogenous Macro Heatmap [invincible3] Endogenous Macro Heatmap
The Endogenous Macro Heatmap is a multi-factor macroeconomic dashboard designed to show the internal economic condition of a selected country in a compact table format directly on the chart.
Unlike cross-country or exogenous comparison models, this indicator focuses on domestic macro conditions : growth, production, demand, liquidity, rates, inflation, employment, fiscal position, debt pressure, and central bank balance sheet behavior.
The goal is to help traders, investors, and macro analysts quickly assess whether a country’s internal economic backdrop is improving, neutral, weakening, or entering a stress phase.
The indicator uses a heatmap structure so that changes in the macro environment can be understood visually. Stronger readings are shown through the positive color gradient, weaker readings through the negative color gradient, and balanced or transition zones through the neutral color.
What This Indicator Measures
The heatmap tracks a broad set of endogenous macro variables, including:
GDP year-over-year growth
Manufacturing production / manufacturing index
New orders or capacity utilization
Building permits, construction output, construction orders, or housing starts depending on the selected country
Retail sales year-over-year
Money supply
10-year government bond yield
Interest rate
Inflation year-over-year
Employment-related data
Debt-to-GDP
Government budget
Central bank balance sheet
Because macro data availability differs across countries, the script automatically substitutes certain fields where required. For example, some countries may use construction output, construction orders, housing starts, or capacity utilization depending on what is available in the TradingView economic database.
Supported Countries
The dashboard currently supports:
United States
United Kingdom
Euro Area
Germany
France
Italy
Canada
Japan
China
Australia
South Korea
New Zealand
Each country uses its corresponding TradingView economic code where available.
Composite Macro Score
The final Score column converts multiple macro readings into a single composite score from 0 to 100.
The score is grouped into four macro blocks:
1. Growth Block
Includes GDP, manufacturing, new orders, construction/building activity, retail sales, and employment.
This block has the largest weight because real economic momentum is the primary driver of macro regime strength.
2. Liquidity Block
Includes money supply and central bank balance sheet data.
This block helps identify whether domestic liquidity conditions are expanding or contracting.
3. Tightness Block
Includes 10-year yield and interest rate conditions.
This block helps measure whether financial conditions are becoming easier or tighter.
4. Stability Block
Includes inflation, debt/GDP, and government budget data.
This block helps detect macro pressure from inflation, fiscal stress, or excessive debt burden.
The composite score is weighted as follows:
Growth: 45%
Liquidity: 20%
Tightness: 20%
Stability: 15%
Score Interpretation
The score is displayed as a clean numeric value without extra symbols, making the table easier to read.
General interpretation:
70–100: Strong macro condition
55–69: Positive / improving condition
45–54: Neutral / transition condition
30–44: Weak condition
Below 30: Stress condition
The score should not be interpreted as a direct buy or sell signal. It is a macro regime filter designed to provide context.
Heatmap Color Logic
The table uses a simple and consistent three-color structure:
Positive color: stronger or favorable macro readings
Neutral color: balanced or mid-range readings
Negative color: weaker or unfavorable macro readings
The color system is intentionally matched with the Exogenous Heatmap style, allowing both dashboards to be used together with a consistent visual language.
Each macro field also includes an **Up Good** setting. This allows the user to define whether higher values are favorable or unfavorable for each metric.
For example:
Higher GDP growth is generally positive.
Higher manufacturing activity is generally positive.
Higher liquidity can be positive.
Higher inflation, debt, or rates may be interpreted differently depending on the user’s macro framework.
This flexibility allows the heatmap to be adapted for different economic regimes and analytical preferences.
Auto and Manual Scaling
The indicator includes an automatic macro gradient scale.
When auto scaling is enabled, the heatmap normalizes each metric based on the visible historical table range. This makes the table visually adaptive and easier to compare across different periods.
Manual scaling is also available for users who prefer fixed macro ranges.
This is useful when comparing the same country across different time periods or when the user wants a stable visual reference.
Timeframe and History Controls
Users can select the table period:
Yearly
Quarterly
Monthly
Weekly
Daily
The data can be fetched by:
A fixed number of periods
A selected start date
This gives flexibility for short-term macro monitoring as well as longer-term economic cycle analysis.
Table Customization
The dashboard includes several table display settings:
Show or hide table
Select table position
Select table size
Customize positive, neutral, and negative colors
The table automatically adapts to the chart background and foreground colors for better readability on both dark and light chart themes.
How to Use
This indicator is best used as a macro context tool.
A practical workflow:
1. Select the country you want to analyze.
2. Choose the table period, such as monthly or quarterly.
3. Review the color trend across the macro fields.
4. Watch whether growth, liquidity, tightness, and stability are improving or deteriorating together.
5. Use the composite score as a broad internal macro regime filter.
6. Combine the macro backdrop with price action, trend, liquidity, sector rotation, and risk management.
For example:
A rising score with improving growth and liquidity may support a risk-on environment.
A falling score with weakening growth and tightening conditions may warn of macro deterioration.
A neutral score may indicate a transition period where markets can become more sensitive to new economic data.
Suggested Use Cases
This heatmap can be useful for:
Macro regime analysis
Country-level economic monitoring
Risk-on / risk-off context
Equity index analysis
Bond market context
Currency market macro background
Sector rotation research
Long-term investment cycle analysis
Comparing domestic conditions with external macro pressure when used together with an exogenous heatmap
Important Notes
Economic data can be revised, delayed, or unavailable depending on the country and TradingView’s data coverage.
Some fields may not exist for every country, so the script uses alternative fields where possible.
The heatmap is designed for macro analysis and educational research. It does not predict price direction by itself and should not be used as a standalone trading system.
Always combine macro signals with technical analysis, market structure, liquidity conditions, and proper risk management.
Disclaimer
This script is for educational and analytical purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any asset.
Markets are influenced by many factors beyond macroeconomic data, including positioning, liquidity, earnings, policy changes, geopolitical events, and sentiment. Use this tool as one layer of a broader decision-making process.
Indicator

Pakistan Macro Dashboard [invincible3] Pakistan Macro Dashboard
Pakistan Macro Dashboard is a macroeconomic cycle oscillator and dashboard designed to analyze Pakistan’s equity-market environment using policy-rate, inflation, currency, liquidity, external-balance, commodity, and KSE100 trend conditions.
The core oscillator focuses on Pakistan’s monetary cycle. It uses the Pakistan policy rate, its cumulative historical mean, inflation trend, inflation level, and real-rate balance to create a macro score from 0 to 100. Higher values suggest improving liquidity and a more supportive equity backdrop, while lower values suggest restrictive conditions and elevated macro pressure.
A key feature of this indicator is the policy-rate cycle background. The background color is based on the relationship between the current Pakistan policy rate and its cumulative mean:
Red background: policy rate is above its mean and rising, indicating restrictive tightening.
Orange background: policy rate is above its mean but falling, indicating early easing or potential recovery.
Green background: policy rate is below its mean and falling, indicating liquidity expansion.
Yellow background: policy rate is below its mean but rising, indicating early tightening or late-cycle caution.
The oscillator pane also includes optional curves for the macro oscillator, policy rate, cumulative mean policy rate, and inflation rate. Users can independently enable or disable each curve, each label, the background cycle color, and the horizontal risk levels.
The dashboard is displayed on the main chart and provides a structured macro view of Pakistan’s market conditions. It includes policy and inflation readings, real rates, GDP growth, unemployment, USD/PKR, FX reserves, current account, trade balance, remittances, external debt, Brent oil, DXY, emerging-market risk, gold, KSE100 trend, RSI, and sector tilt readings.
The table is divided into two parallel panels:
Left panel: policy cycle, core macro, growth, liquidity, FX view, inflation action, sector tilt, and final PSX bias.
Right panel: external pressure, global commodity pressure, KSE100 trend, and sector read.
The scoring system uses a simple green/yellow/orange/red color structure:
Green: supportive or improving conditions.
Yellow: neutral, mixed, or transition phase.
Orange: caution or pressure building.
Red: high macro risk or unfavorable condition.
This tool is designed for top-down macro analysis of the Pakistan equity market. It can help traders and investors understand whether the broader environment is supportive, neutral, or defensive before evaluating individual stocks or sectors.
Important: This indicator is for educational and analytical use only. It is not financial advice and should not be used as a standalone buy or sell signal. Users should combine it with price action, market structure, risk management, and their own independent analysis.
Indicator

Federal Funds ForecastThe Federal Funds Forecast is an all-in-one, forward-looking interest rate monitoring tool that tracks market expectations for the federal funds rate. It provides a comprehensive view of the Federal Reserve’s policy structure, overnight funding markets, and future rate expectations within a single framework, enabling real-time monitoring of funding conditions and evolving policy expectations. It features adjustable parameters and a clear, color-coded table that allows users to quickly assess the current market outlook and how expectations have evolved over time.
At its core, the model displays the main rates that define the US overnight funding system. The Federal Reserve implements monetary policy by establishing a target range for the federal funds rate. This range is maintained through a policy corridor defined by the Standing Repo Facility (SRF) rate at the upper bound and the Reverse Repo (RRP) rate at the lower bound, which serve as a ceiling and floor for overnight funding rates. Within this corridor, the Effective Federal Funds Rate (EFFR), Secured Overnight Financing Rate (SOFR), and Interest on Reserve Balances (IORB) are plotted to show how market rates trade relative to the Federal Reserve’s target range:
SOFR = Volume-weighted average rate of overnight borrowing backed by US Treasury collateral in the repo market, representing the broadest measure of secured funding.
EFFR = Volume-weighted average rate of overnight unsecured lending between banks in the federal funds market, which the Federal Reserve targets to implement monetary policy.
IORB = Interest rate paid by the Federal Reserve on reserve balances held at the Fed, acting as the primary anchor for overnight rates, as eligible banks can earn this rate risk-free.
Stress in the overnight funding market is measured as the spread between SOFR and IORB. Negative spreads typically reflect ample liquidity, as cash-rich lenders without access to IORB compete to lend in the repo market, pushing SOFR below IORB. Positive spreads typically reflect tighter conditions, as strong demand for funding pushes SOFR above IORB, creating an incentive to lend reserves. Sustained positive spreads typically signal funding stress, as persistent demand for cash is not met by sufficient lending supply, reflecting constraints that prevent full arbitrage of the spread. Persistent stress conditions are highlighted using optional background shading.
In addition to current conditions, the indicator displays the market’s implied path for future policy rates based on the Fed funds futures market. This forward path is shown as a dotted projection line extending from the current EFFR over the selected horizon, providing a clear view of whether the market is pricing in rate cuts, hikes, or a relatively stable policy path. The projection label summarizes the expected move in basis points and translates it into an approximate number of cuts or hikes, while the table provides a more detailed breakdown across multiple time horizons.
The table is divided into two main sections following the first row, which displays the current SOFR–IORB spread in basis points. The first section displays the implied difference between expected future rates and the current EFFR across 3M, 6M, 9M, 12M, 15M, and 18M horizons. Green indicates lower implied future rates, while red indicates higher implied future rates. The second section displays the difference between current expectations and prior expectations 1W, 2W, 3W, or 4W ago, based on the repricing period selected in the menu. Green reflects a shift in expectations toward easier policy, while red reflects a shift in expectations toward tighter policy.
In summary, the Federal Funds Forecast is a comprehensive monetary policy tool designed to provide investors with a clear view of the current US policy rate environment, overnight funding conditions, and market expectations for future Federal Reserve policy. While the model offers valuable insight into expectations derived from trading activity in the Fed funds futures market, these expectations reflect conditions at a specific point in time and can change rapidly as incoming data and Federal Reserve communication reshape the US monetary policy outlook. Indicator

Indicator

Indicator

FOMC Federal Fund Rate Tracker [MHA Finverse]The FOMC Rate Tracker is a comprehensive indicator that visualizes Federal Reserve interest rate decisions and tracks market behavior during FOMC meeting periods. This tool helps traders analyze historical rate changes and anticipate market movements around Federal Open Market Committee announcements.
Key Features:
• Visual FOMC Periods - Automatically highlights each FOMC meeting period with colored boxes spanning from announcement to the next meeting
• Complete Rate Data - Displays actual rates, forecasts, previous rates, and rate differences for every meeting from 2021-2026
• Multiple Color Modes - Choose between cycle colors for visual distinction or rate difference colors (green for hikes, red for cuts, gray for holds)
• Smart Filtering - Filter periods by rate hikes only, cuts only, no change, or surprise moves to focus on specific market conditions
• Performance Metrics - Track average returns during rate hikes, cuts, and holds to identify historical patterns
• Volatility Analysis - Measure and compare price volatility across different FOMC periods
• Statistical Dashboard - View total hikes, cuts, holds, surprises, and longest hold streaks at a glance
• Built-in Alerts - Get notified 1 day before FOMC meetings, on meeting day, or when rates change
How It Works:
The indicator divides your chart into distinct periods between FOMC meetings, with each period showing a labeled box containing the meeting date, actual rate, forecast, previous rate, and rate difference. Future meetings are marked as "UPCOMING" to help you prepare for scheduled announcements.
Use Cases:
- Analyze how markets typically react to rate hikes vs. cuts
- Identify volatility patterns around FOMC announcements
- Backtest strategies based on monetary policy cycles
- Plan trades around upcoming Federal Reserve meetings
- Study the impact of surprise rate decisions on price action
Customization Options:
- Adjustable box transparency and outlines
- Customizable label sizes and colors
- Toggle individual dashboards on/off
- Filter specific types of rate decisions
- Configure alert preferences
This indicator is ideal for traders who incorporate fundamental analysis and monetary policy into their trading decisions. The historical data provides context for understanding market reactions to Federal Reserve actions. Indicator

PCE Inflation Monitor (Change YoY & MoM)📊 PCE Inflation Monitor - The Fed's Most Important Metric
Personal Consumption Expenditures (PCE) is the Federal Reserve's preferred inflation measure and THE metric they target for their 2% inflation goal. If you want to predict Fed policy, you need to watch PCE.
🎯 KEY FEATURES:
- Dual Perspective Analysis:
- Year-over-Year (YoY): Histogram bars showing annual PCE inflation
- Month-over-Month (MoM): Line overlay showing monthly consumption price changes
- Visual Reference System:
- Dashed line at 2% (Fed's official PCE inflation target)
- Dotted line at 0.17% (equivalent monthly target)
- Color-coded bars: Red above Fed target, Green below target
- Real-Time Data Table:
- Current PCE Index value
- YoY inflation rate vs. Fed's 2% target
- MoM inflation rate with color coding
- Exact deviation from Fed target (critical for policy predictions)
- Automated Alerts:
- PCE crosses Fed's 2% target (major policy signal!)
- MoM crosses monthly target
- Stay informed of Fed-relevant inflation changes
📈 WHY PCE IS DIFFERENT (AND MORE IMPORTANT):
PCE vs. CPI differences:
- Flexible basket: PCE adjusts for substitution (beef → chicken if prices rise)
- Broader coverage: Includes healthcare paid by insurance/government
- Lower readings: Typically 0.2-0.4% below CPI
- Fed's choice: Explicitly stated as their target metric
Most importantly: When Powell speaks about "our 2% target," he means PCE, not CPI!
🔍 TRADING IMPLICATIONS:
PCE Above 2% (Red Zone):
→ Fed under pressure to maintain/raise rates
→ Hawkish policy stance likely
→ Negative for growth stocks, crypto
→ Positive for USD, bearish for gold
PCE Below 2% (Green Zone):
→ Fed has flexibility to cut rates
→ Dovish policy stance possible
→ Positive for risk assets, growth stocks
→ Negative for USD, bullish for commodities
PCE Approaching 2% from Above:
→ Fed "mission accomplished" narrative
→ Rate cut cycle becomes possible
→ Major bullish signal for equities/crypto
💡 ADVANCED STRATEGIES:
1. Fed Meeting Preparation: Check PCE before FOMC meetings for policy clues
2. Dot Plot Predictions: PCE trend determines Fed's rate forecast updates
3. Pivot Timing: When PCE MoM turns negative, Fed pivot becomes realistic
4. Press Conference Analysis: Compare Powell's comments to PCE deviation
🎯 KEY LEVELS TO WATCH:
- 2.0% YoY: Fed's official target - crossing this level is major news
- 2.5% YoY: "Uncomfortably high" - Fed forced to stay restrictive
- 3.0% YoY: "Crisis mode" - Fed turns very hawkish
- 1.5% YoY: "Below target" - Rate cuts become likely
🔄 COMBINE WITH:
- CPI: Public perception vs. Fed's metric (often diverge)
- Core PCE: Even more important (excludes food/energy volatility)
- Fed Funds Rate: Is Fed responding appropriately to PCE?
📊 DATA SOURCE:
Official PCE data from FRED (Federal Reserve Economic Data), updated monthly typically in the last week of each month (after CPI/PPI releases).
🎨 CUSTOMIZATION:
Fully customizable:
- Toggle YoY/MoM displays
- Adjust Fed target if needed
- Customize colors
- Show/hide absolute PCE values
Perfect for: Fed watchers, macro traders, policy analysts, and serious investors who want to predict monetary policy changes before they happen.
⚠️ CRITICAL INSIGHT: While media focuses on CPI, the Fed focuses on PCE. Trade what the Fed trades, not what the headlines say.
🎓 Pro Tip: Fed members often mention "Core PCE" (excluding food/energy). Consider adding that indicator alongside this one for complete Fed policy analysis. Indicator

Recession Warning Model [BackQuant]Recession Warning Model
Overview
The Recession Warning Model (RWM) is a Pine Script® indicator designed to estimate the probability of an economic recession by integrating multiple macroeconomic, market sentiment, and labor market indicators. It combines over a dozen data series into a transparent, adaptive, and actionable tool for traders, portfolio managers, and researchers. The model provides customizable complexity levels, display modes, and data processing options to accommodate various analytical requirements while ensuring robustness through dynamic weighting and regime-aware adjustments.
Purpose
The RWM fulfills the need for a concise yet comprehensive tool to monitor recession risk. Unlike approaches relying on a single metric, such as yield-curve inversion, or extensive economic reports, it consolidates multiple data sources into a single probability output. The model identifies active indicators, their confidence levels, and the current economic regime, enabling users to anticipate downturns and adjust strategies accordingly.
Core Features
- Indicator Families : Incorporates 13 indicators across five categories: Yield, Labor, Sentiment, Production, and Financial Stress.
- Dynamic Weighting : Adjusts indicator weights based on recent predictive accuracy, constrained within user-defined boundaries.
- Leading and Coincident Split : Separates early-warning (leading) and confirmatory (coincident) signals, with adjustable weighting (default 60/40 mix).
- Economic Regime Sensitivity : Modulates output sensitivity based on market conditions (Expansion, Late-Cycle, Stress, Crisis), using a composite of VIX, yield-curve, financial conditions, and credit spreads.
- Display Options : Supports four modes—Probability (0-100%), Binary (four risk bins), Lead/Coincident, and Ensemble (blended probability).
- Confidence Intervals : Reflects model stability, widening during high volatility or conflicting signals.
- Alerts : Configurable thresholds (Watch, Caution, Warning, Alert) with persistence filters to minimize false signals.
- Data Export : Enables CSV output for probabilities, signals, and regimes, facilitating external analysis in Python or R.
Model Complexity Levels
Users can select from four tiers to balance simplicity and depth:
1. Essential : Focuses on three core indicators—yield-curve spread, jobless claims, and unemployment change—for minimalistic monitoring.
2. Standard : Expands to nine indicators, adding consumer confidence, PMI, VIX, S&P 500 trend, money supply vs. GDP, and the Sahm Rule.
3. Professional : Includes all 13 indicators, incorporating financial conditions, credit spreads, JOLTS vacancies, and wage growth.
4. Research : Unlocks all indicators plus experimental settings for advanced users.
Key Indicators
Below is a summary of the 13 indicators, their data sources, and economic significance:
- Yield-Curve Spread : Difference between 10-year and 3-month Treasury yields. Negative spreads signal banking sector stress.
- Jobless Claims : Four-week moving average of unemployment claims. Sustained increases indicate rising layoffs.
- Unemployment Change : Three-month change in unemployment rate. Sharp rises often precede recessions.
- Sahm Rule : Triggers when unemployment rises 0.5% above its 12-month low, a reliable recession indicator.
- Consumer Confidence : University of Michigan survey. Declines reflect household pessimism, impacting spending.
- PMI : Purchasing Managers’ Index. Values below 50 indicate manufacturing contraction.
- VIX : CBOE Volatility Index. Elevated levels suggest market anticipation of economic distress.
- S&P 500 Growth : Weekly moving average trend. Declines reduce wealth effects, curbing consumption.
- M2 + GDP Trend : Monitors money supply and real GDP. Simultaneous declines signal credit contraction.
- NFCI : Chicago Fed’s National Financial Conditions Index. Positive values indicate tighter conditions.
- Credit Spreads : Proxy for corporate bond spreads using 10-year vs. 2-year Treasury yields. Widening spreads reflect stress.
- JOLTS Vacancies : Job openings data. Significant drops precede hiring slowdowns.
- Wage Growth : Year-over-year change in average hourly earnings. Late-cycle spikes often signal economic overheating.
Data Processing
- Rate of Change (ROC) : Optionally applied to capture momentum in data series (default: 21-bar period).
- Z-Score Normalization : Standardizes indicators to a common scale (default: 252-bar lookback).
- Smoothing : Applies a short moving average to final signals (default: 5-bar period) to reduce noise.
- Binary Signals : Generated for each indicator (e.g., yield-curve inverted or PMI below 50) based on thresholds or Z-score deviations.
Probability Calculation
1. Each indicator’s binary signal is weighted according to user settings or dynamic performance.
2. Weights are normalized to sum to 100% across active indicators.
3. Leading and coincident signals are aggregated separately (if split mode is enabled) and combined using the specified mix.
4. The probability is adjusted by a regime multiplier, amplifying risk during Stress or Crisis regimes.
5. Optional smoothing ensures stable outputs.
Display and Visualization
- Probability Mode : Plots a continuous 0-100% recession probability with color gradients and confidence bands.
- Binary Mode : Categorizes risk into four levels (Minimal, Watch, Caution, Alert) for simplified dashboards.
- Lead/Coincident Mode : Displays leading and coincident probabilities separately to track signal divergence.
- Ensemble Mode : Averages traditional and split probabilities for a balanced view.
- Regime Background : Color-coded overlays (green for Expansion, orange for Late-Cycle, amber for Stress, red for Crisis).
- Analytics Table : Optional dashboard showing probability, confidence, regime, and top indicator statuses.
Practical Applications
- Asset Allocation : Adjust equity or bond exposures based on sustained probability increases.
- Risk Management : Hedge portfolios with VIX futures or options during regime shifts to Stress or Crisis.
- Sector Rotation : Shift toward defensive sectors when coincident signals rise above 50%.
- Trading Filters : Disable short-term strategies during high-risk regimes.
- Event Timing : Scale positions ahead of high-impact data releases when probability and VIX are elevated.
Configuration Guidelines
- Enable ROC and Z-score for consistent indicator comparison unless raw data is preferred.
- Use dynamic weighting with at least one economic cycle of data for optimal performance.
- Monitor stress composite scores above 80 alongside probabilities above 70 for critical risk signals.
- Adjust adaptation speed (default: 0.1) to 0.2 during Crisis regimes for faster indicator prioritization.
- Combine RWM with complementary tools (e.g., liquidity metrics) for intraday or short-term trading.
Limitations
- Macro indicators lag intraday market moves, making RWM better suited for strategic rather than tactical trading.
- Historical data availability may constrain dynamic weighting on shorter timeframes.
- Model accuracy depends on the quality and timeliness of economic data feeds.
Final Note
The Recession Warning Model provides a disciplined framework for monitoring economic downturn risks. By integrating diverse indicators with transparent weighting and regime-aware adjustments, it empowers users to make informed decisions in portfolio management, risk hedging, or macroeconomic research. Regular review of model outputs alongside market-specific tools ensures its effective application across varying market conditions. Indicator

FEDFUNDS Rate Divergence Oscillator [BackQuant]FEDFUNDS Rate Divergence Oscillator
1. Concept and Rationale
The United States Federal Funds Rate is the anchor around which global dollar liquidity and risk-free yield expectations revolve. When the Fed hikes, borrowing costs rise, liquidity tightens and most risk assets encounter head-winds. When it cuts, liquidity expands, speculative appetite often recovers. Bitcoin, a 24-hour permissionless asset sometimes described as “digital gold with venture-capital-like convexity,” is particularly sensitive to macro-liquidity swings.
The FED Divergence Oscillator quantifies the behavioural gap between short-term monetary policy (proxied by the effective Fed Funds Rate) and Bitcoin’s own percentage price change. By converting each series into identical rate-of-change units, subtracting them, then optionally smoothing the result, the script produces a single bounded-yet-dynamic line that tells you, at a glance, whether Bitcoin is outperforming or underperforming the policy backdrop—and by how much.
2. Data Pipeline
• Fed Funds Rate – Pulled directly from the FRED database via the ticker “FRED:FEDFUNDS,” sampled at daily frequency to synchronise with crypto closes.
• Bitcoin Price – By default the script forces a daily timeframe so that both series share time alignment, although you can disable that and plot the oscillator on intraday charts if you prefer.
• User Source Flexibility – The BTC series is not hard-wired; you can select any exchange-specific symbol or even swap BTC for another crypto or risk asset whose interaction with the Fed rate you wish to study.
3. Math under the Hood
(1) Rate of Change (ROC) – Both the Fed rate and BTC close are converted to percent return over a user-chosen lookback (default 30 bars). This means a cut from 5.25 percent to 5.00 percent feeds in as –4.76 percent, while a climb from 25 000 to 30 000 USD in BTC over the same window converts to +20 percent.
(2) Divergence Construction – The script subtracts the Fed ROC from the BTC ROC. Positive values show BTC appreciating faster than policy is tightening (or falling slower than the rate is cutting); negative values show the opposite.
(3) Optional Smoothing – Macro series are noisy. Toggle “Apply Smoothing” to calm the line with your preferred moving-average flavour: SMA, EMA, DEMA, TEMA, RMA, WMA or Hull. The default EMA-25 removes day-to-day whips while keeping turning points alive.
(4) Dynamic Colour Mapping – Rather than using a single hue, the oscillator line employs a gradient where deep greens represent strong bullish divergence and dark reds flag sharp bearish divergence. This heat-map approach lets you gauge intensity without squinting at numbers.
(5) Threshold Grid – Five horizontal guides create a structured regime map:
• Lower Extreme (–50 pct) and Upper Extreme (+50 pct) identify panic capitulations and euphoria blow-offs.
• Oversold (–20 pct) and Overbought (+20 pct) act as early warning alarms.
• Zero Line demarcates neutral alignment.
4. Chart Furniture and User Interface
• Oscillator fill with a secondary DEMA-30 “shader” offers depth perception: fat ribbons often precede high-volatility macro shifts.
• Optional bar-colouring paints candles green when the oscillator is above zero and red below, handy for visual correlation.
• Background tints when the line breaches extreme zones, making macro inflection weeks pop out in the replay bar.
• Everything—line width, thresholds, colours—can be customised so the indicator blends into any template.
5. Interpretation Guide
Macro Liquidity Pulse
• When the oscillator spends weeks above +20 while the Fed is still raising rates, Bitcoin is signalling liquidity tolerance or an anticipatory pivot view. That condition often marks the embryonic phase of major bull cycles (e.g., March 2020 rebound).
• Sustained prints below –20 while the Fed is already dovish indicate risk aversion or idiosyncratic crypto stress—think exchange scandals or broad flight to safety.
Regime Transition Signals
• Bullish cross through zero after a long sub-zero stint shows Bitcoin regaining upward escape velocity versus policy.
• Bearish cross under zero during a hiking cycle tells you monetary tightening has finally started to bite.
Momentum Exhaustion and Mean-Reversion
• Touches of +50 (or –50) come rarely; they are statistically stretched events. Fade strategies either taking profits or hedging have historically enjoyed positive expectancy.
• Inside-bar candlestick patterns or lower-timeframe bearish engulfings simultaneously with an extreme overbought print make high-probability short scalp setups, especially near weekly resistance. The same logic mirrors for oversold.
Pair Trading / Relative Value
• Combine the oscillator with spreads like BTC versus Nasdaq 100. When both the FED Divergence oscillator and the BTC–NDQ relative-strength line roll south together, the cross-asset confirmation amplifies conviction in a mean-reversion short.
• Swap BTC for miners, altcoins or high-beta equities to test who is the divergence leader.
Event-Driven Tactics
• FOMC days: plot the oscillator on an hourly chart (disable ‘Force Daily TF’). Watch for micro-structural spikes that resolve in the first hour after the statement; rapid flips across zero can front-run post-FOMC swings.
• CPI and NFP prints: extremes reached into the release often mean positioning is one-sided. A reversion toward neutral in the first 24 hours is common.
6. Alerts Suite
Pre-bundled conditions let you automate workflows:
• Bullish / Bearish zero crosses – queue spot or futures entries.
• Standard OB / OS – notify for first contact with actionable zones.
• Extreme OB / OS – prime time to review hedges, take profits or build contrarian swing positions.
7. Parameter Playground
• Shorten ROC Lookback to 14 for tactical traders; lengthen to 90 for macro investors.
• Raise extreme thresholds (for example ±80) when plotting on altcoins that exhibit higher volatility than BTC.
• Try HMA smoothing for responsive yet smooth curves on intraday charts.
• Colour-blind users can easily swap bull and bear palette selections for preferred contrasts.
8. Limitations and Best Practices
• The Fed Funds series is step-wise; it only changes on meeting days. Rapid BTC oscillations in between may dominate the calculation. Keep that perspective when interpreting very high-frequency signals.
• Divergence does not equal causation. Crypto-native catalysts (ETF approvals, hack headlines) can overwhelm macro links temporarily.
• Use in conjunction with classical confirmation tools—order-flow footprints, market-profile ledges, or simple price action to avoid “pure-indicator” traps.
9. Final Thoughts
The FEDFUNDS Rate Divergence Oscillator distills an entire macro narrative monetary policy versus risk sentiment into a single colourful heartbeat. It will not magically predict every pivot, yet it excels at framing market context, spotting stretches and timing regime changes. Treat it as a strategic compass rather than a tactical sniper scope, combine it with sound risk management and multi-factor confirmation, and you will possess a robust edge anchored in the world’s most influential interest-rate benchmark.
Trade consciously, stay adaptive, and let the policy-price tension guide your roadmap. Indicator

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. Indicator

Indicator

Forex Macro Metrics [MacroGlide]"Forex Macro Metrics " is a powerful tool for analyzing macroeconomic metrics, designed to help traders make more informed decisions in the forex market. This indicator displays key economic indicators such as interest rates, money supply (M1 and M2), unemployment rate, and government debt for various currencies and their pairs, allowing users to assess the macroeconomic differences between the base and quote currencies.
Key Features:
• Interest Rates Display: Includes interest rates for major world currencies with the ability to show the differential between the base and quote currencies.
• Money Supply Analysis (M1 and M2): Displays the money supply for both the base and quote currencies, including differential calculations.
• Unemployment Rate: Compares the unemployment rates between currencies, showing the differences on the chart.
• Government Debt: Shows government debt levels for the base and quote currencies with differential calculations.
• Customizable Options: Enable/disable specific metrics and adjust colors for better visual clarity.
How to Use:
• Select a Currency Pair: Apply the indicator to your chart and choose the desired currency pair. The indicator will automatically load the relevant data for the base and quote currencies.
• Adjust Display Settings: Use the indicator settings to enable or disable specific metrics and their differentials.
• Analyze the Data: Compare the economic conditions of the two currencies through the charts and identify potential trading opportunities based on macroeconomic differences.
Methodology:
The indicator uses economic data available through TradingView tickers to calculate the values of the base and quote currencies. Differentials are calculated by subtracting the values of the quote currency from the base currency, allowing for a visual assessment of their differences. The displayed data includes historical changes, helping to identify trends and potential reversal points.
Originality and Usefulness:
"Forex Macro Metrics " is a unique tool that combines several key macroeconomic indicators into one comprehensive indicator. This simplifies the analysis process for traders looking to understand the fundamental differences between currencies. Using this approach provides an advantage in assessing long-term trends and potential shifts in currency pairs driven by changes in macroeconomic conditions.
Charts:
The indicator displays data in the form of lines and areas on the chart, with interest rates shown as lines for the base and quote currencies, accompanied by an area representing the differential. For money supply (M1 and M2), lines are drawn for each currency, with areas highlighting the differences. Similarly, the unemployment rate and government debt are displayed with clear visual separation of the data and their differentials, making it easy to compare and analyze the macroeconomic conditions of the currencies involved.
Enjoy the game! Indicator

Indicator

Interest Rate IndicatorThis script offers a overview of Year-over-Year (YoY) interest rates for key countries. The interest rate data utilized by default are sourced from TradingView Tickers, but they can be modified to any preferred source via the settings.
The script does not perform any calculations; its primary function is to present a comparative view of interest rates across different countries in a single indicator.
Key features include:
Interest rate data for the USA, European Union, Australia, Canada, Switzerland, Japan, United Kingdom, and New Zealand (Interest Rate Symbols are editable in the settings).
A table displaying country flags, names, and the latest interest rates, providing a clear and immediate comparison.
Country-representative colors for easy identification and visual distinction between different countries' data.
This indicator is designed for traders and analysts looking for a quick and efficient way to monitor and compare the interest rates of major economies directly within TradingView, facilitating better informed financial and investment decisions. Indicator

Indicator

Indicator

Indicator

Indicator

Central Bank Interest RatesThis indicator will show central bank interest rates on any major currency pairs.
I included the last 10 values for the study and will update them with future changes.
Major currencies: USD, CAD, NZD, AUD, JPY, EUR, CHF, GBP
I might add CZK, TRY, ZAR, and Yuan in the future. Indicator

Indicator

Indicator
