OPEN-SOURCE SCRIPT
Yield Anomaly

Yield Anomaly V2 is an advanced statistical indicator designed to identify abnormal price movements using log returns, adaptive volatility analysis, and robust anomaly detection techniques.
The script combines Z-Score analysis, percentile thresholds, and robust deviation measurements (MAD-based volatility estimation) to highlight unusual market behavior that may indicate momentum expansion, volatility spikes, exhaustion moves, or potential mean-reversion conditions.
Key Features:
• Adaptive anomaly detection using either standard deviation or robust MAD calculations
• Optional percentile-based thresholds for dynamic market adaptation
• EMA or SMA rolling mean selection
• Detection of anomaly clusters and potential regime shifts
• AR(1)-based market regime analysis (mean reversion vs trending conditions)
• Volatility regime monitoring through Volatility-of-Volatility analysis
• Real-time labels displaying statistical market conditions
• Performance tracking table with signal statistics and reversal monitoring
• Fully customizable inputs and visual settings
This indicator is intended for educational and analytical purposes only. It does not provide financial advice, investment recommendations, or guaranteed trading signals. Traders should combine it with proper risk management and additional market analysis before making trading decisions.
The script combines Z-Score analysis, percentile thresholds, and robust deviation measurements (MAD-based volatility estimation) to highlight unusual market behavior that may indicate momentum expansion, volatility spikes, exhaustion moves, or potential mean-reversion conditions.
Key Features:
• Adaptive anomaly detection using either standard deviation or robust MAD calculations
• Optional percentile-based thresholds for dynamic market adaptation
• EMA or SMA rolling mean selection
• Detection of anomaly clusters and potential regime shifts
• AR(1)-based market regime analysis (mean reversion vs trending conditions)
• Volatility regime monitoring through Volatility-of-Volatility analysis
• Real-time labels displaying statistical market conditions
• Performance tracking table with signal statistics and reversal monitoring
• Fully customizable inputs and visual settings
This indicator is intended for educational and analytical purposes only. It does not provide financial advice, investment recommendations, or guaranteed trading signals. Traders should combine it with proper risk management and additional market analysis before making trading decisions.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.