A forecasting pipeline daring enough to face live markets — and lose with dignity.
One repository. One slightly delusional idea.
Two execution personalities:
Static Kaggle data for research. Live yfinance data for public embarrassment.
Watch the models duke it out with reality → Streamlit App
No login. No magic screenshots. Just live prices, live chaos, and zero excuses.
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
Most projects stop at pretty charts.
Most notebooks stop at impressive metrics.
But very few dare to ask the real questions:
- Which model survives sudden market tantrums?
- Which one folds under volatility like my first attempt at coding?
- Which model looks perfect until
live datareality crashes the party?
This project exists to answer those questions — outside cozy notebooks, in the unforgiving market arena, with zero excuses.
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
The Magnificent 7+ AI Stock Forecasting System is a dual-mode forecasting pipeline designed to answer one uncomfortable question:
What actually survives when models leave notebooks and face live markets?
It seamlessly combines offline experimentation with live forecasting, allowing model performance to be evaluated under real volatility, real noise, and real consequences.
No curve-fitting theatrics.
No cherry-picked screenshots.
Just models, markets, and receipts.
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
- Historical Kaggle stock datasets
- Exploratory data analysis with financial statistics
- Feature engineering with clear, defensible justification
- Market regime identification
- Model benchmarking without cherry-picking
Not vibes.
- Live market prices via yfinance
- On-demand model execution
- Rolling forecasts with continuous backtesting
- Interactive model comparison (models openly roast each other)
- Downloadable predictions (for receipts)
Not historical comfort blankets.
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
- ARIMA — assumes the future behaves if you difference it enough
- Prophet — sees seasonality everywhere (custom holidays applied, faith optional)
- Random Forest Regressor — asks hundreds of trees and averages the panic
- XGBoost — wins competitions, demands careful handling, breaks easily
- Lag-based pipelines — yesterday called, it wants today to make sense
- LSTM — remembers long-term patterns, forgets why training is slow
- GRU — LSTM’s efficient sibling with fewer emotional gates
- Sliding windows — teaches neural nets by repeatedly showing them the past
- K-Means — confidently clusters markets into exactly K moods
- Isolation Forest — quietly flags chaos while pretending it’s normal
They all earn credibility — or get roasted by live data.
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
- ( ̄︶ ̄)ゞ Dual execution modes: offline research for thinking, live forecasting for consequences
- (ಠ‿ಠ) Multiple model families competing on the same data — no special treatment
- (•̀ᴗ•́)و Rolling forecasts instead of one heroic prediction and a prayer
- (⌐■_■) Backtesting with consistent, comparable metrics — excuses not included
- (¬‿¬) Regime-aware analysis (markets refuse to stay stationary)
- (☞゚ヮ゚)☞ Interactive dashboard for side-by-side model judgment
- (ಥ﹏ಥ) Downloadable forecasts for accountability, audits, and post-mortems
If it succeeds, it must keep proving it.
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
- Because “just guessing” isn’t a strategy, Python comes to the rescue
- Cleaning data shouldn’t feel like archaeology, which is where Pandas and NumPy shine
- Classical wisdom still works even if everyone chases shiny new algorithms, thanks to Scikit-learn
- Time series deserve honesty and no magic tricks, that’s why Statsmodels is here
- Seasonality isn’t a horoscope, Prophet helps keep it under control
- Deep learning should earn its keep and not just look cool in slides, enter TensorFlow and Keras
- Trees can still settle debates without a chainsaw, which is why XGBoost wins
- Visuals shouldn’t require a crystal ball, Plotly makes them interactive and accountable
- Deploying apps shouldn’t feel like a startup audition, Streamlit keeps it simple and working
- Live data comes with real consequences, yfinance brings it straight to you
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
This system proudly avoids overcomplication. Because why juggle 17 APIs and a database when all you really need are some numbers and a prayer?
- Offline Mode: Historical Kaggle stock datasets — perfect for pretending you can predict the past.
- Live Mode: Real-time OHLC data via yfinance — for when reality likes to smack you in the face.
No databases.
No API keys.
No scraping chaos.
Just raw prices… and the cold, unforgiving march of time.
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
- Install dependencies with pip install -r requirements.txt — because the code won’t do itself.
- Launch the app: streamlit run app.py — enter at your own risk.
- Pick your stocks and choose a forecasting horizon — may the odds be ever in your favor.
- Run the models and watch them duke it out with reality — popcorn optional.
- Download predictions if you want a receipt for your eventual bragging rights (or regrets).
That’s it.
If it breaks, don’t blame us — the market probably threw a tantrum first.
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
- Automated regime-switching model selection because the market refuses to behave consistently
- Probabilistic forecasting with confidence bands, aka “maybe it works, maybe it doesn’t”
- Model explainability dashboards so you can see exactly why your predictions humiliated you
- Event-aware forecasting (earnings, macro releases) because markets love throwing curveballs
- Longer-horizon evaluation under sustained volatility for when chaos lasts more than a coffee break
Markets evolve.
This system is built to evolve right alongside — or spectacularly fail while trying
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
- Not financial advice. Never was. Never will be.
- If a model fails, congratulations, it’s doing its job
- If it works, brace yourself, the market just changed the rules
- Built to expose weaknesses, not sell hopium or false hope
You reached the end.
Your portfolio may still suffer, but at least your system tells the brutal truth