
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.
- Installs
- 96
- Last 24h
- +18
- Trending rank
- #6296
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/jakeschincariol/day-trader-skill --skill trader-timemachine- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads trader-timemachine automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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. - Run
timemachine.py run --write. Add--until 15:55when the plan has a flat-by time, so "neither" means still open at the time you would get out. - Tell the user, in this order: the four odds, the median and the 5 to 95 range of the price at the close, the average R, the history line, then the verdict line and any line under it exactly as printed. Say the seed.
- If the verdict is a coin flip or close to break-even, say so plainly. Do not dress it up. If the history and the replays disagree, say that too.
- Say once that this is built from the last 60 days and is not a prediction.
Earnings, news and halts can do things those 60 days never did. Check
/trader-newsfor the stock before going on. - If the user still wants the trade, hand off to
/trader-budgetto size it.
Example: the reel
TSLA, Monday 2026-10-19. The 15-minute opening range is 354.47 to 362.18. The 10:10 bar closes above it: entry 364.18 at 10:15 AM (bar 8), stop 358.32 (the range midpoint, rounded down), target 370.04 (1R, risk 5.86 a share).
10,000 replays of the rest of the session, 10:15 AM to 4:00 PM (69 five-minute bars), seed 19.
target first 29.4 %
stop first 25.5 %
neither 45.1 % still open at 4:00 PM
green 51.7 % target first, or above the entry at 4:00 PM
Price at 4:00 PM: median 364.36, 90 % of replays between 355.54 and 373.54.
Average R: +0.034
History: the same rule on each of those 59 real sessions fired 33 times:
13 target, 15 stop, 5 neither. Average R -0.062.
Close to a coin flip: target first 29.4 % vs stop first 25.5 %.
45.1 % of the replays hit neither by 4:00 PM; the price at 4:00 PM decides those.
At 1R the target has to come first in half of the replays that hit one
side. It did in 53.6 %. The replays came out close to a coin flip, and the
real history was slightly worse than even. That is the honest answer for this setup, and it is what
the user should hear before /trader-budget sizes 8 shares.
Rules
- Every number comes from the run. Never round a coin flip up into an edge.
- The verdict line and the lines under it are printed by the tool. Repeat them, do not rewrite them. Never judge a 2R or 3R plan by target first vs stop first alone: the verdict already weighs the target's R.
- Simulated odds are not predictions and not promises. Say it once, plainly.
- Free Yahoo data is unofficial and can lag. Bars are 5-minute bars, checked bar by bar, never tick by tick and never real time.
- Always say the seed, so any run can be repeated.
- One plan per run. A changed entry, stop, target or date is a new run.
What it never does
It never places an order, never sizes a position, never changes the plan, and never calls a result a sure thing. It never prints a P&L or a profit. It never uses a bar that has not closed yet, and never mixes today's bars into the pool.
Safety
- Education and tooling, not financial advice. A PASS is a rules check, not a recommendation.
- Paper trading by default (
"paper": true). Going live is the user's own decision, in their own config. - Nothing in this pack places an order except trader-broker, and only when all three hold: trader-risk passed that exact order today, the user typed an explicit yes for that one order in the chat, and the user clicked Allow once on Claude's own card because the order tool is set to "Needs approval" (Customize > Connectors > tool permissions). Never set an order tool to "Always allow".
- No options, margin, short selling or leverage unless the config allows it and the user confirms.
- Broker keys live in environment variables or the Claude Desktop config, never in the chat.
FAQ
What does the trader-timemachine skill do?
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.
How do I install trader-timemachine?
Run npx skills add https://github.com/jakeschincariol/day-trader-skill --skill trader-timemachine in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/trader-timemachine/ (personal) or .claude/skills/trader-timemachine/ (project).
Which AI agents can use trader-timemachine?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is trader-timemachine safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains trader-timemachine?
It is published by jakeschincariol in jakeschincariol/day-trader-skill. It has 96 recorded installs.
More from jakeschincariol/day-trader-skill
trader-entry
jakeschincariol/day-trader-skill
Entry Timer. Watches a setup bar by bar and tells you the moment to get in. Reads free Yahoo 1-minute or 5-minute bars, builds the opening range (the first 15 minutes by default) and calls the entry on the first completed bar that CLOSES above the range high, or above a level you give it (like a 20-day high from the scanner), with an optional volume check. Says waiting and how far, triggered with the time and the price, expired, or not open yet, and writes trader/entry.json for /trader-exit. Long side only. It never places an order. Use when the user says "tell me when to get in", "watch TSLA", "has it broken out", "did it break the opening range", "entry signal", "time my entry", "check my watchlist", or after /trader-scanner and /trader-news, before /trader-exit.
trader-scanner
jakeschincariol/day-trader-skill
Chart Scanner. Scans thousands of charts for setups: opening-range breakouts, flags, oversold bounces. Builds the list of US-listed common stocks, ordinary shares and ADRs from Nasdaq Trader's symbol directories, runs a pre-market scan of daily closes (20-day closing-high breakout, bull flag, reclaimed the 20-day average, oversold, oversold bounce) and an intraday opening-range breakout scan on 5-minute bars, then writes trader/watchlist.json for trader-news and trader-entry. Free Yahoo data, bar by bar. Use when the user says "scan the market", "find me setups", "what is breaking out", "opening range breakouts", "scan for bull flags", "oversold stocks", "pre-market scan", "build my watchlist", "what should I look at today", or at the start of a trading day before /trader-news.
trader-exit
jakeschincariol/day-trader-skill
Exit Planner. Sets your stop and your target before you enter, so you know when to get out. Reads the entry from trader-entry (or a price you give), puts the stop at the opening-range midpoint by default (or the range low, your price, a percent, or a multiple of the ATR), rounds it down to the cent, and sets the target at 2R (or 1R, or your price). Refuses a stop at or above the entry, a target at or below it, or a stop too tight to survive the spread, and says why. Writes trader/plan.json for the Time Machine, the Budget Manager and Price Alerts. Long side only. Use when the user says "where's my stop", "set my stop and target", "plan the exit", "when do I get out", "stop loss", "what's my R", "risk reward", or right after /trader-entry triggers, before /trader-timemachine.
trader-risk
jakeschincariol/day-trader-skill
Risk Manager. Checks every trade against your limits and stops anything over them, before it can reach the broker. For a day trade: a stop is required, the loss at the stop must fit your max loss per trade (measured from the higher of the plan's entry and a fresh price), reward:risk must meet your minimum, the day's total risk must fit your daily loss limit, no more than your trades per day, and no new entries outside your entry window or when the market is closed. It also keeps the basics: blocked tickers, order size, position cap, cash buffer, margin, short sales, options and crypto, malformed or bad bracket orders, duplicates and a daily order limit. Getting out is never blocked by a day limit. Prints PASS or BLOCK with the reason and records the verdicts so trader-broker only shows an order that passed. Use when the user says "check my order", "is this safe", "risk check", "does this break my rules", "can I take this trade", "how much have I risked today", or before /trader-broker,
trader-analyst
jakeschincariol/day-trader-skill
The Earnings Analyst. Reads a company's reported numbers straight from SEC EDGAR (XBRL company facts from its 10-Qs and 10-Ks, plus the latest earnings 8-K and its press release) and sums up what changed: revenue, gross, operating and net margins, net income and diluted EPS, quarter by quarter, each against the same quarter a year earlier, with the trailing twelve months. Reads an earnings call transcript when you paste one. Use when the user says "how did Tesla's earnings look", "analyze the earnings", "what changed this quarter", "is revenue growing", "check the 10-Q", "compare margins", "sum up the call", "does it report this week", or before trading a stock around its earnings.
trader-budget
jakeschincariol/day-trader-skill
Budget Manager. Sizes every position to your budget and your max loss per trade. Reads the trade plan from trader-exit (entry, stop, target), finds the whole shares that fit inside four limits (max loss per trade, position cap, max order, cash after your buffer), says which limit decided it, and writes ONE bracket order (entry, stop-loss, take-profit) to trader/orders.json in the exact shape of Alpaca's placestockorder. A stop too far away for your max loss is a plain refusal, not a smaller order. Nothing is placed. Use when the user says "how many shares", "size this trade", "how much should I buy", "I have $5,000", "I only want to risk $50 a trade", "set my rules", "keep 10% in cash", or after /trader-exit writes a plan.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.