Seasonal Optimizer
It opens from the Strategies → Seasonal Optimizer… menu. Not to be confused with the Seasonal Analysis, which sits in the Market menu and only describes: this one searches and produces a strategy. It looks for calendar patterns — windows of the year in which it pays to be long or short — using the Day Of Year (DOY, normalized 1–366, constant across years). It is a module separate from the Mass Test: seasonality decomposes by cycle (independent round trips), not by AND combination.
When brute-forcing millions of windows, the «best» one almost always looks good by chance. Which is why this module does not merely find patterns (4 searchers) but validates them with a statistical criterion (profile + a robustness layer with a p-value).
Four types of search
① Cyclical (a regular comb)
Few parameters for the whole year: Start, LongDays, ShortDays, FlatDays, Repetitions. Parallelized brute force, very robust against curve-fitting thanks to its parsimony. LongDays = the duration held in the position, not a trigger window.
② Blocks (segmented)
It divides the year into segments and picks the best window (long/short) of each one — irregular windows, one per segment. Each grid row = ONE window (≈1 trade/year); the strategy is the set of all of them.
③ Statistical (profile)
It is not brute force: it computes each day's t-stat (mean return / error), marks the significant ones (|t| ≥ threshold) and merges consecutive days of the same direction into windows (with a tolerance for gaps). Principled and hard to overfit. If no windows show up, loosen the t-stat or lower Min. observations — it needs several years of data per day.
④ Global optimum (DP)
Dynamic programming that picks the OPTIMAL set of non-overlapping windows (any position and width) maximizing the year's joint consistency. It is «Blocks done properly»: global placement, not per fixed segment.
The searcher's metric = consistency (average annual profit × % of positive years, with guardrails for min. trades / years). Longs, shorts or both. Validation by In-Sample % (to compare against TradeStation, set In-Sample = 100). The guardrails (min. trades / years) adjust themselves to the searcher (the cyclical one counts the total; the window-based ones trade ~once a year).
The grid: In-Sample / Out-of-Sample / Total
Each row carries its Score and Max. DD, followed by three blocks — In-Sample, Out-of-Sample and Total — each with Trades · Net $ · Win% · PF. The cut is set by the In-Sample slider (and matches the curve's). Sort by any column, including the ones inside each block.
The key reading: if the OOS Net is still green and its PF > 1, the seasonality holds up out of sample; if it collapses against the IS, it smells of overfitting.
Profile / Heatmap
The Profile / Heatmap button: the loaded symbol's «typical year», averaging every year.
A Jan→Dec strip; each day in green/red according to its average return.
The average cumulative return with a ±1σ band: where the edge is and how reliable it is.
Date, DOY, mean, t-stat and average year; it highlights the days with |t| ≥ 2.
The plan's robustness
The Robustness button: it validates the discovered plan on three fronts.
A temporal split by years (70/30): does it hold outside the sample?
Terciles of the history: stability across decades.
It re-places the plan at random 300 times → a p-value: signal or calendar noise?
The histogram shows the random distribution with the real plan's line on it: if it falls in the right-hand tail, the calendar is special; if it falls in the main distribution, it is consistent with chance.
Viewing and exporting
- ·Plan performance (or double-click): the full report — metrics in three columns, Overall / In-Sample / Out-of-Sample, equity with the cut marked («OOS →») and a table by years.
- ·Trades: a trade-by-trade table with colors and a summary; Copy/Save CSV.
- ·Export EL / View AQL: faithful EasyLanguage code and an AQL breakdown by window.
Hand-off to the rest of AniQuant
Right-click in the grid: it assembles every window of the plan into one single strategy (DayOfYear conditions, with longs and shorts joined by OR and long+short reversal) and sends it to:
The module discovers; the Portfolio combines equity and Survival computes the AQ Survival Score.
The interactive panel (everything in one window)
To the right of the results grid, the panel has tabs along the top: Curve (In-Sample / Out-of-Sample) and Heatmap (Entry × Holding). The key to understanding it: whatever is per plan reacts to the selected row; whatever belongs to the symbol does not depend on the plan.
| View | Does it change with the row? | Why |
|---|---|---|
| IS / OOS (tab) | Yes | It is per plan: each row is a plan → it recomputes its IS/OOS equity. |
| Entry × Holding (tab) | No | It belongs to the symbol: the map is computed over all the data. It only changes with the calendar and the Long/Short dropdown. |
| Profile / Heatmap | No | The map belongs to the symbol (the «typical year»). The windows drawn on top of it are a snapshot of the plan when you opened it. |
| Robustness | Yes* | It is computed for the plan of the row selected when you pressed the button (a modal window; it reflects that row). |
A mental rule: what is per plan (IS/OOS, Robustness) reflects the row; what belongs to the symbol/data (Entry×Holding, Profile) does not depend on the plan. The In-Sample control is a slider above the settings panel; it starts at 70% (leaving 30% OOS for validation) and shows the IS/OOS split as bars while you drag it. That same cut governs the curve, the grid's blocks and the Performance split.
The seasonal Max DD was in dollars
A units bug, silent and with consequences. Everywhere in AniQuant the Max DD % column is a percentage — but the Seasonal Analysis searcher was filling it in money. A saved seasonal strategy reached the Portfolio with dollars in that column, competing in the same table with the others, which are indeed in percent.
The less risky plan looked like the more risky one: the ordering by risk came out backwards. Any decision taken by looking at that column —discarding a plan, picking one for the portfolio— could be exactly the opposite of the right one.
Which is why the searcher computes both curves separately, each under its own name, and the right one goes into «Max DD %». The drawdown in money is not lost — it is still where the Optimizer shows it.
AniQuant can be tried free for 30 days, with every module and no card.