Starting kit for Market Scenario Generator Hackathon

Welcome to our Market Scenario Generator Hackathon Starter Kit repository. This repository provides a standard pipeline to help you with the kick-off of our hackathon. For more details about the hackathon, visit the Hackathon Website.

In this pipeline, we include:

  1. data importing and explanatory analysis,
  2. the model build-up for both the generator and discriminator using LSTM modules,
  3. training algorithm design,
  4. offline evaluation module.

Environment Setup

The code has been tested successfully using Python 3.8 and pytorch 1.11.0. A typical process for installing the package dependencies involves creating a new Python virtual environment.

To install the required packages, run the following:

conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=10.2 -c pytorch
pip install cupy-cuda102
pip install -r requirements.txt

For code illustration, please refer to the Jupyter Notebook we created, namely, example_pipeline.ipynb.

Data

For this challenge, the training data is located at data/. Here, we provide two different datasets, both of which are numpy arrays saved in .pkl format. The first dataset data/ref_data.pkl includes 1200 sample paths representing the daily return and volatility processes of 5 correlated assets. The length of each path is 5, resulting in a time series with shape is [1200, 5, 10]. The second dataset consists of label array of shape [1200, 1] which represents the market condition under with the raw time series is sampled, value 0 stands for regular market condition while value 1 stands for the market under financial crisis.

Sample submission

We also provide a sample submission bundle at sample_submission_bundle which includes:

  1. model_dict.pkl: Dictionary of model parameters used to generate the samples.
  2. model.py: Script of your model architecture, model loading, and data generation.
  3. fake_crisis.pkl: Fake data generated by the trained model under financial crisis scenario.
  4. fake_regular.pkl: Fake data generated by the trained model under regular market scenario.

Finally, we wish you good luck during the competition and most importantly, have fun!!!