strategy-backtest

strategy-backtest is a skill for Claude Code from INo-xious/stockbit-mcp. It costs 50 tokens per session (611 once invoked), scanned A, original, MIT.

A skill for comparing trading strategies on an IDX stock symbol, testing the strongest candidates over time, and producing TradingView Pine Script. IDX refers to the Indonesia Stock Exchange.

In plain words
What is it for?
Use it to compare strategies, run walk-forward backtests, and hand a tested strategy to TradingView as Pine Script.
Why use it?
It helps compare ideas on historical data and account for trading fees, holding limits, and risk settings before treating a strategy as usable.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the stockbit plugin — 9 skills, 2 MCP servers shipped together

Good fit Use it to compare strategies, run walk-forward backtests, and hand a tested strategy to TradingView as Pine Script.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ino-xious/stockbit-mcp/strategy-backtest
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add INo-xious/stockbit-mcp --skill strategy-backtest
Clone the repo
git clone --depth 1 https://github.com/INo-xious/stockbit-mcp

Made for: Claude Code.

Or install stockbit, the plugin that ships this one along with the rest of its 9 skills, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for strategy-backtest

README.md
[![agentmods](https://agentmods.dev/badge/skills/ino-xious/stockbit-mcp/strategy-backtest/github.svg)](https://agentmods.dev/skills/ino-xious/stockbit-mcp/strategy-backtest)
Your own site
<a href="https://agentmods.dev/skills/ino-xious/stockbit-mcp/strategy-backtest"><img src="https://agentmods.dev/badge/skills/ino-xious/stockbit-mcp/strategy-backtest/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for strategy-backtest

Your own site · 80×15
<a href="https://agentmods.dev/skills/ino-xious/stockbit-mcp/strategy-backtest"><img src="https://agentmods.dev/badge/skills/ino-xious/stockbit-mcp/strategy-backtest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 611 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.00611
Opus 5.5 $0.00020 $0.00244
Sonnet 5.5 $0.00010 $0.00122
Haiku 4.5 $0.00005 $0.00061

Measured 1mo ago against content hash 05f62ff088f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

strategy-backtest scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/strategy-backtest/SKILL.md · 44 lines

How it starts

The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Strategy backtest

The sequence

  1. strategy_compare symbol=… — nine built-in strategies over the same bars, ranked. This is the cheap first pass: it tells you whether anything on this symbol has an edge worth testing properly, and the bars are fetched once for all of them.
  2. backtest symbol=… strategy=… on the one or two that stood out. Set walk_forward=true and give it folds. An in-sample result on two years of daily bars is a description of the past, and presenting one as a strategy is the single most misleading thing this server can be used to do.
    • Set commission_buy_pct and commission_sell_pct to the user's real fees. IDX defaults are roughly 0.15% buy and 0.25% sell, and the difference between gross and net is where most paper edges live.
    • stop_loss_pct, take_profit_pct and max_hold_bars change the answer more than the entry rule usually does.
  3. pine_script symbol=… kind=strategy to hand it to TradingView, with the entry and exit conditions carried across.

workflow_run name=strategy_check and name=pine_handoff package steps 1–2 and 3.

What to report, and what not to

  • warnings and inconclusive are the result, not a footnote. Read them out. If the backtest says the sample was too small, that is the answer to the user's question.
  • ARA/ARB-locked bars break fills. A limit-up day has no liquidity at the printed price. The backtester flags these; a strategy whose returns come from limit-locked entries did not happen.
  • Two years of daily bars is about 480 sessions. That supports claims about daily setups. It does not support a claim about monthly seasonality, and it does not survive being sliced by regime.
  • Trade count matters more than return. Nine trades with a 60% win rate is not a 60% win rate.
  • Never annualise a backtest or extrapolate it forward.

Presenting it

Give the net return after commission, the trade count, the maximum drawdown, and the walk-forward folds side by side — if fold three lost money, that belongs in the first paragraph. Then the warnings. Then, plainly: backtested results do not predict future returns, and this is not advice.

Read the full file on GitHub · 44 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 44 lines · 50 tokens per session scan A 05f62ff088f8

Subscribe to this mod's changes

strategy-backtest is a skill published in the GitHub repository INo-xious/stockbit-mcp (56 stars, last pushed 8d ago), licensed MIT. It adds 50 tokens to every session and 611 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.