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 post-event price direction land around coin-flip accuracy. I'm a freelance web developer in Japan, not a quant, and I knew that if I let an LLM "predict" anything I would just be laundering my own wishful thinking through a chatbot.
So I gave Claude Code a different job description. In my project's CLAUDE.md — the standing instructions file the agent reads every session — there's a hard rule:
No predictions. Data only. The AI's role is limited to four things: (1) structuring data, (2) computing factual metrics, (3) checking facts against pre-defined rules, (4) explaining results with sources. Trading decisions are rule-based. Overfitting to past data is a hidden prediction — prefer economically sensible rules.
Claude Code's job was to be the engineer: build the data pipeline, implement backtests I specified, and then — this is the important part — kill my ideas with evidence. Over a few weeks it killed three of them. Here's the honest record.







