unemp_spx_model_3_2: Unemployment rate and S&P 500 hierarchical HMM

unemp_spx_model_3_2R Documentation

Unemployment rate and S&P 500 hierarchical HMM

Description

A pre-computed HHMM with monthly unemployment rate in the US on the coarse scale using 3 states and S&P 500 index data on the fine scale using 2 states from 1970 to 2020 for demonstration purpose.

Usage

data("unemp_spx_model_3_2")

Format

An object of class fHMM_model.

Details

The model was estimated via:

controls <- list(
  hierarchy = TRUE,
  states    = c(3, 2),
  sdds      = c("t", "t"),
  period    = "m",
  data      = list(
    file       = list(unemp, spx),
    date_column = c("date", "Date"),
    data_column = c("rate_diff", "Close"),
    from       = "1970-01-01",
    to         = "2020-01-01",
    logreturns = c(FALSE, TRUE)
  ),
  fit       = list(
    runs    = 200,
    iterlim = 300
  )
)
controls <- set_controls(controls)
unemp_spx_data <- prepare_data(controls)
unemp_spx_model_3_2 <- fit_model(unemp_spx_data)

fHMM documentation built on Oct. 12, 2023, 5:10 p.m.