|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
Internal rolling state for Bollinger Band computation. More...
#include <hawking.hpp>
Public Member Functions | |
| void | push (double price) noexcept |
| Push a new price and pop the oldest if window is full. | |
| double | mean () const noexcept |
| Return the rolling mean (NaN-safe). | |
| double | stddev () const noexcept |
| Return the rolling standard deviation (population σ). | |
| bool | full () const noexcept |
| True iff window has reached its maximum size. | |
Public Attributes | |
| std::vector< double > | window |
| Rolling price window (oldest first). | |
| double | sum {0.0} |
| Running sum for fast mean. | |
| double | sum_sq {0.0} |
| Running sum of squares for fast σ. | |
| std::size_t | max_size {DEFAULT_BB_WINDOW} |
Internal rolling state for Bollinger Band computation.
Definition at line 121 of file hawking.hpp.
|
inlinenoexcept |
True iff window has reached its maximum size.
Definition at line 137 of file hawking.hpp.
|
noexcept |
Return the rolling mean (NaN-safe).
Definition at line 66 of file hawking.cpp.
|
noexcept |
Push a new price and pop the oldest if window is full.
Definition at line 53 of file hawking.cpp.
|
noexcept |
Return the rolling standard deviation (population σ).
Definition at line 71 of file hawking.cpp.
| std::size_t srfm::hawking::BollingerState::max_size {DEFAULT_BB_WINDOW} |
Definition at line 125 of file hawking.hpp.
| double srfm::hawking::BollingerState::sum {0.0} |
Running sum for fast mean.
Definition at line 123 of file hawking.hpp.
| double srfm::hawking::BollingerState::sum_sq {0.0} |
Running sum of squares for fast σ.
Definition at line 124 of file hawking.hpp.
| std::vector<double> srfm::hawking::BollingerState::window |
Rolling price window (oldest first).
Definition at line 122 of file hawking.hpp.