Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
srfm::hawking::PriceEventHorizon Class Reference

#include <hawking.hpp>

Classes

struct  Config
 Configuration for the Bollinger Band event horizon detector. More...
 

Public Member Functions

 PriceEventHorizon (Config config=Config{}) noexcept
 
std::optional< HawkingTemperature > update (double close) noexcept
 
void reset () noexcept
 Reset the internal rolling state (e.g. at session boundaries).
 
std::size_t window_fill () const noexcept
 Return current window fill level (0 → full).
 

Detailed Description

Detects when a price series approaches its "event horizon" — the Bollinger Band boundary at which the current trend cannot continue.

Usage:

PriceEventHorizon peh(bb_window=20, bb_sigma=3.0);
for (auto& bar : bars) {
auto temp = peh.update(bar.close);
if (temp) fmt::print("{}\n", temp->to_string());
}

Definition at line 153 of file hawking.hpp.

Constructor & Destructor Documentation

◆ PriceEventHorizon()

srfm::hawking::PriceEventHorizon::PriceEventHorizon ( Config  config = Config{})
explicitnoexcept

Definition at line 82 of file hawking.cpp.

Member Function Documentation

◆ reset()

void srfm::hawking::PriceEventHorizon::reset ( )
noexcept

Reset the internal rolling state (e.g. at session boundaries).

Definition at line 88 of file hawking.cpp.

◆ update()

std::optional< HawkingTemperature > srfm::hawking::PriceEventHorizon::update ( double  close)
noexcept

Update state with a new closing price and compute T_H.

Parameters
closeClosing price of the current bar.
Returns
HawkingTemperature or nullopt during warm-up (until bb_window bars have been seen).

Definition at line 96 of file hawking.cpp.

◆ window_fill()

std::size_t srfm::hawking::PriceEventHorizon::window_fill ( ) const
inlinenoexcept

Return current window fill level (0 → full).

Definition at line 184 of file hawking.hpp.


The documentation for this class was generated from the following files: