AI Cuts Weeklong ETF Mapping Task to One Hour
An ETF strategist used ChatGPT to generate Python that maps one‑month returns for 44 US-listed country ETFs versus the all‑world index in about an hour.
Andrew Rice, an ETF strategist at Algorithmic Investment Models, used a large language model to produce Python code that generates a daily map of trailing one‑month returns for 44 US‑listed country ETFs relative to the all‑world index. He described the work in a recent newsletter.
Rice began by asking the model to verify his list of single‑country ETFs. The LLM suggested three additional countries; those ETFs were already delisted, leaving a final set of 44 funds with dedicated US listings. He then requested code that would create a choropleth‑style map showing each country’s one‑month return versus the global index.
The model produced semi‑functional code within roughly 90 seconds. Rice spent additional time debugging and adjusting the script through the chat interface. He reported that errors which might have taken hours to solve manually were fixed in short LLM response cycles, often within 30 to 120 seconds after sharing error messages.
Rice estimated that the active work he performed took about 30 to 60 minutes in total. He contrasted that with the week of development and debugging that the same task would likely have required before the use of generative AI. He also noted that individual bugs could have demanded one to four hours each if handled without LLM assistance.
Rice used ChatGPT and mentioned alternatives such as Claude and Gemini as viable options for the task. He said there was no revenue motive for the map and that he built it as a convenience tool for his morning routine; he now runs the script daily to monitor how foreign stock markets are performing against the global index.
In the newsletter, Rice framed his view on AI spending and market valuations separately from the tools themselves, writing that his skepticism focused on AI capital expenditures and company valuations rather than on the usefulness of the models. He documented the workflow steps-checking the ETF list, generating code, iterating on errors and integrating the script into daily use-and attributed the faster turnaround to the rapid iteration enabled by chat‑based LLMs.








