Season ChartThis overlay is built on the idea of seasonal charts.
It is constructed by taking the percentage change from each close and recording that change for every trading day of any year that is within the sample. We then take the average for each day of all the years.
These averages are then cumulated to create the chart as per traditional seasonal chart construction.
I have also taken a trimmed mean of the averages to try and dampen the impact one off moves that may have a dramatic effect on the daily averages (for example the crash to $0 in oil in April 2020) however, even removing 10% may not guarantee one off moves won’t affect the average.
The construction of the chart is completely dependent on the data provided by TradingView and so it is recommended that if longer sample sizes are used, the user go back to check that the years contained within the sample have a full history. Some data may have large gaps in their history and this can distort the seasonality readings.
I have attempted to align the chart with the first trading day of the year, but the start of some months may be out by a day or two as it becomes difficult to track all weeks with differing market holidays closures each year and this in turn varies the total amount of actual trading days in each year as well as leap years.
This overlay is designed for the Daily time frame only and will not work on Crypto or any other instrument that trades outside of usual business weekdays. Future updates may include the ability to adapt to Crypto instruments.
All feedback and comments welcome!
Seasonality-trading
Seasonality Widget [LuxAlgo]The Seasonality Widget tool allows users to easily visualize seasonal trends from various data sources.
Users can select different levels of granularity as well as different statistics to express seasonal trends.
🔶 USAGE
Seasonality allows us to observe general trends occurring at regular intervals. These intervals can be user-selected from the granularity setting and determine how the data is grouped, these include:
Hour
Day Of Week
Day Of Month
Month
Day Of Year
The above seasonal chart shows the BTCUSD seasonal price change for every hour of the day, that is the average price change taken for every specific hour. This allows us to obtain an estimate of the expected price move at specific hours of the day.
Users can select when data should start being collected using the "From Date" setting, any data before the selected date will not be included in the calculation of the Seasonality Widget.
🔹 Data To Analyze
The Seasonality Widget can return the seasonality for the following data:
Price Change
Closing price minus the previous closing price.
Price Change (%)
Closing price minus the previous closing price, divided by the
previous closing price, then multiplied by 100.
Price Change (Sign)
Sign of the price change (-1 for negative change, 1 for positive change), normalized in a range (0, 100). Values above 50 suggest more positive changes on average.
Range
High price minus low price.
Price - SMA
Price minus its simple moving average. Users can select the SMA period.
Volume
Amount of contracts traded. Allow users to see which periods are generally the most /least liquid.
Volume - SMA
Volume minus its simple moving average. Users can select the SMA period.
🔹 Filter
In addition to the "From Date" threshold users can exclude data from specific periods of time, potentially removing outliers in the final results.
The period type can be specified in the "Filter Granularity" setting. The exact time to exclude can then be specified in the "Numerical Filter Input" setting, multiple values are supported and should be comma separated.
For example, if we want to exclude the entire 2008 period we can simply select "Year" as filter granularity, then input 2008 in the "Numerical Filter Input" setting.
Do note that "Sunday" uses the value 1 as a day of the week.
🔶 DETAILS
🔹 Supported Statistics
Users can apply different statistics to the grouped data to process. These include:
Mean
Median
Max
Min
Max-Min Average
Using the median allows for obtaining a measure more robust to outliers and potentially more representative of the actual central tendency of the data.
Max and Min do not express a general tendency but allow obtaining information on the highest/lowest value of the analyzed data for specific periods.
🔶 SETTINGS
Granularity: Periods used to group data.
From Data: Starting point where data starts being collected
🔹 Data
Analyze: Specific data to be processed by the seasonality widget.
SMA Length: Period of the simple moving average used for "Price - SMA" and "Volume - SMA" options in "Analyze".
Statistic: Statistic applied to the grouped data.
🔹 Filter
Filter Granularity: Period type to exclude in the processed data.
Numerical Filter Input: Determines which of the selected hour/day of week/day of month/month/year to exclude depending on the selected Filter Granularity. Only numerical inputs can be provided. Multiple values are supported and must be comma-separated.
Time Cycles IndicatorThis script is used to analyze the seasonality of any asset (commodities, stocks, indices).
To use the script select a timeframe D or W and select the months you are interested in the script settings. You will see all the candles that are part of those months highlighted in the chart.
You can use this script to understand if assets have a cyclical behavior in certain months of the year.
Seasonality Chart [LuxAlgo]The Seasonality Chart script displays seasonal variations of price changes that are best used on the daily timeframe. Users have the option to select the calculation lookback (in years) as well as show the cumulative sum of the seasonal indexes.
🔶 SETTINGS
Lookback (Years): Number of years to use for the calculation of the seasonality chart.
Cumulative Sum: Displays the cumulative sum of seasonal indexes.
Use Percent Change: Uses relative price changes (as a percentage) instead of absolute changes.
Linear Regression: Fits a line on the seasonality chart results using the method of least squares.
🔶 USAGE
Seasonality refers to the recurrent tendencies in a time series to increase or decrease at specific times of the year. The proposed tool can highlight the seasonal variation of price changes.
It is common for certain analysts to use a cumulative sum of these indexes to display the results, highlighting months with the most significant bullish/bearish progressions.
The above chart allows us to highlight which months prices tended to have their worst performances over the selected number of years.
🔹 Note
Daily price changes are required for the construction of the seasonal chart. Thus, charts using a low timeframe might lack data compared to higher ones. We recommend using the daily timeframe for the best user experience.
🔶 DETAILS
To construct our seasonal chart, we obtain the average price changes for specific days on a specific month over a user-set number of years from January to December. These individual averages form "seasonal indexes."
This is a common method in classical time series decomposition.
Example:
To obtain the seasonal index of price changes on January first we record every price change occuring on January first over the years of interest, we then average the result.
This operation is done for all days in each month to construct our seasonal chart.
Seasonal variations are often highlighted if the underlying time series is affected by seasonal factors. For market prices, it is difficult to assess if there are stable seasonal variations on all securities.
The consideration of seasonality by market practitioners has often been highlighted through strategies or observations. One of the most common is expressed by the adage "Sell in May and Go Away" for the US market. We can also mention:
January Effect
Santa Claus Rally
Mark Twain Effect
...etc.
These are commonly known as calendar effects and appear from the study of seasonal variations over certain years.
Seasonal pivot datesPlots approximate equinox and solstice dates, which are often zones around which market pivots occur.
ILM Seasonality Monthly - Day of Month - Tabular FormUse this indicator on Daily Timeframe
This indicator displays the seasonality data for any instrument (index/stock/ futures /currency) in a tabular data by day of the month (Day 1..31).
User can change the start of the year and month for analysis from the inputs.
Year is represented in rows and Day of the month (Day) is represented in cols.
This indicator uses Daily Data feed to calculate the % change
Summary data for Day of month is displayed at the bottom of the table
ILM Seasonality Big Moves - TableUse this script on Daily Timeframe.
This script calculates Daily Moves ( Intraday / Close basis ) and buckets them into 1% / 2% / 3% moves
Also calculates MAX DD for the financial year from Peak to Trough
Helps in identifying volatility of the instrument and high drawdowns due to volatility
Month/Month Percentage % Change, Historical; Seasonal TendencyTable of monthly % changes in Average Price over the last 10 years (or the 10 yrs prior to input year).
Useful for gauging seasonal tendencies of an asset; backtesting monthly volatility and bullish/bearish tendency.
~~User Inputs~~
Choose measure of average: sma(close), sma(ohlc4), vwap(close), vwma(close).
Show last 10yrs, with 10yr average % change, or to just show single year.
Chose input year; with the indicator auto calculating the prior 10 years.
Choose color for labels and size for labels; choose +Ve value color and -Ve value color.
Set 'Daily bars in month': 21 for Forex/Commodities/Indices; 30 for Crypto.
Set precision: decimal places
~~notes~~
-designed for use on Daily timeframe (tradingview is buggy on monthly timeframe calculations, and less precise on weekly timeframe calculations).
-where Current month of year has not occurred yet, will print 9yr average.
-calculates the average change of displayed month compared to the previous month: i.e. Jan22 value represents whole of Jan22 compared to whole of Dec21.
-table displays on the chart over the input year; so for ES, with 2010 selected; shows values from 2001-2010, displaying across 2010-2011 on the chart.
-plots on seperate right hand side scale, so can be shrunk and dragged vertically.
-thanks to @gabx11 for the suggestion which inspired me to write this
RSI - S&P Sector ETFsThe script displays RSI of each S&P SPDR Sector ETF
XLB - Materials
XLC - Communications
XLE - Energy
XLF - Financials
XLI - Industrials
XLK - Technology
XLP - Consumer Staples
XLRE - Real Estate
XLU - Utilities
XLV - Healthcare
XLY - Consumer Discretionary
It is meant to identify changes in sector rotation, compare oversold/overbought signals of each sector, and/or any price momentum trading strategy applicable to a trader.