Future Live Stock Prediction using Large Language Models in Python.

Sahaj Godhani
3 min readJun 8, 2023

Stock market prediction has always been a challenging task for investors and traders. However, recent advancements in natural language processing and deep learning have opened up new possibilities. In this article, we will explore how we can leverage large language models and Yahoo Finance data to make future stock price predictions using Python.

Large Language Models Article (LLM)

Table of Contents:

  1. Understanding the Problem
  2. Gathering Historical Stock Data
  3. Preprocessing the Data
  4. Using a Large Language Model
  5. Generating Future Stock Price Predictions
  6. Conclusion

Section 1: Understanding the Problem To begin, let’s understand the problem we aim to solve. We want to predict future stock prices based on historical data. While this task is inherently uncertain, language models can help us analyze patterns and generate speculative predictions.

Section 2: Gathering Historical Stock Data We start by using the “yfinance” library in Python to fetch historical stock data from Yahoo Finance. By specifying the desired ticker symbol and date range, we can retrieve a dataset containing stock prices and corresponding dates.

--

--

Sahaj Godhani
Sahaj Godhani

Written by Sahaj Godhani

AI Engineer || LLM || Gen AI || Data Scientist ||

No responses yet