mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-24 13:38:05 +00:00
validation and profiles
This commit is contained in:
@@ -36,6 +36,21 @@ Where:
|
||||
|
||||
## Performance Profile
|
||||
|
||||
### Operation Count (Streaming Mode)
|
||||
|
||||
ADOSC = short EMA of ADL minus long EMA of ADL. Two parallel EMA updates per bar — O(1).
|
||||
|
||||
| Operation | Count | Cost (cycles) | Subtotal |
|
||||
| :--- | :---: | :---: | :---: |
|
||||
| ADL accumulation (MFM * Vol) | 1 | 8 cy | ~8 cy |
|
||||
| Short EMA update (FMA) | 1 | 1 cy | ~1 cy |
|
||||
| Long EMA update (FMA) | 1 | 1 cy | ~1 cy |
|
||||
| ADOSC = shortEMA - longEMA | 1 | 1 cy | ~1 cy |
|
||||
| NaN guard + state update | 1 | 2 cy | ~2 cy |
|
||||
| **Total** | **O(1)** | — | **~13 cy** |
|
||||
|
||||
O(1) per bar. Two EMA states maintained in parallel. After warmup (longPeriod bars), both EMAs are hot. FMA used for EMA update: new = FMA(prev, decay, alpha*adl).
|
||||
|
||||
ADOSC is slightly heavier than ADL because it involves two EMAs.
|
||||
|
||||
| Metric | Score | Notes |
|
||||
|
||||
Reference in New Issue
Block a user