Live Website: https://fin-tsp-qtqp.vercel.app/
Fin-TSP (Financial Time Series Prediction) is a high-performance Neural Terminal designed for the Indian Stock Market (NSE/BSE). This project moves away from traditional 1D price-action models, treating market dynamics as a Computer Vision problem. By converting raw price action into 2D Spectrograms via Short-Time Fourier Transform (STFT), a Convolutional Neural Network (CNN) identifies hidden spectral patterns in volatility to predict next-day price movements.
- Framework: FastAPI (Python 3.11)
- Deep Learning: TensorFlow-CPU (Memory-optimized for 512MB RAM constraints)
- Signal Processing: SciPy (STFT spectral mapping)
- Data Ingestion: yFinance (Real-time NSE/BSE data)
- Deployment: Render (Web Service)
- Framework: Next.js 15 (App Router / Turbopack)
- Styling: Tailwind CSS (Neural-Dark Theme)
- Visuals: Chart.js, Lucide React, & Framer Motion (Glow-effects/Animations)
- Deployment: Vercel
The prediction pipeline follows a rigorous four-stage process:
- Normalization: Raw OHLC data is scaled to ensure feature consistency across 5,300+ supported assets.
- STFT Mapping: 1D price time-series is transformed into a 60x60 spectral image, capturing both time and frequency domains.
- CNN Inference:
- Conv2D Layers: Slide kernels over the spectrogram to detect "edges" in volatility and spectral density.
- MaxPool: Downsamples features to ensure translation invariance.
- Dense Head: A linear head performs the final regression to output the Predicted T+1 Price.
- Backtesting: The system compares predictions against historical truth to calculate Directional Accuracy metrics.
Ensure you have the necessary build tools:
-
Clone the Repository:
git clone [https://github.com/rohan-shyam/Fin-TSP.git](https://github.com/rohan-shyam/Fin-TSP.git) cd Fin-TSP -
Backend Setup:
cd backend python -m venv .venv source .venv/bin/activate pip install -r requirements.txt uvicorn app.main:app --reload
-
Frontend Setup:
cd ../frontend npm install npm run dev
- STFT Spectrogram Integration
- CNN Model Training & Inference
- Real-time NSE Ticker Search
- Vercel & Render Production Deployment
Author: Rohan Shyam

