Skip to content

Comprehensive stock market analysis for major tech companies (2019–2024). Features data cleaning, feature engineering, classical time series (SARIMA & Prophet), supervised & unsupervised ML, and neural networks. Available as both a Jupyter notebook for experimentation and a Streamlit app for interactive exploration.

Notifications You must be signed in to change notification settings

ArshiBansal/Stocks_Analysis

Repository files navigation

Course Project Chaos Origin

Magnificent 7+ AI Stock Forecasting System

A forecasting pipeline daring enough to face live markets — and lose with dignity.

One repository. One slightly delusional idea.
Two execution personalities: naïve hope and cold, hard Python.
Static Kaggle data for research. Live yfinance data for public embarrassment.

Live Forecast

Watch the models duke it out with reality → Streamlit App

No login. No magic screenshots. Just live prices, live chaos, and zero excuses.


• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

Project Headache Trigger

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 data reality crashes the party?

This project exists to answer those questions — outside cozy notebooks, in the unforgiving market arena, with zero excuses.


• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

Project Overview

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.


• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

Project Architecture
( ̄︶ ̄)ゞ Mode 1 — Research & Experimentation (Jupyter Notebook)
  • Historical Kaggle stock datasets
  • Exploratory data analysis with financial statistics
  • Feature engineering with clear, defensible justification
  • Market regime identification
  • Model benchmarking without cherry-picking
Built for reproducibility.
Not vibes.

(☞゚ヮ゚)☞ Mode 2 — Live Forecasting Engine (Streamlit)
  • 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)
Built for real data.
Not historical comfort blankets.

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

Models Used
(⌐■_■) Time Series
  • ARIMA — assumes the future behaves if you difference it enough
  • Prophet — sees seasonality everywhere (custom holidays applied, faith optional)
(ಠ‿ಠ) Machine Learning
  • 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
(•̀ᴗ•́)و Deep Learning
  • 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
(¬‿¬) Unsupervised Learning
  • K-Means — confidently clusters markets into exactly K moods
  • Isolation Forest — quietly flags chaos while pretending it’s normal
No model is trusted by default.
They all earn credibility — or get roasted by live data.

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

Features
  • ( ̄︶ ̄)ゞ 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 a model fails, it fails publicly.
If it succeeds, it must keep proving it.

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

Technologies Used
  • 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

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

Data Requirements

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.


• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

User Guide
  1. Install dependencies with pip install -r requirements.txt — because the code won’t do itself.
  2. Launch the app: streamlit run app.py — enter at your own risk.
  3. Pick your stocks and choose a forecasting horizon — may the odds be ever in your favor.
  4. Run the models and watch them duke it out with reality — popcorn optional.
  5. 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.


• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

Future Improvements
  • 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


• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

Final Notes
  • 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

About

Comprehensive stock market analysis for major tech companies (2019–2024). Features data cleaning, feature engineering, classical time series (SARIMA & Prophet), supervised & unsupervised ML, and neural networks. Available as both a Jupyter notebook for experimentation and a Streamlit app for interactive exploration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published