Using LLMs to predict stock prices part 1

The video introduces a stock price prediction toolkit that leverages large language models (LLMs) to forecast prices based on historical data, emphasizing the effectiveness of shorter data ranges for accuracy. It covers the first four files of the toolkit, which include downloading stock data, visualizing predictions, and performing single and multiple-day price forecasts, while encouraging viewers to support the project for further resources and upcoming content.

In this video, the presenter introduces a stock price prediction toolkit that utilizes large language models (LLMs). The project consists of eight files, with the first four being covered in this initial video. The primary focus is on predicting stock prices based on historical closing prices, where the model takes in data from previous days to forecast the next day’s price. The presenter emphasizes the simplicity of the approach, which can be expanded to predict prices based on various historical data ranges, such as 3-day, 5-day, or even 60-day data.

The toolkit includes a simulation component that tracks performance metrics such as overall score, direction accuracy, and mean absolute error across multiple predictions. The presenter shares results from running 25 simulations, highlighting that shorter historical data (like 3-day data) often yields better prediction accuracy compared to longer historical data (like 60-day data). The video also includes a disclaimer that the predictions are for research purposes only and should not be considered financial advice.

The first file in the toolkit is designed to download stock price data based on a specified ticker and date range, outputting the data in CSV format. The second file visualizes this data through plots, allowing users to compare the predicted prices with actual prices. The third file focuses on predicting a single day’s price based on a specified number of historical days, providing a performance report that includes actual and predicted prices along with error metrics.

The fourth file expands on the previous functionality by enabling multiple-day predictions. It allows users to set parameters for the number of days to look back and how many predictions to make. The presenter explains that this file uses asynchronous programming to manage multiple prediction requests efficiently, ensuring that the process remains smooth and within API rate limits. The results include accuracy metrics and visualizations that help users assess the model’s performance.

Finally, the presenter encourages viewers to become patrons to access the complete toolkit and additional resources. They mention that the second part of the project will delve into more complex simulations and investment strategies, including Monte Carlo simulations and performance weights for predictions. The video concludes with an invitation for feedback and a promise of more content related to stock price predictions and AI applications in finance.