OPEN-SOURCE SCRIPT
AetherEdge - Volatility Forecast

🖊️ Overview
ATR shows yesterday's volatility; AE-VOL forecasts the next move and states the uncertainty honestly. An adaptive EWMA variance model estimates forward volatility, drawn on price as a conformal-calibrated expected-range envelope, alongside a volatility regime and a vol-targeted position-size readout.
🔶 Key Features
Adaptive vol forecast — the EWMA decay λ is learned online and reacts to volatility clustering
Calibrated range envelope — the N-bar range is statistically calibrated to hit a target coverage
Forward cone — projects the forecast range into the future
Volatility regime — low/normal/high with expanding ↑ / contracting ↓
Expected move — next-bar ±% and N-bar ±%
Vol-targeted sizing — a multiple that shrinks when forecast vol is high, grows when low
Alerts on regime change; bar-close updates — no repaint
🧠 Technical Architecture
Vol model (adaptive EWMA): h_t = λ·h_{t-1} + (1-λ)·r² (RiskMetrics — a GARCH(1,1) special case with ω≈0; reactivity = 1-λ, persistence = λ). The single decay λ is learned online by quasi-likelihood (QLIKE) with a recursive derivative. A full 3-parameter GARCH has a flat, ill-conditioned likelihood that single-pass SGD won't recover, so AE-VOL adapts one well-conditioned parameter — robust and honest. Returns are in % for numerical stability.
Calibration (split-conformal): the forecast is wrapped in a distribution-free band — the (1-α) quantile of realized standardized moves rescales the envelope so coverage matches the target empirically (fat tails included). No lookahead: the standardizer is the forecast made N bars ago.
Sizing: multiple = clamp(target vol / forecast vol, min, max).
Honest scope: an EWMA variance recursion + one online-adapted parameter + nonparametric conformal calibration (this tool uses no RL). Not deep learning, not a guarantee.
⚙️ Recommended Settings & Tuning Guide (crypto 15m–4H)
Key parameters: decay learning rate, initial λ, horizon N, band significance (1-α), calibration window, target per-bar vol %.
Initial λ ≈ 0.94 is standard; it auto-adjusts (higher-vol assets converge to lower λ = more reactive)
N is how far ahead you care about; 5–20 bars for 15m–1H
Calibration window ≈ 200; longer is steadier, shorter tracks the recent regime
Target vol % is the per-bar vol you want per position; 0.5–1.5% for crypto 15m–1H
Band significance defaults to 0.90 (10% expected outside); the HUD shows realized coverage
💡 How to Use in Practice
Use the range envelope for take-profit/stop or range judgment (outside the band = statistically unusual)
Regime HIGH favors breakout/trend; LOW (squeeze) flags reversal/range setups
Use the size multiple for vol-targeted money management (auto-smaller in high vol)
The closer coverage is to target, the more trustworthy the band; if it drifts, adjust N or the window
Combine with AE-BPE (breakout probability) or AE-AVP (volume profile) to layer regime × level
⚠️ Important Notes
Needs a learning period (warmup); λ re-learns on timeframe/parameter change
The envelope is a probabilistic range, not a guarantee that price stays inside
The vol forecast gives magnitude, not direction
Probability, not a guarantee — always do your own due diligence and use risk management
🚨 Disclaimer
This indicator is for educational and informational purposes only and is not financial advice or a recommendation to buy or sell. No method guarantees future profits; past performance does not indicate future results, and trading carries the risk of loss. All decisions are your own — use proper validation and disciplined risk management.
ATR shows yesterday's volatility; AE-VOL forecasts the next move and states the uncertainty honestly. An adaptive EWMA variance model estimates forward volatility, drawn on price as a conformal-calibrated expected-range envelope, alongside a volatility regime and a vol-targeted position-size readout.
🔶 Key Features
Adaptive vol forecast — the EWMA decay λ is learned online and reacts to volatility clustering
Calibrated range envelope — the N-bar range is statistically calibrated to hit a target coverage
Forward cone — projects the forecast range into the future
Volatility regime — low/normal/high with expanding ↑ / contracting ↓
Expected move — next-bar ±% and N-bar ±%
Vol-targeted sizing — a multiple that shrinks when forecast vol is high, grows when low
Alerts on regime change; bar-close updates — no repaint
🧠 Technical Architecture
Vol model (adaptive EWMA): h_t = λ·h_{t-1} + (1-λ)·r² (RiskMetrics — a GARCH(1,1) special case with ω≈0; reactivity = 1-λ, persistence = λ). The single decay λ is learned online by quasi-likelihood (QLIKE) with a recursive derivative. A full 3-parameter GARCH has a flat, ill-conditioned likelihood that single-pass SGD won't recover, so AE-VOL adapts one well-conditioned parameter — robust and honest. Returns are in % for numerical stability.
Calibration (split-conformal): the forecast is wrapped in a distribution-free band — the (1-α) quantile of realized standardized moves rescales the envelope so coverage matches the target empirically (fat tails included). No lookahead: the standardizer is the forecast made N bars ago.
Sizing: multiple = clamp(target vol / forecast vol, min, max).
Honest scope: an EWMA variance recursion + one online-adapted parameter + nonparametric conformal calibration (this tool uses no RL). Not deep learning, not a guarantee.
⚙️ Recommended Settings & Tuning Guide (crypto 15m–4H)
Key parameters: decay learning rate, initial λ, horizon N, band significance (1-α), calibration window, target per-bar vol %.
Initial λ ≈ 0.94 is standard; it auto-adjusts (higher-vol assets converge to lower λ = more reactive)
N is how far ahead you care about; 5–20 bars for 15m–1H
Calibration window ≈ 200; longer is steadier, shorter tracks the recent regime
Target vol % is the per-bar vol you want per position; 0.5–1.5% for crypto 15m–1H
Band significance defaults to 0.90 (10% expected outside); the HUD shows realized coverage
💡 How to Use in Practice
Use the range envelope for take-profit/stop or range judgment (outside the band = statistically unusual)
Regime HIGH favors breakout/trend; LOW (squeeze) flags reversal/range setups
Use the size multiple for vol-targeted money management (auto-smaller in high vol)
The closer coverage is to target, the more trustworthy the band; if it drifts, adjust N or the window
Combine with AE-BPE (breakout probability) or AE-AVP (volume profile) to layer regime × level
⚠️ Important Notes
Needs a learning period (warmup); λ re-learns on timeframe/parameter change
The envelope is a probabilistic range, not a guarantee that price stays inside
The vol forecast gives magnitude, not direction
Probability, not a guarantee — always do your own due diligence and use risk management
🚨 Disclaimer
This indicator is for educational and informational purposes only and is not financial advice or a recommendation to buy or sell. No method guarantees future profits; past performance does not indicate future results, and trading carries the risk of loss. All decisions are your own — use proper validation and disciplined risk management.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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ã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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.