DAFE Trading Systems — TED-PE White Paper

// PAPER 02 — PHASE-SPACE RECONSTRUCTION

TED-PE

Thompson-Enhanced Derivative Pattern Engine.

Price oscillators as generators of a four-dimensional kinematic phase space — velocity, acceleration, jerk, snap. Historical analogs matched by weighted geometry, aggregated by similarity, tuned by a Bayesian bandit. Live. Drag the cloud.

d¹–d⁴ kinematics Nearest-neighbor Bayesian bandit Expected value

// drag to rotate · d⁴ = color

Each point is a historical bar mapped into the reconstructed phase space. The amber trail is the active state vector. When the engine fires, it pulls the nearest historical analogs out of the cloud — the matches flash brighter than the rest.

AuthorShaun Lear (DskyzInvestments)
DateJuly 3, 2026
ClassificationAcademic Research White Paper
StatusPUBLISHED

Abstract

Standard financial technical analysis is primarily dogmatic and linear, assuming static thresholds that fail under non-stationary regimes. This paper introduces the Thompson-Enhanced Derivative Pattern Engine (TED-PE), which treats price oscillators as generators of a multi-dimensional kinematic phase space by extracting the first four temporal derivatives — Velocity (d¹), Acceleration (d²), Jerk (d³), Snap (d⁴). A causal, Gaussian-weighted Tompson Low-Pass Filter controls the noise amplification inherent in numerical differentiation, and rolling Z-score normalization makes the axes comparable. Historical structural analogs are located via a weighted Euclidean nearest-neighbor search in ℝ⁴ and aggregated into a similarity-weighted ensemble. Analog outcomes are combined into an Expected Value estimate — probability-weighted average win minus probability-weighted average loss — rather than a raw win rate. Dimension weights are set by a Bayesian Multi-Armed Bandit with an explicit forgetting factor. This document states plainly where the model's independence assumptions and validation gaps remain open.

01The Dogma Problem

Classical indicators were designed in the mid-to-late 20th century for low-frequency, human-brokered markets. An RSI of 70 on a 5-minute chart of a high-beta crypto-asset during institutional accumulation is a completely different structural state than an RSI of 70 during low-volatility weekend retail drift. And by smoothing with trailing averages, traditional indicators introduce phase delay — rendering signals late at exactly the moments that matter.

The alternative is to study the rate of change of the market's internal momentum: transition from static horizontal lines to kinematic phase-space reconstruction.

02The Physics of Momentum — A Reversal in Five Phases

When a trend exhausts, the reversal is not instantaneous. It progresses sequentially through higher-order derivatives long before price or moving averages confirm:

d⁴ · SNAPThe rate of momentum-acceleration decay peaks while price still rises. Structural energy is dissipating.
d³ · JERKThe shockwave hits the rate of acceleration. The third derivative crosses zero.
d² · ACCELThe system actively decelerates. Price still rises — but its rate of increase is slowing.
d¹ · VELMomentum velocity falls to zero. The trend stalls.
d⁰ · PRICEBaseline and price finally roll over. The threshold-based crowd enters here.

The high-order derivative sequence contains the structural fingerprint of the reversal — before the baseline indicator crosses its threshold.

03Mathematical Engineering

3.1 — The Noise Problem

Each successive finite difference amplifies high-frequency noise exponentially:

\[ \Delta^{n} f(t) = \sum_{k=0}^{n} (-1)^{k} \binom{n}{k} f(t-k) \]

By the fourth difference, a raw signal is typically overwhelmed by white noise. The filter is therefore not optional.

3.2 — Causal Gaussian-Weighted Filtering (Tompson Filter)

\[ y_{t} = \frac{ \sum_{i=0}^{L-1} w_{i}\, x_{t-i} }{ \sum_{i=0}^{L-1} w_{i} } \qquad\qquad w_{i} = \exp\!\left( -\frac{ \left[i - \frac{L-1}{2}\right]^{2} }{ 2\sigma^{2} } \right) \]
Correction from the original edition The weight kernel is symmetric in shape, but the index runs only through past bars — the filter's application is causal, not zero-lag. Expect an effective delay on the order of (L−1)/2 bars. The practical benefit is smoother frequency response and reduced ringing, not lag elimination.

3.3 — Rolling Z-Score Normalization

Different indicators print on different scales; their derivatives cannot be compared natively. Each derivative is normalized:

\[ n_{d_k}(t) = \frac{ d_k(t) - \mu_{d_k}(t, N) }{ \sigma_{d_k}(t, N) } \]

04Phase-Space Reconstruction

The four normalized derivatives form a state vector in ℝ⁴:

\[ \vec{S}(t) = \bigl( n_{d_1}(t),\; n_{d_2}(t),\; n_{d_3}(t),\; n_{d_4}(t) \bigr)^{\!\top} \]

