The Hour-Long Project We Never Would’ve Started

This article was originally published on ETFTrends.com. We may often come off as skeptical about AI in this newsletter. Our skepticism is primarily centered on the AI capital spend and AI company valuations rather than the AI tools themselves, which we have found both useful and exciting. In that spirit, I’m going to walk you…


The Hour-Long Project We Never Would’ve Started

This article was originally published on ETFTrends.com.

We may often come off as skeptical about AI in this newsletter. Our skepticism is primarily centered on the AI capital spend and AI company valuations rather than the AI tools themselves, which we have found both useful and exciting. In that spirit, I’m going to walk you through a simple example of how we have used AI tools in our research process.

Our portfolio has had a fair amount of international exposure over the last 9 months, so I wanted to create a monitor of how various countries have been performing of late. I can pull a list of foreign ETF trailing returns with no effort, but what I really wanted was a map so I could easily see regional variations vs. single country variations.

There’s no driving business need for this map and it’s unlikely to generate a dollar of revenue. And so just a few years ago, I would not have bothered to take the week or so of time it would have taken to write and debug the map code myself.  With ChatGPT (or Claude or Gemini or your LLM of choice), I no longer needed to consider whether making that map was worth a week of my time because I could now accomplish it with about 30-60 minutes of active time while ChatGPT did the brunt of the work.

I began by double checking with the LLM whether I had an exhaustive list of single-country ETFs. It suggested three countries I hadn’t included, but it turned out these had been de-listed anyway. I ended up with a list of 44 countries that have dedicated US-listed ETFs.

Next, I simply told the LLM I wanted Python code to be able to generate a daily map of trailing 1-month returns for each of the countries in my list relative to the all-world index. I got semi-workable Python code within about 90 seconds. The rest of the minimal time invested was spent debugging and tweaking the output.

If I was doing this myself, any error would have resulted in combing line-by-line through the code, and if nothing obvious jumped out at me, searching for documentation on the map or data retrieval libraries and/or combing through old Stack Overflow posts. Each bug could have taken 1-4 hours to resolve on its own. Instead, I got workable, fixed code back within 30-120 seconds of LLM thinking time after sharing the error messages in the chat.

And with minimal effort, I now have a script I can run every day that generates the map below, allowing me to check in on the latest foreign stock market performance as part of my morning routine.

trailing 1 month
trailing 1 month

Authored by Andrew Rice

Source link