Learn R Programming

fHMM (version 0.3.0)

fit_hmm: Fit (hierarchical) hidden Markov models to financial data

Description

Performs data processing, fitting, state decoding and visualization.

Usage

fit_hmm(controls, events, sim_par)

Arguments

controls

A list of controls (optional).

events

A list of (historical, financial) events (optional).

sim_par

A list of model parameters for simulation in thetaList format, default NULL (optional).

Value

No return value. Estimation results are saved in "controls[["path"]]/models/controls[["id"]]".

Details

Specify a model by setting parameters of the named list controls and passing it to fit_hmm. See the vignettes on how to specify controls.

Examples

Run this code
# NOT RUN {
### fitting a 2-state HMM with state-dependent t-distributions to simulated data
controls = list(
  path    = tempdir(),
  id      = "test",
  model   = "hmm",
  states  = 2,
  sdds    = "t",
  horizon = 200,
  fit     = list("runs" = 10, "seed" = 1)
)
fit_hmm(controls)
# }

Run the code above in your browser using DataLab