22 const double beta_sq = beta * beta;
23 return 1.0 / std::sqrt(1.0 - beta_sq);
28 double max_vol)
noexcept
33 const double beta = portfolio_vol / max_vol;
38 double coordinate_time,
39 double velocity)
noexcept
45 result.
tau = coordinate_time / result.
gamma;
66 const double dtau = dt_days / current_gamma_;
68 elapsed_t_ += dt_days;
89 double coordinate_age,
91 double sharpe)
const noexcept
115 double threshold_tau,
117 : threshold_tau_(threshold_tau > 0.0 ? threshold_tau : 5.0)
124 if (dt_days <= 0.0) {
130 const double dtau = dt_days / gamma;
132 tau_since_rebalance_ += dtau;
133 clock_.tick(new_vol, dt_days);
135 if (tau_since_rebalance_ >= threshold_tau_) {
136 tau_since_rebalance_ = 0.0;
145 tau_since_rebalance_ = 0.0;
AgingResult compute(double coordinate_age, double portfolio_vol, double sharpe) const noexcept
PortfolioAgingModel(double max_vol=DEFAULT_MAX_VOL)
void tick(double new_vol, double dt_days=1.0) noexcept
void reset() noexcept
Reset all accumulators.
ProperTimeClock(double max_vol=DEFAULT_MAX_VOL)
RelativisticRebalanceTimer(double threshold_tau=5.0, double max_vol=DEFAULT_MAX_VOL)
void reset_timer() noexcept
Reset timer (does not reset rebalance_count).
bool tick(double new_vol, double dt_days=1.0) noexcept
Physical and financial constants for the SRFM system.
static constexpr double BETA_MAX_SAFE
constexpr double DEFAULT_MAX_VOL
Default maximum portfolio volatility (annualised), analogous to c.
Proper Time Portfolio module — Round 7 public API.
Result of one aging computation.
double gamma
Lorentz factor.
double coordinate_age
Raw age in the same units as input.
double effective_age
coordinate_age * γ.
double adj_sharpe
sharpe / √(effective_age) or 0 if age <= 0.
Value type returned by ProperTime::compute.
double tau
Elapsed proper time.
double gamma
Lorentz factor γ = 1/√(1−β²)
double velocity
Normalised velocity β = vol / max_vol.
static double gamma_factor(double velocity) noexcept
static double to_velocity(double portfolio_vol, double max_vol=DEFAULT_MAX_VOL) noexcept
static ProperTimeValue compute(double coordinate_time, double velocity) noexcept