I Built a Stock Price Prediction App While Learning ML โ Here's What I Learned
TL;DR: I built a full-stack stock prediction app with 7 ML algorithms, 1,001 stocks, and offline-first support. It's open source, and I'd love your feedback. ๐ github.com/ankit02327/stock-price How It Started This project began from something I was personally learning: machine learning. While taking ML courses at university, I wanted to understand how the algorithms I was studying could beโฆ
This reporter built a stock market prediction app while studying machine learning. The project started as a way for the reporter to understand how ML algorithms could be applied to a real-world problem, rather than simply being part of coursework. The goal was to create an educational resource that would allow others to learn about machine learning by examining a practical application, working with real financial data, experimenting with the code, and eventually creating their own projects.
The app uses seven different ML algorithms, ranging from basic linear regression to more advanced models like ARIMA and autoencoders. It includes data from 1,001 stocks from both the US and India, with a focus on 936 stocks that had sufficient data after filtering. The app provides real-time data through Finnhub for US stocks and Upstox for Indian stocks, with offline storage as a backup option.
Key features of the app include interactive charts using Recharts, 38 technical indicators calculated from historical data, automatic USD/INR currency conversion, and smart prediction models that provide confidence scores. The app is designed to work offline, which was a deliberate design choice to make it accessible to anyone who wants to experiment without needing API keys or worrying about rate limits.
The technology stack consists of Flask for the backend, Python 3.8+ for the programming language, React 18 and TypeScript for the frontend, Vite for building the app, Tailwind CSS for styling, and Recharts for data visualization. The app pulls data from Finnhub, Upstox, and yfinance APIs. While the offline components include stock information, complete historical charts, all trained ML models, and 38 technical indicators, live prices require API keys.
Through building this project, the reporter has learned that machine learning is not magic but rather a tool for finding patterns in data, and that data quality is paramount. The reporter started with simple linear regression and gradually moved to more complex models, emphasizing the importance of starting simple and iterating.
The project has already garnered 27 contributors and 14 releases, and the reporter plans to add more features such as migrating to FastAPI, implementing Redis caching, using PostgreSQL, Docker Compose, MLflow for experiment tracking, performing news sentiment analysis, and creating a backtesting system.
The reporter invites others to contribute to the project, whether through reporting bugs, submitting pull requests, sharing the app with others learning machine learning, or simply providing feedback.
Written by urgent.news from Dev.to's reporting โ not their text. Machine-written โ may contain errors; check the original before relying on it.