Skip to main content

Module features

Module features 

Source
Expand description

§Features: what SD v2 looks at

Classic SD looked at the market through three keyholes: one compression measurement (21 bars), one momentum gauge (the Awesome Oscillator), and a stopwatch that either said “active” or “expired”. Each keyhole is where one of the known weaknesses came from:

WeaknessKeyholeWhat v2 adds
Short squeezes are missedA 21-bar Bollinger band needs ~21 quiet bars before it can shrinkA second, 10-bar compression gauge, plus a continuous squeeze depth q
Momentum is one-dimensionalAO only, and a single AO colour change ends the tradeA panel of seven momentum gauges, blended, and a flip that must persist
No time decayActive is a yes/no switchA smooth strength curve over the life of the fire, and stored squeeze energy

This module only measures. It does not decide anything; model.rs learns how much each measurement is worth, and engine.rs turns that into the SD number.

§Squeeze depth q

The classic tiers compare SMA + 2σ with SMA + k·ATR. The SMAs cancel, so the test is really 2σ ≤ k·ATR, i.e. q = 2σ/ATR ≤ k. Writing it this way gives one continuous number: q < 1 is a high squeeze, q < 1.5 mid, q < 2 low, and how far below 2 tells you how tightly coiled price is.

Structs§

FeatureConfig
Knobs that change how features are measured (not how they are weighted).
FeatureFrame
All measurements for one symbol, one entry per bar.

Enums§

CompressionMode
Which compression gauge drives the squeeze clock.
FlipMode
How the clock decides “momentum flipped”.

Constants§

DEFAULT_BLEND
Equal default weights for the momentum blend, before any learning.
FEATURE_NAMES
Names of the model inputs, in column order. Keep in sync with FeatureFrame::row.

Functions§

decay_kernel
The time-decay kernel.
tier
Classic tier from a continuous depth.