# How to Backtest with Claude or ChatGPT on Point-in-Time Data

Source: https://finzdata.com/learn/backtest-with-claude-chatgpt

Step by step: connect Claude, ChatGPT or any AI to FinzData Alpha Factory and backtest trading ideas honestly, with every trial counted and checked.

# How to Backtest with Claude or ChatGPT: A Step-by-Step Guide

AI assistants are good at turning a trading idea into rules and code. They are less good at the part that decides whether the idea is real: an honest backtest on clean data, with every attempt counted. If you ask Claude or ChatGPT to backtest on its own, it will usually guess at data, skip costs and keep the best of many tries without telling you.

FinzData Alpha Factory fixes that by giving your AI a research engine to work in. This guide shows how to connect it and run a full session.

## What you need

- An AI assistant. Alpha Factory works with Claude, ChatGPT, Grok, Gemini, Perplexity, Qwen, Kimi, GLM, Llama and local models.

- A way to connect it: the FinzData MCP server, the REST API (OpenAPI), packages or plugins.

- Nothing else to start. The keyless start needs no key, no form and no card, and gives you the last 6 months of data with 20 trials a day. A free email account opens the last 12 months.

## Step 1: Connect your AI

Open the [FinzData connect page](https://finzdata.com/mcp) and follow the instructions for your assistant. MCP-capable assistants such as Claude can add the FinzData MCP server directly. Assistants that work with OpenAPI actions can use the REST API instead. Once connected, your AI can call Alpha Factory on its own.

## Step 2: Give it a goal

Start with a clear, testable goal. Name the market, the condition the strategy must survive and the question you want answered:

Use FinzData Alpha Factory to find a /ES strategy that survives 2022, and tell me if it is real.

A specific goal keeps the session focused and makes the final verdict easy to read.

## Step 3: Let the session run the six functions

Alpha Factory gives your AI six functions. A good session uses them in order:

- **Start a session.** This opens a ledger where every trial is recorded.

- **See what is known and crowded.** Your AI checks what has already been tested and published, so it does not rediscover the same idea.

- **Run a trial.** Your AI proposes and builds a strategy, and Alpha Factory runs it on point-in-time data.

- **Review the ledger.** Every trial, good or bad, is listed. This is what keeps the result honest.

- **Promote.** When a candidate looks strong, your AI asks for it to be judged against the publication gates.

- **Autopilot.** For longer searches, the loop of goal, propose, build, run, score and learn can continue on its own within your limits.

## Step 4: Read the verdict

Promotion is strict. A strategy must clear six gates: a deflated Sharpe ratio of at least 0.95 at the true trial count, beating its benchmark on unseen validation data, staying profitable at 2x costs, surviving plus or minus 20% on every parameter, at least 100 trades or 5 years of evidence, and correlation below 0.8 to anything already published.

If it passes, a hidden hold-out of the latest 24 months opens once and decides. Failures are published too, and nothing is quietly re-run. The full design is on the [Alpha Factory research page](https://finzdata.com/research/alpha-factory-ai-trading-research-engine).

## Why not just ask the AI to backtest?

Because AI calls are not evidence on their own. In the FinzData AI Macro Tournament Round 1, 12 AI models from 7 labs made 83 calls on 9 US economic release days. They agreed with each other 84% of the time but were right on only 29 of 83 calls. Following their consensus lost 6.7%.

A backtest your AI writes from memory has the same weakness. It may use data that was revised after the fact, skip companies that were delisted, or forget how many variants it tried. Alpha Factory runs every trial on point-in-time data: 16,000+ US stocks since 2000 including delisted names, 5,100+ ETFs, 139 futures markets with every contract since 2007, end-of-day options chains since 2010 and 22,700+ macro series with every vintage kept.

## What happens after a strategy passes

Published strategies get a public Hub page and a forward record, Verified at 63, 126 and 252 sessions. Your AI found the idea; the forward record shows whether it holds up.

## FAQ

### Can ChatGPT or Claude backtest a trading strategy?

They can write the rules and the code, but on their own they cannot vouch for clean data or count trials. Connected to Alpha Factory, they run every trial on point-in-time data with a full ledger and a strict verdict.

### Do I need an API key to start?

No. The keyless start needs no key, no form and no card. It covers the last 6 months of data with 20 trials a day.

### Which AI models work with Alpha Factory?

Claude, ChatGPT, Grok, Gemini, Perplexity, Qwen, Kimi, GLM, Llama and local models, through the MCP server, the REST API, packages and plugins. See the [Alpha Factory research page](https://finzdata.com/research/alpha-factory-ai-trading-research-engine).

This material is for information only and is not investment advice.

## Related

- [Can AI Find a Profitable Strategy? AI Trading, Tested Honestly](https://finzdata.com/learn/ai-trading-strategy-test)

- [Best AI Trading Bot? Test the Strategy Behind It First](https://finzdata.com/learn/best-ai-trading-bot-checklist)

- [Backtest Overfitting: Walk-Forward Tests and Point-in-Time Data](https://finzdata.com/learn/overfitting-walk-forward-point-in-time)

- [FinzData Alpha Factory: AI Trading Research & Backtesting Engine](https://finzdata.com/research/alpha-factory-ai-trading-research-engine)

- [Deflated Sharpe Ratio Explained](https://finzdata.com/learn/deflated-sharpe-ratio)

- [Look-ahead bias](https://finzdata.com/learn/look-ahead-bias)

- [Survivorship bias](https://finzdata.com/learn/survivorship-bias)

- [Why backtests lie](https://finzdata.com/research/why-backtests-lie)

- [AI Macro Tournament 2026](https://finzdata.com/research/ai-macro-tournament-2026)

- [Connect your AI](https://finzdata.com/mcp)
