{"repo":"loelschlaeger/fHMM","free":true,"listed":false,"github":"https://github.com/loelschlaeger/fHMM","clone":"git clone https://github.com/loelschlaeger/fHMM.git","description":"Hidden Markov models for finance","language":"R","stars":23,"topics":["hidden-markov-models","finance","rstats"],"license":"GPL-3.0","category":"trading","readme_excerpt":"HMMs for Finance The {fHMM} R package allows for the detection and characterization of financial market regimes in time series data by applying hidden Markov Models (HMMs). The vignettes outline the package functionality and the model formulation. For a reference on the method, see: Oelschläger, L., and Adam, T. 2021. “Detecting Bearish and Bullish Markets in Financial Time Series Using Hierarchical Hidden Markov Models.” Statistical Modelling. A user guide is provided by the accompanying software paper: Oelschläger, L., Adam, T., and Michels, R. 2024. “fHMM: Hidden Markov Models for Financial Time Series in R”. Journal of Statistical Software. Below, we illustrate an application to the German stock index DAX. We also show how to use the package to simulate HMM data, compute the model likelihood, and decode the hidden states using the Viterbi algorithm. Installation You can install the released package version from CRAN with: Contributing We are open to contributions and would appreciate your input: - If you encounter any issues, please submit bug reports as issues. - If you have any ideas for new features, please submit them as feature requests. - If you would like to add extensions to the package, please fork the master branch and submit a pull request. Example: Fitting an HMM to the DAX We fit a 3-state HMM with state-dependent t-distributions to the DAX log-returns from 2000 to 2022. The states can be interpreted as proxies for bearish (green below) and bullish markets (r","default_branch":null,"files":null,"tree":[],"storefront":"/r/loelschlaeger","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/loelschlaeger/fHMM/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}