fHMM1.4.1 package

Fitting Hidden Markov Models to Financial Data

plot.fHMM_model

Plot method for an object of class fHMM_model

prepare_data

Prepare data

read_data

Read data

reorder_states

Reorder estimated states

set_controls

Define and validate model specifications

check_date

Check date format

compare_models

Compare multiple models

compute_ci

Compute confidence intervals

compute_residuals

Compute (pseudo-) residuals

compute_T_star

Compute lengths of fine-scale chunks

decode_states

Decode the underlying hidden state sequence

download_data

Download financial data from Yahoo Finance

fHMM_colors

Set color scheme for visualizations

fHMM_data

Constructor of an fHMM_data object

fHMM_events

Checking events

fHMM_model

Constructor of a model object

fHMM_parameters

Set and check model parameters

fHMM_sdds

Define state-dependent distributions

fHMM-package

fHMM: Fitting Hidden Markov Models to Financial Data

find_closest_year

Find closest year

fit_model

Model fitting

get_initial_values

Initialization of numerical likelihood optimization

list_to_vector

List to vector

ll_hmm

Log-likelihood function of an (H)HMM

nLL_hhmm

Negative log-likelihood function of an HHMM

nLL_hmm

Negative log-likelihood function of an HMM

parameter_labels

Create labels for estimated parameters

parameter_transformations

Parameter transformations

plot_ll

Visualization of log-likelihood values

plot_pr

Visualize pseudo residuals

plot_sdds

Visualization of estimated state-dependent distributions

plot_ts

Visualize time series

plot.fHMM_data

Plot method for an object of class fHMM_data

simulate_hmm

Simulate data

simulate_observations

Simulate state-dependent observations

Fitting (hierarchical) hidden Markov models to financial data via maximum likelihood estimation. See Oelschläger, L. and Adam, T. "Detecting Bearish and Bullish Markets in Financial Time Series Using Hierarchical Hidden Markov Models" (2021, Statistical Modelling) <doi:10.1177/1471082X211034048> for a reference on the method. A user guide is provided by the accompanying software paper "fHMM: Hidden Markov Models for Financial Time Series in R", Oelschläger, L., Adam, T., and Michels, R. (2024, Journal of Statistical Software) <doi:10.18637/jss.v109.i09>.

  • Maintainer: Lennart Oelschläger
  • License: GPL-3
  • Last published: 2024-09-16