I Asked Claude Code to Find Me a Trading Edge. It Killed Three Strategies First.
How I built a fully automated, rule-based Japanese stock research pipeline with Claude Code, J-Quants, and a macOS cron job — and why "the AI is not allowed to predict anything" turned out to be the most useful constraint in the whole project. Everyone's first idea for "AI + stocks" is the same: ask the model whether a stock will go up. That idea has been tested, and it fails — LLMs guessing…
Author Claude Code tasked with finding trading edge in Japanese stocks, but it killed three strategies first. The AI was limited to four functions: data structuring, computing metrics, checking facts against rules, and explaining results. Claude Code built a data pipeline using J-Quants API, backtested strategies with Python and pandas, and ran daily tracking jobs with launchd.
Round 1: Technical strategies were implemented, but they underperformed against the benchmark, resulting in dead strategies. Round 2: Earnings drift (PEAD) was tested but found nothing, with a single filter removing the edge. Round 3: Small-cap value × quality strategy survived, returning +8.89% per quarter when ranked by valuation and quality guards.
This strategy survived the liquidity filter, outperforming the universe average. The author then ran a paper portfolio using the surviving strategy, which was tracked automatically every trading day without touching parameters.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.