# Trader timemachine

> Trader timemachine is an open-source agent skill for finance and payments. Simulates a day-trade plan's odds of hitting target or stop from 60 days of bars. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/Merrymen-Labs/merrymen/tree/main/plugins/merrymen-trader/skills/trader-timemachine
- **Repository:** https://github.com/merrymen-labs/merrymen
- **GitHub stars:** 52
- **License:** MIT
- **Skill name:** trader-timemachine
- **Collection:** https://github.com/Merrymen-Labs/merrymen
- **Categories:** [finance and payments](https://ai-powered.com/categories/finance-and-payments)
- **Listing updated:** 2026-12-01

## About

This skill takes a day-trade plan with an entry, stop and target and replays the rest of the session 10,000 times. Each replay is built from scaled 5-minute bar moves drawn from the same time of day over the stock's last 60 full sessions, and it checks the stop before the target on every bar. The output reports the share of replays that reach target first, stop first, or neither by a chosen flat-by time, along with the median and range of the closing price and the average R.

The skill also runs the same rule on each past session in the stock's recent history, so the user can compare the simulated odds against what actually happened. A short verdict weighs the win rate against the break-even rate implied by the target's R multiple. The run uses a fixed random seed so results can be reproduced, and it is meant to be called after a plan is written and before any position sizing.

It expects a plan file or flags for symbol, date, entry, stop and target, plus Python 3 and access to Yahoo's free, unofficial chart data for 5-minute bars. Charts can be saved to a JSON file or printed as an ASCII fan chart.

## When your agent uses it

> Time Machine. Replays every possible outcome of a trade before you risk a dollar: 10,000 simulated sessions plus every past time the setup fired. Takes the plan from trader-exit (entry, stop, target), rebuilds the rest of the day 10,000 times from the stock's own 5-minute bars over the last 60 days, and re-runs the same rule on every past session. Prints the odds of target first, stop first, or neither by the close, where the price sits at the close, the average R, the history, and one honest verdict, then hands off to /trader-budget. Use when the user says "run the time machine", "replay this trade", "what are the odds", "simulate this trade", "monte carlo", "backtest this setup", "how often does this hit the target", "is this a coin flip", or after /trader-exit writes a plan, before /trader-budget.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs Python scripts](https://github.com/Merrymen-Labs/merrymen/tree/HEAD/plugins/merrymen-trader/skills/trader-timemachine)
- [Network calls found in its scripts](https://github.com/Merrymen-Labs/merrymen/tree/HEAD/plugins/merrymen-trader/skills/trader-timemachine)
- [License: MIT](https://github.com/Merrymen-Labs/merrymen/tree/HEAD/plugins/merrymen-trader/skills/trader-timemachine)

## Features

- **Monte Carlo replays:** Runs 10,000 simulated sessions from the stock's own recent 5-minute bars, with a configurable seed.
- **Target versus stop odds:** Reports how often a plan hits its target first, its stop first, or neither by the close.
- **Historical rule check:** Re-runs the same plan rule on each past full session to show the real record.
- **Break-even verdict:** Compares the win rate with the break-even rate implied by the target's R multiple.
- **Price distribution output:** Shows the median and 5 to 95 percent range of the closing price plus an average R figure.
- **Saved run and chart:** Writes results to a JSON file and renders an ASCII fan chart of the saved run.

## Good for

- Check how often a planned breakout trade would have hit its target before its stop
- Replay an intraday entry with a set stop and target to see the simulated spread of outcomes
- Backtest a day-trading setup against the stock's last 60 sessions
- Decide whether a trade plan is close to a coin flip before sizing the position

## Install

### Claude Code

This skill ships in the `merrymen-trader` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Merrymen-Labs/merrymen
/plugin install merrymen-trader@merrymen
```

Or copy only this skill to `~/.claude/skills/trader-timemachine`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Merrymen-Labs/merrymen.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/trader-timemachine &&
cp -R "$tmp/plugins/merrymen-trader/skills/trader-timemachine" ~/.claude/skills/trader-timemachine &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/trader-timemachine` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/trader-timemachine` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Merrymen-Labs/merrymen.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/trader-timemachine &&
cp -R "$tmp/plugins/merrymen-trader/skills/trader-timemachine" ~/.agents/skills/trader-timemachine &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/trader-timemachine` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/trader-timemachine` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Merrymen-Labs/merrymen.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/trader-timemachine &&
cp -R "$tmp/plugins/merrymen-trader/skills/trader-timemachine" ~/.cursor/skills/trader-timemachine &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/trader-timemachine` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Merrymen-Labs/merrymen.git --path plugins/merrymen-trader/skills/trader-timemachine
```

Or copy the folder to `~/.gemini/skills/trader-timemachine` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/trader-timemachine`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Merrymen-Labs/merrymen.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/trader-timemachine &&
cp -R "$tmp/plugins/merrymen-trader/skills/trader-timemachine" ~/.copilot/skills/trader-timemachine &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/trader-timemachine` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Merrymen-Labs/merrymen.git
```

Then copy `merrymen/plugins/merrymen-trader/skills/trader-timemachine` into your agent's skills folder as `trader-timemachine`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It needs Python 3 and a plan file from trader-exit or the entry, stop and target given as flags. It fetches 60 days of 5-minute bars from Yahoo's unofficial chart API.

### Does Trader timemachine place trades or size positions?

No. It never places orders, never sizes a position and never changes the plan. It hands off to trader-budget for sizing.

### How is the simulation built?

Each replay takes past 5-minute bars from the same time of day, scales them to the current price, and checks the stop before the target on each bar.

### What happens when the data is insufficient?

It refuses with a short message when there are fewer than 20 full sessions, when the entry bar is missing, or when the plan does not make sense.

### Is the result a prediction?

No. The odds come from the stock's last 60 days of bars and do not account for earnings, news or halts.

### How do I install Trader timemachine in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/trader-timemachine to use it in all your projects, or to .claude/skills/trader-timemachine in one project. Or install the merrymen-trader plugin, which includes it: /plugin marketplace add Merrymen-Labs/merrymen, then /plugin install merrymen-trader@merrymen.

### Does Trader timemachine run scripts?

Yes. It runs Python scripts. Its scripts contain network calls. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Trader timemachine?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Trader timemachine?

The closest alternatives to Trader timemachine are Trader exit, Trader entry, Trader scanner, Trader alerts and Qmt inner backtest.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Trader exit](https://ai-powered.com/skills/trader-exit): Trader exit is an open-source agent skill for finance and payments.
- [Trader entry](https://ai-powered.com/skills/trader-entry): Trader entry is an open-source agent skill for finance and payments.
- [Trader scanner](https://ai-powered.com/skills/trader-scanner): Trader scanner is an open-source agent skill for finance and payments.
- [Trader alerts](https://ai-powered.com/skills/trader-alerts): Trader alerts is an open-source agent skill for finance and payments.
- [Qmt inner backtest](https://ai-powered.com/skills/qmt-inner-backtest): Qmt inner backtest is an open-source agent skill for finance and payments.
- [Trader budget](https://ai-powered.com/skills/trader-budget): Trader budget is an open-source agent skill for finance and payments.
- [Trader broker](https://ai-powered.com/skills/trader-broker): Trader broker is an open-source agent skill for finance and payments.
- [Trader risk](https://ai-powered.com/skills/trader-risk): Trader risk is an open-source agent skill for finance and payments.

---
Source: https://ai-powered.com/skills/trader-timemachine
