Skip to contents

Data preparation

Use these functions to prepare or simulate financial data.

set_controls() validate_controls() print(<fHMM_controls>) summary(<fHMM_controls>)
Define and validate model specifications
download_data()
Download financial data from Yahoo Finance
simulate_hmm()
Simulate data
prepare_data()
Prepare data
fHMM_data() print(<fHMM_data>) summary(<fHMM_data>)
Constructor of an fHMM_data object
plot(<fHMM_data>)
Plot method for an object of class fHMM_data

Model parameters

Use these functions to define and transform model parameters.

Model estimation

Use these function for model estimation and state decoding.

Model evaluation

Use these functions to evaluate a fitted model.

fHMM_model() print(<fHMM_model>) residuals(<fHMM_model>) summary(<fHMM_model>) coef(<fHMM_model>) AIC(<fHMM_model>) BIC(<fHMM_model>) nobs(<fHMM_model>) logLik(<fHMM_model>) npar() predict(<fHMM_model>)
Constructor of a model object
compare_models()
Compare multiple models
compute_residuals()
Compute (pseudo-) residuals
plot(<fHMM_model>)
Plot method for an object of class fHMM_model
fHMM_colors()
Set color scheme for visualizations
fHMM_events() print(<fHMM_events>)
Checking events

Data

The following data sets are included in the package.

dax
Deutscher Aktienindex (DAX) index data
spx
Standard & Poor’s 500 (S&P 500) index data
unemp
Unemployment rate data USA
vw
Volkswagen AG (VW) stock data

Models

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

dax_model_2n
DAX 2-state HMM with normal distributions
dax_model_3t
DAX 3-state HMM with t-distributions
dax_vw_model
DAX/VW hierarchical HMM with t-distributions
sim_model_2gamma
Simulated 2-state HMM with gamma distributions
unemp_spx_model_3_2
Unemployment rate and S&P 500 hierarchical HMM