File size: 2,168 Bytes
bbf5d55 85927f8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
---
license: mit
title: Synthetic Stock Data Generator & Visualizer
emoji: π§
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.0
app_file: app/app.py
pinned: false
---
# π§ Synthetic Stock Data Generator & Visualizer
This project builds a **synthetic stock market data generator** using a combination of **Autoencoders (AE)** and **Generative Adversarial Networks (GANs)**.
The goal is to create realistic synthetic financial time-series data and compare model performance between **real** and **synthetic** datasets.
---
## π **Project Overview**
### πΉ Workflow
1. **Autoencoder (AE):**
- Encodes stock price data into a compressed **latent space**.
- Captures temporal and feature-based dependencies between Open, High, Low, Close, and Volume.
2. **GAN (Generator + Discriminator):**
- Learns to generate **synthetic latent vectors** that mimic the AE latent representations.
- Generator produces fake latent vectors.
- Discriminator learns to distinguish between real (from AE encoder) and fake (from Generator).
3. **Synthetic Data Reconstruction:**
- The **synthetic latent vectors** are passed through the **AE Decoder**.
- This recreates **synthetic stock market data** at the feature level (Open, High, Low, Close, Volume).
4. **Model Evaluation:**
- A downstream **neural network classifier** is trained on:
- Real data
- Synthetic data
- Performance metrics and comparison charts are saved in the `/charts` folder.
---
## π **Visualization App**
The project includes a **Gradio-powered dashboard** to visualize stock time series for real and synthetic data.
### π₯οΈ Try it on Hugging Face
If youβre viewing this on Hugging Face, launch the app directly below π
[](https://huggingface.co/spaces/Raheel31/Synthetic_Stock_Data)
### π App Features
- Select any stock ticker and feature (Open, High, Low, Close, Volume)
- View **5-year time series** comparisons of **original vs synthetic data**
- Interactive plots rendered with `matplotlib`
---
## π **Repository Structure**
|