OPEN-SOURCE SCRIPT

QSL Rolling Volatility

70
This script calculates the rolling annualized volatility of an asset, helping traders measure how much its returns fluctuate over time. It uses logarithmic daily returns and computes the standard deviation over a custom lookback period (default: 252 trading days = 1 year) to capture historical volatility. The result is scaled to an annualized figure by multiplying by √252, making it comparable across different timeframes.

🔹 Key Features:
• Customizable Lookback Period: Set in days to fit different trading strategies.
• Annualized Output: Expresses volatility in yearly terms for consistency with financial models.
• Rolling Calculation: Continuously updates to reflect recent market conditions.
• Clear Visualization: Plots volatility as a time-series indicator and displays the latest value with a label.

This tool is ideal for risk management, position sizing, and strategy optimization in quantitative trading. 🚀

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.