Git Product home page Git Product logo

diyano / rfinance17 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luisdamiano/rfinance17

0.0 2.0 0.0 3.11 MB

Presentation and notebook for the lightning talk A Quick Intro to Hidden Markov Models Applied to Stock Volatility presented in R/Finance 2017.

License: Creative Commons Attribution Share Alike 4.0 International

R 0.47% TeX 0.38% HTML 75.79% Stan 0.30% CSS 8.98% JavaScript 14.09%

rfinance17's Introduction

A Quick Intro to Hidden Markov Models Applied to Stock Volatility

Both the presentation and the notebook are part of the material presented in R/Finance 2017.

About R/Finance

Applied 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.

Abstract

I 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.

Foreword

The (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.

Prerequisites

  • R 3.3.3
  • RStudio Desktop 1.0.136
  • Rtools 3.3 (R 3.2.x to 3.3.x)
  • Stan 2.14
  • R Packages
    • RStan 2.14.2

Authors

License

A Quick Intro to Hidden Markov Models Applied to Stock Volatility is licensed under CC-BY-SA 4.0. See the LICENSE file for details.

Acknowledgments

  • To the R/Finance Conference committee for accepting my proposal and generously providing travel funding.
  • Special thanks to all those who showed me how much fun stats can be, a real life changer.

rfinance17's People

Contributors

luisdamiano avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.