lona-backtest

lona-backtest is a command for Claude Code from mindsightventures/lona-agent-skills. It costs 15 tokens per session (329 once invoked), scanned A, original, MIT.

A complete workflow for testing an algorithmic trading strategy against historical market data and examining the results.

In plain words
What is it for?
Use it to create or select a strategy, download Binance data when needed, run and monitor a backtest, inspect performance metrics, and view trades on a chart.
Why use it?
It coordinates the separate steps of selecting or creating a strategy, preparing data, running the test, and reviewing its outcome.

Command for Claude Code

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

Part of the lona plugin — 3 skills, 3 commands, 1 agent, 1 MCP server shipped together

Good fit Use it to create or select a strategy, download Binance data when needed, run and monitor a backtest, inspect performance metrics, and view trades on a chart.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/mindsightventures/lona-agent-skills/lona-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.

Clone the repo
git clone --depth 1 https://github.com/mindsightventures/lona-agent-skills

Made for: Claude Code.

Or install lona, the plugin that ships this one along with the rest of its 3 skills, 3 commands, 1 agent, 1 MCP server.

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 lona-backtest

README.md
[![agentmods](https://agentmods.dev/badge/commands/mindsightventures/lona-agent-skills/lona-backtest/github.svg)](https://agentmods.dev/commands/mindsightventures/lona-agent-skills/lona-backtest)
Your own site
<a href="https://agentmods.dev/commands/mindsightventures/lona-agent-skills/lona-backtest"><img src="https://agentmods.dev/badge/commands/mindsightventures/lona-agent-skills/lona-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 lona-backtest

Your own site · 80×15
<a href="https://agentmods.dev/commands/mindsightventures/lona-agent-skills/lona-backtest"><img src="https://agentmods.dev/badge/commands/mindsightventures/lona-agent-skills/lona-backtest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 329 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.
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.00015 $0.00329
Opus 5 $0.00008 $0.00164
Sonnet 5 $0.00003 $0.00066
Haiku 4.5 $0.00002 $0.00033

Measured 10d ago against content hash 4d1e6d275f42, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

lona-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 10d 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.

commands/lona-backtest.md · 29 lines

What it actually says

Lona Backtest Workflow

Execute a complete backtesting workflow: select or create a strategy, ensure market data is available, run the backtest, and analyze results.

Steps

  1. Check existing strategies - Use lona_list_strategies to see available strategies
  2. Select or create strategy - Either pick an existing strategy or create a new one:
    • From code: lona_create_strategy
    • From description: lona_create_strategy_from_description (async, poll with lona_get_strategy_creation_status)
  3. Check market data - Use lona_list_symbols to see available data
  4. Download data if needed - Use lona_download_market_data to get data from Binance
  5. Run backtest - Use lona_run_backtest with the strategy ID and data IDs
  6. Monitor progress - Poll lona_get_report_status every 5-10 seconds until COMPLETED or FAILED
  7. View results - Use lona_get_report for summary or lona_get_full_report for detailed analysis
  8. Visualize trades - Use lona_get_report_chart to see trade entries/exits

Ask the user

  • Which strategy to test (or describe one to create)
  • Which market/symbol to test on
  • What date range to backtest
  • Any specific parameters (initial cash, commission, leverage)
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. 10d ago First seen · 29 lines · 15 tokens per session scan A 4d1e6d275f42

Subscribe to this mod's changes

lona-backtest is a command published in the GitHub repository mindsightventures/lona-agent-skills (4 stars, last pushed 6mo ago), licensed MIT. It adds 15 tokens to every session and 329 once invoked, about $0.0001 per session on Opus 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-31.