Skip to content

Commit d857b28

Browse files
committed
docs: record Regime Trend v1 execution errata
1 parent 65aea68 commit d857b28

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Regime Trend v1 — Errata 001
2+
3+
Status: **Accepted before any market-data evaluation**
4+
5+
This errata corrects two contradictions discovered by synthetic-test design. No market data or performance result was viewed before these corrections.
6+
7+
## 1. Remove unreachable immediate-entry-stop rule
8+
9+
The frozen specification stated that an entry candle could open below the newly computed initial stop.
10+
11+
That state is unreachable because:
12+
13+
- `entry_fill = open * (1 + buy_slippage)`
14+
- `initial_stop = entry_fill - 2.5 * entry_atr`
15+
- `entry_atr > 0`
16+
17+
Therefore `initial_stop` is always strictly below `entry_fill`, while `entry_fill` is above the raw open. The raw open cannot be less than or equal to the new initial stop.
18+
19+
Corrections:
20+
21+
- remove `immediate_entry_stop` from exit reasons,
22+
- remove `immediate_entry_stop_flag` from the ledger,
23+
- the entry candle is handled by the normal initial-stop rule after the entry fills.
24+
25+
## 2. Correct next-open trend-exit ordering
26+
27+
A trend-exit signal is created at candle `t` close and must execute at candle `t+1` open.
28+
29+
Correct ordering at `t+1` open:
30+
31+
1. If `open[t+1] <= active_stop`, classify the fill as a gap stop and use adverse sell slippage from the open.
32+
2. Otherwise fill the pending trend exit at the same open with adverse sell slippage.
33+
3. Do not inspect the later intrabar low before executing an already pending next-open trend exit.
34+
35+
The earlier reference engine incorrectly checked the full low of `t+1` before the pending trend exit, which could reclassify a required open exit as an intrabar stop.
36+
37+
## Version impact
38+
39+
- Strategy ID remains `regime-trend-v1` because these are logical corrections made before market evaluation.
40+
- Reference implementation version becomes `typescript-reference-v1.0.1`.
41+
- All later implementations and parity reports must apply this errata together with `spec.md`.

0 commit comments

Comments
 (0)