PROTECTED SOURCE SCRIPT
Cập nhật Multi-Dimensional Quantitative Matrix [Pro]

### **Abstract**
In modern financial markets, asset classes do not move in isolation. Equities, Sovereign Bonds, Currencies, and Commodities are inextricably linked by global liquidity flows and interest rate expectations. However, analyzing these relationships is computationally challenging due to disparate volatility profiles (e.g., comparing Bitcoin’s variance with the 2-Year Treasury Yield).
The **Multi-Dimensional Quantitative Matrix** proposes a normalized statistical framework to visualize **Inter-Market Momentum** and **Cross-Asset Correlation**. By utilizing a rolling Z-Score normalization engine, this tool transforms raw price action into standardized deviations (), allowing for a direct, "apples-to-apples" comparison of momentum across the entire financial spectrum.
---
### **1. Quantitative Methodology**
The core engine relies on a three-step statistical process to filter noise and isolate structural trends:
#### **A. Logarithmic Returns**
To ensure accurate comparison between high-beta assets (Crypto, Tech) and low-beta assets (Currencies, Bonds), the script calculates the natural logarithm of returns rather than simple percentage changes.
#### **B. Z-Score Normalization**
Raw momentum is normalized against its historical distribution. This creates a standard score that indicates how many standard deviations the current momentum is from the mean.
* ****: The asset is performing within its historical norm (Equilibrium/Noise).
* ****: Statistically significant positive momentum (Outlier Strength).
* ****: Statistically significant negative momentum (Outlier Weakness).
#### **C. "Ghost-to-Neon" Signal Processing**
To reduce cognitive load, the indicator employs a dynamic opacity filter based on the Signal-to-Noise Ratio:
* **The Ghost Zone (Noise):** When the Z-Score is near zero (mean-reverting), the lines fade to transparent gray. This indicates a lack of conviction in the trend.
* **The Neon Zone (Signal):** As momentum deviates from the mean, the opacity and color intensity increase linearly. Only statistically significant trends appear brightly on the chart.
---
### **2. Analysis Dimensions (Modes)**
The script includes 8 distinct preset environments, allowing the analyst to switch macro-perspectives instantly:
**1. 🏦 Macro Global (Asset Class)**
* **Purpose:** The "Big Picture" view of Risk-On vs. Risk-Off.
* **Constituents:** S&P 500, US 10Y Yields, Gold, Bitcoin, DXY, Oil, TLT, VIX.
* **Application:** Identify regime changes. E.g., If *Yields* (Red) and *DXY* (Teal) spike while *Equities* (Blue) fade, the market is pricing in monetary tightening.
**2. 💧 Global Liquidity (Monetary Supply)**
* **Purpose:** Tracking the "fuel" of the financial system.
* **Methodology:** Includes a specialized **Monthly-Force Engine** to handle low-frequency economic data (M2, Fed Balance Sheet) without "flat-lining" on daily charts.
* **Constituents:** M2 Money Supply (USA, China, Eurozone, Japan), Fed Balance Sheet, and Stablecoin Market Cap (USDT/USDC).
**3. 🗺️ Country Flows (Geo-Arbitrage)**
* **Purpose:** Visualizing capital migration between geopolitical regions.
* **Constituents:** USA, Europe, Japan, China, Emerging Markets, UK, Canada, India.
* **Application:** Identifying "Great Rotations." E.g., Capital fleeing developed markets (US/EU) to seek alpha in Emerging Markets (India/China).
**4. 📉 Bond Market (Yields & Duration)**
* **Purpose:** Deep dive into the fixed-income yield curve and credit stress.
* **Constituents:** 2Y/10Y/30Y Yields, German Bunds, TLT (Price), MOVE Index (Bond Volatility), High Yield Credit (Junk Bonds), TIPS (Real Yields).
* **Application:** If the *MOVE Index* (Teal) rises while *Junk Bonds* (Blue) fall, credit spreads are widening—a leading indicator of recession.
**5. 🏭 US Sectors (Equity Rotation)**
* **Purpose:** Internal rotation within the S&P 500.
* **Constituents:** Tech, Energy, Financials, Healthcare, Staples, Discretionary, Industrials, Utilities.
**6. 💱 Forex CSM (G8 Currencies)**
* **Purpose:** Currency Strength Meter.
* **Methodology:** Calculates the aggregate strength of a currency against the entire basket of the other 7 majors.
* **Constituents:** EUR, GBP, AUD, NZD, USD, CAD, CHF, JPY.
**7. ☢️ Strategic Resources (Real Assets)**
* **Purpose:** Tracking inputs for the energy transition and defense.
* **Constituents:** Rare Earths, Uranium, Lithium, Base Metals.
---
### **3. Parameter Guide**
* **Z-Score Lookback (Default: 90):** The statistical window. 90 days (approx. 1 trading quarter) is recommended for identifying intermediate macro trends. Lower values (e.g., 20) will result in a more responsive, albeit noisier, oscillator.
* **Smoothing Factor (Default: 5):** Applies an EMA filter to the final Z-Score. Increasing this value reduces "whipsaws" but introduces slight lag.
* **Ghost Threshold (Default: 20):** Controls the visual filter.
* *Increase* to hide more noise and see only extreme outliers.
* *Decrease* to see all market movements, including sideways consolidation.
---
### **Disclaimer**
*This tool is intended for quantitative analysis and research purposes only. It visualizes historical statistical deviations and does not constitute financial advice. Past performance of a Z-Score signal does not guarantee future mean reversion or trend continuation.*
Phát hành các Ghi chú
**Multi-Dimensional Quantitative Matrix [Pro]**
### **Abstract**
**Framework for Cross-Asset Momentum & Regime Detection**
In modern financial markets, asset classes (Equities, Sovereign Bonds, Currencies, and Commodities) exhibit complex, non-linear correlations driven by global liquidity flows and interest rate expectations. However, comparative analysis is often hindered by **Volatility Asymmetry**: a 1% move in the 2-Year Treasury Yield is statistically far more significant than a 1% move in Bitcoin, yet standard percentage charts fail to reflect this.
The **Multi-Dimensional Quantitative Matrix** solves this problem. It utilizes a rolling **Z-Score Normalization Engine** to transform raw price action into standardized deviations (). This allows the analyst to visualize **Inter-Market Momentum** and **Capital Rotation** on a single, normalized oscillating scale, effectively isolating the "Signal" from market "Noise."
---
### **1. Quantitative Methodology**
The indicator processes data through a three-stage algorithmic pipeline:
#### **A. Logarithmic Returns**
To ensure mathematical consistency across assets with different pricing magnitudes, the script calculates the natural logarithm of returns.
#### **B. Z-Score Normalization (Standardization)**
Raw momentum is normalized against its historical volatility profile over a user-defined lookback period (Default: 90 Days).
* ****: The asset is trading at equilibrium (Mean Reversion).
* ****: Statistically significant positive momentum (Outlier Strength).
* ****: Statistically significant negative momentum (Outlier Weakness).
#### **C. Dynamic Signal-to-Noise Filter (The "Ghost" Engine)**
To reduce cognitive load, the visualizer employs a dynamic opacity filter:
* **Noise Regime ():** Lines fade to transparent gray. This indicates a lack of structural trend or conviction.
* **Signal Regime ():** As momentum deviates from the mean, color intensity increases linearly. This "Heatmap" effect ensures the analyst's eye is immediately drawn only to statistically significant anomalies.
---
### **2. Analytical Dimensions (Modes)**
The matrix includes 8 distinct preset environments:
1. **🏦 Macro Global:** The "Big Picture" view. Correlates Risk Assets (SPX, BTC) against Safety (Gold, TLT) and Stress (VIX, DXY).
2. **💧 Global Liquidity:** Tracks the "Monetary Base" (M2 Supply of Fed, ECB, PBOC, BOJ) and Crypto Stablecoins. *Includes a specialized monthly-force fix for economic data.*
3. **🗺️ Country Flows (Geo-Arbitrage):** Visualizes capital migration between regions (e.g., Long India / Short Europe).
4. **📉 Bond Market:** Deep dive into the Yield Curve, Credit Spreads (HYG), and Bond Volatility (MOVE).
5. **🏭 US Sectors:** Internal rotation within the S&P 500 (Growth vs. Value).
6. **💱 Forex CSM:** Currency Strength Meter calculating the aggregate strength of G8 currencies.
7. **☢️ Strategic Resources:** Tracks critical inputs (Uranium, Lithium, Copper) vs. Sovereign Yields.
8. **🤖 Future Tech:** AI, Semiconductors, and Robotics thematic flows.
---
### **3. Configuration Guide**
* **Z-Score Lookback (Default: 90):** The statistical window. 90 days (Quarterly) is ideal for identifying intermediate macro trends.
* **Smoothing Factor:** Applies an EMA filter to the final Z-Score to reduce "whipsaws." Higher values = smoother curves but slight lag.
* **Ghost Threshold (Noise Filter):** The most critical setting for visual clarity.
* *Low (10-20):* Shows more market noise.
* *High (30-50):* Displays only extreme tail-risk events.
---
### **Disclaimer**
*This script is for educational and research purposes only. It visualizes historical statistical deviations and does not constitute financial advice.*
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.