Absolute
systemic:core-absMathfunction1 crInputs
| Name | Type | Description |
|---|---|---|
| Data | floatarray | The numeric series to transform. Each value is converted to its absolute magnitude. |
Outputs
| Name | Type | Description |
|---|---|---|
| Absolute | floatarray | The non-negative magnitude of each input value. |
Converts all values to their non-negative magnitude. Positive values stay positive, negative values become positive, zero remains zero.
| Input | Output |
|---|---|
| 5 | 5 |
| -3 | 3 |
| 0 | 0 |
| -7.5 | 7.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 Case | Example |
|---|---|
| Volatility measurement | Size of daily returns regardless of direction |
| Distance from baseline | How far price is from a moving average |
| Error magnitude | Tracking error, deviation from target |
Practical Example: Movement Magnitude
Take absolute value of daily returns to measure activity intensity:
| Day | Return | |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.
Related Modules
- 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 Case | What ABS Does | Why It Matters |
|---|---|---|
| Volatility analysis | Converts returns to magnitudes | Measures movement intensity |
| Deviation measurement | Removes directional sign | Focuses on distance from reference |
| Symmetric indicators | Equal treatment of up/down | Ideal for oscillators |
| Risk metrics | Absolute drawdown/deviation | Direction-agnostic risk assessment |
Further Reading
- Absolute Value - Khan Academy — Foundational math concepts
- Average True Range (ATR) - Fidelity — A popular volatility indicator built on absolute values
- Mean Absolute Deviation - Khan Academy — Statistical measure using absolute values
- Volatility Clustering - Wikipedia — The phenomenon of clustered volatility in financial markets