Giter Club home page Giter Club logo

elliptical-empirical's Introduction

elliptical-empirical

Empirical example about estimation of multivariate elliptical extreme quantile regions in a financial context. Data consists of three time series of market price indices from 2.7.2001 to 29.6.2007:

  • Standard and Poors S&P 500,
  • Financial Times Stock Exchange FTSE 100 and
  • Nikkei 225.

We compute returns $Y_t = \log(X_{t+1} / X_t)$ and fit $\mathrm{EGARCH}(1, 1)$ model to time series of returns for each index. Then we use innovations for computing extreme quantile regions for several probabilities $p\in(1/2000, 1/5000, 1/10000)$.

Requirements

  1. Clone or unzip the repository.

    git clone https://github.com/perej1/elliptical-empirical.git
    
  2. Install required packages by running the following R command in the project's root folder (R package renv has to be installed).

    renv::restore()
    

Running the code

Emprical example involves three steps:

  1. modify.R - Fitting of $\mathrm{EGARCH}(1, 1)$ models and computation of innovations.

  2. test-assumptions.R - Test assumptions of independence, ellipticity and regular variation.

  3. analyze.R - Estimation of extreme quantile regions.

Lastly, the script main.R is responsible for argument parsing. In order to perform all the three parts of the empirical example, just run the following.

Rscript main.R

If you wish to skip some parts of the empirical example, you can run something like below.

Rscript main.R --modify TRUE --test FALSE --analyze TRUE

That is, above snippet of code skips statistical tests.

elliptical-empirical's People

Contributors

perej1 avatar

Watchers

 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.