Systemicalpha

Absolute

systemic:core-absMathfunction1 cr

Inputs

NameTypeDescription
DatafloatarrayThe numeric series to transform. Each value is converted to its absolute magnitude.

Outputs

NameTypeDescription
AbsolutefloatarrayThe non-negative magnitude of each input value.

∣x∣={x,if x≥0−x,if x<0|x| = \begin{cases} x, & \text{if } x \geq 0 \\ -x, & \text{if } x < 0 \end{cases}

Converts all values to their non-negative magnitude. Positive values stay positive, negative values become positive, zero remains zero.

InputOutput
55
-33
00
-7.57.5

Missing Data

A datapoint can be missing (null) — a data gap, or a closed-market slot such as a weekend on a stock series.

  • A missing input produces a null output at the same position. The math is never faked: no zero or other substitute is invented for a slot that has no data.
  • ABS itself has no invalid inputs — every real number has an absolute value — so a null output always means "no input datapoint here", never a math error.
  • In live execution the module returns exactly one datapoint (the newest slot), which is null when that slot has no input value.

When to Use

Absolute value is essential when you care about how much something moved, not which direction:

Use CaseExample
Volatility measurementSize of daily returns regardless of direction
Distance from baselineHow far price is from a moving average
Error magnitudeTracking error, deviation from target

Practical Example: Movement Magnitude

Take absolute value of daily returns to measure activity intensity:

DayReturn|Return|
Mon+2.5%2.5%
Tue-1.8%1.8%
Wed-4.2%4.2%
Thu+0.3%0.3%

The average of these magnitudes (2.2%) describes how much the asset typically moves per day—the foundation of volatility metrics like Average True Range.


Volatility Compression Detection

A creative application of absolute value is detecting periods of low volatility—often a precursor to significant moves. When the average absolute return falls to its lowest percentile over a lookback period, the market may be "coiling" for a breakout.

flowchart LR
    subgraph Pipeline["Volatility Compression Pipeline"]
        DR["Daily Return"]
        ABS["ABS Module"]
        SMA["Simple Moving Average"]
        PERC["Percentile"]
        SIGNAL["Low Percentile = Alert"]
    end
    
    DR --> ABS
    ABS --> SMA
    SMA --> PERC
    PERC --> SIGNAL
    
    style ABS fill:#4a90d9,stroke:#333,color:#fff
    style SIGNAL fill:#e74c3c,stroke:#333,color:#fff

When the average absolute return falls to its lowest 10th percentile over the past year, consider it a warning: the market might be coiling for a significant move. This phenomenon is well-documented in options pricing (see volatility clustering) and can inform both directional bets and options strategies.


  • SUB — Calculate differences (then apply ABS for unsigned distance)
  • SQRT — Another transformation that constrains output
  • POW — Use exponent 0.5 for dampened magnitude

Key Takeaways

Use CaseWhat ABS DoesWhy It Matters
Volatility analysisConverts returns to magnitudesMeasures movement intensity
Deviation measurementRemoves directional signFocuses on distance from reference
Symmetric indicatorsEqual treatment of up/downIdeal for oscillators
Risk metricsAbsolute drawdown/deviationDirection-agnostic risk assessment

Further Reading

Rendering diagrams...
© 2026 WanoLabs. All rights reservedAlpha build v0.1.5