Rule Trade - Japanese equity verification layer

jp.ruletradePublished by ruletrade.jpOfficial publisherv0.2.0Updated Oct 24, 2026

Verified Japanese equity studies: 50 anomalies, 26 indicators, 12 candlesticks, events, ETF decay.

VerifiedStreamable HTTPWeb executableFinanceData & Analytics

Overview

AI-generated overview

Remote MCP server that returns published backtest statistics for Japanese equity rules: anomalies, indicators, candlestick patterns, event reactions and…

What you can do
  • Read daily rule matches and market regime: one stock matching a published moving-average rule, plus regime, circuit-breaker state, VIX, Nikkei 225 and a three-axis score
  • Review verification studies: 50 anomalies over 61 years, 26 technical indicators, 12 candlestick patterns, event reactions and leveraged/inverse ETF decay, with win rates, profit factors and p-values
  • Filter studies by name, pattern or event and request detailed breakdowns
  • Read a guide covering update times, delays, what is deliberately withheld and the disclaimer
When to use it
Useful when an assistant needs to answer questions about how mechanical Japanese equity rules, indicators or patterns have historically performed, or wants a statistical, non-advisory view of market conditions and event reactions.
Requirements
A remote Streamable HTTP endpoint; no API key, registration or local runtime is needed. Data updates on Japanese exchange trading days, and several study datasets are fixed snapshots from book publication rather than daily data.
Before you install
Results are statistics about mechanical rule matches, not investment advice, ratings or buy/sell signals; every response carries a disclaimer that should not be stripped when relaying. The server deliberately withholds raw prices, position sizing, entry/exit and stop levels, and full lists of matching stocks. Rate limits are not enforced today, so usage should stay reasonable.

Installation

In SourceWeft

  1. Open Rule Trade - Japanese equity verification layer in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/jp.ruletrade%2Fmcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "rule-trade-japanese-equity-verification": {
      "type": "http",
      "url": "https://ruletrade.jp/mcp"
    }
  }
}

README

Rule Trade MCP / ルールトレード MCP

Endpoint: https://ruletrade.jp/mcp (llms.txt: https://ruletrade.jp/mcp/llms.txt · OpenAPI: https://ruletrade.jp/mcp/openapi.json · health: https://ruletrade.jp/mcp/health)


English

A verification layer for Japanese equities, exposed over MCP.

Most Japanese-equity MCP servers cover the primary data layer — filings, prices, order execution. This one covers what is missing: what actually happened when published, mechanical rules were applied. It holds no engine of its own; it reads JSON that an existing pipeline publishes daily and reshapes it. Zero dependencies, no API key, no registration.

What you can get

ToolReturns
get_daily_signalsOne stock that matched a published mean-reversion rule (25-day moving-average deviation ≤ -15%), delayed one trading day. Counts are returned; the full list of matches is not distributed.
get_market_regimeMachine-classified market regime (BULLISH / NEUTRAL / BEARISH / PANIC), circuit-breaker state, VIX, Nikkei 225, daily history, and a three-axis score (trend, short-term risk, supply and demand) with the reasoning behind each axis. No stock names.
get_anomaly_summary50 Japanese market anomalies tested over 61 years — verdict, win rate, mean return, sample size, p-value, control group. Filter by name. Plus five crash-precursor gauges and a 7-flag ignition meter verified over 26 years.
get_candlestick_verdictAll 12 classic Japanese candlestick patterns tested on 1,550 TSE Prime stocks over 10.5 years — trades, win rate, profit factor, excess return, p-value, losing years, and which of the five adoption criteria each one failed. None of them cleared the bar. The one with the highest profit factor (3.04) flipped sign between the first and second halves of the sample.
get_event_reactionWhat followed an event, from three separate studies — 27 event types (earthquakes, rate decisions, tariffs, pandemics), post-earnings drift across ~26,000 announcements, and index additions and deletions. All three point the same way: the move happens before the event clears. Per-stock rows and sector baskets are deliberately excluded.
get_indicator_verdict26 technical indicators traded exactly as the textbooks describe — TOPIX500, 10 years, ~500,000 trades. Win rate, expectancy, profit factor and excess return over random entry, across two exits. Nine cleared every regime; thirteen did not, and those thirteen are mostly the ones beginners learn first.
get_etf_decayTwelve years of measured decay in leveraged and inverse ETFs — yearly theory against actual, win rate by holding period, profit factor by market condition, and 305 attempts to hold and wait for a position to come back (99.3% came back; the ones that did not lost 32.5%).
list_tools_guideUpdate times (JST), delays, what is deliberately not returned, disclaimer, roadmap. Call this first.

