OPEN-SOURCE SCRIPT
AetherEdge - Seasonality

🖊️ Overview
Seasonality tools show raw averages and let you fool yourself with three-sample "edges." AE-SEAS measures the time-of-day / day-of-week / month return profile properly, with significance. It learns each bucket's mean return, win-rate, sample count and t-stat, and shrinks small-sample buckets toward the global mean (empirical Bayes) to prevent overfitting — answering "which time periods have a real edge" with data.
🔶 Key Features
Time-of-period profiles — learned mean return and win-rate by hour / weekday / month
Significance (t-stat) — separates a real edge from noise (don't trust raw averages)
Empirical-Bayes shrinkage — small-sample buckets shrink toward the global mean (anti-overfitting)
Current-bucket bias — the shrunk expected return, win-rate and significance for the bucket you're in
Heatmap table — all buckets at a glance, current one highlighted
Signals + alerts on entering a significant-edge bucket; bar-close accumulation — no repaint
🧠 Technical Architecture
Bucket statistics: each time bucket (hour 0–23 / weekday / month) accumulates the bar's return, yielding mean, variance, sample count, win-rate and a t-stat (mean ÷ standard error). Larger |t| = a less-likely-to-be-chance edge.
ML (empirical-Bayes shrinkage = regularized estimation): shrunk mean = global mean + (bucket mean − global mean) × n/(n+k). Low-sample buckets shrink hard toward the global mean; well-sampled buckets approach the raw value. This stops a five-sample bucket from masquerading as a strong signal — regularized estimation, not raw counting, is the "ML."
Timezone: buckets are computed in the selected timezone (Exchange / UTC / NY / London / Tokyo).
Honest scope: regularized per-bucket statistics (empirical-Bayes shrinkage + t-test) (no RL). Not deep learning, not a guarantee.
⚙️ Recommended Settings & Tuning Guide (crypto 15m–4H)
Key parameters: active profile (hour/weekday/month), timezone, shrinkage strength k, significance threshold |t|, min samples.
Profile: "Hour" for crypto intraday, "Weekday" for weekly tendencies, "Month" for the long run (higher timeframes)
Timezone: UTC is standard for crypto; exchange TZ for equities
Higher shrinkage k pulls small samples harder toward the global mean (conservative)
Significance |t| defaults to 2.0 (≈95%); use 2.5–3.0 to be stricter
Longer history / timeframe means more samples per bucket and higher reliability
💡 How to Use in Practice
Use the heatmap table to spot hours/days with a large mean and a ✦ (significant)
Reference the current-bucket bias as the backdrop for the period you're in
Treat entering a significant bull/bear bucket as a trend/caution cue
Ignore buckets with low sample count (n) or small t
Combine with AE-VOL (volatility) or AE-CVD (flow) to layer time × context
⚠️ Important Notes
Seasonality is a historical tendency with no guarantee of persistence (structural shifts break it)
Low-sample buckets remain uncertain even after shrinkage (always check n and t)
Needs a learning period (warmup) and ample history; accumulation resets on timeframe/timezone change
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.
Seasonality tools show raw averages and let you fool yourself with three-sample "edges." AE-SEAS measures the time-of-day / day-of-week / month return profile properly, with significance. It learns each bucket's mean return, win-rate, sample count and t-stat, and shrinks small-sample buckets toward the global mean (empirical Bayes) to prevent overfitting — answering "which time periods have a real edge" with data.
🔶 Key Features
Time-of-period profiles — learned mean return and win-rate by hour / weekday / month
Significance (t-stat) — separates a real edge from noise (don't trust raw averages)
Empirical-Bayes shrinkage — small-sample buckets shrink toward the global mean (anti-overfitting)
Current-bucket bias — the shrunk expected return, win-rate and significance for the bucket you're in
Heatmap table — all buckets at a glance, current one highlighted
Signals + alerts on entering a significant-edge bucket; bar-close accumulation — no repaint
🧠 Technical Architecture
Bucket statistics: each time bucket (hour 0–23 / weekday / month) accumulates the bar's return, yielding mean, variance, sample count, win-rate and a t-stat (mean ÷ standard error). Larger |t| = a less-likely-to-be-chance edge.
ML (empirical-Bayes shrinkage = regularized estimation): shrunk mean = global mean + (bucket mean − global mean) × n/(n+k). Low-sample buckets shrink hard toward the global mean; well-sampled buckets approach the raw value. This stops a five-sample bucket from masquerading as a strong signal — regularized estimation, not raw counting, is the "ML."
Timezone: buckets are computed in the selected timezone (Exchange / UTC / NY / London / Tokyo).
Honest scope: regularized per-bucket statistics (empirical-Bayes shrinkage + t-test) (no RL). Not deep learning, not a guarantee.
⚙️ Recommended Settings & Tuning Guide (crypto 15m–4H)
Key parameters: active profile (hour/weekday/month), timezone, shrinkage strength k, significance threshold |t|, min samples.
Profile: "Hour" for crypto intraday, "Weekday" for weekly tendencies, "Month" for the long run (higher timeframes)
Timezone: UTC is standard for crypto; exchange TZ for equities
Higher shrinkage k pulls small samples harder toward the global mean (conservative)
Significance |t| defaults to 2.0 (≈95%); use 2.5–3.0 to be stricter
Longer history / timeframe means more samples per bucket and higher reliability
💡 How to Use in Practice
Use the heatmap table to spot hours/days with a large mean and a ✦ (significant)
Reference the current-bucket bias as the backdrop for the period you're in
Treat entering a significant bull/bear bucket as a trend/caution cue
Ignore buckets with low sample count (n) or small t
Combine with AE-VOL (volatility) or AE-CVD (flow) to layer time × context
⚠️ Important Notes
Seasonality is a historical tendency with no guarantee of persistence (structural shifts break it)
Low-sample buckets remain uncertain even after shrinkage (always check n and t)
Needs a learning period (warmup) and ample history; accumulation resets on timeframe/timezone change
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.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.