Squeeze Momentum Indicator [Comunidad Rafael Cepeda]Este indicador fue adaptado para el uso de la comunidad de Rafael cepeda Trader
Fundamental Analyse
Mongoose Global Conflict Risk Index v1Overview
The Mongoose Global Conflict Risk Index v1 is a multi-asset composite indicator designed to track the early pricing of geopolitical stress and potential conflict risk across global markets. By combining signals from safe havens, volatility indices, energy markets, and emerging market equities, the index provides a normalized 0–10 score with clear bias classifications (Neutral, Caution, Elevated, High, Shock).
This tool is not predictive of headlines but captures when markets are clustering around conflict-sensitive assets before events are widely recognized.
Methodology
The indicator calculates rolling rate-of-change z-scores for eight conflict-sensitive assets:
Gold (XAUUSD) – classic safe haven
US Dollar Index (DXY) – global reserve currency flows
VIX (Equity Volatility) – S&P 500 implied volatility
OVX (Crude Oil Volatility Index) – energy stress gauge
Crude Oil (CL1!) – WTI front contract
Natural Gas (NG1!) – energy security proxy, especially Europe
EEM (Emerging Markets ETF) – global risk capital flight
FXI (China ETF) – Asia/China proxy risk
Rules:
Safe havens and vol indices trigger when z-score > threshold.
Energy triggers when z-score > threshold.
Risk assets trigger when z-score < –threshold.
Each trigger is assigned a weight, summed, normalized, and scaled 0–10.
Bias classification:
0–2: Neutral
2–4: Caution
4–6: Elevated
6–8: High
8–10: Conflict Risk-On
How to Use
Timeframes:
Daily (1D) for strategic signals and early warnings.
4H for event shocks (missiles, sanctions, sudden escalations).
Weekly (1W) for sustained trends and macro build-ups.
What to Look For:
A single trigger (for example, Gold ON) may be noise.
A cluster of 2–3 triggers across Gold, USD, VIX, and Energy often marks early stress pricing.
Elevated readings (>4) = caution; High (>6) = rotation into havens; Shock (>8) = market conviction of conflict risk.
Practical Application:
Monitor as a heatmap of global stress.
Combine with fundamental or headline tracking.
Use alert conditions at ≥4, ≥6, ≥8 for systematic monitoring.
Notes
This indicator is for informational and educational purposes only.
It is not financial advice and should be used in conjunction with other analysis methods.
US Net Liquidity + M2 / US Debt (FRED)US Net Liquidity + M2 / US Debt
🧩 What this chart shows
This indicator plots the ratio of US Net Liquidity + M2 Money Supply divided by Total Public Debt.
US Net Liquidity is defined here as the Federal Reserve Balance Sheet (WALCL) minus the Treasury General Account (TGA) and the Overnight Reverse Repo facility (ON RRP).
M2 Money Supply represents the broad pool of liquid money circulating in the economy.
US Debt uses the Federal Government’s total outstanding debt.
By combining net liquidity with M2, then dividing by total debt, this chart provides a structural view of how much monetary “fuel” is in the system relative to the size of the federal debt load.
🧮 Formula
Ratio
=
(
Fed Balance Sheet
−
(
TGA
+
ON RRP
)
)
+
M2
Total Public Debt
Ratio=
Total Public Debt
(Fed Balance Sheet−(TGA+ON RRP))+M2
An optional normalization feature scales the ratio to start at 100 on the first valid bar, making long-term trends easier to compare.
🔎 Why it matters
Liquidity vs. Debt Growth: The numerator (Net Liquidity + M2) captures the monetary resources available to markets, while the denominator (Debt) reflects the expanding obligation of the federal government.
Market Signal: Historically, shifts in net liquidity and money supply relative to debt have coincided with major turning points in risk assets like equities and Bitcoin.
Context: A rising ratio may suggest that liquidity conditions are improving relative to debt expansion, which can be supportive for risk assets. Conversely, a falling ratio may highlight tightening conditions or debt outpacing liquidity growth.
⚙️ How to use it
Overlay this chart against S&P 500, Bitcoin, or gold to analyze correlations with asset performance.
Watch for trend inflections—does the ratio bottom before equities rally, or peak before risk-off periods?
Use normalization for long historical comparisons, or raw values to see the absolute ratio.
📊 Data sources
This indicator pulls from FRED (Federal Reserve Economic Data) tickers available in TradingView:
WALCL: Fed balance sheet
RRPONTSYD: Overnight Reverse Repo
WTREGEN: Treasury General Account
M2SL: M2 money stock
GFDEBTN: Total federal public debt
⚠️ Notes
Some FRED series are updated weekly, others monthly—set your chart timeframe accordingly.
If any ticker is unavailable in your plan, replace it with the equivalent FRED symbol provided in TradingView.
This indicator is intended for macro analysis, not short-term trading signals.
Small Business Economic Conditions - Statistical Analysis ModelThe Small Business Economic Conditions Statistical Analysis Model (SBO-SAM) represents an econometric approach to measuring and analyzing the economic health of small business enterprises through multi-dimensional factor analysis and statistical methodologies. This indicator synthesizes eight fundamental economic components into a composite index that provides real-time assessment of small business operating conditions with statistical rigor. The model employs Z-score standardization, variance-weighted aggregation, higher-order moment analysis, and regime-switching detection to deliver comprehensive insights into small business economic conditions with statistical confidence intervals and multi-language accessibility.
1. Introduction and Theoretical Foundation
The development of quantitative models for assessing small business economic conditions has gained significant importance in contemporary financial analysis, particularly given the critical role small enterprises play in economic development and employment generation. Small businesses, typically defined as enterprises with fewer than 500 employees according to the U.S. Small Business Administration, constitute approximately 99.9% of all businesses in the United States and employ nearly half of the private workforce (U.S. Small Business Administration, 2024).
The theoretical framework underlying the SBO-SAM model draws extensively from established academic research in small business economics and quantitative finance. The foundational understanding of key drivers affecting small business performance builds upon the seminal work of Dunkelberg and Wade (2023) in their analysis of small business economic trends through the National Federation of Independent Business (NFIB) Small Business Economic Trends survey. Their research established the critical importance of optimism, hiring plans, capital expenditure intentions, and credit availability as primary determinants of small business performance.
The model incorporates insights from Federal Reserve Board research, particularly the Senior Loan Officer Opinion Survey (Federal Reserve Board, 2024), which demonstrates the critical importance of credit market conditions in small business operations. This research consistently shows that small businesses face disproportionate challenges during periods of credit tightening, as they typically lack access to capital markets and rely heavily on bank financing.
The statistical methodology employed in this model follows the econometric principles established by Hamilton (1989) in his work on regime-switching models and time series analysis. Hamilton's framework provides the theoretical foundation for identifying different economic regimes and understanding how economic relationships may vary across different market conditions. The variance-weighted aggregation technique draws from modern portfolio theory as developed by Markowitz (1952) and later refined by Sharpe (1964), applying these concepts to economic indicator construction rather than traditional asset allocation.
Additional theoretical support comes from the work of Engle and Granger (1987) on cointegration analysis, which provides the statistical framework for combining multiple time series while maintaining long-term equilibrium relationships. The model also incorporates insights from behavioral economics research by Kahneman and Tversky (1979) on prospect theory, recognizing that small business decision-making may exhibit systematic biases that affect economic outcomes.
2. Model Architecture and Component Structure
The SBO-SAM model employs eight orthogonalized economic factors that collectively capture the multifaceted nature of small business operating conditions. Each component is normalized using Z-score standardization with a rolling 252-day window, representing approximately one business year of trading data. This approach ensures statistical consistency across different market regimes and economic cycles, following the methodology established by Tsay (2010) in his treatment of financial time series analysis.
2.1 Small Cap Relative Performance Component
The first component measures the performance of the Russell 2000 index relative to the S&P 500, capturing the market-based assessment of small business equity valuations. This component reflects investor sentiment toward smaller enterprises and provides a forward-looking perspective on small business prospects. The theoretical justification for this component stems from the efficient market hypothesis as formulated by Fama (1970), which suggests that stock prices incorporate all available information about future prospects.
The calculation employs a 20-day rate of change with exponential smoothing to reduce noise while preserving signal integrity. The mathematical formulation is:
Small_Cap_Performance = (Russell_2000_t / S&P_500_t) / (Russell_2000_{t-20} / S&P_500_{t-20}) - 1
This relative performance measure eliminates market-wide effects and isolates the specific performance differential between small and large capitalization stocks, providing a pure measure of small business market sentiment.
2.2 Credit Market Conditions Component
Credit Market Conditions constitute the second component, incorporating commercial lending volumes and credit spread dynamics. This factor recognizes that small businesses are particularly sensitive to credit availability and borrowing costs, as established in numerous Federal Reserve studies (Bernanke and Gertler, 1995). Small businesses typically face higher borrowing costs and more stringent lending standards compared to larger enterprises, making credit conditions a critical determinant of their operating environment.
The model calculates credit spreads using high-yield bond ETFs relative to Treasury securities, providing a market-based measure of credit risk premiums that directly affect small business borrowing costs. The component also incorporates commercial and industrial loan growth data from the Federal Reserve's H.8 statistical release, which provides direct evidence of lending activity to businesses.
The mathematical specification combines these elements as:
Credit_Conditions = α₁ × (HYG_t / TLT_t) + α₂ × C&I_Loan_Growth_t
where HYG represents high-yield corporate bond ETF prices, TLT represents long-term Treasury ETF prices, and C&I_Loan_Growth represents the rate of change in commercial and industrial loans outstanding.
2.3 Labor Market Dynamics Component
The Labor Market Dynamics component captures employment cost pressures and labor availability metrics through the relationship between job openings and unemployment claims. This factor acknowledges that labor market tightness significantly impacts small business operations, as these enterprises typically have less flexibility in wage negotiations and face greater challenges in attracting and retaining talent during periods of low unemployment.
The theoretical foundation for this component draws from search and matching theory as developed by Mortensen and Pissarides (1994), which explains how labor market frictions affect employment dynamics. Small businesses often face higher search costs and longer hiring processes, making them particularly sensitive to labor market conditions.
The component is calculated as:
Labor_Tightness = Job_Openings_t / (Unemployment_Claims_t × 52)
This ratio provides a measure of labor market tightness, with higher values indicating greater difficulty in finding workers and potential wage pressures.
2.4 Consumer Demand Strength Component
Consumer Demand Strength represents the fourth component, combining consumer sentiment data with retail sales growth rates. Small businesses are disproportionately affected by consumer spending patterns, making this component crucial for assessing their operating environment. The theoretical justification comes from the permanent income hypothesis developed by Friedman (1957), which explains how consumer spending responds to both current conditions and future expectations.
The model weights consumer confidence and actual spending data to provide both forward-looking sentiment and contemporaneous demand indicators. The specification is:
Demand_Strength = β₁ × Consumer_Sentiment_t + β₂ × Retail_Sales_Growth_t
where β₁ and β₂ are determined through principal component analysis to maximize the explanatory power of the combined measure.
2.5 Input Cost Pressures Component
Input Cost Pressures form the fifth component, utilizing producer price index data to capture inflationary pressures on small business operations. This component is inversely weighted, recognizing that rising input costs negatively impact small business profitability and operating conditions. Small businesses typically have limited pricing power and face challenges in passing through cost increases to customers, making them particularly vulnerable to input cost inflation.
The theoretical foundation draws from cost-push inflation theory as described by Gordon (1988), which explains how supply-side price pressures affect business operations. The model employs a 90-day rate of change to capture medium-term cost trends while filtering out short-term volatility:
Cost_Pressure = -1 × (PPI_t / PPI_{t-90} - 1)
The negative weighting reflects the inverse relationship between input costs and business conditions.
2.6 Monetary Policy Impact Component
Monetary Policy Impact represents the sixth component, incorporating federal funds rates and yield curve dynamics. Small businesses are particularly sensitive to interest rate changes due to their higher reliance on variable-rate financing and limited access to capital markets. The theoretical foundation comes from monetary transmission mechanism theory as developed by Bernanke and Blinder (1992), which explains how monetary policy affects different segments of the economy.
The model calculates the absolute deviation of federal funds rates from a neutral 2% level, recognizing that both extremely low and high rates can create operational challenges for small enterprises. The yield curve component captures the shape of the term structure, which affects both borrowing costs and economic expectations:
Monetary_Impact = γ₁ × |Fed_Funds_Rate_t - 2.0| + γ₂ × (10Y_Yield_t - 2Y_Yield_t)
2.7 Currency Valuation Effects Component
Currency Valuation Effects constitute the seventh component, measuring the impact of US Dollar strength on small business competitiveness. A stronger dollar can benefit businesses with significant import components while disadvantaging exporters. The model employs Dollar Index volatility as a proxy for currency-related uncertainty that affects small business planning and operations.
The theoretical foundation draws from international trade theory and the work of Krugman (1987) on exchange rate effects on different business segments. Small businesses often lack hedging capabilities, making them more vulnerable to currency fluctuations:
Currency_Impact = -1 × DXY_Volatility_t
2.8 Regional Banking Health Component
The eighth and final component, Regional Banking Health, assesses the relative performance of regional banks compared to large financial institutions. Regional banks traditionally serve as primary lenders to small businesses, making their health a critical factor in small business credit availability and overall operating conditions.
This component draws from the literature on relationship banking as developed by Boot (2000), which demonstrates the importance of bank-borrower relationships, particularly for small enterprises. The calculation compares regional bank performance to large financial institutions:
Banking_Health = (Regional_Banks_Index_t / Large_Banks_Index_t) - 1
3. Statistical Methodology and Advanced Analytics
The model employs statistical techniques to ensure robustness and reliability. Z-score normalization is applied to each component using rolling 252-day windows, providing standardized measures that remain consistent across different time periods and market conditions. This approach follows the methodology established by Engle and Granger (1987) in their cointegration analysis framework.
3.1 Variance-Weighted Aggregation
The composite index calculation utilizes variance-weighted aggregation, where component weights are determined by the inverse of their historical variance. This approach, derived from modern portfolio theory, ensures that more stable components receive higher weights while reducing the impact of highly volatile factors. The mathematical formulation follows the principle that optimal weights are inversely proportional to variance, maximizing the signal-to-noise ratio of the composite indicator.
The weight for component i is calculated as:
w_i = (1/σᵢ²) / Σⱼ(1/σⱼ²)
where σᵢ² represents the variance of component i over the lookback period.
3.2 Higher-Order Moment Analysis
Higher-order moment analysis extends beyond traditional mean and variance calculations to include skewness and kurtosis measurements. Skewness provides insight into the asymmetry of the sentiment distribution, while kurtosis measures the tail behavior and potential for extreme events. These metrics offer valuable information about the underlying distribution characteristics and potential regime changes.
Skewness is calculated as:
Skewness = E / σ³
Kurtosis is calculated as:
Kurtosis = E / σ⁴ - 3
where μ represents the mean and σ represents the standard deviation of the distribution.
3.3 Regime-Switching Detection
The model incorporates regime-switching detection capabilities based on the Hamilton (1989) framework. This allows for identification of different economic regimes characterized by distinct statistical properties. The regime classification employs percentile-based thresholds:
- Regime 3 (Very High): Percentile rank > 80
- Regime 2 (High): Percentile rank 60-80
- Regime 1 (Moderate High): Percentile rank 50-60
- Regime 0 (Neutral): Percentile rank 40-50
- Regime -1 (Moderate Low): Percentile rank 30-40
- Regime -2 (Low): Percentile rank 20-30
- Regime -3 (Very Low): Percentile rank < 20
3.4 Information Theory Applications
The model incorporates information theory concepts, specifically Shannon entropy measurement, to assess the information content of the sentiment distribution. Shannon entropy, as developed by Shannon (1948), provides a measure of the uncertainty or information content in a probability distribution:
H(X) = -Σᵢ p(xᵢ) log₂ p(xᵢ)
Higher entropy values indicate greater unpredictability and information content in the sentiment series.
3.5 Long-Term Memory Analysis
The Hurst exponent calculation provides insight into the long-term memory characteristics of the sentiment series. Originally developed by Hurst (1951) for analyzing Nile River flow patterns, this measure has found extensive application in financial time series analysis. The Hurst exponent H is calculated using the rescaled range statistic:
H = log(R/S) / log(T)
where R/S represents the rescaled range and T represents the time period. Values of H > 0.5 indicate long-term positive autocorrelation (persistence), while H < 0.5 indicates mean-reverting behavior.
3.6 Structural Break Detection
The model employs Chow test approximation for structural break detection, based on the methodology developed by Chow (1960). This technique identifies potential structural changes in the underlying relationships by comparing the stability of regression parameters across different time periods:
Chow_Statistic = (RSS_restricted - RSS_unrestricted) / RSS_unrestricted × (n-2k)/k
where RSS represents residual sum of squares, n represents sample size, and k represents the number of parameters.
4. Implementation Parameters and Configuration
4.1 Language Selection Parameters
The model provides comprehensive multi-language support across five languages: English, German (Deutsch), Spanish (Español), French (Français), and Japanese (日本語). This feature enhances accessibility for international users and ensures cultural appropriateness in terminology usage. The language selection affects all internal displays, statistical classifications, and alert messages while maintaining consistency in underlying calculations.
4.2 Model Configuration Parameters
Calculation Method: Users can select from four aggregation methodologies:
- Equal-Weighted: All components receive identical weights
- Variance-Weighted: Components weighted inversely to their historical variance
- Principal Component: Weights determined through principal component analysis
- Dynamic: Adaptive weighting based on recent performance
Sector Specification: The model allows for sector-specific calibration:
- General: Broad-based small business assessment
- Retail: Emphasis on consumer demand and seasonal factors
- Manufacturing: Enhanced weighting of input costs and currency effects
- Services: Focus on labor market dynamics and consumer demand
- Construction: Emphasis on credit conditions and monetary policy
Lookback Period: Statistical analysis window ranging from 126 to 504 trading days, with 252 days (one business year) as the optimal default based on academic research.
Smoothing Period: Exponential moving average period from 1 to 21 days, with 5 days providing optimal noise reduction while preserving signal integrity.
4.3 Statistical Threshold Parameters
Upper Statistical Boundary: Configurable threshold between 60-80 (default 70) representing the upper significance level for regime classification.
Lower Statistical Boundary: Configurable threshold between 20-40 (default 30) representing the lower significance level for regime classification.
Statistical Significance Level (α): Alpha level for statistical tests, configurable between 0.01-0.10 with 0.05 as the standard academic default.
4.4 Display and Visualization Parameters
Color Theme Selection: Eight professional color schemes optimized for different user preferences and accessibility requirements:
- Gold: Traditional financial industry colors
- EdgeTools: Professional blue-gray scheme
- Behavioral: Psychology-based color mapping
- Quant: Value-based quantitative color scheme
- Ocean: Blue-green maritime theme
- Fire: Warm red-orange theme
- Matrix: Green-black technology theme
- Arctic: Cool blue-white theme
Dark Mode Optimization: Automatic color adjustment for dark chart backgrounds, ensuring optimal readability across different viewing conditions.
Line Width Configuration: Main index line thickness adjustable from 1-5 pixels for optimal visibility.
Background Intensity: Transparency control for statistical regime backgrounds, adjustable from 90-99% for subtle visual enhancement without distraction.
4.5 Alert System Configuration
Alert Frequency Options: Three frequency settings to match different trading styles:
- Once Per Bar: Single alert per bar formation
- Once Per Bar Close: Alert only on confirmed bar close
- All: Continuous alerts for real-time monitoring
Statistical Extreme Alerts: Notifications when the index reaches 99% confidence levels (Z-score > 2.576 or < -2.576).
Regime Transition Alerts: Notifications when statistical boundaries are crossed, indicating potential regime changes.
5. Practical Application and Interpretation Guidelines
5.1 Index Interpretation Framework
The SBO-SAM index operates on a 0-100 scale with statistical normalization ensuring consistent interpretation across different time periods and market conditions. Values above 70 indicate statistically elevated small business conditions, suggesting favorable operating environment with potential for expansion and growth. Values below 30 indicate statistically reduced conditions, suggesting challenging operating environment with potential constraints on business activity.
The median reference line at 50 represents the long-term equilibrium level, with deviations providing insight into cyclical conditions relative to historical norms. The statistical confidence bands at 95% levels (approximately ±2 standard deviations) help identify when conditions reach statistically significant extremes.
5.2 Regime Classification System
The model employs a seven-level regime classification system based on percentile rankings:
Very High Regime (P80+): Exceptional small business conditions, typically associated with strong economic growth, easy credit availability, and favorable regulatory environment. Historical analysis suggests these periods often precede economic peaks and may warrant caution regarding sustainability.
High Regime (P60-80): Above-average conditions supporting business expansion and investment. These periods typically feature moderate growth, stable credit conditions, and positive consumer sentiment.
Moderate High Regime (P50-60): Slightly above-normal conditions with mixed signals. Careful monitoring of individual components helps identify emerging trends.
Neutral Regime (P40-50): Balanced conditions near long-term equilibrium. These periods often represent transition phases between different economic cycles.
Moderate Low Regime (P30-40): Slightly below-normal conditions with emerging headwinds. Early warning signals may appear in credit conditions or consumer demand.
Low Regime (P20-30): Below-average conditions suggesting challenging operating environment. Businesses may face constraints on growth and expansion.
Very Low Regime (P0-20): Severely constrained conditions, typically associated with economic recessions or financial crises. These periods often present opportunities for contrarian positioning.
5.3 Component Analysis and Diagnostics
Individual component analysis provides valuable diagnostic information about the underlying drivers of overall conditions. Divergences between components can signal emerging trends or structural changes in the economy.
Credit-Labor Divergence: When credit conditions improve while labor markets tighten, this may indicate early-stage economic acceleration with potential wage pressures.
Demand-Cost Divergence: Strong consumer demand coupled with rising input costs suggests inflationary pressures that may constrain small business margins.
Market-Fundamental Divergence: Disconnection between small-cap equity performance and fundamental conditions may indicate market inefficiencies or changing investor sentiment.
5.4 Temporal Analysis and Trend Identification
The model provides multiple temporal perspectives through momentum analysis, rate of change calculations, and trend decomposition. The 20-day momentum indicator helps identify short-term directional changes, while the Hodrick-Prescott filter approximation separates cyclical components from long-term trends.
Acceleration analysis through second-order momentum calculations provides early warning signals for potential trend reversals. Positive acceleration during declining conditions may indicate approaching inflection points, while negative acceleration during improving conditions may suggest momentum loss.
5.5 Statistical Confidence and Uncertainty Quantification
The model provides comprehensive uncertainty quantification through confidence intervals, volatility measures, and regime stability analysis. The 95% confidence bands help users understand the statistical significance of current readings and identify when conditions reach historically extreme levels.
Volatility analysis provides insight into the stability of current conditions, with higher volatility indicating greater uncertainty and potential for rapid changes. The regime stability measure, calculated as the inverse of volatility, helps assess the sustainability of current conditions.
6. Risk Management and Limitations
6.1 Model Limitations and Assumptions
The SBO-SAM model operates under several important assumptions that users must understand for proper interpretation. The model assumes that historical relationships between economic variables remain stable over time, though the regime-switching framework helps accommodate some structural changes. The 252-day lookback period provides reasonable statistical power while maintaining sensitivity to changing conditions, but may not capture longer-term structural shifts.
The model's reliance on publicly available economic data introduces inherent lags in some components, particularly those based on government statistics. Users should consider these timing differences when interpreting real-time conditions. Additionally, the model's focus on quantitative factors may not fully capture qualitative factors such as regulatory changes, geopolitical events, or technological disruptions that could significantly impact small business conditions.
The model's timeframe restrictions ensure statistical validity by preventing application to intraday periods where the underlying economic relationships may be distorted by market microstructure effects, trading noise, and temporal misalignment with the fundamental data sources. Users must utilize daily or longer timeframes to ensure the model's statistical foundations remain valid and interpretable.
6.2 Data Quality and Reliability Considerations
The model's accuracy depends heavily on the quality and availability of underlying economic data. Market-based components such as equity indices and bond prices provide real-time information but may be subject to short-term volatility unrelated to fundamental conditions. Economic statistics provide more stable fundamental information but may be subject to revisions and reporting delays.
Users should be aware that extreme market conditions may temporarily distort some components, particularly those based on financial market data. The model's statistical normalization helps mitigate these effects, but users should exercise additional caution during periods of market stress or unusual volatility.
6.3 Interpretation Caveats and Best Practices
The SBO-SAM model provides statistical analysis and should not be interpreted as investment advice or predictive forecasting. The model's output represents an assessment of current conditions based on historical relationships and may not accurately predict future outcomes. Users should combine the model's insights with other analytical tools and fundamental analysis for comprehensive decision-making.
The model's regime classifications are based on historical percentile rankings and may not fully capture the unique characteristics of current economic conditions. Users should consider the broader economic context and potential structural changes when interpreting regime classifications.
7. Academic References and Bibliography
Bernanke, B. S., & Blinder, A. S. (1992). The Federal Funds Rate and the Channels of Monetary Transmission. American Economic Review, 82(4), 901-921.
Bernanke, B. S., & Gertler, M. (1995). Inside the Black Box: The Credit Channel of Monetary Policy Transmission. Journal of Economic Perspectives, 9(4), 27-48.
Boot, A. W. A. (2000). Relationship Banking: What Do We Know? Journal of Financial Intermediation, 9(1), 7-25.
Chow, G. C. (1960). Tests of Equality Between Sets of Coefficients in Two Linear Regressions. Econometrica, 28(3), 591-605.
Dunkelberg, W. C., & Wade, H. (2023). NFIB Small Business Economic Trends. National Federation of Independent Business Research Foundation, Washington, D.C.
Engle, R. F., & Granger, C. W. J. (1987). Co-integration and Error Correction: Representation, Estimation, and Testing. Econometrica, 55(2), 251-276.
Fama, E. F. (1970). Efficient Capital Markets: A Review of Theory and Empirical Work. Journal of Finance, 25(2), 383-417.
Federal Reserve Board. (2024). Senior Loan Officer Opinion Survey on Bank Lending Practices. Board of Governors of the Federal Reserve System, Washington, D.C.
Friedman, M. (1957). A Theory of the Consumption Function. Princeton University Press, Princeton, NJ.
Gordon, R. J. (1988). The Role of Wages in the Inflation Process. American Economic Review, 78(2), 276-283.
Hamilton, J. D. (1989). A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle. Econometrica, 57(2), 357-384.
Hurst, H. E. (1951). Long-term Storage Capacity of Reservoirs. Transactions of the American Society of Civil Engineers, 116(1), 770-799.
Kahneman, D., & Tversky, A. (1979). Prospect Theory: An Analysis of Decision under Risk. Econometrica, 47(2), 263-291.
Krugman, P. (1987). Pricing to Market When the Exchange Rate Changes. In S. W. Arndt & J. D. Richardson (Eds.), Real-Financial Linkages among Open Economies (pp. 49-70). MIT Press, Cambridge, MA.
Markowitz, H. (1952). Portfolio Selection. Journal of Finance, 7(1), 77-91.
Mortensen, D. T., & Pissarides, C. A. (1994). Job Creation and Job Destruction in the Theory of Unemployment. Review of Economic Studies, 61(3), 397-415.
Shannon, C. E. (1948). A Mathematical Theory of Communication. Bell System Technical Journal, 27(3), 379-423.
Sharpe, W. F. (1964). Capital Asset Prices: A Theory of Market Equilibrium under Conditions of Risk. Journal of Finance, 19(3), 425-442.
Tsay, R. S. (2010). Analysis of Financial Time Series (3rd ed.). John Wiley & Sons, Hoboken, NJ.
U.S. Small Business Administration. (2024). Small Business Profile. Office of Advocacy, Washington, D.C.
8. Technical Implementation Notes
The SBO-SAM model is implemented in Pine Script version 6 for the TradingView platform, ensuring compatibility with modern charting and analysis tools. The implementation follows best practices for financial indicator development, including proper error handling, data validation, and performance optimization.
The model includes comprehensive timeframe validation to ensure statistical accuracy and reliability. The indicator operates exclusively on daily (1D) timeframes or higher, including weekly (1W), monthly (1M), and longer periods. This restriction ensures that the statistical analysis maintains appropriate temporal resolution for the underlying economic data sources, which are primarily reported on daily or longer intervals.
When users attempt to apply the model to intraday timeframes (such as 1-minute, 5-minute, 15-minute, 30-minute, 1-hour, 2-hour, 4-hour, 6-hour, 8-hour, or 12-hour charts), the system displays a comprehensive error message in the user's selected language and prevents execution. This safeguard protects users from potentially misleading results that could occur when applying daily-based economic analysis to shorter timeframes where the underlying data relationships may not hold.
The model's statistical calculations are performed using vectorized operations where possible to ensure computational efficiency. The multi-language support system employs Unicode character encoding to ensure proper display of international characters across different platforms and devices.
The alert system utilizes TradingView's native alert functionality, providing users with flexible notification options including email, SMS, and webhook integrations. The alert messages include comprehensive statistical information to support informed decision-making.
The model's visualization system employs professional color schemes designed for optimal readability across different chart backgrounds and display devices. The system includes dynamic color transitions based on momentum and volatility, professional glow effects for enhanced line visibility, and transparency controls that allow users to customize the visual intensity to match their preferences and analytical requirements. The clean confidence band implementation provides clear statistical boundaries without visual distractions, maintaining focus on the analytical content.
ES/NQ, Pre-Market High & Low (04:00 AM - 09:30 AM)This indicator marks the Pre market high and Pre market low from 04:00am to 09:30am for any us Index
Fed Funds Rate-of-ChangeFed Funds Rate-of-Change
What it does:
This indicator pulls the Effective Federal Funds Rate (FRED:FEDFUNDS, monthly) and measures how quickly it’s changing over a user-defined lookback. It offers stabilized change metrics that avoid the “near-zero blow-up” you see with naive % ROC. The plot turns red only when the signal is below the lower threshold and heading down (i.e., value < –threshold and slope < 0).
This indicator is meant to be useful in monitoring fast cuts on the part of the FED - a signal that has preceded recession or market pullbacks in times prior.
Change modes: Percentage, log and delta.
Percent ROC (ε floor): 100 * (now - prev) / max(prev, ε)
Log change (ε): 100 * (ln(now + ε) - ln(prev + ε))
Delta (bps): (now - prev) * 100 (basis points; avoids percentage math)
Tip: For “least drama,” use Delta (bps). For relative change without explosions near zero, use Log change (ε).
Key inputs:
Lookback (months): ROC window in calendar months (because source is monthly).
Change Metric: one of the three options above.
ε (percentage points): small constant (e.g., 0.25 pp) used by Percent ROC (ε) and Log change (ε) to stabilize near-zero values.
EMA Smoothing length: light smoothing of the computed series.
Clip |value| at: optional hard cap to tame outliers (0 = off).
Threshold % / Threshold bps: lower/upper threshold band; unit adapts to the selected metric.
Plot as histogram: optional histogram view.
Coloring / signal logic
Red: value is below the lower threshold (–threshold) and the series is falling on the current bar.
How to use:
Add to any chart (timeframe doesn’t matter; data is monthly under the hood).
Pick a Change Metric and set Lookback (e.g., 3–6 months).
Choose a reasonable threshold:
Percent/Log: try 10–20%
Delta (bps): try 50–100 bps
Optionally smooth (EMA 3–6) and/or clip extreme spikes.
Interpretation
Sustained red often marks periods of accelerating downside in the Fed Funds change metric (e.g., policy easing momentum when using bps).
Neutral (gray) provides context without implying direction bias.
Notes & limitations
Source is monthly FRED series; values update on monthly closes and are stable (no intrabar repainting of the monthly series).
Threshold units switch automatically with the metric (%, %, or bps).
Smoothing/clip are convenience tools; adjust conservatively to avoid masking important shifts.
Grand Master's Candlestick Dominance (ATR Enhanced)### Grand Master's Candlestick Dominance (ATR Enhanced)
**Overview**
Unleash the ancient wisdom of Japanese candlestick charting with a modern twist! This comprehensive Pine Script v5 strategy and indicator scans for over 75 classic and advanced candlestick patterns (bullish, bearish, and neutral), assigning dynamic strength scores (1-10) to each for precise signal filtering. Enhanced with Average True Range (ATR) for volatility-aware body size validation, it dominates the markets by combining timeless pattern recognition with robust confirmation layers. Whether used as a backtestable strategy or visual indicator, it empowers traders to spot high-probability reversals, continuations, and indecision setups with surgical accuracy.
Inspired by Steve Nison's *Japanese Candlestick Charting Techniques*, this tool elevates pattern analysis beyond basics—think Hammers, Engulfing patterns, Morning Stars, and rare gems like Abandoned Baby or Concealing Baby Swallow—all consolidated into intelligent arrays for real-time averaging and prioritization.
**Key Features**
- **Extensive Pattern Library**:
- **Bullish (25+ patterns)**: Hammer (8.0), Bullish Engulfing (10.0), Morning Star (7.0), Three White Soldiers (9.0), Dragonfly Doji (8.0), and more (e.g., Rising Three, Unique Three River Bottom).
- **Bearish (25+ patterns)**: Hanging Man (8.0), Bearish Engulfing (10.0), Evening Star (7.0), Three Black Crows (9.0), Gravestone Doji (8.0), and exotics like Upside Gap Two Crows or Stalled Pattern.
- **Neutral/Indecision (34+ patterns)**: Doji variants (Long-Legged, Four Price), Spinning Tops, Harami Crosses, and multi-bar setups like Upside Tasuki Gap or Advancing Block.
Each pattern includes duration tracking (1-5 bars) and ATR-adjusted body/shadow criteria for relevance in volatile conditions.
- **Smart Confirmation Filters** (All Toggleable):
- **Trend Alignment**: 20-period SMA (customizable) ensures entries align with the prevailing trend; optional higher timeframe (e.g., Daily) MA crossover for multi-timeframe confluence.
- **Support/Resistance (S/R)**: Pivot-based levels with 0.01% tolerance to confirm bounces or breaks.
- **Volume Surge**: 20-period volume MA with 1.5x spike multiplier to validate momentum.
- **ATR Body Sizing**: Filters small bodies (<0.3x ATR) and long bodies (>0.8x ATR) for context-aware pattern reliability.
- **Follow-Through**: Ensures post-pattern confirmation via bullish/bearish closes or closes beyond prior bars.
Minimum average strength (default 7.0) and individual pattern thresholds (5.0) prevent weak signals.
- **Entry & Exit Logic**:
- **Long Entry**: Bullish average strength ≥7.0 (outweighing bearish), uptrend, volume spike, near support, follow-through, and HTF alignment.
- **Short Entry**: Mirror for bearish dominance in downtrends near resistance.
- **Exits**: Bearish/neutral shift, or fixed TP (5%) / SL (2%)—pyramiding disabled, 10% equity sizing.
- Backtest range: Jan 1, 2020 – Dec 31, 2025 (editable). Initial capital: $10,000.
- **Interactive Dashboard** (Top-Right Panel):
Real-time insights including:
- Market phase (e.g., "Bullish Phase (Avg Str: 8.2)"), active pattern (e.g., "BULLISH: Bullish Engulfing (Str: 10.0, Bars: 2)"), and trend status.
- Strength breakdowns (Bull/Bear/Neutral counts & averages).
- Filter status (e.g., "Volume: ✔ Spike", "ATR: Enabled (L:0.8, S:0.3)").
- Backtest stats: Total trades, win rate, streak, and last entry/exit details (price & timestamp).
Toggle mode: Strategy (live trades) or Indicator (signals only).
- **Advanced Alerts** (15+ Toggleable Types):
Set up via TradingView's "Any alert() function call" for bar-close triggers:
- Entry/Exit signals with strength & pattern details.
- Strong patterns (≥2 bullish/bearish), neutral indecision, volume spikes.
- S/R breakouts, HTF reversals, high-confidence singles (≥8.0 strength).
- Conflicting signals, MA crossovers, ATR volatility bursts, multi-bar completions.
Example: "STRONG BULLISH PATTERN detected! Strength: 9.5 | Top Pattern: Three White Soldiers | Trend: Up".
**Customization & Usage Tips**
- **Inputs Groups**: Strategy toggles, confirmations, exits, backtest dates, and 15+ alert switches—all intuitively grouped.
- **Optimization**: Tune min strengths for aggressive (lower) or conservative (higher) trading; enable/disable filters to suit your style (e.g., disable S/R for scalping).
- **Best For**: Forex, stocks, crypto on 1H–Daily charts. Test on historical data to refine TP/SL.
- **Limitations**: No external data installs; relies on built-in TA functions. Patterns are probabilistic—combine with your risk management.
Master the candles like a grandmaster. Deploy on TradingView, backtest relentlessly, and let dominance begin! Questions? Drop a comment.
*Version: 1.0 | Updated: September 2025 | Credits: Built on Pine Script v5 with nods to Nison's timeless techniques.*
Stock Valuation Models - Professional Investment Analysis Tool📊 Overview
Stock Valuation Models is a comprehensive financial analysis indicator that combines multiple valuation methodologies to calculate intrinsic stock value. This professional-grade tool implements 7 different valuation methods , risk assessment framework, and financial health metrics to provide data-driven investment decisions.
🎯 Key Features
📈 Multiple Valuation Methods
Graham's Valuation - Conservative asset-based approach by Benjamin Graham
Multiples Valuation - Market-based P/E and P/B ratios from sector peers
Discounted Cash Flow (DCF) - Future cash flow projections with present value calculation
Dividend Discount Model - Gordon Growth Model for dividend-paying stocks
FCFF Model - Enterprise-level Free Cash Flow to Firm analysis
EVA Model - Economic Value Added measurement above cost of capital
Advanced Multiples - Enterprise Value ratios (EV/EBITDA, EV/Sales)
🏥 Financial Health Metrics
Altman Z-Score - Bankruptcy prediction and financial distress assessment
Piotroski F-Score - 9-point fundamental strength evaluation
Beneish M-Score - Earnings manipulation detection system
Magic Formula - Joel Greenblatt's combined quality and value scoring
⚖️ Risk Assessment Framework
Multi-Factor Risk Scoring - Fundamental, market, quality, and data quality risks
Risk-Adjusted Margin of Safety - Dynamic safety thresholds based on risk level
Position Sizing Guidance - Risk-appropriate investment allocation recommendations
🔍 Data Quality System
Real-Time Quality Tracking - Visual warnings for insufficient data
Fallback Methodology - Alternative calculations when primary data unavailable
Confidence Scoring - Method agreement and data quality assessment
⚙️ Settings & Parameters
Main Settings
Margin of Safety (%) - Minimum discount required before buying (Default: 15%)
Table Font Size - Choose between "Small" and "Normal" text size
Valuation Methods
Graham's Valuation - Best for mature, stable companies with strong fundamentals
Multiples Valuation - Compares to industry peers using dynamic sector ratios
Discounted Cash Flow - Ideal for growth companies with predictable cash flows
Dividend Discount Model - For consistent dividend-paying stocks (disabled by default)
FCFF Model - Enterprise approach for leveraged companies and M&A analysis
EVA Model - Measures value creation above cost of capital
Advanced Multiples - Wall Street standard EV ratios for professional analysis
Additional Metrics
Magic Formula - Combined quality and value scoring system
Altman Z-Score - Bankruptcy risk assessment (Safe >2.99, Distress <1.81)
Piotroski F-Score - Fundamental quality score (Excellent ≥8, Poor <4)
Beneish M-Score - Manipulation detector (High Risk >-2.22, Low Risk ≤-2.22)
🔧 How It Works
Dynamic Calculations
Sector-Based Ratios - Automatically detects company sector and applies appropriate valuation multiples
Economic Integration - Uses real-time risk-free rates, VIX volatility, and GDP growth data
Quality Weighting - Adjusts method weights based on company type (growth/mature/distressed) and market conditions
Negative Value Handling - Shows actual calculated values but excludes negative results from weighted average
Risk-Adjusted Analysis
VIX Integration - Higher market volatility increases required margin of safety
Sector Risk Premiums - Energy and Financial sectors get higher risk multipliers
Quality Adjustments - High Piotroski F-Score companies get lower risk ratings
Data Quality Impact - Insufficient data increases risk score and safety requirements
Visual Display
Horizontal Table Layout - Organized by method groups (Valuation → Results → Risk → Health)
Color-Coded Results - Green/Yellow/Red indicators for risk levels and recommendations
Warning Symbols - ⚠️ for data quality issues, ❌ for excluded negative values
Dollar Amounts - Both percentage and dollar-based margin of safety calculations
📈 Interpretation Guide
💎 Intrinsic Value Results
Weighted Average - Combines all enabled methods based on intelligent weighting
Confidence Level - High/Medium/Low based on method agreement and data quality
Method Count - Number of successful valuation calculations
🎯 Margin of Safety
Percentage - Current discount/premium to calculated intrinsic value
Dollar Amount - Absolute dollar difference per share
Buy Price - Risk-adjusted target purchase price
⚖️ Risk Assessment
Low Risk (Green) - Normal position sizing (3-5%)
Medium Risk (Yellow) - Reduced position sizing (1-3%)
High Risk (Red) - Minimal position sizing (<1%)
📊 Recommendations
STRONG BUY - Low risk + adequate margin + high confidence
BUY - Meets risk-adjusted margin requirements
HOLD - Positive margin but higher risk
SELL - Insufficient margin for risk level
🎓 Educational Tooltips
Every parameter includes detailed explanations accessible by hovering over the setting. Learn about:
When to use each valuation method
How different metrics are calculated
Interpretation thresholds and ratings
Risk factors and quality indicators
💡 Best Practices
🚀 For Growth Stocks
Enable DCF and Advanced Multiples
Focus on Piotroski F-Score for quality assessment
Use higher margin of safety due to volatility
💰 For Value Stocks
Enable Graham's and Multiples Valuation
Check Altman Z-Score for financial stability
Consider Magic Formula rating
📈 For Dividend Stocks
Enable Dividend Discount Model
Focus on sustainable dividend coverage
Check for consistent dividend history
⚠️ For Distressed Situations
Prioritize Graham's asset-based approach
Monitor Altman Z-Score closely
Use higher risk-adjusted margins
⚠️ Important Notes & Data Limitations
📅 Data Timing Considerations
Fundamental Data Lag - Company financial data (earnings, cash flows, balance sheet items) may be 1-3 months behind current market conditions
Quarterly Reporting Delays - Most recent available data reflects the company's situation as of the last filed quarterly/annual report
Market vs. Fundamentals Gap - Stock prices react instantly to news, while fundamental data updates occur periodically
Accuracy Impact - Recent business changes, market events, or company developments may not be reflected in current calculations
🔧 Technical Limitations
Data Dependencies - Requires fundamental data availability from TradingView
Quality Warnings - Pay attention to ⚠️ symbols indicating insufficient data
Risk Context - Always consider risk score in investment decisions
Market Conditions - Tool automatically adjusts for market volatility (VIX)
Sector Specificity - Ratios automatically adjust based on company's sector
💡 Best Practice Recommendations
Supplement with Current Analysis - Always combine with recent news, earnings calls, and management guidance
Monitor Data Quality - Check when the underlying financial data was last updated
Consider Market Context - Factor in recent market events that may affect company performance
Use as Starting Point - Treat calculations as baseline analysis requiring additional research
🔗 Methodology
Based on established academic research and professional practices:
Benjamin Graham - Security Analysis principles
Joel Greenblatt - Magic Formula methodology
Edward Altman - Z-Score bankruptcy prediction
Joseph Piotroski - Fundamental analysis scoring
Messod Beneish - Earnings manipulation detection
Modern Portfolio Theory - Risk-adjusted decision making
This indicator is designed for educational and analytical purposes. Always conduct additional research and consider consulting with financial professionals before making investment decisions.
Pro Day Trader (v7)Pro Day Trader (v6) — Update Summary
Core behavior (unchanged by default)
EMA(9/21) + RSI(14) with HTF EMA filter.
Same alerts, plots, and session handling.
All new features are opt-in (off by default) to preserve existing signals.
New features (opt-in)
Adaptive RSI
Inputs: Use Dynamic RSI, RSI slope lookback, RSI slope relax threshold, RSI relax step.
Relaxes RSI gates slightly during strong momentum slopes.
Dynamic ATR Multiplier
Inputs: Dynamic ATR multiplier, ATR long MA length, ATR ratio low/high, Scale when below/above.
Adapts stop multiple to volatility (tightens in chop, loosens in expansions).
Entry Mode
Inputs: Entry Mode = Immediate / Pullback EMA / Pullback VWAP, Pullback wait bars (max).
Optional “arm-then-pullback” entry to improve price on signals after a valid cross.
MTF RSI Filter
Inputs: Use MTF RSI filter, MTF #1, MTF #2, MTF RSI length, MTF RSI long min / short max.
Requires 15m/60m RSI alignment with 5m entries.
DI Direction Confirmation
Input: Use DI direction confirm.
Confirms longs with +DI > −DI and shorts with −DI > +DI.
PA Gate Score
Inputs: Use PA Gate Score, PA score min (default 0.65), Near OR penalty factor, Lunch penalty factor.
Combines RVOL/ADX/penalties into one score; normalized to ≤ 1.0.
Gate mode quality-of-life
Auto gate mode retained for HTF/VWAP: Both in RTH / Either outside RTH.
Preset/EZ behavior preserved (e.g., Scalp → Either).
Risk & trail fixes
Trailing ATR persistence: resets the opposite trail on a new entry to avoid stale lines.
Dynamic ATR uses atrMultUse in stop math (targets unchanged).
Dashboard additions
Displays: PA Score & threshold, Dyn RSI thresholds, Trail ATR status, DI Confirm, Dyn ATR mult, Entry Mode, and MTF RSI status (only meaningful when features are on).
Internals / safety
Non-repainting maintained (request.security(..., lookahead_off)).
Series computed each bar (no conditional function calls).
PA Score clamped to ≤ 1.0 to prevent over-weighting single factors in high-RVOL regimes.
Suggested presets (optional)
Futures (MES/ES/MNQ): Gate = Auto, Use Dynamic ATR = ON, Entry = Pullback EMA, Use DI Confirm = ON.
Equities (TSLA/NVDA): Use Dynamic RSI = ON, Entry = Pullback EMA (first 60–90m RTH).
If enabling PA Score: start with PA score min = 0.65–0.75.
Market Structure - BOS LinesMarket Structure - BOS Lines individuazione delle 3cf e segnalazione con il bos
VIX Price BoxVIX Price Box (Customizable Colors)
This indicator displays the current VIX (CBOE Volatility Index) value in a fixed box on the top-right corner of the chart. It’s designed to give traders a quick, at-a-glance view of market volatility without needing to switch tickers.
Features
Pulls the live VIX price and updates automatically on every bar.
Displays the value inside a table box that stays fixed in the top-right corner.
Threshold-based coloring: the text color changes depending on whether the VIX is below, between, or above your chosen threshold levels.
5 built-in color modes:
Custom mode – choose your own colors for low, medium, and high volatility zones.
Adjustable threshold levels, background color, and frame color.
Use Cases
Monitor overall market risk sentiment while trading other instruments.
Identify periods of low vs. high volatility at a glance.
Pair with strategies that rely on volatility (options trading, hedging, breakout setups, etc.).
Higher High Lower Low Higher High Lower Low 🦉{Phanchai} — TradingView Description
Structure detector with dynamic Support/Resistance, customizable labels, and ready-made alerts (Pine v6).
This script marks market structure turning points — HH (Higher High), HL (Higher Low), LH (Lower High), LL (Lower Low) — and builds segmented Support/Resistance lines from those turns. Labels and colors are fully customizable and the script ships with multiple alert conditions.
What it does
Detects swing pivots using left/right bar windows, then classifies each confirmed swing as HH/HL/LH/LL.
Plots compact labels at the confirmed pivot bars with tooltips (English).
Derives dynamic Support / Resistance : every time structure flips, the previous level is closed and a new segment starts, extending to the right .
Provides alert conditions for any label and for specific first-occurrence shifts (e.g., first HH after a bearish label).
How it works (in short)
A pivot high/low confirms only after Right Bars candles have closed; labels and S/R appear at that confirmation bar.
An internal backbone (zigzag-like) is built from confirmed pivots, with light consistency checks to avoid contradictory sequences.
Structure rules compare the recent five pivots (A…E) to decide HH/HL/LH/LL.
S/R is updated from structure: e.g., in an up leg, new HLs refresh Support; in a down leg, new LHs refresh Resistance.
Alerts included
Any structure label (HH/HL/LH/LL) — Fires on any new label.
First LL after HL/HH — First bearish break after a bullish label.
First HH after LL/LH — First bullish break after a bearish label.
LL or HL formed — Any low-side label.
LH or HH formed — Any high-side label.
HL formed
HH formed
LL formed
LH formed
How to use (quick start)
Add the indicator to your chart.
Choose Left/Right Bars for your timeframe (e.g., 5–10 for intraday; larger for higher timeframes).
Pick your label colors/sizes and S/R style.
Right-click the chart → Add alert… → Condition: this indicator → select the desired alert.
Notes & tips
Because pivots require Right Bars to confirm, labels and S/R appear with a natural delay of that many bars. This avoids repainting.
Raising Left/Right Bars reduces noise and increases the average distance between pivots; lowering them increases sensitivity.
Structure is strict: sometimes you may see two HL (or two LH) in a row if the intermediate opposite swing didn’t qualify as HH/LH (or LL/HL).
S/R segments are drawn with line objects ; they are controlled via Inputs (style/width/color), not the Style tab.
This tool highlights structure; it’s not a standalone entry/exit system. Combine with volume, trend, or risk management rules.
Built with Pine v6. Clean, compact labels; segmented S/R that updates only on confirmed changes; comprehensive alerts ready for automation.
Swing RSI Panel//@version=6
indicator("Swing RSI Panel", overlay=false)
// RSI Settings
rsiLength = input.int(14, "RSI Length")
rsiOversold = input.int(40, "RSI Oversold")
rsiOverbought = input.int(60, "RSI Overbought")
// Calculate RSI
rsiValue = ta.rsi(close, rsiLength)
// Plot RSI
plot(rsiValue, "RSI", color=color.purple, linewidth=2)
hline(50, "Midline", color=color.gray, linestyle=hline.style_dotted)
hline(rsiOversold, "Oversold", color=color.green, linestyle=hline.style_dotted)
hline(rsiOverbought, "Overbought", color=color.red, linestyle=hline.style_dotted)
// Fill zones
bgcolor(rsiValue >= rsiOverbought ? color.new(color.red, 90) :
rsiValue <= rsiOversold ? color.new(color.green, 90) : na, title="RSI Zones")
Fundamentals PanelFundamentals Panel Description
The Fundamentals Panel is a versatile Pine Script indicator that displays key financial metrics—Market Cap, P/E Ratio, P/S Ratio, and PEG Ratio—in a clean, customizable table on your TradingView chart. Designed for investors and traders, this tool brings essential company fundamentals directly to your chart, saving time and enhancing decision-making.
Quick Insights: View critical valuation metrics (Market Cap, P/E, P/S, PEG) at a glance without leaving your chart, ideal for fundamental analysis or screening stocks.
Customizable Display: Toggle each metric on or off via input settings to focus on what matters most to your strategy.
Adjustable Font Size: Choose from Small, Normal, or Large text sizes to ensure readability suits your chart setup and screen preferences.
Reliable Data: Pulls data directly from TradingView’s financial database, using diluted shares and trailing metrics for accuracy across most stocks.
Debugging Support: Includes hidden plots (visible in the Data Window) to verify raw data like shares outstanding, revenue, and PEG, helping you trust the numbers.
How It Works
The indicator fetches:
Market Cap: Calculated using diluted shares outstanding and current price.
P/E Ratio: Price divided by trailing twelve-month (TTM) diluted EPS.
P/S Ratio: Market cap divided by TTM total revenue.
PEG Ratio: Trailing PEG from TradingView’s data, with an additional calculated PEG for cross-checking.
Optimized SMC Dashboard - by MinkyJuiceSMC - all in one
all SMC confluences are included, fully automated and customisable
enjoy, made by MinkyJuice
No Turd Burglars, please
FOMC Fund Rate 2022–2025(0.1)This indicator visualizes the Federal Open Market Committee (FOMC) meetings from 2022 through 2025.
It plots vertical lines on the announcement dates and attaches labels showing:
The decision (rate hike ⭡, cut ⭣, or hold ⭤).
The size of the rate change in percentage points.
The cumulative Federal Funds Rate path in parentheses.
Features:
Accurate timestamps for each FOMC meeting (UTC+1).
Customizable line style, width, and color.
Label color and text color options.
Placeholder labels for future meetings to maintain the timeline.
Use this script to keep track of historical Fed policy decisions and visualize the rate path over time directly on your chart.
Value Investing IndicatorThis is based on PeterNagy Indicator. I just update it from v.4 to v.6 and modify. Open for tweak
PE Rating by The Noiseless TraderPE Rating by The Noiseless Trader
This script analyzes a symbol’s Price-to-Earnings (P/E) ratio, using Diluted EPS (TTM) fundamentals directly from TradingView.
The script calculates the Price-to-Earnings ratio (P/E) using Diluted EPS (TTM) fundamentals. It then identifies:
PE High → the highest valuation point over a 3-year historical range.
PE Low → the lowest valuation point over a 3-year historical range.
PE Median → the midpoint between the two extremes, offering a fair-value benchmark.
PE (Int) → an additional intermediate low to track more recent undervaluation points. This is calculated based on lowest valuation point over a 1-year historical range
These levels are plotted directly on the chart as horizontal references, with markers showing the exact bars/dates when the extremes occurred. Candles corresponding to those days are also highlighted for context.
Bars corresponding to these extremes are highlighted (red = PE High, green = PE Low).
How it helps
Provides a historical valuation framework that complements technical analysis. We look for long opportunity or base formation near the PE Low and be cautious when stocks tends to trade near High PE.
We do not short the stock at High PE infact be cautious with long trades.
Helps identify whether current price action is happening near overvalued or undervalued zones.
Adds a long-term perspective to support swing trading and investing decisions. If a stock is coming from Low PE to Median PE and along with that if we get entry based on Classical strategies like Darvas Box, or HH-HL based on Dow Theory.
Offers a simple visual map of how far the market has moved from “cheap” to “expensive.”
This tool is best suited for long-term investors and swing traders who want to merge fundamentals with technical setups.
This indicator is designed as an educational tool to illustrate how valuation metrics (like earnings multiples) can be viewed alongside price action, helping traders connect fundamental context with technical execution in real market conditions.
ATR Future Movement Range Projection
The "ATR Future Movement Range Projection" is a custom TradingView Pine Script indicator designed to forecast potential price ranges for a stock (or any asset) over short-term (1-month) and medium-term (3-month) horizons. It leverages the Average True Range (ATR) as a measure of volatility to estimate how far the price might move, while incorporating recent momentum bias based on the proportion of bullish (green) vs. bearish (red) candles. This creates asymmetric projections: in bullish periods, the upside range is larger than the downside, and vice versa.
The indicator is overlaid on the chart, plotting horizontal lines for the projected high and low prices for both timeframes. Additionally, it displays a small table in the top-right corner summarizing the projected prices and the percentage change required from the current close to reach them. This makes it useful for traders assessing potential targets, risk-reward ratios, or option strategies, as it combines volatility forecasting with directional sentiment.
Key features:
- **Volatility Basis**: Uses weekly ATR to derive a stable daily volatility estimate, avoiding noise from shorter timeframes.
- **Momentum Adjustment**: Analyzes recent candle colors to tilt projections toward the prevailing trend (e.g., more upside if more green candles).
- **Time Horizons**: Fixed at 1 month (21 trading days) and 3 months (63 trading days), assuming ~21 trading days per month (excluding weekends/holidays).
- **User Adjustable**: The ATR length/lookback (default 50) can be tweaked via inputs.
- **Visuals**: Green/lime lines for highs, red/orange for lows; a semi-transparent table for quick reference.
- **Limitations**: This is a probabilistic projection based on historical volatility and momentum—it doesn't predict direction with certainty and assumes volatility persists. It ignores external factors like news, earnings, or market regimes. Best used on daily charts for stocks/ETFs.
The indicator doesn't generate buy/sell signals but helps visualize "expected" ranges, similar to how implied volatility informs option pricing.
### How It Works Step-by-Step
The script executes on each bar update (typically daily timeframe) and follows this logic:
1. **Input Configuration**:
- ATR Length (Lookback): Default 50 bars. This controls both the ATR calculation period and the candle count window. You can adjust it in the indicator settings.
2. **Calculate Weekly ATR**:
- Fetches the ATR from the weekly timeframe using `request.security` with a length of 50 weeks.
- ATR measures average price range (high-low, adjusted for gaps), representing volatility.
3. **Derive Daily ATR**:
- Divides the weekly ATR by 5 (approximating 5 trading days per week) to get an equivalent daily volatility estimate.
- Example: If weekly ATR is $5, daily ATR ≈ $1.
4. **Define Projection Periods**:
- 1 Month: 21 trading days.
- 3 Months: 63 trading days (21 × 3).
- These are hardcoded but based on standard trading calendar assumptions.
5. **Compute Base Projections**:
- Base projection = Daily ATR × Days in period.
- This gives the total expected movement (range) without direction: e.g., for 3 months, $1 daily ATR × 63 = $63 total range.
6. **Analyze Candle Momentum (Win Rate)**:
- Counts green candles (close > open) and red candles (close < open) over the last 50 bars (ignores dojis where close == open).
- Total colored candles = green + red.
- Win rate = green / total colored (as a fraction, e.g., 0.7 for 70%). Defaults to 0.5 if no colored candles.
- This acts as a simple momentum proxy: higher win rate implies bullish bias.
7. **Adjust Projections Asymmetrically**:
- Upside projection = Base projection × Win rate.
- Downside projection = Base projection × (1 - Win rate).
- This skews the range: e.g., 70% win rate means 70% of the total range allocated to upside, 30% to downside.
8. **Calculate Projected Prices**:
- High = Current close + Upside projection.
- Low = Current close - Downside projection.
- Done separately for 1M and 3M.
9. **Plot Lines**:
- 3M High: Solid green line.
- 3M Low: Solid red line.
- 1M High: Dashed lime line.
- 1M Low: Dashed orange line.
- Lines extend horizontally from the current bar onward.
10. **Display Table**:
- A 3-column table (Projection, Price, % Change) in the top-right.
- Rows for 1M High/Low and 3M High/Low, color-coded.
- % Change = ((Projected price - Close) / Close) × 100.
- Updates dynamically with new data.
The entire process repeats on each new bar, so projections evolve as volatility and momentum change.
### Examples
Here are two hypothetical examples using the indicator on a daily chart. Assume it's applied to a stock like AAPL, but with made-up data for illustration. (In TradingView, you'd add the script to see real outputs.)
#### Example 1: Bullish Scenario (High Win Rate)
- Current Close: $150.
- Weekly ATR (50 periods): $10 → Daily ATR: $10 / 5 = $2.
- Last 50 Candles: 35 green, 15 red → Total colored: 50 → Win Rate: 35/50 = 0.7 (70%).
- Base Projections:
- 1M: $2 × 21 = $42.
- 3M: $2 × 63 = $126.
- Adjusted Projections:
- 1M Upside: $42 × 0.7 = $29.4 → High: $150 + $29.4 = $179.4 (+19.6%).
- 1M Downside: $42 × 0.3 = $12.6 → Low: $150 - $12.6 = $137.4 (-8.4%).
- 3M Upside: $126 × 0.7 = $88.2 → High: $150 + $88.2 = $238.2 (+58.8%).
- 3M Downside: $126 × 0.3 = $37.8 → Low: $150 - $37.8 = $112.2 (-25.2%).
- On the Chart: Green/lime lines skewed higher; table shows bullish % changes (e.g., +58.8% for 3M high).
- Interpretation: Suggests stronger potential upside due to recent bullish momentum; useful for call options or long positions.
#### Example 2: Bearish Scenario (Low Win Rate)
- Current Close: $50.
- Weekly ATR (50 periods): $3 → Daily ATR: $3 / 5 = $0.6.
- Last 50 Candles: 20 green, 30 red → Total colored: 50 → Win Rate: 20/50 = 0.4 (40%).
- Base Projections:
- 1M: $0.6 × 21 = $12.6.
- 3M: $0.6 × 63 = $37.8.
- Adjusted Projections:
- 1M Upside: $12.6 × 0.4 = $5.04 → High: $50 + $5.04 = $55.04 (+10.1%).
- 1M Downside: $12.6 × 0.6 = $7.56 → Low: $50 - $7.56 = $42.44 (-15.1%).
- 3M Upside: $37.8 × 0.4 = $15.12 → High: $50 + $15.12 = $65.12 (+30.2%).
- 3M Downside: $37.8 × 0.6 = $22.68 → Low: $50 - $22.68 = $27.32 (-45.4%).
- On the Chart: Red/orange lines skewed lower; table highlights larger downside % (e.g., -45.4% for 3M low).
- Interpretation: Indicates bearish risk; might prompt protective puts or short strategies.
#### Example 3: Neutral Scenario (Balanced Win Rate)
- Current Close: $100.
- Weekly ATR: $5 → Daily ATR: $1.
- Last 50 Candles: 25 green, 25 red → Win Rate: 0.5 (50%).
- Projections become symmetric:
- 1M: Base $21 → Upside/Downside $10.5 each → High $110.5 (+10.5%), Low $89.5 (-10.5%).
- 3M: Base $63 → Upside/Downside $31.5 each → High $131.5 (+31.5%), Low $68.5 (-31.5%).
- Interpretation: Pure volatility-based range, no directional bias—ideal for straddle options or range trading.
In real use, test on historical data: e.g., if past projections captured actual moves ~68% of the time (1 standard deviation for ATR), it validates the volatility assumption. Adjust the lookback for different assets (shorter for volatile cryptos, longer for stable blue-chips).
KT_Global Bond Yields by CountryGlobal Bond Yields Indicator Summary
The Global Bond Yields by Country indicator, developed for Trading View (Pine Script v5), provides a comprehensive tool for visualizing and analyzing government bond yields across multiple countries and maturities. Below are its key features:
Features
Country Selection: Choose from 20 countries, including the United States, China, Japan, Germany, United Kingdom, and more, to display their respective bond yields.
Multiple Maturities: Supports 18 bond maturities ranging from 1 month to 40 years, allowing users to analyze short-term to long-term yield trends.
Customizable Display:
Toggle visibility for each maturity (1M, 3M, 6M, 1Y, 2Y, 3Y, 4Y, 5Y, 6Y, 7Y, 8Y, 9Y, 10Y, 15Y, 20Y, 25Y, 30Y, 40Y) individually.
Option to show or hide all maturities with a single toggle for streamlined analysis.
10Y-2Y Yield Spread: Plots the difference between 10-year and 2-year bond yields, a key indicator of yield curve dynamics, with an option to enable/disable.
Zero Line Reference: Displays a dashed grey horizontal line at zero for clear visual reference.
Color-Coded Plots: Each maturity is plotted with a distinct color, ranging from lighter shades (short-term) to darker shades (long-term), for easy differentiation.
Country Label: Displays the selected country's name as a large, prominent label on the chart for quick identification.
Error Handling: Alerts users if an invalid country is selected, ensuring robust operation.
Data Integration: Fetches bond yield data from Trading View's database (e.g., TVC:US10Y) with support for ignoring invalid symbols to prevent errors.
This indicator is ideal for traders and analysts monitoring global fixed-income markets, yield curve shapes, and cross-country comparisons.
Futures Forward Price [NeoButane]In futures markets, the theoretical value of a futures contract can be derived from its underlying price and cost of carry. By baking in the costs and potential yields, the theoretical forward price then be used in basis against futures prices in place of the underlying spot price.
Usage
The script creates plots on the main chart and a separate window pane. Both are meant to be used to visualize dislocations in the market.
By using a futures vs. forward basis instead of futures vs. spot basis, discounts in the market are clearer.
Last month, the gold futures market GCZ2025 traded >1% above forward price when tariffs were announced and fell back in line once the tariffs were verbally retracted.
View roll spreads over a back-adjusted continuous chart. I guess. I don't think spread traders only look at one chart. This is as educational for me as it is you.
Configuration
The underlying reference needs to be changed to match the futures contract you are using.
The Risk-Free Rate defaults to FRED:SOFR. I found the contract month matched 3-Month SOFR Futures to be the closest for forward price.
Risk-Free Rate: The interest rate source for forward price.
Constant Risk-Free Rate: a static interest rate that can be used in advance of future changes in risk-free rate.
Underlying Reference: spot or index price. Some examples include TVC:SPX, TVC:GOLD, CRYPTO:BTCUSD, TVC:USOIL.
Forward Price Compounding: determines which formula to use. They're similar and become closer as the contract matures.
Alternative Contract: enable and select a futures contract to use it on a chart different than the main.
Storage Cost and Yield: for use with commodities. I haven't found a proper use for them yet but enabling is simple if you are able to.
The following are meant to be used with the continuous formula as they are compounded. However the rate sources don't differ much for the purpose of futures prices.
3-Month CME SOFR Futures
3-Month ICEEUR SONIA Futures
3-Month Osaka TONA Futures
The other rate sources are either meant for futures contracts shorter than quarterly such as monthly crypto futures or were meant to help myself understand how different rates would align with futures prices, like inflation.
What this script does
It uses the cost of carry formula to output the forward price (red line). The underlying reference (green line) is plotted alongside and a futures-derived reference (blue line) can be displayed to see how it looks next to the real reference price.
The data pane displays either the nominal difference or percentage difference between the real futures price and the calculated forward price.
Further reading
www.investopedia.com
www.cmegroup.com
www.oxfordenergy.org
www-2.rotman.utoronto.ca
www.cmegroup.com
3-month rate futures
www.cmegroup.com
www.ice.com
www.bankofengland.co.uk
www.jpx.co.jp