What you cannot get — by design

  • Raw price series, OHLCV, or financial-statement values
  • Position sizing, entry/exit prices, stop-loss or take-profit levels
  • The production thresholds used by the operator's own system
  • Any recommendation, rating, or buy/sell signal

Every response carries a disclaimer key. Do not strip it when relaying results to a user. Output describes whether mechanical rules matched. It is not investment advice, not a solicitation, and promises no future return.

How to connect

bash
# Claude Codeclaude mcp add --transport http ruletrade https://ruletrade.jp/mcp
  • claude.ai: Settings → Connectors → Add custom connector → https://ruletrade.jp/mcp
  • Any MCP client: POST JSON-RPC 2.0 to https://ruletrade.jp/mcp (Streamable HTTP, stateless)

Where the research comes from

The rules and verification data are published as books by the operator (Japanese, Kindle): Silent Investor BNF, Crashes Decay, and All 50 Japanese Market Anomalies Tested Over 61 Years. The anomaly dataset is a fixed snapshot taken at that book's publication (2026-08) and is not updated daily.

Good to know

  • Data updates on Japan Exchange trading days. Exact times are in list_tools_guide.
  • Rate limits are not enforced today. Please be reasonable.
  • Statistical values are rounded; p-values use 3 significant figures so very small values stay readable.

日本語

