Skip to content
Michael_Portfolio.ipynb
MR
File browser
Michael_Portfolio.ipynb
profile.jpg
resume.pdf

One editable portfolio notebook. Edits survive refreshes in this tab and reset when the tab closes or the notebook is reset.

michaelml.dev / Michael_Portfolio.ipynb
Multi-model ensemble ML system for stock price forecasting using Random Forest, SVM, and Linear Regression. Features Flask backend with real-time progress updates via Server-Sent Events, automatic market hours detection, and optional news sentiment analysis with TextBlob.
[ ]
code · Stock Prediction
project = load_project("stock-prediction")
project.summary()
Output

Stock Prediction

Multi-model ensemble ML system for stock price forecasting using Random Forest, SVM, and Linear Regression. Features Flask backend with real-time progress updates via Server-Sent Events, automatic market hours detection, and optional news sentiment analysis with TextBlob.

PythonMachine LearningFlaskscikit-learnRandom ForestSVMLinear RegressionyfinanceTextBlobServer-Sent EventsTime SeriesFinance
[ ]
code · Problem definition
project = load_project("stock-prediction")
project.problem()
Output
ProblemExplore how several classical models behave on changing market data while keeping preprocessing and progress visible to a user.
ApproachCollect yfinance data, engineer temporal and market features, compare Random Forest, SVM, and Linear Regression, and optionally add news sentiment.
OutcomeDelivered an interactive model-comparison prototype; no investment-performance or trading-return metric is claimed.
[ ]
code · Constraints
project = load_project("stock-prediction")
project.constraints()
Output

Constraints

  • Features differ while markets are open and volume remains incomplete.
  • Financial time series are non-stationary and sensitive to leakage.
  • News access and sentiment are optional external dependencies.
[ ]
code · Role and implementation
project = load_project("stock-prediction")
project.implementation()
Output

Role and implementation

My role: Built the data collection, model modules, Flask orchestration, Server-Sent Events progress stream, and comparison dashboard.

  • Validated symbols and downloaded historical and recent data with yfinance.
  • Trained three classical models and streamed progress with Server-Sent Events.
  • Added optional TextBlob sentiment for company-specific news.
[ ]
code · Architecture
project = load_project("stock-prediction")
project.show_architecture()
Output
Symbol ValidationValidate stock symbol against company database CSV and retrieve company name for news lookup
Historical Data CollectionDownload maximum historical data and recent 7-day/1-day data from Yahoo Finance via yfinance
Feature EngineeringExtract temporal features (Month/Year/Day) and market features (Open/Volume), with conditional Volume inclusion based on market hours
Multi-Model TrainingTrain Random Forest, SVM, and Linear Regression models in parallel using 50/50 train-test split
Ensemble PredictionGenerate predictions from all three models using latest market data (yesterday's close)
News Sentiment AnalysisOptional: Fetch stock-specific news via NewsAPI and compute sentiment polarity using TextBlob
[ ]
code · Demo and media
project = load_project("stock-prediction")
project.media()
Output

No cover image is shown for this project.

[ ]
code · Evaluation
project = load_project("stock-prediction")
project.evaluation()
Output

Evaluation

  • Displayed each model side by side rather than presenting one opaque forecast.
  • The project record does not document a trading or held-out benchmark.
[ ]
code · Results
project = load_project("stock-prediction")
project.results()
Output

Results

  • Produced a functioning comparison dashboard and real-time progress flow.
  • Predictions are presented as an ML experiment, not financial advice.
[ ]
code · Tradeoffs and failures
project = load_project("stock-prediction")
project.tradeoffs()
Output

Tradeoffs

  • Classical models are approachable but do not resolve regime shifts or market causality.
  • Sentiment adds context while introducing another noisy and time-sensitive source.
[ ]
code · What I would improve
project = load_project("stock-prediction")
project.improvements()
Output

Improvements

  • Use walk-forward evaluation, leakage audits, and calibrated baselines.
  • Separate educational visualizations from any future decision-support interface.
[ ]
code · Links and repository
project = load_project("stock-prediction")
project.links()
Output
GitHub
Python 3 · PyodideWorker: CPUConnecting…Command modeLn 1, Col 1