With fast 10, slow 30 and a two-observation lag, level-versus-mean switches to -1 on the constructed May 22 label, while lookback change and fast/slow means switch on May 26. All three have one reversal, four turnover units and a 12 bp cost proxy at the chosen 3 bp one-way setting.
Fix the example and its boundaries
This case uses the constructed reversal fixture supplied with comparison engine version 1.0.0. Its 180 reference levels combine an upward component, a later downward component and a deterministic oscillation. They are generated numbers, not observed prices for an instrument. The figures below were reproduced with the shipped Node reference runner and checked against the engine's calculation rules.
The settings are fast window 10, slow window 30, lag two observations and chosen one-way cost three basis points. A common warmup excludes 32 input rows, leaving 148 assessment rows labelled February 15 through September 8, 2023. These labels skip weekends but do not implement an exchange calendar. They describe the fixture's ordered observations, not verified trading sessions.
Compare three definitions on the same information
At each assessment row, all three calculations end at the same earlier information row. Lookback change compares that level with its level 30 intervals earlier. Level-versus-mean compares it with the trailing 30-observation mean. Fast/slow means compares trailing averages of 10 and 30 observations. The endpoint rule therefore needs 31 levels, explaining why the common warmup accommodates more than a 30-value average.
The NIST explanation of a moving average supports the underlying rolling arithmetic: entering and departing observations change the mean. Here those means summarize the intervening path, whereas lookback change uses two endpoints. The engine applies a small numerical tolerance around zero; no assessed state is neutral in this particular fixture. Different summaries can therefore switch at different rows without a computational inconsistency.
Follow the observation lag exactly
The first assessment label is February 15, but its information label is February 13. More revealingly, the assessment on Monday, May 22 uses information ending Thursday, May 18: Friday and Monday are the two subsequent fixture observations. Two observations are not always two calendar days. The label identifies delayed information, not an order time or an available execution price.
The pandas shift documentation independently distinguishes period-based shifts from frequency-based date shifts. That documentation explains the conceptual distinction; it is not a claim that this JavaScript engine uses pandas. The verified convention here is a row-index relationship. Moving a date label by a calendar interval would not reproduce the same information mapping around weekends.
Locate the verified switches
Reading the computed timeline shows level-versus-mean first switching from +1 to -1 on May 22, using information through May 18. Lookback change and fast/slow means first switch on May 26, using information through May 24. These dates were checked directly rather than inferred from the totals. Every method remains negative through the final assessment row after its sole reversal.
The methods disagree on precisely four assessment labels: May 22, May 23, May 24 and May 25. On each, level-versus-mean is -1 and the other two remain +1. Thus the earlier switch is four observation rows earlier, not a generally estimated response advantage. It is a property of this path, these windows and the specified common lag.
A date such as May 22 may look like evidence about a real market episode. Here it is only a generated weekday label attached to a deterministic calculation. No historical event, announcement or market participant explains the switch. Its cause is the relationship between the fixture's permitted level and the selected trailing mean at that information cutoff.
| Method | First negative assessment label | Information ending | Reversals |
|---|---|---|---|
| Lookback change | 2023-05-26 | 2023-05-24 | 1 |
| Level vs mean | 2023-05-22 | 2023-05-18 | 1 |
| Fast / slow means | 2023-05-26 | 2023-05-24 | 1 |
Reconcile occupancy and agreement
Lookback change and fast/slow means each record 72 positive and 76 negative assessment rows. Level-versus-mean records 68 positive and 80 negative rows. Each pair sums to 148, with zero neutral rows. The four-row redistribution follows directly from the earlier switch. Long and short are labels for fixed unit directional states, not counts of actual contracts held in an account.
All three rules agree on 144 of the 148 assessment rows. Dividing 144 by 148 and multiplying by 100 gives 97.2973%, rounded to four decimal places. Equivalently, four rows fail the all-method agreement condition. This is a classification-agreement statistic, not accuracy: the exercise supplies no independently defined future target against which a correct prediction could be scored.
Reconcile the turnover ledger
Every method begins from an assumed flat state, enters +1, reverses once to -1 and is flattened after the final assessment. Initial entry contributes one turnover unit, the sign reversal contributes two and terminal flattening contributes one. The total is four. Multiplying four by the chosen three-basis-point one-way setting gives a 12 bp cost proxy for each method.
The engine's changes count is two because it includes initial entry and the within-timeline reversal, but not the terminal flattening added separately to turnover. Its reversal count is one because entering from zero is not a sign reversal. This bookkeeping distinction explains how two state changes, one reversal and four turnover units can all correctly describe the same assessed sequence.
Interpret timing without inventing a winner
The level rule changes direction earlier here, yet all three incur the same abstract activity total. Neither finding establishes which timing is preferable. The comparison does not calculate P/L or returns, does not model fills and does not map its basis-point cost proxy to account NAV. Its unit exposure is fixed, with no volatility sizing or changing contract quantity inside this case.
The useful result is narrower and reproducible: different summaries of the same lagged path can disagree temporarily while producing identical reversal and turnover counts. Reading the timeline alongside the summary reveals that difference. Reusing these dates or counts for another path would be unjustified, and the successful reference calculation verifies the stated mechanics rather than validating an investment method.
Research checkpoints
- The verified switches occur on constructed May 22 and May 26 labels, four observation rows apart.
- Agreement is 144 of 148 rows, or 97.2973%; it is not predictive accuracy.
- Each method has one reversal, four turnover units and a 12 bp fixed-unit cost proxy including entry and final flattening.
Source record
Related methods
Moving-Average Trend Rules Without the Mystery
Work through price-versus-mean and fast-versus-slow rules, including ties, warmup and sensitivity to window membership.
Signal Timing and Lookahead: Follow the Information Clock
Trace observation, publication, calculation and delayed use, with practical examples of leakage and missing-data traps.
Reversals and Whipsaw: What Changing Signals Actually Show
Distinguish persistent reversals from repeated threshold crossings, and measure state changes without inventing investment results.
Published 16 October 2026. Illustrations and reference diagnostics do not establish strategy profitability or execution quality.