OPEN-SOURCE SCRIPT

Proxy Financial Stress Index Strategy

By EdgeTools
This strategy is based on a Proxy Financial Stress Index constructed using several key financial indicators. The strategy goes long when the financial stress index crosses below a user-defined threshold, signaling a potential reduction in market stress. Once a position is opened, it is held for a predetermined number of bars (periods), after which it is automatically closed.

The financial stress index is composed of several normalized indicators, each representing different market aspects:

VIX - Market volatility.
US 10-Year Treasury Yield - Bond market.
Dollar Index (DXY) - Currency market.
S&P 500 Index - Stock market.
EUR/USD - Currency exchange rate.
High-Yield Corporate Bond ETF (HYG) - Corporate bond market.

Each component is normalized using a Z-score (based on the user-defined moving average and standard deviation lengths) and weighted according to user inputs. The aggregated index reflects overall market stress.

The strategy enters a long position when the stress index crosses below a specified threshold from above, indicating reduced financial stress. The position is held for a defined holding period before being closed automatically.
Scientific References:

The concept of a financial stress index is derived from research that combines multiple financial variables to measure systemic risks in the financial markets. Key research includes:

The Financial Stress Index developed by various Federal Reserve banks, including the Cleveland Financial Stress Index (CFSI)​


Bank of America Merrill Lynch Option Volatility Estimate (MOVE) Index as a measure of interest rate volatility, which correlates with financial stress​


These indices are widely used in economic research to gauge financial instability and help in policy decisions. They track real-time fluctuations in various markets and are often used to anticipate economic downturns or periods of high financial risk.
forecastingFundamental Analysissentiment

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer