Git Product home page Git Product logo

cryptoforecomb's Introduction

CryptoForeComb

Codes used in the paper "A Comparison of Methods for Forecasting Value-at-Risk and Expected Shortfall of Cryptocurrencies" of Trucíos and Taylor, 2022.

Instructions

Daily BTC and ETH prices were downloaded from Binance and are in the Data folder. The codes used are described below:

Main functions:

  • VaR_ES.R : Estimates the VaR and ES using the methods described in the paper. crytocurrency = "BTC/" performs the results for BTC, crytocurrency = "ETH/" performs the results for ETH.
  • ForeComb.R: Performs the combining methods proposed by Taylor (2020) and briefly described in Section 3.2 (the combining methods described in Section 3.1 are included in the Comparison.R file).
  • Comparison.R: This code performs the backtesting exercise for the VaR and ES, the final output are the Tables reported in the paper (in .tex format). Additionaly, the model confidence set and the fluctiation test of Giacomini and Rossi (2010) are performed.

Auxiliary functions:

  • Optimizations.R: Used in ForeComb.R and Comparison.R codes. Implements the scoring functions used and the optimization weights routines.
  • scoring_functions.cpp: Implements the scoring functions in C++.
  • Function_VaR_VQR.R: Implements the VQR backtesting of Gaglianone et al. (2011).
  • CAViaR.R and CAViaR.cpp: implements the CAViaR, CAViaREVT and CAViaRALD methods.
  • DescriptiveStatistics.R: Table 1 and Figure 1 of the paper.
  • GiacominiRossiTest.R: Fluctuation test of Giacomini and Rossi (2010)

The routines should be used as follows:

  1. VaR_ES.R
  2. ForeComb.R
  3. Comparison.R

References

  • Taylor, J. W. (2020). Forecast combinations for value at risk and expected shortfall. International Journal of Forecasting, 36(2), 428-441.
  • Trucíos, C. and Taylor, J. W. (2022). A Comparison of Methods for Forecasting Value-at-Risk and Expected Shortfall of Cryptocurrencies. Journal of Forecasting (To appear)
  • Gaglianone, W. P., Lima, L. R., Linton, O., & Smith, D. R. (2011). Evaluating value-at-risk models via quantile regression. Journal of Business & Economic Statistics, 29(1), 150-160.
  • Giacomini, R. and Rossi, B. (2010). Forecast comparisons in unstable environments. Journal of Applied Econometrics, 25(4):595-620.

cryptoforecomb's People

Contributors

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