Coder Social home page Coder Social logo

matyasfarkas / varfxi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from romainlafarguette/varfxi

0.0 0.0 0.0 358.67 MB

Model and replications scripts for the 2020 IMF Working Paper "Foreign Exchange Interventions Rules for Central Banks: A Risk-Based Framework"

License: GNU General Public License v3.0

Shell 0.01% Python 0.14% TeX 0.15% Jupyter Notebook 99.71%

varfxi's Introduction

VaR-Rule for FX Interventions

Link to the Python notebook: https://github.com/romainlafarguette/VaR-FX-Interventions/blob/master/notebooks/VaR-FX%20Interventions.ipynb

The Python notebook replicates the tables and the charts of the IMF WP on "Foreign Exchange Interventions Rules for Central Banks: A Risk-Based Framework"

IMPORTANT: BECAUSE OF AN UPDATE OF THE ARCH PACKAGE AFTER 4.19, and in particular the random number generator, the way the random seed is managed has changed. Some results are therefore slightly different (e.g. the pdf plot) by a few pips as in the IMF WP, but are qualitatively similar. The journal version will reflect the new version

The paper uses a Python package that I have written, DistGARCH, also available in this Github folder, with the public FX intervention data from the Banco Mexico. DistGARCH is based on the ARCH package of Kevin Sheppard.

You can use the code for non-commercial applications, providing that you cite the IMF Working Paper Lafarguette, R. and Veyrune, R. (2020) "Foreign Exchange Interventions Rules for Central Banks: A Risk-Based Framework", IMF Working Paper

The folder is organized as follows:

  • mxn_estimation.py is the pure Python file with the core estimation and robustness analysis
  • VaR-FX Interventions.ipynb is a Jupyter notebook, which illustrates the approach
  • modules/ contains the modules for this project, in particular distGARCH which infers a conditional distribution from a GARCH model
  • data/ contains public data files, with FX rate and FX interventions from Banco Mexico website
  • img/ contains some images to illustrate the Jupyter Notebook

Reuse of this tool and IMF data does not imply any endorsement of the research and/or product. Any research presented should not be reported as representing the views of the IMF, its Executive Board, or member governments.

Note that the Github repo contains only publicly available data.

Author: Romain Lafarguette, August 2020

If you have any question, please contact me via Github or rlafarguette "at" imf "dot" org

varfxi's People

Contributors

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