Skip to contents

Data preparation

Use these functions to prepare or simulate financial data.

set_controls()
Set and check controls
download_data()
Downloading financial data
prepare_data()
Prepare data
fHMM_parameters()
Setting and checking model parameters
plot(<fHMM_data>)
Plot method for an object of class fHMM_data

Model estimation

Use these function for model estimation and state decoding.

fit_model()
Model fitting
decode_states()
Decoding the underlying hidden state sequence
reorder_states()
Reordering of estimated states

Model evaluation

Use these functions to evaluate a fitted model.

coef(<fHMM_model>)
Model coefficients
compare_models()
Comparing multiple fHMM_model-objects
compute_residuals()
Computing (pseudo-) residuals
plot(<fHMM_model>)
Plot method for an object of class fHMM_model
fHMM_colors()
Setting color scheme for visualizations
fHMM_events()
Checking events
predict(<fHMM_model>)
Prediction

Models

The following pre-computed models are included in the package.

dax_model_2n
DAX 2-state HMM
dax_model_3t
DAX 3-state HMM
dax_vw_model
DAX/VW hierarchical HMM
sim_model_2gamma
Simulated 2-state HMM

Small utilities

These functions may be useful beyond {fHMM}.

check_date()
Check date format "YYYY-MM-DD"
is_number()
Check for integers
is_tpm()
Check for tpm
match_all()
Best-possible match of two numeric vectors
sample_tpm()
Sample transition probability matrices
simulate_markov_chain()
Simulate a Markov chain