AI calc infrastructure

Don't trust AI-written backtest.Use verified primitives.

AI に Sharpe を 何 度 も 再 実装 さ せ ない。

Deterministic finance primitives for Claude, Cursor, Codex, ChatGPT — backed by 9 months of dogfooded FX backtest engine.

AI に 計算 さ せる の で は なく、 AI が 呼ぶ 計算 infra を 提供。 MCP server + REST API 両 経路、 7 日 trial → 月 ¥980。

Same numbers every time. 100× faster than AI rewriting. Audit-ready.

claude-desktop

You: Sharpe ratio of EURJPY with RSI(14) strategy?

Claude: calling fx_backtest.run

{
  "strategy": "rsi_oversold",
  "symbol":   "EURJPY",
  "params":   { "rsi_period": 14 }
}

verified, deterministic, 187 ms

Claude:

Sharpe:      1.42
Max DD:      -8.3%
Win rate:    54.1%
Profit factor: 1.78

How it works

Stop letting AI reinvent your Sharpe ratio.3 steps to deterministic finance.

I built this because I was tired of Claude reinventing Sharpe every chat session. Now my AI agent calls verified primitives instead.

  1. Get a license key

    Sign up on the dashboard, choose a plan, and get an API key + MCP license in under 60 seconds.

    ダッシュボード で sign up → Stripe で plan 選択 → API key + MCP license を 60 秒 で 取得。

  2. Wire it into your AI

    Add the MCP server to Claude Desktop / Cursor / Codex config, or use the REST API directly from any framework.

    Claude Desktop / Cursor / Codex の config に MCP 追加、 or 任意 言語 から REST API を 直接 call。

  3. Ask. AI does the rest.

    Tell your agent what to test. It fetches data, calls our verified primitives, and returns deterministic results.

    AI に 検証 内容 を 質問 する だけ。 data 取得 + 計算 + 結果 整理 を AI が orchestrate。

Calc primitives

8 primitives. Same numbers every time.

Verified engine, not AI-generated code. 9 months of dogfooded development. 303 unit tests + multi-round adversarial review.

9 ヶ月 投資 の 検証 済 engine。 303 件 test + Codex 多 round review。

  • run_backtest

    Execute strategy across OHLC, return trades + equity curve.

    戦略 を OHLC で 実行 + trade + equity curve 返却。

  • calc_sharpe

    Risk-adjusted return — annualized, deterministic, audit-ready.

    risk-adjusted return = 年率化 + 決定的 + 監査 可能。

  • calc_maxdd

    Peak-to-trough drawdown + duration + recovery time.

    最大 drawdown + 期間 + 回復 時間。

  • run_walkforward

    Anchored or rolling WFO with purged splits — no lookahead.

    anchored / rolling WFO + purged split = look-ahead なし。

  • run_montecarlo

    Bootstrap returns, get distribution of outcomes + percentiles.

    bootstrap で 結果 分布 + percentile 返却。

  • optimize_grid

    Brute-force parameter sweep with explicit budget cap.

    パラメータ grid 全 探索 = 明示 上限 付き。

  • optimize_genetic

    Evolutionary search over high-dim parameter space.

    遺伝 アルゴリズム で 高 次元 パラメータ 探索。

  • compare_strategies

    Side-by-side stats across N strategies, single call.

    N 戦略 を 1 call で 並列 比較 = 統計 / metric matrix 返却。

Two transports, one engine

Reach the same engine from anywhere your AI lives.

Call our primitives from Claude Desktop, Cursor, Codex, ChatGPT Custom GPTs, your own LangChain agent — or plain curl. Same shared core, two transports.

同 計算 engine = 2 transport で 提供。 AI agent でも 任意 言語 でも 同 result。

MCP server

stdio protocol

Plug into Claude Desktop, Cursor, Codex CLI, ChatGPT Desktop, or any MCP-compatible IDE.

Claude Desktop / Cursor / Codex CLI / ChatGPT Desktop / 任意 MCP 対応 IDE に config 1 行 で 統合。

{
  "mcpServers": {
    "quantprims": {
      "command": "npx",
      "args": ["@quantprims/mcp"],
      "env": { "LICENSE_KEY": "fxb-…" }
    }
  }
}

REST API

HTTPS + JSON

Call from any framework, language, or web UI. Same primitives, generic HTTP transport.

任意 言語 / framework / web UI から HTTP で call。 同 primitives、 汎 用 transport。

curl https://api.quantprims.com/v1/calc_sharpe \
  -H "Authorization: Bearer fxb-…" \
  -d '{ "returns": [...] }'
Both backed by the same shared/ core — 9 months of dogfooded TypeScript primitives.

Why trust this

AI is fast. AI is wrong sometimes.Wolfram-grade primitives fix that.

Same story as Wolfram Alpha for math — when correctness matters, you call a verified engine, not let the LLM reinvent it.

