https://github.com/neuraladitya/trade_predictor_project
An AI-powered trade prediction system using machine learning, technical analysis, and time series models. Built with FastAPI, React, and Tailwind CSS.
https://github.com/neuraladitya/trade_predictor_project
arima csv-analysis fastapi financial-data kalman-filter machine-learning markov-models pca prediction-system random-forest react stock-market tailwindcss tda technical-indicators trade-prediction tsne vite wavelet-transform
Last synced: about 2 months ago
JSON representation
An AI-powered trade prediction system using machine learning, technical analysis, and time series models. Built with FastAPI, React, and Tailwind CSS.
- Host: GitHub
- URL: https://github.com/neuraladitya/trade_predictor_project
- Owner: NeuralAditya
- Created: 2025-04-07T21:18:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-07T21:30:31.000Z (about 1 year ago)
- Last Synced: 2025-04-07T22:28:54.107Z (about 1 year ago)
- Topics: arima, csv-analysis, fastapi, financial-data, kalman-filter, machine-learning, markov-models, pca, prediction-system, random-forest, react, stock-market, tailwindcss, tda, technical-indicators, trade-prediction, tsne, vite, wavelet-transform
- Language: Python
- Homepage:
- Size: 846 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ง NeuralAditya - Trade Prediction Project
[](#)
[](https://www.python.org/downloads/)
[](https://nodejs.org/)
[](LICENSE)
**Trade Prediction Project** is an advanced and modular trade prediction system that combines state-of-the-art **machine learning** and **signal processing techniques** to provide highly accurate stock trend forecasts.
Built with a powerful **FastAPI backend** and a modern **Vite + React + TailwindCSS frontend**, this full-stack application is optimized for **real-time interaction** and **predictive insight delivery**.
## ๐ Core Features
- ๐ **FastAPI Backend**: Lightweight and high-performance API for fast data processing and model predictions.
- โ๏ธ **React + Vite Frontend**: Ultra-fast UI built with Vite, React, TailwindCSS, and ShadCN.
- ๐ **ML Algorithms**: Random Forest, ARIMA, and Markov Switching models for robust predictions.
- ๐ง **Fourier Transform Analysis**: Extracts frequency-domain features to capture cyclic trends in data.
- ๐ **Wavelet Transform**: Multi-resolution analysis to uncover short-term vs long-term volatility patterns.
- ๐ก **Kalman Filter**: Smooths noisy market signals and estimates hidden state trends.
- ๐ **Topological Data Analysis (TDA)**: Captures shape and structure of time-series data using persistence diagrams.
- ๐งฎ **Technical Indicators**: Includes RSI, MACD, EMA, Bollinger Bands, and more.
- ๐ฏ **Dimensionality Reduction**: Uses PCA and t-SNE for compressing and visualizing high-dimensional features.
- ๐ผ๏ธ **Live Graphs**: UI displays prediction results and historical performance in interactive charts.
- ๐งพ **CSV Upload & Visualization**: Upload any stock OHLCV CSV and view results instantly.
## โก Use Cases
- Short-term & long-term stock trend forecasting
- Backtesting and model evaluation
- Educational tool for data science and trading students
- Research into hybrid models and multi-signal strategies
---
## ๐ธ Frontend Screenshot
---
## ๐ Project Structure
```bash
Trade_Predictor_Project/
โ
โโโ backend/
โ โโโ api/
โ โ โโโ predict.py # Main prediction endpoint logic
โ โโโ models/
โ โ โโโ train_model.py # (Optional) Re-train ML models
โ โโโ utils/
โ โ โโโ helpers.py # (Optional) Any helper functions
โ โโโ __init__.py
โ โโโ main.py # FastAPI entrypoint
โ โโโ requirements.txt # Backend dependencies
โ
โโโ frontend/
โ โโโ src/
โ โ โโโ TradePredictApp.tsx # UI for file upload and results
โ โโโ public/
โ โ โโโ screenshot.png # UI screenshot image
โ โโโ package.json
โ โโโ postcss.config.js
โ โโโ tailwind.config.js
โ โโโ vite.config.ts
โ โโโ tsconfig.json
โ
โโโ docker-compose.yml
โโโ README.md
โโโ .gitignore
```
---
## ๐ Getting Started
### ๐ง Backend (FastAPI)
```bash
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload
```
Backend will be running at: [http://localhost:8000](http://localhost:8000)
---
### ๐ป Frontend (Vite + React)
```bash
cd frontend
npm install
npm run dev
```
Frontend will be running at: [http://localhost:5173](http://localhost:5173)
Ensure the backend is also running for full functionality.
---
## ๐ค API Endpoint
### `POST /api/predict`
Upload a `.csv` file with the following required columns:
```
Open, High, Low, Close, Volume
```
#### โ
Example Response
```json
{
"accuracy": 0.8123,
"confusion_matrix": [[100, 20], [15, 80]]
}
```
---
## ๐ณ Docker (Run Full Stack)
```bash
docker-compose up --build
```
> Make sure Docker is installed and running before executing.
---
## โ
Requirements
- Python 3.10+
- Node.js 18+
- Docker (optional)
---
## ๐ License
MIT ยฉ 2025 NeuralAditya