Building A Stock Analyst Using DSPy (1)

FS Ndzomga
Thoughts on Machine Learning
5 min readAug 5, 2024

--

The context

After the theoretical introduction to DSPy that you can find here, we can now finally move into the most interesting part, which is the practical applications that you can build using DSPy.

We will start by building a stock analyst using DSPy. In the image below, you can see the beautiful evolution of the NVIDIA stock this year. It was really a beautiful evolution. I was smart enough to buy it last year, so I saw a very big increase in my small investment portfolio thanks to my buying NVIDIA last year.

In this chapter, we will build a stock analyst using DSPy. Our stock analyst will be automatically powered by artificial intelligence.

So, how will this work? To create your investment thesis, you need to know about recent company news. Are there positive news that can affect the company positively or are they negative news that can have a detrimental effect on the company? You need to know this kind of stuff before buying any stock, and you also need to read the financial statements of that company in order to understand their position in the income statement, the balance sheet, or the cashflow — are they in a…

--

--

FS Ndzomga
Thoughts on Machine Learning

Engineer passionate about data science, startups, product management, philosophy and French literature. Built lycee.ai, discute.co and rimbaud.ai