2025-12-18 13:51:06 -08:00
# Aroon
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
> Price levels are irrelevant. The only thing that matters is *when* they happened. Aroon is a stopwatch for trends.
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
The Aroon indicator measures the temporal freshness of price extremes. Unlike oscillators that obsess over *how much* price has moved, Aroon asks *how long* it has been since a new high or low. It quantifies the "staleness" of a trend, providing an early warning system for consolidation and reversals.
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
## The 1995 Innovation
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
Tushar Chande introduced Aroon in *Beyond Technical Analysis* (1995). The name comes from the Sanskrit word for "Dawn's Early Light." Chande's insight was that trends don't just stop; they age. By measuring the time elapsed since the last extreme, Aroon attempts to spot the "dawn" of a new trend rather than just confirming an existing one.
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
## Architecture & Physics
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
Aroon is purely time-based. It normalizes the "days since" metric into a 0-100 oscillator.
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
1. **Time Tracking** : We maintain a sliding window of the last $N$ bars.
2. **Extremum Search** : We locate the index of the highest high and lowest low within that window.
3. **Normalization** : We convert the distance (in bars) into a percentage.
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
### The Logic of Freshness
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
- **Aroon Up**: Quantifies the recency of the High.
- 100: New high today.
- 0: No new high for the entire period.
- **Aroon Down**: Quantifies the recency of the Low.
- 100: New low today.
- 0: No new low for the entire period.
- **Oscillator**: The net difference ($Up - Down$), showing the dominant temporal force.
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
### Zero-Allocation Design
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
The implementation is optimized for minimal memory footprint.
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
- **Storage**: We use two `RingBuffer` instances to store Highs and Lows.
- **Search**: The search for min/max is performed via a linear scan of the internal buffer.
- **Allocations**: The `Update` cycle is strictly zero-allocation.
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
## Mathematical Foundation
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
The math is a linear decay function based on time.
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
$$
\text{Aroon Up} = \frac{Period - \text{Days Since High}}{Period} \times 100
$$
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
$$
\text{Aroon Down} = \frac{Period - \text{Days Since Low}}{Period} \times 100
$$
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
$$
\text{Oscillator} = \text{Aroon Up} - \text{Aroon Down}
$$
2025-12-18 13:51:06 -08:00
## Performance Profile
2025-12-20 15:08:07 -08:00
While memory is O(P), computational complexity is linear with respect to the period due to the min/max search.
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
| Metric | Complexity | Notes |
| :--- | :--- | :--- |
| **Throughput** | ~10ns / bar | Scales linearly with Period ($O(P)$) |
| **Allocations** | 0 bytes | Hot path is allocation-free |
| **Complexity** | O(P) | Requires scanning the buffer for extremes |
| **Memory** | O(P) | Stores `Period + 1` samples of High and Low |
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
*Note: For standard periods (14-50), the linear scan is negligible. For massive periods (>1000), the O(P) cost becomes measurable.*
2025-12-18 13:51:06 -08:00
2025-12-20 15:08:07 -08:00
## Validation
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
We validate against standard reference implementations.
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
- **Buffer Sizing**: We use `Period + 1` to correctly handle the inclusive range.
- **Tie-Breaking**: If multiple bars share the same extreme value, we use the *most recent* one (yielding a higher Aroon score).
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
### Common Pitfalls
2025-12-17 13:18:25 -08:00
2025-12-20 15:08:07 -08:00
- **Single Value Updates**: If you feed Aroon only `Close` prices (instead of High/Low), it degrades into a "Time Since Highest Close" metric. It works, but it loses the nuance of intraday extremes.
- **The 70/30 Rule**: A common interpretation is that a trend is strong only if the primary line is > 70. Values between 30 and 70 often indicate noise or consolidation.