Logo Trader Timemachine

Trader Timemachine

Cộng đồng
Jakeschincariol
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.

Add to TypingMind

Tổng quan

Nhà phát hànhJakeschincariol
Kho mãday-trader-skill
Tên kỹ năngtrader-timemachine
Sao
617
Bản fork
119
Tệp đi kèm
1
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Jakeschincariol công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Trader Timemachine trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Jakeschincariol/day-trader-skill/tree/main/trader-timemachine
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Jakeschincariol/day-trader-skill.git /tmp/day-trader-skill
mkdir -p .claude/skills
cp -r /tmp/day-trader-skill/trader-timemachine .claude/skills/trader-timemachine
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Trader Timemachine trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Trader Timemachine ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Trader Timemachine với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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).

bash
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

filewhat
trader/plan.jsonthe plan from trader-exit: symbol, date, entry, entry_time / entry_bar, stop, stop_rule, target, target_r, opening range
Yahoo chart APIone request: 60 days of 5-minute bars (range=60d&interval=5m), free and unofficial, can lag
trader/timemachine.jsonwith --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

  1. 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.
  2. 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.
  3. 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 --until divided by the risk. A gap through the stop still counts as -1R here. A real fill can be worse.
  4. 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.
  5. 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.
  6. Below the verdict, when it applies: a line when more than 40 % of the replays hit neither (the price at --until decides 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

  1. Make sure trader/plan.json is today's plan from /trader-exit. If there is none, run that first, or pass the plan as flags.
  2. Run timemachine.py run --write. Add --until 15:55 when the plan has a flat-by time, so "neither" means still open at the time you would get out.
  3. 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.
  4. 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.
  5. 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-news for the stock before going on.
  6. If the user still wants the trade, hand off to /trader-budget to 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.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Trader Timemachine làm được gì?

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 t...

Vì sao nên dùng Trader Timemachine trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Trader Timemachine là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Trader Timemachine trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Jakeschincariol/day-trader-skill/tree/main/trader-timemachine. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Trader Timemachine?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Trader Timemachine với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Trader Timemachine với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Trader Timemachine có miễn phí không?

Có. Kỹ năng này được Jakeschincariol phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