GithubHelp home page GithubHelp logo

sw_stresstest's Introduction

System-Wide Stress Test Model

Build

This is the reference implementation of the system-wide stress test model, as described in this paper. This repo uses public data from EBA, while the result in the paper is generated using confidential data. And so this repo is not sufficient to exactly reproduce the paper result. However, the result is qualitatively the same.

This repo uses the Resilience library.

For a self-contained introduction to the model in fewer than 1k lines of code, see https://github.com/ox-inet-resilience/firesale_stresstest. The firesale_stresstest repository implements all of its building block from scratch instead of using the Resilience library. It reproduces the result of Cont-Schaanning 2017.

Usage

Requires Python 3. It is recommended to run everything within a virtualenv.

  • git clone the repo and cd to it.
  • Install the dependencies with pip install .
  • Run the simulation with python sw_stresstest/simulation.py

You will see the results in the plots/ folder.

Remarks:

  • You can enable/disable parallelization (the parallelization is implemented using Python's multiprocessing library) by searching for fs.parallel in simulation.py and setting it to True/False.
  • Parallelization seems to not work on Windows. You probably need to disable it to run the simulation.
  • You can tweak the number of repetitions of the simulations by changing NSIM in the simulation.py file.
  • To speed up the simulation, you may decrease the value of NPOINTS. This represents the number of points in the x-axis in the simulation plots. Note: for now, changing NPOINTS will cause problem with running simulation FF11 because it is hardcoded to assume that the length is 11. This will be fixed in the future version.

Citing this project

To cite the model and/or the Resilience library in your publication you can use the CITATION.bib.

sw_stresstest's People

Contributors

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