Seasonality [TFO]

This Seasonality indicator is meant to provide insight into an asset's average performance over specified periods of time (Daily, Monthly, and Quarterly). It is based on a 252 trading day calendar, not a 365 day calendar. Therefore, some estimations are used in order to aggregate the Daily data into higher timeframes, as we assume every Month to be 21 trading days, and every Quarter to be 63 trading days. Instead of collecting data on the 1st day of a given month, we are actually treating it as the "nth" trading day of the year. Some years exceed 252 trading days, some fall short; however 252 is the average that we are working with for US stocks and indices. Results may vary for non-US markets.

Main features:
- Statistics Table
- Performance Analysis
- Seasonal Pivots

The Statistics Table provides a summarized view of the current seasonality: whether the average Day/Month/Quarter tends to be bullish or bearish, what the average percent change is, and what the current (actual) change is relative to the historical value. It is shown in the top right of this chart.

The Performance Analysis shows a histogram of the average percentage performance for the selected timeframe. Here we have options for Daily, Monthly, and Quarterly. The previous chart showed the Monthly timeframe, here we have the Daily and Quarterly.

Lastly, Seasonal Pivots show where highs and lows tend to be created throughout the year, based on an aggregation of the Daily performance data collected over the available years. If we anchor our data to the beginning of the current year, and then manually offset it by ~252 (depending on the year), we can line this data up with the previous years' data and observe how well these Seasonal Pivots lined up with major Daily highs and lows.

Styling options are available for every major component of this indicator. Please consider sharing if you find it useful!


TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。