GPT Investor: Step-by-step Guide to Use OpenAI GPT Models to compare different stocks

Amirarsalan Rajabi
8 min readMar 31, 2024
Image created by DALL·E 3

In this tutorial, I explain how to utilize GPT-4 for comparing potential stock purchases. It is based on Matt Shumer’s code for using Claude for financial analysis . This tutorial introduces modifications to adapt the strategy for use with the OpenAI API. We also implement asynchronous requests, a change that significantly accelerates the processing speed.

Disclaimer: This tutorial is designed for educational purposes only and is not intended to be used as an investment advice.

Here is how the web app works in the end:

All the code in this tutorial along with instructions for how to build the web app is available in this GitHub repository:

--

--