kaburadar.jp / ruletrade.jp が毎日公開している検証済みJSON(docs/*.json)を、 AIエージェント(Claude / Cursor / ChatGPT 等)から MCP で読めるようにする 変換層 です。 エンジンは持たず、GitHub raw の JSON を読んで整形するだけ。依存パッケージゼロ。

正規URL は https://ruletrade.jp/mcp。実体は Cloudflare Workers だが、 ruletrade.jp(Vercel)の vercel.json で rewrite しているため、配信先が変わっても利用者側の URL は変わらない。

ツール読むJSON内容
get_daily_signalsfree_scanner.jsonBNF 25日線乖離ルールの該当銘柄(1営業日遅れ)。返すのは1件のみ・件数は返す
get_market_regimeradar.json / market_jiai.json / radar_history.json / score3.json地合い BULLISH〜PANIC・HALT・VIX・日経・履歴 + 3軸スコア(トレンド/短期リスク/需給・5段階・軸ごとの根拠)
get_anomaly_summaryanomaly_results.json / gauge.json / crash.jsonジンクス50本の検証結果(61年・判定/勝率/p値。name で絞り込み)+ 『暴落は、減衰する』5つの前兆 + 着火メーター(26年検証)
get_candlestick_verdictcandlestick_verdict.json酒田五法12本の検証結果(東証プライム・10年半)。12本すべて不採用・落ちた基準・不採用の理由。pattern で絞り込み(日英の別名可)
get_event_reactionevent_reaction.json / earnings_drift.json / supply_demand_events.json出来事のあとに何が起きたかを3つの検証から。①出来事27種(地震・利上げ・関税ほか) ②決算後のドリフト ③指数の入替。event で絞り込み(地震 / 決算 / TOPIX など)
get_indicator_verdictindicator_verdict.jsonテクニカル指標26種の検証結果(TOPIX500・10年・約50万回)。使える9 / 条件付き4 / 捨てろ13・8区分のどこで基準に届かなかったか。name で絞り込み(日英の別名可)
get_etf_decayetf_decay.jsonレバレッジ・インバースETFの減価(12年の実測)。年別・保有日数別・条件別と「戻るまで待つ」305回の結果。各節の「解釈で注意すべき点」を必ず添える
list_tools_guide(静的)使い方・更新時刻・遅延・免責・今後の予定

法務線は人向けサイトと同一:

  • 銘柄を返すのは1件だけ(2026-09-17 に上位3件から縮小)。該当した全銘柄の一覧は配布しない。件数は返す
  • 推奨語(推奨/おすすめ/買うべき/儲かる 等 src/legal.js の NG_WORDS)は出力から伏せ字にする
  • 全レスポンスに disclaimer キーを常設
  • 価格・株数・利確/損切ライン・本番の調整済み閾値は出さない(free_scanner.json 生成時点で既に落ちている)
  • ジンクス検証は判定結果と統計値(勝率・平均・標本数・p値)のみ。格言の本文(saying)は推奨語を含むため出力しない
  • 書籍の検証も統計値のみ。銘柄名・銘柄コード・銘柄バスケットは返さない。元データに併存する明細(連想の baskets.csv 499行・決算の events_raw.csv・自社株買いの buyback_*.csv 5,523行)は生成側でも開いていない
  • 書籍から取り込む文章は mcp/tools/legal_check.py が JSON を書き出す前に検査する。伏せ字(scrub)は最後の砦で、そこに頼ると「各[表現調整]点の日経平均」のように文の意味が壊れる
  • ETFのコード(1357 等)だけは返す。何を検証したかを示す識別子で、個別株を名指しするのとは別

データの出どころ

docs/*.json は既存の生成側(Python)が毎日書き出しているもの。MCP は読むだけで、生成側は一切触らない。

docs/anomaly_results.json / docs/candlestick_verdict.json / docs/event_reaction.json / docs/indicator_verdict.json / docs/etf_decay.json / docs/earnings_drift.json / docs/supply_demand_events.json の7つは 日次ではなく 書籍刊行時点の固定データ。後の2つは mcp/tools/build_*.py で検証の生出力から機械変換し、 mcp/tools/verify_*.py で元CSVと1つずつ突き合わせている(手で書き写さない)。

docs/anomaly_results.json だけは日次ではなく 書籍刊行時点(2026-08)の固定データ。 元は 株式投資開発/jinx_verification/results/results.json(このリポジトリの外)で、 JSON 非対応の NaN を null に置換したコピー。更新するときは同じ手順でコピーし直す。

エンドポイント

パス内容
POST /mcpMCP Streamable HTTP(JSON-RPC・ステートレス)
GET /health5つのJSONが読めるか確認
GET /llms.txtエージェント向けの説明(英語主・日本語従)
GET /openapi.jsonOpenAPI 3.1。JSON-RPC を1エンドポイントとして記述
GET /概要

デプロイ(どちらか一方でOK・スマホのブラウザから完結)

A. Cloudflare Workers(推奨: ログ保持が長い・無料枠 10万req/日)

  1. Cloudflare ダッシュボード → Workers & Pages → Create → Import a repository
  2. リポジトリ stock-trading- を選ぶ → Root directory に mcp を入れる
  3. Build command は空、Deploy command は npx wrangler deploy(既定のまま)
  4. Deploy → Worker の実体は https://ruletrade-mcp.<account>.workers.dev/mcp。 利用者に案内するのは正規URL https://ruletrade.jp/mcp(ruletrade.jp の site/vercel.json が rewrite する)。 Worker の URL が変わったときは site/vercel.json の2行と src/tools.js の CANONICAL_* を直す
  5. ログ: Worker → Logs(wrangler.toml の observability で有効化済み)。event:"tool_call" で絞ると呼び出し数が見える

B. Vercel

  1. vercel.com → Add New Project → リポジトリ stock-trading- を Import
  2. Root Directory を mcp に変更、Framework Preset は Other
  3. Deploy → https://<project>.vercel.app/mcp がエンドポイント
  4. ログ: Project → Logs(Hobby は保持1時間なので、集計したい場合は下の LOG_WEBHOOK を使う)

動作確認(デプロイ後にブラウザで開くだけ)

  • https://ruletrade.jp/mcp/health → "ok": true なら完了
  • Worker 直の https://ruletrade-mcp.<account>.workers.dev/health でも同じものが見える(切り分け用)

接続(正規URLを使う。*.workers.dev は案内しない)

  • Claude(claude.ai): 設定 → コネクタ → カスタムコネクタを追加 → URL に https://ruletrade.jp/mcp
  • Claude Code: claude mcp add --transport http ruletrade https://ruletrade.jp/mcp
  • 最初に list_tools_guide を呼ぶよう initialize の instructions で案内している

環境変数(すべて任意)

変数用途
DATA_BASEJSONの取得元(既定: GitHub raw の docs/)。リポジトリ非公開化時に差し替え
ANOMALY_URL検証JSONを別配信先に置く場合に指定。get_anomaly_summary の jinx_verification_external にそのまま入る(通常は不要。既定は docs/anomaly_results.json)
LOG_WEBHOOK呼び出しログ(1行JSON)をPOSTする先。GAS/Slack/Sheets 等で集計したい場合
CACHE_TTL_MSインスタンス内キャッシュ(既定 60000)

呼び出しログの形: {"ts","event":"tool_call","tool","args","ok","ms","scrubbed","client"} (initialize 時は clientInfo も記録。実際にどう使われているかを見るための数字)

ローカル

bash
cd mcpnpm test        # 実際の docs/*.json をフィクスチャに35テスト(推奨語ゼロ・銘柄コードゼロの検査を含む)node dev.js     # http://localhost:8787/mcpcurl -s localhost:8787/healthcurl -s -X POST localhost:8787/mcp -H 'content-type: application/json' \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_market_regime","arguments":{"history_days":5}}}'

今後

  • run_rule_backtest は、検証基盤(backtest_grid)ができた時点で検討。エンジンは二重に作らない
  • Week 1 は「読むだけ」。書き込み・発注・個別助言に相当する機能は入れない

Source: mcp/README.md at commit 1907eae

Tools

8

get_daily_signals

公開ルールに該当した銘柄(1件・1営業日遅れ)

公開ルール(BNF 25日線乖離が -15% 以下)に該当した銘柄を返す。★返すのは1件だけ★(該当した全銘柄の一覧は配布しない)。件数は返すので「今日は何件あったか」は分かる。1営業日遅れ(前営業日の終値で判定)。価格・株数・利確/損切ラインは含まない。該当は機械的な条件への一致であって、売買の判断ではない。

Parametersstrategy

get_market_regime

地合い判定(BULLISH/NEUTRAL/BEARISH/PANIC)と3軸スコア

本番システムが日中に更新している相場環境の判定、サーキットブレーカー(HALT)状態、VIX、日経平均、当日シグナル件数を返す。あわせて3軸スコア(トレンド・短期リスク・需給をそれぞれ -2〜+2 で採点し、合計 -6〜+6 を5段階に分けたもの)と、各軸がその点数になった理由・5営業日以内の大型イベントを返す。銘柄名は含まない。オプションで日次履歴も返す。相場の予想ではない。

Parametershistory_days

get_anomaly_summary

アノマリー検証結果(ジンクス50本)+暴落前兆(傾斜計5・着火メーター7)

日本株の言い伝え(アノマリー/ジンクス)50本を61年分の日経平均データで検証した結果(判定・勝率・平均リターン・標本数・p値)を返す。name を渡すとその名前を含むものだけに絞り込める(例: セルインメイ, 節分天井, 干支)。あわせて、5つの暴落前兆(逆イールド・CAPE・信用膨張・過熱・引き締め)の点灯状況と、着火メーター(7フラグ・20営業日以内に-10%が起きた過去の割合)の現在値も返す。detail=true で年代別の内訳・統計表・書籍上の根拠を含める。返すのは判定結果と統計値のみで、価格系列や財務値は含まない。

Parametersnamedetail

get_candlestick_verdict

酒田五法12本の検証結果(採用ゼロ本)

三尊天井・赤三兵・三空叩き込みなど酒田五法12本を東証プライム1,550銘柄・10年半で検証した結果を返す。取引回数・勝率・PF・平均超過収益・p値・負け年・5つの採用基準のどれで落ちたか・不採用の理由を含む。12本すべてが採用基準を満たさなかった(採用ゼロ本)。最も PF の高い三空叩き込み(PF 3.04)も、期間を前半と後半に分けると符号が反転するため不採用としている。pattern を渡すとその形だけに絞り込める(日本語・英語の別名可。例: 三尊, head and shoulders, 赤三兵)。detail=true で保有日数別・相場環境別の内訳を含める。銘柄名・銘柄コード・価格は含まない。

Parametersdetailpattern

get_event_reaction

出来事のあとに何が起きたか(3つの検証)

ある出来事のあとに何が起きたかを、3つの検証からまとめて返す。(1)出来事27種 — 地震・利上げ・円安・関税・パンデミックなどのあと、市場全体を上回る動きがあったか。判定は 持続型/初動型/不発/逆行/市場全体のみ の5種類と、5つの窓(当日/翌日/5営業日後/1か月後/3か月後)の超過収益・勝率・p値。(2)決算後のドリフト — 決算発表のあと値動きが続くか。約26,000件の決算で検証。(3)指数の入替 — TOPIX の採用・除外でいつ・どちら向きに動くか。3つは別々のデータから同じ形を示している: 反応は出来事を通過する前か、ごく初期に終わる。出来事27種の「初動型」は翌朝の寄り付きで終わり、決算後のドリフトは+5日で統計的に消え、指数の入替は実施日で止まる。event を渡すと絞り込める(例: 地震, earthquake, 利上げ, 決算, PEAD, TOPIX, 日経225)。省略すると3つの見出しを返す。銘柄名・銘柄コード・銘柄バスケットは含まない。返すのは分類と統計だけ。

Parameterseventdetail

get_indicator_verdict

テクニカル指標26種の検証結果(使える9 / 条件付き4 / 捨てろ13)

RSI・MACD・移動平均クロス・ボリンジャーバンドなどテクニカル指標26種を、教科書どおりの買い方で TOPIX500・10年・約50万回の売買として検証した結果を返す。勝率・期待値・PF・ランダムな売買との超過収益を、出口2種類(20営業日で手仕舞い / 8%トレーリング)で返す。判定は 使える9個 / 条件付き4個 / 捨てろ13個 の3段。「使える」の基準は8区分(出口2 × 上昇/下落/前半/後半)すべてで超過収益が +0.3% を超えること。捨てろ13個には入門書の最初に出てくる指標が並んでいる。name を渡すとその指標だけに絞り込める(日本語・英語の別名可。例: RSI, 一目, ichimoku, 乖離率)。detail=true で8区分すべての内訳を含める。銘柄名・銘柄コード・価格は含まない。

Parametersnamedetail

get_etf_decay

レバレッジ・インバースETFの減価(12年の実測)

日経ダブルインバース(1357)などレバレッジ・インバース型ETFを12年・2,964営業日ぶん実測した結果を返す。年別の理論値と実績・保有日数別の勝率と理論との乖離・地合い条件別の PF と最大ドローダウン・「戻るまで待つ」を305回試した結果を含む。日々の値動きを2倍にする商品なので、上下を往復するだけで元に戻らない(日経が+10%のあと-9.1%で元の水準に戻る2日間で、100→80→94.5)。検証結果には各節の「解釈で注意すべき点」を必ず添えて返す(日経が12年で約4倍になった上昇相場のデータであるため)。detail=true で地合い条件別の72通りを含める。日足の価格系列と個別株の銘柄情報は含まない。

Parameterscodedetail

list_tools_guide

使い方ガイド・データ更新時刻・免責

このサーバーの全ツール(8本)の説明、データの更新タイミングと遅延、返さないものの一覧、免責事項、今後の予定を返す。最初に一度呼ぶことを想定。

Takes no parameters.

Version history

2
  1. v0.2.0LatestSep 18, 2026
  2. v0.1.0Sep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.