Seasonal Monthly Heatmap - Multi-Asset, Roll-Adjusted

196
Seasonal Monthly Heatmap shows, for up to ten symbols at once, how often each calendar month has been positive over the last N years, with its mean return and a flag when the result is unlikely to be random. It is designed to compare seasonal tendencies across asset classes at a glance and to separate real seasonality from long-term drift.

WHAT IT DOES
- Builds a 10 x 12 table: one row per symbol, one column per calendar month.
- Each cell shows the percentage of years in which that month was positive (or beat its own trend, see Detrend), the mean monthly return below it, and an asterisk when the hit rate is statistically unusual.
- Cells are colored from red (mostly negative) through grey (neutral) to green (mostly positive). The current month is highlighted in the header. The last column shows the number of years used.

WHAT MAKES IT DIFFERENT
1) Roll-safe returns for futures. Back-adjusted continuous contracts subtract every roll gap from older prices, which in contango markets (natural gas, crude oil) pushes old prices toward zero or below and distorts any percentage statistic. Each daily return here is the move of the back-adjusted series divided by the previous unadjusted price, so roll gaps are removed and percentages stay correct. The chart's own settings do not change the results.
2) Detrend mode (on by default). Each month's log return is compared with one twelfth of that same year's total log return. A green cell then means the month beat the pace of its own year, which separates true seasonality from the long-term rise of assets such as equity indices.
3) Statistical flag. An asterisk marks months where the hit rate is far enough from 50% to be unlikely under a coin flip (|z| >= 1.645, about 5% probability in each direction).
4) Multi-asset presets: "Futures" (Nasdaq, S&P 500, Dow, Russell 2000, gold, silver, crude oil, natural gas, 10-year Treasury note, euro), "US Sectors" (SPY, QQQ, IWM and seven sector ETFs) and "Custom" (any ten symbols).

HOW TO USE IT
1) Add it to any daily chart. The chart symbol does not matter, but choose one with a long history (for example ES1!) because the chart's history limits the years available.
2) Select a list, or choose "Custom" and enter your own symbols.
3) Compare the table with Detrend on and off.
4) If the list includes crypto, load the heatmap on a crypto chart (for example BTCUSD). Crypto trades seven days a week and a non-crypto chart has no weekend bars. The table shows a warning when this happens.

HOW TO INTERPRET IT
- With a table of 10 x 12 = 120 cells, about one in ten cells will be flagged by chance alone. A single isolated asterisk is most likely noise.
- Give more weight to patterns that (a) appear both with Detrend on and off, (b) form blocks of consecutive months or repeat across related assets, and (c) have an economic explanation (heating season, physical gold demand, refinery maintenance, year-end equity flows).
- Highly correlated assets (for example the three US equity index futures) showing the same month do not count as independent confirmations.
- Prefer the hit rate over the mean: one extreme year can dominate the average, especially in energy markets.
- Use the table as background context for direction and timing, not as a trading signal.

SETTINGS
- Years to average (default 25).
- List: Futures, US Sectors or Custom (ten symbol inputs).
- Detrend.
- Adjust for dividends: for stocks and ETFs, uses dividend-adjusted prices so ex-dividend drops do not create false bearish months. No effect on futures.
- Show mean return, table position and text size.

LIMITATIONS
- Daily timeframe only.
- Months with fewer than ten valid trading days, and the first partial month of each symbol's history, are excluded. Cells with fewer than five years show "-".
- Detrended statistics only use complete calendar years, so they can show fewer years than the raw statistics.
- If an exchange holiday differs between the chart symbol and a requested symbol, that day's return can be skipped. The effect is small.
- The script makes 30 data requests. Plans with lower request limits may need fewer symbols.
- The futures calculation relies on TradingView's back-adjusted and unadjusted continuous data.
- Past seasonal behavior does not predict future results. This is a statistical study, not trading advice.

Companion script: "Seasonality Window Stats" applies the same statistics to a custom window starting today (the next N sessions, or the rest of the year) for the chart symbol, with a projected seasonal path.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.