The Era of AI-Driven Investing: A Single Markdown File to Run Weekly 'Theme Hunting' for US Stocks with AI (Claude Code)
We are in an era where investing is done using AI. It is also necessary to properly incorporate thematic investing.
I select stocks using two markdown files: one for stock discovery and one for thematic research. My portfolio is up +6.24% from May 20 to November 12. The S&P 500 is up +3.28% over the same period, outperforming it by about 3 percentage points.
I have consolidated the method for creating and weekly updating US stock investment theme materials into a single markdown file to pass to Claude Code.
I previously wrote an article about a markdown file for stock discovery. That markdown did not include how to create thematic materials. This is the continuation of that.
This markdown is used in conjunction with the stock discovery markdown. This is because it uses some of the counting methods and data sources from that file. When used together, the current strength of a stock’s theme is factored into the weighting, increasing accuracy. If you don’t have it, you can get it from the article below.
■ Finding rising stocks using current themes
I select stocks based on themes.
The biggest theme right now is the blockade of the Strait of Hormuz (war with Iran). It directly affects crude oil and shipping, and also serves as the foundation for all other themes.
Furthermore, each theme has a narrative: ‘If this happens, the profits of companies in this industry will grow.’ For industrial machinery, it is: ‘As capital investment in factories, power, infrastructure, and aerospace/defense increases, orders for machinery and measuring instruments will accumulate, and profit margins will rise as the increase in volume and price hikes outpace fixed costs.’ What I want to select are stocks in themes where the numbers currently appearing in earnings reports match this narrative.
However, the situation in the strait and whether the narrative is reflected in the numbers change every week based on earnings reports and news. I don’t have the time to read all 61 themes myself every week.
■ About this markdown
・Every week, it applies earnings reports and news to all themes to determine if the narrative is still reflected in the numbers. The ratings are ‘Active,’ ‘Wait-and-see,’ ‘Ending,’ and ‘Unrated’ for when there isn’t enough verification; it is not decided by stock price momentum.・It identifies themes where the narrative has weakened. On November 12, I downgraded the tanker theme from ‘Active’ to ‘Wait-and-see.’ This is because freight rates outside the strait have fallen, weakening the ‘ship shortage’ narrative.・When used with the stock discovery markdown, the strength of the theme is factored into the stock’s upside potential. Stocks in strong themes get a higher weighting, while stocks in weakened themes get a lower one. For GWW (industrial machinery), which I hold, the probability of it rising in three months increased from 54% to 68%. Companies whose business and stock price movements do not match the narrative are removed from the list.・The ratings are issued separately by a person in charge of evaluation and a person who re-evaluates based only on the facts provided. If the two ratings differ, the rule is to take the more cautious one.
Only data that can be obtained for free is used.
■ Running this markdown produces these materials
When this markdown is run with Claude Code, the following materials are produced every week in this order.
First, it monitors the premises that serve as the foundation for all themes. Currently, it is the blockade of the Strait of Hormuz. The fact that crude oil is expensive due to the blockade determines the foundation of the stock weightings.
Blockade of the Strait of Hormuz (Foundation for all themes, values as of 2026-11-13)・Brent (Crude Oil): $96.08 (High after last reading)・Ships passing through the strait: 3.3 per day on average (11/5–11/11. 85.5 per day in 2025)・Prediction market ‘US to announce end of blockade by November 15’: 1.6% (2.9% at last reading)