Read TradingView seasonality without treating it as a forecast
TradingView offers a built-in Seasonality indicator with a monthly heatmap, average changes, standard deviations, and positive percentages. Its chart boxes apply historical monthly averages to the previous month close. The separate Seasonals view compares annual price paths. These displays help describe historical data; an average-based box is not a probability interval or an executable order.
- In the Seasonality indicator, record the starting year and any ignored months. Check the Data Window count for the current average rather than assuming that the requested date range equals the available sample.
- TradingView documents that historical boxes use information available when drawn, while the heatmap reflects the latest available calculations. Do not use a present-day heatmap average to authorize an earlier trade.
- Keep excluded years visible in your research record. Removing a difficult year after seeing its return changes the sample being described.
Choose the observation before counting the sample
Use one row for each complete return window. The table below defines three possible experiments, not interchangeable versions of one statistic. For each, save the exchange, symbol, data source, timezone, price adjustments, and exact start and end timestamps.
- For a positive prior close, define percentage return as 100 × (ending close / prior close - 1). Keep zero returns in the denominator but outside the strictly positive count. Treat missing endpoints as missing, not zero.
- For this monthly research design, exclude incomplete months and record every exclusion. A month-to-date return is a different horizon from a completed historical month.
- Fix whether prices include dividend adjustments and how futures rolls are handled. Do not mix price return, total return, and realized strategy return in one average. A zero or negative starting price requires a different, explicitly defined return measure.
| Hypothesis | One observation | Denominator and calendar rule |
|---|
| A particular month behaves differently | Close of the last session of the previous month to close of the last session of the target month. | Number of valid occurrences of that month. Five completed Aprils give n = 5, not 60 months or roughly 100 daily bars. |
| A weekday behaves differently | For a Monday close-to-close test, previous available session close to Monday close. | Count valid Mondays. Skip Monday holidays; do not rename Tuesday as Monday. This return includes the intervening non-trading period. |
| A holiday or turn-of-month window behaves differently | A fixed number of exchange sessions before and after a named event. | Count complete event windows. Predefine the holiday calendar and resolve overlapping windows before calculating results. |
A five-April calculation with a visible denominator
The following prices are invented for arithmetic, not observations of an asset. Each row independently normalizes the preceding March close to 100. The requested 2018 to 2023 sample contains six Aprils, but 2018 lacks a March endpoint, leaving five valid returns. There are no other exclusions.
- Arithmetic mean = (-2 + 1 + 2 + 3 + 16) / 5 = 4%. Median = 2%. Positive frequency = 4 / 5 = 80%. These are separate statistics; the mean is not an annualized or compounded return.
- Without the 2023 observation, the mean is (-2 + 1 + 2 + 3) / 4 = 1%, and positive frequency is 3 / 4 = 75%. Report this as sensitivity analysis alongside the full sample, not as permission to delete an inconvenient year.
- Repeat the omission for every year. Here the leave-one-year-out means range from 1% to 5.5%. A single omission therefore changes the estimated average materially.
| Year | March endpoint | April endpoint | April return |
|---|
| 2018 | Missing | Unavailable for comparison | Excluded; not 0% |
| 2019 | 100 | 98 | -2% |
| 2020 | 100 | 101 | +1% |
| 2021 | 100 | 102 | +2% |
| 2022 | 100 | 103 | +3% |
| 2023 | 100 | 116 | +16% |
Put a confidence range beside an 80% positive frequency
For 4 positive observations out of 5, a two-sided 95% Wilson interval is approximately 37.6% to 96.4%. The calculation follows the Wilson method documented by NIST. The wide interval makes the small denominator visible; 80% alone hides it. This is an interval for a binomial proportion under its assumptions, not a range for next April return.
- For reproducibility, set p = 4/5, n = 5, and z = 1.96. Center = (p + z²/(2n)) / (1 + z²/n). Half-width = z × sqrt(p(1-p)/n + z²/(4n²)) / (1 + z²/n).
- The model assumes independent outcomes with a common positive-return probability. Market regimes, related instruments, and overlapping windows can violate that model. The interval also does not correct for selecting April after inspecting many alternatives.
- Positive frequency ignores loss size. Report the return distribution and worst observation as well. A high positive frequency can coexist with a negative mean if losing periods are large enough.
Calendar and sample choices can create the apparent effect
A calendar grouping is only reproducible when another researcher can assign the same observations to it. Pine calendar variables use the exchange timezone and the bar opening timestamp; changing the displayed chart timezone does not change that calculation. For overnight sessions, explicitly choose opening-date or trading-day attribution.
| Source of distortion | Audit question | Required record |
|---|
| Calendar alignment | Are dates, session numbers, or week numbers being compared? How are leap days, short weeks, and holiday closures handled? | One fixed mapping rule. Never silently shift a missing date to the next session. |
| Window selection | Was the start year moved until the average became positive? | Original dates, all tested ranges, and the full-sample result beside any diagnostic exclusion. |
| Multiple comparisons | How many months, weekday filters, holding periods, assets, and entry rules were searched? | A candidate log. Twelve months across ten assets already produces 120 groups before entry and exit variants. |
| Survivorship and shared exposure | Were only currently listed winners chosen? Are several assets reacting to the same event? | Instrument-selection rule and historical availability. Correlated asset returns do not supply independent calendar repetitions. |
| Changing market conditions | Does one era or exceptional year account for most of the average? | Subperiod results, counts, and leave-one-year-out comparisons without retuning each subperiod. |
Separate a monthly return from an executable strategy
A close-to-close calendar statistic does not specify a fill. Before testing a trade rule, fix when the calendar condition is known, when orders are submitted, the execution model, size, exits, and costs. TradingView strategies normally fill a market order on the next available tick, commonly the next bar open in a historical bar-close test.
- Do not infer an April close-to-close profit from a strategy that first recognizes April after its first daily bar closes. Its entry and exit timestamps must be checked separately from the descriptive return window.
- Include commissions, spread or slippage assumptions, and applicable financing or borrow costs. Save a base scenario and an adverse cost scenario with the same signals.
- As arithmetic only, subtracting an assumed 0.40 percentage points per round trip from every toy April gives a mean of 3.60%, or 0.60% without 2023. This constant haircut does not model real fills, compounding, or instrument-specific fees.
- Compare against the same underlying exposure without the calendar filter. Report time in market and drawdown alongside net return; being invested for fewer months changes exposure as well as results.
Freeze the rule before an out-of-sample test
An illustrative research split could use 2005 to 2017 for development and 2018 to 2025 for evaluation, provided the instrument has complete history and the later outcomes have not influenced selection. Those dates are a protocol example, not a reported experiment. If you already inspected both periods, label both as development data and reserve a genuinely unseen period.
- A failed later test cannot be repaired by choosing another month and still calling the same period untouched. Revisions need a new evaluation sample.
- Few annual repetitions can leave the result inconclusive for years. More intraday bars do not increase the number of independent Aprils.
| Stage | Fixed record | Decision rule |
|---|
| Before exploration | Eligible instruments, calendar windows, return definition, costs, and candidate list. | Assign the evaluation dates before comparing candidates. Record missing-data rules. |
| After development | One selected rule, code version, parameters, sizing, and benchmark. | Freeze the specification. Define acceptable net result, risk, and sample-count criteria in advance. |
| Evaluate once | All eligible later observations, fills, costs, and rejected windows. | Report pass, fail, or inconclusive against the frozen criteria. Eight complete years provide at most eight Aprils for one asset. |
| Forward monitoring | Next review date, accumulated observations, loss limit, and data-quality checks. | Pause for a predefined risk-limit breach or broken data. At scheduled reviews, compare results with the frozen benchmark; record any revision as a new hypothesis. |
Use Pineify for implementation and trade-result review
Give Pine Script AI Coding Agent the calendar definition, missing-data rules, date split, order timing, and risk limits to draft a strategy. Check the generated source and signal timestamps in TradingView. The calendar hypothesis and its statistical validity remain research decisions.
- Backtest Deep Report accepts a TradingView Strategy Tester trade-list CSV and can display daily, weekly, and monthly trade-result heatmaps. Its monthly calculation groups realized net P&L by trade exit time.
- That exit-month grouping is different from month-end mark-to-market returns on the underlying asset. A trade spanning March and April does not allocate its unrealized March P&L to March in this calculation.
- Keep the raw price observations, calendar exclusions, and hypothesis log separately. Trade CSV analysis cannot reconstruct missing price history or establish that a seasonal pattern will persist.