Wolfram Alpha が GPT 時代 で も 数式 path で 棲み分け を 保つ 同 構造。

  • Deterministic

    Same input → same output, every time. No AI hallucination drift between sessions.

    同 input = 同 output 保証。 AI 毎回 別 実装 で 数値 ブレる path 撤廃。

  • 100× faster iteration

    Verified primitives return in ~0.1s. AI re-implementing Sharpe each time takes 5-20s.

    検証 済 primitives = 0.1 秒。 AI 毎回 code 書く path 比 100×。

  • Audit-ready

    9 months of TypeScript primitives. 303 unit tests. Multi-round adversarial review log.

    TypeScript primitives 9 ヶ月 投資 + 303 件 test + Codex 多 round review 履歴。

  • Safe boundary

    Schema-constrained inputs + read-only data. No prompt injection, no arbitrary execution.

    schema 制約 input + read-only data = prompt injection 隔離、 任意 実行 risk なし。

Pricing

Founder dogfood pricing.

This is what I pay myself. One plan, all features. Try 7 days free.

founder 本人 が 毎日 払う 想定 price。 1 plan + 全 機能 同 access、 7 日 trial 後 課金。

Free trial

7 days, no card required

¥0for 7 days
  • All 8 calc primitives
  • MCP server + REST API
  • Up to 2 devices per license
  • Audit log + reproducibility
  • Email support
Start trial
Recommended

Pro

Founder dogfood pricing

¥980/ month
  • All 8 calc primitives
  • MCP server + REST API
  • Up to 2 devices per license
  • Audit log + reproducibility
  • Email support
Get license key

※ 商用 利用 に つい て = 投資 助言 業 非該当 確認 (= 弁護士 書面 取得 path) を 進行 中。 数字 だけ 返す path (= 評価 channel 削除) で 設計 済。 利用 規約 参照。

FAQ

Common questions

Can I use this from ChatGPT, not just Claude?ChatGPT でも 使え ます か? Claude 限定 で は?

Yes. The REST API works from any HTTP client — Claude, ChatGPT Custom GPTs (Actions), Gemini, Cursor bash, LangChain, plain curl, your own SDK. MCP transport additionally covers Claude Desktop / Cursor / Codex CLI / IDE clients.

YES = REST API は 任意 HTTP client (= ChatGPT Custom GPT Actions / Gemini / curl / LangChain / 任意 言語 SDK) から call 可能。 MCP transport は Claude Desktop / Cursor / Codex CLI / IDE client carry。

How do I wire it into Claude Desktop?Claude Desktop に 設定 する 方法 は?

Add a single block to claude_desktop_config.json with the MCP server command + your LICENSE_KEY env var. Full setup snippet on the docs page. Takes under 2 minutes.

claude_desktop_config.json に MCP server 起動 command + LICENSE_KEY env を 追加 する だけ。 詳細 sample = docs ページ 参照、 2 分 以内 完了。

Can I use this commercially?商用 利用 可能 です か?

Single-license commercial use (= personal trading research, consulting prep) is intended. We are completing a lawyer-signed opinion on non-applicability to Japanese investment advisory law (= 投資 助言 業) before formal launch. Until that is published, treat commercial use as best-effort.

個人 商用 利用 (= 自己 投資 検証、 consulting 準備) 想定。 日本 法 投資 助言 業 非該当 弁護士 書面 取得 path 進行 中、 launch 前 公開 予定。 それ まで 商用 利用 は best-effort。

Isn't this giving investment advice?これ は 投資 助言 で は?

No. The engine returns numbers (= Sharpe / max drawdown / win rate / etc.) — never recommendations, evaluations, or buy/sell signals. The 'number-only' path was a 13-round refactor specifically to drop investment advisory law risk from 20-35% to 2-5%. Interpretation is on you (or your AI agent).

NO = 数字 (= Sharpe / max DD / win rate / etc.) のみ 返却、 推奨 / 評価 / 売買 signal なし。 「数字 だけ 返す」 path = 13 round 改修 で 投資 助言 業 該当 risk 20-35% → 2-5%。 解釈 は user (or AI agent) 責任。

Where does the price data come from?価格 data の 出所 は どこ です か?

We don't supply price data. You (or your AI agent) pass OHLC arrays as input — sourced from your broker export, paid data API, or your own collection. Same structure as Wolfram Alpha for math: bring your numbers, we calculate. Data source compliance is your responsibility.

data 提供 し ま せん。 OHLC array を input で 渡す path (= broker export / 有料 API / 自前 収集 から)。 Wolfram Alpha 同 構造 = 数式 を 渡す と 計算 結果 を 返す。 data 出所 規約 適合 性 は user 責任。

What's covered by the license?license で カバー さ れる 範囲 は?

All 8 calc primitives, both transports (MCP + REST), up to 2 devices per license, full audit log + reproducibility. No feature lock between trial and paid — only the time window changes.

8 primitives 全 + MCP + REST 両 transport + 2 device / license + audit log + reproducibility。 trial と paid 間 で feature lock なし、 期間 制限 のみ。

What happens to fx-backtest.com web simulator?既 fx-backtest.com web simulator は?

Legacy web simulator remains available at /simulator for existing users. New development focus is on the MCP + REST API path. Web UI gets maintenance-only.

既 user 向け に /simulator 維持 (= freeze)。 新 開発 = MCP + REST API path 集中、 web UI は maintenance only。