
49 trained LSTM models, 21 years of NIFTY 50 data, and a dark-mode Flask dashboard that forecasts tomorrow’s closing price. An AI final year project you can demo the day you download it.
Python | TensorFlow (Keras LSTM) | Flask | Pandas | NumPy | scikit-learn | Plotly.js | Bootstrap 5.3 | Waitress | Jupyter Notebook
This project trains a separate LSTM deep learning model for each of 49 NIFTY 50 stocks, using daily price data from 2000 to 2021, and predicts each stock's next trading day closing price. Every model looks at a 60-day window of prices plus 18 engineered features, including SMA, EMA, RSI, MACD, Bollinger Bands and lagged closing prices. The trained models are served through a Flask web app with interactive Plotly charts, a backtest view, an up/down forecast card with a confidence gauge, and a feature that lets you rewind the prediction to any past date to see what the model would have said back then.
It's built as an educational project. The point is to show the complete time-series ML workflow on real Indian market data, not to tell anyone what to buy.
You open the website. You see a grid of 49 NIFTY 50 companies, like Reliance, TCS, HDFC Bank and Infosys, with their industry listed. Click one and you get a candlestick chart of its full price history, with moving averages drawn on top.
Then the interesting part. The app shows you what its LSTM model thinks tomorrow's closing price will be, whether that's up or down, and how accurate the model was on data it never saw during training. You also get a chart where the actual prices and the model's predictions sit on top of each other, so you can see exactly where it got things right and where it drifted.
And there's a "predict as of" date picker. Pick any date, say 14 March 2015, and the app tells you what the model would have forecast for 16 March. Examiners love this, because you can show them a prediction and then show them what really happened.
.keras files already sitting in the models/ folder, each with its own scaler and config JSON. No retraining needed to run the app.stock_price_prediction.ipynb for a deep dive into a single stock (you change one SYMBOL variable), and train_all_stocks.ipynb, which retrains all stocks in one go and writes RMSE, MAE, MAPE and R² for each into _training_summary.csv./. Type "bank" and the list filters as you type./stock/RELIANCE (or any symbol) with a candlestick chart, preset ranges for 3M, 1Y, 4Y and All, and a custom from/to date range. There's also a year-jump dropdown, so you don't have to click back through 20 years in a date picker./predict page with the up/down forecast, expected price change, a forecast chart and a confidence gauge based on the model's test-set R²./api/ with five endpoints: symbols, date range, history, predict and backtest. You can call them from Postman during your viva if someone wants proof the backend is real./healthz endpoint that reports how many models are loaded, and a production server (wsgi.py) that runs on Waitress, which works on Windows, unlike gunicorn.Raw CSV goes in, and the code in webapp/ml/features.py computes the indicators exactly the way the training notebook did. MinMaxScaler squashes everything to the 0–1 range. The last 60 days become one input sequence. The LSTM outputs a scaled number, the scaler inverts it back to rupees, and that's your predicted close. PredictorRegistry loads each model the first time someone requests that stock and keeps it cached after that.
The folder structure is clean, too. There's an app factory in webapp/__init__.py, separate routes/main.py and routes/api.py, and development and production configs. So when your guide asks you to explain the architecture, you're explaining something sensible.
/api routes.Here's the thing. What's genuinely hard about this project is understanding why the feature engineering in the notebook and in features.py must match exactly. Change a window size in one place and forget the other, and the model gets fed garbage without throwing a single error. Spend 30 minutes reading both files side by side before your viva.
But the part that looks scary, training 49 deep learning models, is already done for you. The models ship pre-trained. You install the requirements, run python run.py, and the dashboard is live.
One more honest point. A few stocks, including COALINDIA, ONGC, NESTLEIND and BAJAJFINSV, have weak or negative R² on the test set. That's not a bug. Price-only models can't see news, earnings or policy changes. Mention this limitation in your report's future scope section and you'll look smarter than students who claim 99% accuracy.
If you're a student who needs a working project for your college submission, final year project, semester project, internship or academic demonstration, this is for you. Whether you're studying BCA, B.Tech, MCA, M.Tech, Computer Science, IT, AI, Data Science or another related field, you can choose a project that fits your requirements. If you need the source code, project report, documentation, or help setting up and running the project, CodeAj gives you the resources and support to get started faster.
It's an especially good fit if your guide wants deep learning (not just a scikit-learn regression) and you'd like a topic that sounds impressive without needing a GPU or any paid API.
You get the complete source code, both notebooks, the dataset, all 49 trained models, and a project report you can adapt to your college's format. If something breaks on your laptop, like a TensorFlow version clash or a port that's already in use, our team will get on a call and help you set it up. If you want more options in the same space, browse our AI and ML final year projects, check the machine learning projects with source code, or look at other Flask final year projects if your college prefers Flask-based submissions.
This is a research and educational project. The forecasts are not financial advice and shouldn't be used for real trading decisions.
Add any of these professional upgrades to save time and impress your evaluators.
Personal session with an expert developer
We'll install and configure the project on your PC via remote session (Google Meet, Zoom, or AnyDesk).
1-hour live session to explain logic, flow, database design, and key features.
Want to know exactly how the setup works? Review our detailed step-by-step process before scheduling your session.
Fully customized to match your college format, guidelines, and submission standards.
Need feature changes, UI updates, or new features added?
Charges vary based on complexity.
We'll review your request and provide a clear quote before starting work.
Reviews