Using GPTs to analyze stock investments
I've been investing since 2005. Even though I wanted to analyze my investments, I never did. Since my portfolio was growing and I was getting dividends, I didn't dig deeper. With ChatGPT and Claude, I saw an opportunity to use these tools for analysis.
I downloaded all my transaction data from my broker and uploaded it to #ChatGPT to calculate the compound annual growth rate (CAGR). ChatGPT managed to identify the columns in the Excel file, and also provided a reference to a Python program that did the analysis. However, the output had many negative CAGR values, so I wasn't happy.
ChatGPT explained that missing sell dates caused the negative or zero CAGRs. Since I hold most of my stocks long-term, many stocks didn't have a sell-date. By now, my daily free limit was over and I switched to Claude. I gave this prompt.
Attached is the all stock buy and sell transactions over a long period of time. Calculate individual CAGR for each stock, calculate overall CAGR, and compare the overall CAGR with sensex index. Consider today's date as a sell date for those stocks where there is no sell date.
It said CAGR will be approximate because I didn't provide dividend info.
I then uploaded each stock's average cost price and asked Claude to take that into account. It provided a detailed analysis of each stock and calculated an approximate CAGR for each stock. The results matched my mental estimates, even though it made a few assumptions.
The highest CAGR is 58.53% & lowest has been 4.77%.
The thing I liked about this exercise was that I could interact confidently without having to worry about upselling, which is common with human financial advisors. Claude and ChatGPT both answered my questions, even ones I thought were stupid.
I'm going to keep using these tools for financial analysis. The process has been fun and educational, letting me ask questions freely and gain insights.