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.
- ๐ 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.
- 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
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
โโโ .gitignorecd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reloadBackend will be running at: http://localhost:8000
cd frontend
npm install
npm run devFrontend will be running at: http://localhost:5173
Ensure the backend is also running for full functionality.
Upload a .csv file with the following required columns:
Open, High, Low, Close, Volume
{
"accuracy": 0.8123,
"confusion_matrix": [[100, 20], [15, 80]]
}docker-compose up --buildMake sure Docker is installed and running before executing.
- Python 3.10+
- Node.js 18+
- Docker (optional)
MIT ยฉ 2025 NeuralAditya
