trader-timemachine
БесплатноЗапускает вложенные скриптыНе проверен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…
от Jakeschincariol★ 10 420 звёзд на GitHubОб этом скилле
trader-timemachine
The Time Machine sits between the plan and the money. trader-exit has set the entry, the stop and the target. Before anything is sized or sent, this skill asks one question: if today plays out like the stock's own last 60 days, how often does this plan hit the target first, the stop first, or neither? It answers with 10,000 replays and with the real record of the same rule on every past session. It is a simulation built from the stock's own recent bars, not a prediction. Day trading loses most people money, and a good-looking replay does not change that.
${CLAUDE_SKILL_DIR} below is this skill's folder (where this SKILL.md lives).
python3 "${CLAUDE_SKILL_DIR}/timemachine.py" run # trader/plan.json, 10,000 replays, seed 19
python3 "${CLAUDE_SKILL_DIR}/timemachine.py" run --write # also save trader/timemachine.json
python3 "${CLAUDE_SKILL_DIR}/timemachine.py" run --until 15:55 # end each replay at your flat-by time
python3 "${CLAUDE_SKILL_DIR}/timemachine.py" run --json
python3 "${CLAUDE_SKILL_DIR}/timemachine.py" run --symbol TSLA --date 2026-10-19 \
--entry 364.18 --stop 358.32 --target 370.04 --entry-time "10:15 AM"
python3 "${CLAUDE_SKILL_DIR}/timemachine.py" chart --from # ASCII fan chart of the saved run
Other flags: --replays N, --seed N (default 19), --window N (default 2
bars), --offline FILE (a saved Yahoo chart JSON, .json or .json.gz),
--now "2026-10-19 10:15" (New York time) to pin the clock.
What it reads and writes
| file | what |
|---|---|
trader/plan.json |
the plan from trader-exit: symbol, date, entry, entry_time / entry_bar, stop, stop_rule, target, target_r, opening range |
| Yahoo chart API | one request: 60 days of 5-minute bars (range=60d&interval=5m), free and unofficial, can lag |
trader/timemachine.json |
with --write: {plan, mc, history} plus the verdict. mc holds the odds, percentiles, the fan-chart bands, 160 sample paths and a 24-bin histogram of the close |
How it works
- The pool. It keeps only FULL sessions before the plan's date: all 78 five-minute bars, 9:30 to 4:00 New York time. Half days, gaps and today are left out. Every bar becomes four ratios to the bar before it: open, high, low and close over the previous close.
- One replay. Start at the entry price. For each bar left in the day, pick a past bar from the same time of day (plus or minus 2 bars) at random, and scale it to the current price. Bar by bar, it checks the stop first, then the target. A bar that touches both counts as the stop.
- 10,000 replays give four odds. Target first. Stop first. Neither,
which means the trade was still open at
--until(default 4:00 PM, the close, or 1:00 PM on an NYSE early-close day). Green, which means target first or above the entry at--until. R is +1 at a 1R target, -1 at the stop, and otherwise the distance from the entry at--untildivided by the risk. A gap through the stop still counts as -1R here. A real fill can be worse. - The history. The plan's own rule (the same opening range, stop rule and target R) runs again on every one of those past sessions. That is what really happened, not a simulation.
- The verdict is one line from the numbers. It looks only at the replays that hit one side, and asks how often the target came first. A bigger target needs to win less often to break even: 1 in (1 + R). That is 50 % at 1R, 33 % at 2R, 25 % at 3R. Less than 5 points from break-even: "Close to a coin flip" at 1R, "Close to break-even" at any other R. 5 to 15 points: "Leans toward the target" or "Leans toward the stop". 15 or more: "Strongly toward" one of them. So a 2R plan with target first 24.1 % and stop first 50.5 % is close to break-even (it needs 33 % of the 74.6 % that hit a side, and got 32 %), not a loser.
- Below the verdict, when it applies: a line when more than 40 % of the
replays hit neither (the price at
--untildecides those), and the average R when its sign goes against the lean. Those can only point the other way because of the replays that hit neither.
The seed. The draws come from Python's random.Random(seed), seed 19 by
default. Same plan, same data, same seed: the same numbers, on any machine.
Say the seed with every result so the user can repeat it.
5-minute bars only. Yahoo keeps 60 days of 5-min bars but only about 7 days of 1-min bars, too few sessions for a fair pool. It refuses, in one plain line, when there are fewer than 20 full sessions, when the entry bar is not in the data (wrong date, not closed yet, a future day), or when the plan does not make sense (a stop above a buy's entry, an entry off the 5-minute grid). A live in-progress bar is never used.
Steps
- Make sure
trader/plan.jsonis today's plan from/trader-exit. If there is none, run that first, or pass the plan as flags.
Установить trader-timemachine в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл trader-timemachine?
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.
Как установить скилл trader-timemachine?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл trader-timemachine запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic