|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
Online β estimator with a sliding window of N log-returns. More...
#include <beta_calculator.hpp>
Public Member Functions | |
| BetaCalculator (double c_market=DEFAULT_C_MARKET) noexcept | |
| Construct with a market speed-of-light calibration constant. | |
| void | update (double close) noexcept |
| Ingest one new close price and update the rolling log-return buffer. | |
| double | beta () const noexcept |
| Current β estimate. | |
| bool | warmed_up () const noexcept |
| Whether enough data has been seen to produce a reliable β. | |
| std::size_t | close_count () const noexcept |
| Number of close prices ingested so far. | |
| std::size_t | ret_count () const noexcept |
| Number of log-returns accumulated (capped at N). | |
| double | c_market () const noexcept |
| Configured market speed-of-light constant. | |
| void | reset () noexcept |
| Reset all state as if no ticks have been seen. | |
Online β estimator with a sliding window of N log-returns.
Template parameter N determines how many log-returns are averaged. FIX-3 mode (default) uses N=3.
| N | Number of log-returns in the averaging window. Must be ≥ 1. |
Definition at line 64 of file beta_calculator.hpp.
|
inlineexplicitnoexcept |
Construct with a market speed-of-light calibration constant.
| c_market | The denominator used to normalise raw log-returns into β. Must be strictly positive and finite. Defaults to 0.02. |
Definition at line 75 of file beta_calculator.hpp.
|
inlinenoexcept |
Current β estimate.
Returns 0.0 until N log-returns have been accumulated. Guaranteed: |result| < BETA_MAX_SAFE.
Definition at line 113 of file beta_calculator.hpp.
|
inlinenoexcept |
Configured market speed-of-light constant.
Definition at line 142 of file beta_calculator.hpp.
|
inlinenoexcept |
Number of close prices ingested so far.
Definition at line 136 of file beta_calculator.hpp.
|
inlinenoexcept |
Reset all state as if no ticks have been seen.
Definition at line 149 of file beta_calculator.hpp.
|
inlinenoexcept |
Number of log-returns accumulated (capped at N).
Definition at line 139 of file beta_calculator.hpp.
|
inlinenoexcept |
Ingest one new close price and update the rolling log-return buffer.
| close | Current bar's close price. Must be positive and finite; non-positive / non-finite values are silently ignored (no state change) to protect the pipeline from bad data. |
Definition at line 89 of file beta_calculator.hpp.
|
inlinenoexcept |
Whether enough data has been seen to produce a reliable β.
True once N+1 close prices have been ingested (N log-returns computed).
Definition at line 133 of file beta_calculator.hpp.