# Backtest a Solana memecoin strategy with AI

> **Coming soon.** Occam's AI connection is not open yet. This page describes how it will work, and access opens soon. Until then the Occam MCP server and REST API at `mcp.occam.co` do not answer, and the setup steps below cannot be completed yet.

Occam lets an AI assistant backtest a Solana memecoin strategy for you. You describe the idea in plain words; the assistant turns it into rules on Occam's token metrics, checks the rules, and runs an Occam simulation over recent market data. The result is reported after fees, with the most recent third of the window held out as a separate check.

Occam calls a backtest a simulation. Running one never places a trade.

## What you need

- An Occam account whose wallet qualifies for simulations (`get_usage` says whether it does).
- An AI app connected to Occam's MCP server, `https://mcp.occam.co/mcp` once access opens (coming soon): see [Connect Claude to Occam](https://app.occam.co/docs/ai/connect-claude-to-occam.md) or [Connect ChatGPT or Cursor to Occam](https://app.occam.co/docs/ai/connect-chatgpt-cursor-to-occam.md). Or call the REST API from your own code with an API key.
- The simulate permission on that connection or key.

## What a strategy is in Occam

An Occam algorithm is a set of rules plus a take-profit:

- **Rules** filter tokens by metrics such as Market Cap, Total Token Holders or Bot Wallet Share. A token signals when every rule matches. `list_metrics` lists the metrics, and `get_metric` gives each one's unit and accepted bounds.
- **Take-profit** says when to sell, for example at 2x the entry price, 100% of the position.

## The loop

1. **Find metrics.** The assistant calls `list_metrics` with search words from your idea and `get_metric` for each candidate.
2. **Check the rules.** `validate_spec` returns every error and warning at once, such as a bound outside a metric's range or a metric that is often missing on very young tokens.
3. **Simulate.** `simulate` runs the rules over the last 1 to 30 days (default 7). It waits up to about 20 seconds; a longer run is fetched with `get_simulation`.
4. **Read the result** (below), change one thing, and simulate again.
5. **Look at what separates winners.** `winners_stats` shows, for one rule metric, how tokens that reached 2x read at entry compared with the rest.
6. **Keep it.** If you agree, `create_algorithm` saves it in your account, live and unpublished.

Example request to give your assistant:

> Using Occam, build me an algorithm that catches tokens between $40k and $150k market cap with more than 150 holders and under 40% bot wallets. Simulate it over the last 7 days and tell me the hit rate and median multiple after fees, then suggest one change to improve it.

## How to read a result

- **Outcome.** `edge_candidate` means positive after fees for a follower in both the earlier part and the held-out third, with enough distinct tokens. `no_edge_found` is a normal result, not an error. `inconclusive` means it was positive in the earlier part only, or there were too few tokens.
- **After fees.** Figures include Occam's platform fee and, on the subscriber basis, the creator commission a follower pays. `fee_basis` shows the percentages used. Priority fees and tips are not included, so figures are slightly optimistic.
- **Hit rate.** `win_rate` is the share of tokens whose after-fee multiple is above 1.
- **Held-out third.** The latest third of the window is scored separately in `heldout`. A result that holds up there is more convincing, but it is a check, not a guarantee.
- **Short windows.** Under 7 days the result carries a `short_window` caution: treat it as provisional.
- **Configurations tried.** `configurations_tried` counts the distinct rule sets you simulated in the last 30 days. The more you try, the more likely a good result is luck. Change one thing at a time.
- **Token rows.** Each row shows a token's entry time and price, peak, multiple, and what each rule's metric read at entry (`rule_values`).

## Limits

At launch: 100 simulations a day per account, one open simulation at a time, resetting at 00:00 UTC. Calling simulate again with the same input reuses the run and counts nothing.

## What a simulation does not tell you

Past results do not predict future results. Memecoins are volatile and many go to zero. Nothing Occam returns is financial advice.
