https://github.com/callmequant/financial_ts_generation_hackathon
FourierFlow is a tool for generating synthetic financial time series data using deep generative models. This modified version is utilized for the Market Scenario Generator Hackathon: From Stability to Storms. It aims to provide effective synthetic data generation to model different financial scenarios.
https://github.com/callmequant/financial_ts_generation_hackathon
financial-modeling generative-models synthetic-data time-series-generation
Last synced: 7 months ago
JSON representation
FourierFlow is a tool for generating synthetic financial time series data using deep generative models. This modified version is utilized for the Market Scenario Generator Hackathon: From Stability to Storms. It aims to provide effective synthetic data generation to model different financial scenarios.
- Host: GitHub
- URL: https://github.com/callmequant/financial_ts_generation_hackathon
- Owner: CallmeQuant
- Created: 2024-06-10T15:04:22.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T15:16:53.000Z (almost 2 years ago)
- Last Synced: 2024-12-28T16:20:12.908Z (over 1 year ago)
- Topics: financial-modeling, generative-models, synthetic-data, time-series-generation
- Language: Python
- Homepage:
- Size: 17.6 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FourierFlow Generator for Financial Time Series
The FourierFlow is a simple, yet powerful tool for generating synthetic time series data using deep generative models. The model is slightly modified and applied to the Market Scenario Generator Hackathon: From Stability to Storms (for more details of the hackathon, visit [Hackathon Website](https://hackathon.deepintomlf.ai/competitions/38)).
# Getting Started
## Installation:
Clone this repository to your local machine.
I recommend to create a new environment by running
```console
conda env create -f environment.yml
```
## Configuration:
- Navigate to the config_ff.yaml file.
- Adjust the parameters according to your needs:
+ `input_dim`: Dimensionality of input features.
+ `output_dim`: Dimensionality of output features.
+ `hidden_dim`: Size of hidden layers.
+ `n_flows`: Number of flow layers.
+ `n_lags`: Number of time lags.
+ `vol_activation`: Activation function for volatility modeling (e.g., “softplus”).
+ Other hyperparameters (batch size, learning rate, etc.).
- Pretraining or Checkpoint:
+ Choose between two modes:
+ Pretrain:
+ Load your training data and labels (regular and crisis data).
+ Train the generator using generator_regular.fit() and generator_crisis.fit().
+ Save the combined model dictionary using save_combined_model_dict().
+ Checkpoint (Pickle Files):
+ Load the pre-trained model from model_dict.pkl.
- Generating Samples:
+ Run the script main.py in console:
```console
python main.py
```
+ Specify the condition (e.g., crisis or regular) by setting `condition[0]` in the `main.py`.
+ The generated synthetic data will be saved to a pickle file.
# References:
[1] Alaa, A.M., Chan, A.J., & Schaar, M.V. (2021). Generative Time-series Modeling with Fourier Flows. International Conference on Learning Representations.