{"id":33193662,"url":"https://github.com/luisdamiano/rfinance17","last_synced_at":"2026-01-17T12:00:49.814Z","repository":{"id":85095289,"uuid":"91628955","full_name":"luisdamiano/rfinance17","owner":"luisdamiano","description":"Presentation and notebook for the lightning talk A Quick Intro to Hidden Markov Models Applied to Stock Volatility presented in R/Finance 2017.","archived":false,"fork":false,"pushed_at":"2017-05-18T01:07:53.000Z","size":3188,"stargazers_count":6,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T13:25:14.474Z","etag":null,"topics":["finance","hidden-markov-model","machine-learning","rfinance","statistics","stock-market","volatility"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luisdamiano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-05-17T23:32:04.000Z","updated_at":"2024-03-12T10:47:44.000Z","dependencies_parsed_at":"2023-07-04T17:38:59.784Z","dependency_job_id":null,"html_url":"https://github.com/luisdamiano/rfinance17","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/luisdamiano/rfinance17","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisdamiano%2Frfinance17","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisdamiano%2Frfinance17/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisdamiano%2Frfinance17/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisdamiano%2Frfinance17/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luisdamiano","download_url":"https://codeload.github.com/luisdamiano/rfinance17/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisdamiano%2Frfinance17/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finance","hidden-markov-model","machine-learning","rfinance","statistics","stock-market","volatility"],"created_at":"2025-11-16T07:00:31.294Z","updated_at":"2026-01-17T12:00:49.777Z","avatar_url":"https://github.com/luisdamiano.png","language":"HTML","funding_links":[],"categories":["\u003ca id=\"4d2a33083a894d6e6ef01b360929f30a\"\u003e\u003c/a\u003eVolatility"],"sub_categories":[],"readme":"# A Quick Intro to Hidden Markov Models Applied to Stock Volatility\n\nBoth the [presentation](./presentation/) and the [notebook](./notebook/) are part of the material presented in [R/Finance](http://www.rinfinance.com/) 2017.\n\n## About R/Finance\nApplied Finance with R From the inaugural conference in 2009, the annual R/Finance conference in Chicago has become the primary meeting for academics and practioners interested in using R in Finance. Participants from academia and industry mingle for two days to exchange ideas about current research, best practices and applications. A single-track program permits continued focus on a series of refereed submissions. A lively social program rounds out the event.\n\n## Abstract\n\nI make a naive implementation of the forward algorithm in Stan for the Normal Mixed GARCH. Using series for an index and stock prices from companies in different industries, I find that belief states are shared across assets and the strength of the relationship varies for each pair of assets. This hints that volatility states follow a hierarchical structure: for example, the risk states of a global portfolio may be decomposed in Country + Industry + Stock Individual.\n\n## Foreword\nThe (very) **naive** implementation of the algorithm in Stan is only meant for illustration. A few good practices were neglected, convergence is not guaranteed, there is much room left for optimization and fitting *N* different independent models is probably not a reasonable choice for production sampler. The main takeaway of this presentation is the ideas behind the code but not the code itself.\n\n## Prerequisites\n  * R 3.3.3\n  * RStudio Desktop 1.0.136\n  * Rtools 3.3 (R 3.2.x to 3.3.x)\n  * Stan 2.14\n  * R Packages\n    * RStan 2.14.2\n\n## Authors\n\n* **Luis Damiano** - [luisdamiano](https://github.com/luisdamiano)\n\n## License\n\n_A Quick Intro to Hidden Markov Models Applied to Stock Volatility_ is licensed under CC-BY-SA 4.0. See the [LICENSE](LICENSE.md) file for details.\n\n## Acknowledgments\n\n* To the R/Finance Conference committee for accepting my proposal and generously providing travel funding.\n* Special thanks to all those who showed me how much fun stats can be, a real life changer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisdamiano%2Frfinance17","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluisdamiano%2Frfinance17","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisdamiano%2Frfinance17/lists"}