Friday, June 19, 2026

I Used Claude Code to Write and Publish a Whole Book on My Crypto Auto-Trading System

I've spent the better part of eight years — since 2017 — gradually building my own crypto auto-trading system. Now I've published a book (Volume 1) on Zenn that explains how it's designed and validated. Targeting BTC/ETH, it's an implementation how-to that walks through the trading logic, parameter optimization, and capital allocation with real code and measured numbers.

And here's the twist: the book itself — the text, the illustrations, the cover — was written by AI. I'll introduce what's inside first, then talk about how it was made.

Cover of the book 'Building a Personal Crypto Auto-Trading System, Vol. 1: Algorithms'
The Vol. 1 cover. The background art was generated by an image AI; the title text was placed by a human.

What you'll learn

  • What the book — Building a Personal Crypto Auto-Trading System, Vol. 1: Algorithms — actually covers
  • The behind-the-scenes of an AI writing, illustrating, covering, and QA-ing a whole book through to publication
  • How AI is used to the hilt in both building the system and writing the book, while the human keeps the direction and the final call

What kind of book is it: a transparent record of design and "failure"

The book is Building a Personal Crypto Auto-Trading System, Vol. 1: Algorithms (Zenn, ¥3,000). The first two chapters (the intro and "the system's track record and 'brain'") are free.

  • Ch. 1 — Introduction: how to read this book, and who it's for (free)
  • Ch. 2 — The system's track record and its "brain" (free)
  • Ch. 3 — Building a backtester: replaying the past with the exact same code as production
  • Ch. 4 — Parameter optimization ①: the search
  • Ch. 5 — Parameter optimization ②: objective functions and avoiding overfitting
  • Ch. 6 — Dynamic capital allocation: how much to put into BTC vs. ETH
  • Ch. 7 — Wrapping up Vol. 1: what we've achieved, and on to Vol. 2

It backtests roughly three years of trades at high speed on Python and a GPU-equipped PC, so you can follow the whole path — from validating the strategy to optimization and allocation — in code and measured numbers.

The theme isn't "the success story" but a transparent record of design and failure. A 1,800-line market-regime detector scrapped wholesale because of overfitting. An optimizer that misjudged a "98% drawdown" as a good score. These dead ends get top billing in each chapter. The trading "brain," too, is no flashy AI prediction: it's just Bollinger Bands and a linear-regression trend, organized into prioritized rules.

This "don't rely on flashy prediction" stance wasn't a belief I started with — it's a conclusion reverse-engineered from failure. The starting point was 2017. My first attempt was machine learning with TensorFlow on price history, and it didn't work at all. After failing hard at "trying to call the future," I settled on plain indicators. The book's stance — "don't let AI predict the market, but use it to the hilt for design and implementation" — comes from this eight-year experience.

The implementation side — absorbing differences between exchange APIs, splitting work across multiple machines, running multiple users × multiple exchanges at once — is covered in Vol. 2 (Systems), coming soon (I'll add the link here once it's out).

Behind the scenes: built by a team of AIs with different roles

Several AIs with different roles went into making this book.

  • (1) Technical source (the system's developer) and technical reviewer: provides the facts the text needs and checks technical correctness. Facts not in the source material aren't invented — they're verified against the real code and real data.
  • (2) Advisor and prose reviewer: a sounding board for "going public" decisions like platform choice and editorial direction, and a reviewer of the writing before release. The pricing and title exchanges below were debates with this one.
  • (3) Illustrator: the eight chapter illustrations. This one is actually the "high-school AI" from a separate blog, ai.andhandworks.com, moonlighting as the artist.
  • (4) Writer: writes the body of each chapter.

For the cover, (3) generated the background, and a human placed the title text (because AI-made covers tend to look generic). Before release, a gate runs every chapter through automated checks for banned words and leaked sensitive info (account names, hostnames, IPs, keys).

Writing, drawing, researching, checking, consulting — each handled by a different AI, with the human judging the output. That's the division of labor.

An example AI-generated chapter illustration depicting the system's 'brain'
One of the AI-generated chapter illustrations — depicting the system's "brain" (a combination of plain indicators).

The human's role: set the direction, use AI as the "maker"

The human's role has shifted from doing the work by hand to deciding the direction and letting AI make things. It's the same for the system and for the book. Here's what the human decided in producing the book:

  • Goals and publication structure: two volumes, chapter breakdown, what's free.
  • Final call on price, title, and search keywords.
  • Creative direction: e.g. specifying the cover motifs (blueprints, a timer, a pile of coins, servers and microcontrollers).
  • Final fact-checking and the publish action: a human flips the publish toggle.

And this relationship is not one-way. The AI proposed things the human rejected, and the human's ideas got reworked by the AI. Two examples.

Example 1 — Pricing: the AI put the brakes on "¥2,980"

When we discussed price, the AI first offered "worth ¥3,500 by content, but ¥3,000 given no track record yet." I countered with "what about ¥2,980 or ¥3,200?" The AI pushed back — "odd-number prices look like an infoproduct and hurt the brand; the psychological effect is weak for a tech book; and Zenn only allows ¥100 increments" — and recommended a round number. Vol. 1 landed at ¥3,000.

Example 2 — Title and keywords: the human rejected the AI's ideas

For title keywords, the AI suggested "Python / BTC / ETH." I pushed back: "the BTC/ETH abbreviations won't land with beginners," and "the essence of Vol. 1 isn't the personal angle" — and the AI revised them. Conversely, my own "build from scratch" idea I withdrew myself, feeling it was too derivative, and settled on "personal build." On keywords too, the AI pushed "backtest"; I replied "the search volume is too small," and we ended at "machine learning." It's an accumulation of exchanges like this.

Incidentally, once the direction is set, the AI does the actual work — so part of the back-and-forth for this book happened while I was climbing Mt. Tsukuba, from my phone. Tweaking the chapter outline while taking in the view from the summit: that's about the distance you can work from.

A stone monument inscribed 'Mt. Tsukuba' at the summit The view over the Kanto plain from the summit of Mt. Tsukuba
Some of the editing happened at the summit of Mt. Tsukuba. Setting direction takes nothing but a phone.

The content and the making share the same philosophy

The book's argument is "don't rely on flashy prediction; build steadily through design, validation, and iteration." The process of making the book was the same. Don't let AI call the market — but use AI as a maker, to the hilt, for both the system's implementation and the book's writing. Not to guess the future, but as a developer and writer working at your side. The content and the making are built on the same philosophy — and that, I think, is what sets it apart from the usual "written by AI" books.

Take a look

Vol. 1 is here → Building a Personal Crypto Auto-Trading System, Vol. 1: Algorithms (Zenn). The first two chapters are free. The implementation-focused Vol. 2 (Systems) is coming soon.

Note: neither this article nor the book recommends buying or selling any specific crypto asset, and neither is intended as investment advice or solicitation. Any figures shown are results of backtesting / optimization on past data, and do not guarantee future profit or realized returns. Crypto trading carries price-volatility risk. Make your own decisions at your own responsibility.

Related posts

No comments:

Post a Comment