explaingit

huseinzol05/stock-prediction-models

9,345Jupyter NotebookAudience · dataComplexity · 3/5LicenseSetup · moderate

TLDR

A large collection of Jupyter Notebooks with machine learning models for predicting stock prices and simulating automated trading strategies. Built for learning and research, not live trading.

Mindmap

mindmap
  root((stock-prediction-models))
    Price Prediction
      LSTM networks
      GRU networks
      Attention models
      Seq2seq forecasting
    Trading Agents
      Q-learning
      Actor-critic
      Evolution strategies
      Moving averages
    Analysis
      Outlier detection
      Monte Carlo sim
      Portfolio optimization
    Tech Stack
      Python
      Jupyter Notebook
      TensorFlow
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Learn how to apply LSTM and GRU deep learning models to predict stock price movements from historical data.

USE CASE 2

Build and backtest an automated trading agent that learns buy and sell decisions through reinforcement learning.

USE CASE 3

Run Monte Carlo simulations to explore different portfolio outcomes under uncertainty.

USE CASE 4

Use the browser-based demo to test stock predictions by uploading a CSV without installing anything.

Tech stack

PythonJupyter NotebookTensorFlowPyTorchJavaScript

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Python with TensorFlow or PyTorch installed, notebooks also run in Google Colab without local setup.

Free to use, modify, and distribute for any purpose including commercial, as long as you include the license notice.

In plain English

Stock-Prediction-Models is a collection of machine learning and deep learning experiments aimed at forecasting stock prices and simulating trading strategies. Everything is organized as Jupyter Notebooks, which are interactive documents that combine code, charts, and explanations in a single file. The repository is intended as a research and learning resource rather than a production trading system. The collection is split into two main areas. The first is price prediction models: about 18 deep learning architectures are included, covering a range of neural network types used for working with time-series data. Among them are LSTM networks (which process sequences of data by maintaining a kind of memory across time steps), GRU networks (a related but slightly simpler approach), convolutional approaches, and attention-based models. Some models use a technique called Seq2seq, where the model reads a sequence and outputs a new sequence, which can be useful for forecasting multiple future time steps at once. The second area is trading agents: over 20 automated decision-making programs that decide when to buy or sell. These range from simple rule-based approaches like moving averages to more complex reinforcement learning agents, where the program learns by trial and error through simulated trading. Approaches include Q-learning, policy gradient methods, actor-critic setups, and evolution strategies. Additional notebooks cover data exploration, including outlier detection and overbought/oversold analysis applied to Tesla stock, as well as Monte Carlo simulations (a way to model uncertainty by running many randomized scenarios) for portfolio optimization. A portfolio optimization notebook is also included. A JavaScript version of one LSTM model and one trading agent is available as a browser-based demo, allowing you to upload historical stock data in CSV format and see predictions without installing any software. The project is released under the Apache 2.0 license. It is primarily aimed at people learning machine learning techniques in the context of financial data, not at traders looking for a ready-made system.

Copy-paste prompts

Prompt 1
I want to use the stock-prediction-models LSTM notebook to predict Tesla stock prices. Walk me through loading the CSV data and running the model in Jupyter.
Prompt 2
Using the reinforcement learning trading agent in stock-prediction-models, help me set up a Q-learning agent that learns to trade a stock in a simulated environment.
Prompt 3
Show me how to run the Monte Carlo portfolio optimization notebook from stock-prediction-models on my own set of stock tickers.
Prompt 4
Help me adapt one of the moving average trading agents in stock-prediction-models to use my own historical price CSV data.
Prompt 5
Explain how the Seq2seq models in stock-prediction-models forecast multiple future days of stock prices at once.
Open on GitHub → Explain another repo

← huseinzol05 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.