Files
QuanTAlib/lib/numerics/_index.md
T
Miha Kralj dafc569f4c Add series algebra and signal predicates layer
Series arithmetic (lib/numerics):
- Add, Sub, Mul, Div, Lag, reusing BiInputIndicatorBase at period=1
- Div publishes 0.0 (not NaN) on a zero denominator, since a non-finite
  ComputeError result permanently poisons the base's running sum
- BiInputIndicatorBase gains Subscribe(a, b) implementing the
  strategy-primitives spec's time-join rule for event-chained two-input nodes

Phase 0 contracts (lib/core):
- TTradeContext, BracketFlags, ExitReason, TrendState, VolState
- SignalConstants (DefaultEpsilon, TruthThreshold), OutOfRangePolicy
- ConfirmOnClose: bar-confirmation wrapper (Section 8.6)

Signal predicates (lib/signals/predicates), Phase 1:
- Above, Below, Equal (ComparePredicateBase<TOp> generic comparison core)
- InsideChannel, OutsideChannel, ChannelPosition (new MultiInputBase,
  3-input time-join)
- IsRising, IsFalling (exclude current bar, confirm-then-push window)
- AtHighest, AtLowest (include current bar, rebuild-on-correction,
  mirrors channels/Dc)
- Hysteresis, PercentDistance

All new nodes ship with .cs, tests, and .md docs; indices and the
StrategyPrimitives.Spec.md are updated with placement decisions and
design notes. Full suite: 16730 tests, 0 failures, 0 warnings.
2026-09-25 06:45:03 -07:00

4.0 KiB
Raw Blame History

Numerics

Basic mathematical transforms and utility functions for time series. These building blocks convert raw price data into forms suitable for analysis, comparison, and downstream indicator consumption.

Indicator Full Name Description
ACCEL Acceleration Momentum change; second derivative of price.
ADD Element-wise Addition Sum of two time-aligned streams: a + b.
BETADIST Beta Distribution Beta probability distribution transform.
BINOMDIST Binomial Distribution Binomial probability distribution transform.
CHANGE Percentage Change Relative price movement over lookback period.
CWT Continuous Wavelet Transform Time-frequency decomposition with continuous wavelets.
DECAY Linear Decay Peak envelope with linear degradation; max(input, prev − 1/period).
DIV Element-wise Division Quotient of two time-aligned streams: a / b; 0.0 near zero denominator.
DWT Discrete Wavelet Transform À trous Haar stationary DWT; multi-resolution approximation + detail decomposition.
EDECAY Exponential Decay Peak envelope with exponential degradation; max(input, prev × (period−1)/period).
EXPDIST Exponential Distribution Exponential probability distribution transform.
EXPTRANS Exponential Transform e^x transform for log-space conversion reversal.
FDIST F-Distribution Fisher-Snedecor probability distribution transform.
FFT Fast Fourier Transform Frequency-domain decomposition via FFT algorithm.
GAMMADIST Gamma Distribution Gamma probability distribution transform.
HIGHEST Rolling Maximum Maximum value over lookback window.
IFFT Inverse Fast Fourier Transform Frequency-to-time domain reconstruction.
JERK Jerk Rate of acceleration; third derivative of price.
LAG Value Delay Republishes the input from n bars ago: x[t-n].
LINEARTRANS Linear Transform y = ax + b scaling transformation.
LOGNORMDIST Log-normal Distribution Log-normal probability distribution transform.
LOGTRANS Logarithmic Transform Natural log for percentage-based analysis.
LOWEST Rolling Minimum Minimum value over lookback window.
MAXINDEX Rolling Maximum Index Position of maximum value in rolling window.
MININDEX Rolling Minimum Index Position of minimum value in rolling window.
MUL Element-wise Multiplication Product of two time-aligned streams: a * b.
NORMALIZE Min-Max Normalization Scale to [0,1] range using rolling min/max.
NORMDIST Normal Distribution Gaussian probability distribution transform.
POISSONDIST Poisson Distribution Poisson probability distribution transform.
RELU Rectified Linear Unit max(0, x); neural network activation function.
SIGMOID Logistic Function 1/(1+e^-x); bounded [0,1] transform.
SLOPE First Derivative First derivative; velocity of price movement.
SQRTTRANS Square Root Transform Variance-stabilizing transformation.
SUB Element-wise Subtraction Difference of two time-aligned streams: a - b.
TDIST Student's t-Distribution Student's t probability distribution transform.
WEIBULLDIST Weibull Distribution Weibull probability distribution transform.