The engine scans a historical search window for the closest states — a weighted Euclidean distance:

\[ D\bigl(\vec{S}(t), \vec{H}(t-i)\bigr) = \sqrt{ \sum_{k=1}^{4} \omega_{k}\, \bigl( n_{d_k}(t) - n_{d_k}(t-i) \bigr)^{2} } \]

Distance converts to a similarity score, and the top-C analogs beyond a similarity threshold are aggregated:

\[ S_{score} = \frac{1}{1 + D} \]

Rather than a plain top-C average, each analog's contribution is weighted by its similarity — and outcomes are combined into an Expected Value, not a win rate:

\[ EV = P_{win} \cdot \overline{W} \;-\; P_{loss} \cdot \overline{L} \]
Known limitation The Euclidean metric treats the four axes as orthogonal. They are successive derivatives of one underlying series — mechanically correlated by construction. A Mahalanobis distance with the rolling covariance of [d₁…d₄] would correct this; it is flagged as a priority extension.

05Self-Optimization — The Bayesian Bandit

Each derivative arm maintains a Beta posterior, updated by sign-of-derivative vs. subsequent price direction, with an explicit forgetting factor so stale regimes decay rather than accumulate:

\[ \theta_{k} \sim \mathrm{Beta}(\alpha_{k},\, \beta_{k}) \qquad\qquad \alpha_{k} \leftarrow 0.999 \cdot \alpha_{k} \qquad \beta_{k} \leftarrow 0.999 \cdot \beta_{k} \]
Correction from the original edition True Thompson Sampling draws θₖ from the Beta posterior each decision epoch. Pine Script has no native Beta-variate sampler, so this edition implements an approximate stochastic draw via Normal-moment-matching (Box-Muller over math.random(), redrawn once per closed bar). A deterministic posterior-mean mode remains available for fully repaint-free execution.

The sampled/expected probabilities normalize to sum to 4.0, dynamically re-weighting the ωₖ in the distance metric.

// Live laboratory — analog matching in ℝ⁴

● LIVE

A synthetic oscillator replays in phase space. The active state (amber) drags its analog trail behind it; the C nearest historical states (cyan) flash as the engine finds them, and their projected returns roll the Expected Value readout. Adjust the search window and analog count and watch the ensemble change character.

ANALOGS: 0 EV: 0.00 WIN RATE: BEST ARM:
active state matched analog historical states

06Live Evidence

Production output from the TED-PE indicator on TrendSpider — structural inflections clustering at swing highs and lows, with the four-derivative cascade in the sub-pane. Chart screenshot forthcoming.

07System Parameters

System ParameterEvaluated Value / Setting
Base IndicatorCommodity Channel Index (CCI)
Indicator Length12 bars
FilterTompson Low-Pass Filter (period 7)
Bayesian BanditEnabled (Z-score lookback 50)
Search Window1000 bars
Analog Matches7 analogs
Similarity Threshold0.60
Projection Horizon5 bars

08Known Limitations & Assumptions

  1. The Tompson filter is causal, not zero-lag; it carries ≈ (L−1)/2 bars of group delay.
  2. "Thompson Sampling" is a Normal-moment-matched approximation to a Beta draw — a deterministic posterior-mean mode is offered as an alternative.
  3. Derivative axes and bandit arms both assume independence that the kinematic-cascade premise itself contradicts. Mahalanobis distance and correlated-arm bandits are natural, unimplemented extensions.
  4. Analog sample sizes are typically small; win-rate/EV estimates are high-variance.
  5. No out-of-sample or walk-forward validation has been conducted — descriptive observations only.
  6. Transaction costs, slippage, and spread are not modeled in the EV or TP/SL calculations.

09Conclusion

TED-PE replaces dogmatic thresholds with geometry: a market state is a point in phase space, and a signal is a measured distance to the states that mattered before. The framework is honest about its approximations — the corrected filter causality, the moment-matched sampler, the independence assumptions — and the live implementation ships the full parameter surface on the store.

// NEXT FRAMEWORK

From phase space to material state.

CFE treats support and resistance as latent barriers with fatigue, damage, and healing — a level engine with a stress test built in.

// DAFE TRADING SYSTEMS

Intelligent trading infrastructure — engineered, not assembled. Research-driven systems for real market conditions.

// CONTACT

Shaun Lear (DskyzInvestments)
Shaun@dafetradingsystems.com
(713) 725-8728
Houston, TX


Important: Trading Risk Disclosure. Futures, options, forex, and digital asset trading involves substantial risk of loss and is not suitable for everyone. Investors may lose all or more than their initial investment, so only risk capital should be used. Past performance is not indicative of future results.

© 2026 DAFE Trading Systems LLC — engineered, not assembled.