PINE LIBRARY
CyberRegimeLib

CyberRegimeLib - online sssm
GaussianRegime parameter/state UDT
PosteriorHistory ring-buffer UDT
Gaussian cloning and prior-stat capping
Online EM accumulation and M-step
Hamilton forward filtering
One-step smoothing
Fixed-horizon Kim smoothing
Active-state hysteresis
Library "CyberRegimeLib"
f_regime_new(dimensions)
Parameters:
dimensions (int)
method clone(source)
Namespace types: GaussianRegime
Parameters:
source (GaussianRegime)
f_clone_regimes(source)
Parameters:
source (array<GaussianRegime>)
f_n_eff_at(regimes, index)
Parameters:
regimes (array<GaussianRegime>)
index (int)
f_cap_prior_stats(regimes, total_cap)
Parameters:
regimes (array<GaussianRegime>)
total_cap (float)
method initialize_stats(regime, regime_count, active_dims)
Namespace types: GaussianRegime
Parameters:
regime (GaussianRegime)
regime_count (int)
active_dims (array<bool>)
f_accumulate_stats(regimes, responsibilities, observation, lambda_eff, admission_weight, count, prior_weighted, full_cov_dims)
Parameters:
regimes (array<GaussianRegime>)
responsibilities (array<float>)
observation (array<float>)
lambda_eff (float)
admission_weight (float)
count (int)
prior_weighted (bool)
full_cov_dims (int)
method mstep(regime, active_dims, ridge_main, ridge_aux, shrinkage, min_n_eff, anchor)
Namespace types: GaussianRegime
Parameters:
regime (GaussianRegime)
active_dims (array<bool>)
ridge_main (float)
ridge_aux (float)
shrinkage (float)
min_n_eff (float)
anchor (float)
f_hamilton_step(transition, filtered, log_likelihoods, count)
Parameters:
transition (matrix<float>)
filtered (array<float>)
log_likelihoods (array<float>)
count (int)
f_history_new(capacity, state_count)
Parameters:
capacity (int)
state_count (int)
method push(history, filtered, predicted)
Namespace types: PosteriorHistory
Parameters:
history (PosteriorHistory)
filtered (array<float>)
predicted (array<float>)
method smooth_one(history, transition, fallback_index, fallback_probability)
Namespace types: PosteriorHistory
Parameters:
history (PosteriorHistory)
transition (matrix<float>)
fallback_index (int)
fallback_probability (float)
method smooth_fixed(history, transition, horizon)
Namespace types: PosteriorHistory
Parameters:
history (PosteriorHistory)
transition (matrix<float>)
horizon (int)
f_hysteresis_state(current, active_since, candidate, best, second, minimum_margin, minimum_bars, current_bar)
Parameters:
current (int)
active_since (int)
candidate (int)
best (float)
second (float)
minimum_margin (float)
minimum_bars (int)
current_bar (int)
GaussianRegime
Fields:
mu (array<float>)
mu_seed (array<float>)
Sigma (matrix<float>)
Sigma_inv (matrix<float>)
F (matrix<float>)
Q_diag (array<float>)
prior (series float)
n_eff (series float)
sum_x (array<float>)
sum_xx (matrix<float>)
PosteriorHistory
Fields:
filtered_flat (array<float>)
predicted_flat (array<float>)
write_idx (series int)
count (series int)
capacity (series int)
state_count (series int)
GaussianRegime parameter/state UDT
PosteriorHistory ring-buffer UDT
Gaussian cloning and prior-stat capping
Online EM accumulation and M-step
Hamilton forward filtering
One-step smoothing
Fixed-horizon Kim smoothing
Active-state hysteresis
Library "CyberRegimeLib"
f_regime_new(dimensions)
Parameters:
dimensions (int)
method clone(source)
Namespace types: GaussianRegime
Parameters:
source (GaussianRegime)
f_clone_regimes(source)
Parameters:
source (array<GaussianRegime>)
f_n_eff_at(regimes, index)
Parameters:
regimes (array<GaussianRegime>)
index (int)
f_cap_prior_stats(regimes, total_cap)
Parameters:
regimes (array<GaussianRegime>)
total_cap (float)
method initialize_stats(regime, regime_count, active_dims)
Namespace types: GaussianRegime
Parameters:
regime (GaussianRegime)
regime_count (int)
active_dims (array<bool>)
f_accumulate_stats(regimes, responsibilities, observation, lambda_eff, admission_weight, count, prior_weighted, full_cov_dims)
Parameters:
regimes (array<GaussianRegime>)
responsibilities (array<float>)
observation (array<float>)
lambda_eff (float)
admission_weight (float)
count (int)
prior_weighted (bool)
full_cov_dims (int)
method mstep(regime, active_dims, ridge_main, ridge_aux, shrinkage, min_n_eff, anchor)
Namespace types: GaussianRegime
Parameters:
regime (GaussianRegime)
active_dims (array<bool>)
ridge_main (float)
ridge_aux (float)
shrinkage (float)
min_n_eff (float)
anchor (float)
f_hamilton_step(transition, filtered, log_likelihoods, count)
Parameters:
transition (matrix<float>)
filtered (array<float>)
log_likelihoods (array<float>)
count (int)
f_history_new(capacity, state_count)
Parameters:
capacity (int)
state_count (int)
method push(history, filtered, predicted)
Namespace types: PosteriorHistory
Parameters:
history (PosteriorHistory)
filtered (array<float>)
predicted (array<float>)
method smooth_one(history, transition, fallback_index, fallback_probability)
Namespace types: PosteriorHistory
Parameters:
history (PosteriorHistory)
transition (matrix<float>)
fallback_index (int)
fallback_probability (float)
method smooth_fixed(history, transition, horizon)
Namespace types: PosteriorHistory
Parameters:
history (PosteriorHistory)
transition (matrix<float>)
horizon (int)
f_hysteresis_state(current, active_since, candidate, best, second, minimum_margin, minimum_bars, current_bar)
Parameters:
current (int)
active_since (int)
candidate (int)
best (float)
second (float)
minimum_margin (float)
minimum_bars (int)
current_bar (int)
GaussianRegime
Fields:
mu (array<float>)
mu_seed (array<float>)
Sigma (matrix<float>)
Sigma_inv (matrix<float>)
F (matrix<float>)
Q_diag (array<float>)
prior (series float)
n_eff (series float)
sum_x (array<float>)
sum_xx (matrix<float>)
PosteriorHistory
Fields:
filtered_flat (array<float>)
predicted_flat (array<float>)
write_idx (series int)
count (series int)
capacity (series int)
state_count (series int)
Pine kitaplığı
Gerçek TradingView ruhuyla, yazar bu Pine kodunu açık kaynaklı bir kütüphane olarak yayınladı, böylece topluluğumuzdaki diğer Pine programcıları onu yeniden kullanabilir. Yazarı tebrik ederiz! Bu kütüphaneyi özel olarak veya diğer açık kaynaklı yayınlarda kullanabilirsiniz, ancak bu kodun yayınlarda yeniden kullanılması Topluluk Kuralları tarafından yönetilir.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Pine kitaplığı
Gerçek TradingView ruhuyla, yazar bu Pine kodunu açık kaynaklı bir kütüphane olarak yayınladı, böylece topluluğumuzdaki diğer Pine programcıları onu yeniden kullanabilir. Yazarı tebrik ederiz! Bu kütüphaneyi özel olarak veya diğer açık kaynaklı yayınlarda kullanabilirsiniz, ancak bu kodun yayınlarda yeniden kullanılması Topluluk Kuralları tarafından yönetilir.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.