lona-trading

lona-trading is a cursor rule for Cursor from mindsightventures/lona-agent-skills. It costs 0 tokens per session (605 once invoked), scanned A, original, MIT.

Guidelines for using Lona tools to create, manage, and backtest algorithmic trading strategies, which are automated buy-and-sell rules.

In plain words
What is it for?
Use them when creating or updating Python strategies, generating one from a written description, browsing market data, downloading cryptocurrency data, or running backtests.
Why use it?
They explain which tools to use for strategy code, market data, and historical testing.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use them when creating or updating Python strategies, generating one from a written description, browsing market data, downloading cryptocurrency data, or running backtests.

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

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-trading

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/mindsightventures/lona-agent-skills/lona-trading"><img src="https://agentmods.dev/badge/rules/mindsightventures/lona-agent-skills/lona-trading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 605 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.00000 $0.00605
Opus 5 $0.00000 $0.00302
Sonnet 5 $0.00000 $0.00121
Haiku 4.5 $0.00000 $0.00060

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

Security

Grade A, and why

lona-trading 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 12d 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.

rules/lona-trading.mdc · 65 lines

How it starts

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

Lona Trading Strategy Development

When working with trading strategy development, backtesting, or market data analysis, use the Lona MCP tools.

MCP Server

This plugin connects to the Lona MCP server (lona) which provides 18 tools for algorithmic trading strategy development.

Tool Categories

Strategy Management

  • lona_list_strategies — List all saved strategies
  • lona_get_strategy — Get strategy metadata
  • lona_get_strategy_code — View Python source code
  • lona_create_strategy — Create from Backtrader code
  • lona_update_strategy — Modify an existing strategy (creates new version)

AI Strategy Generation

  • lona_create_strategy_from_description — Generate from natural language (async, returns jobId)
  • lona_get_strategy_creation_status — Poll creation progress (PENDING → GENERATING → SAVING → COMPLETED)

Market Data

  • lona_list_symbols — Browse available datasets (set is_global: true for pre-loaded data)
  • lona_get_symbol — Get symbol details
  • lona_get_symbol_data — Preview OHLCV data
  • lona_download_market_data — Download cryptocurrency data from Binance

Backtesting

  • lona_run_backtest — Execute strategy against historical data (async, returns report_id)
  • lona_get_report_status — Poll execution status (PENDING → EXECUTING → PROCESSING → COMPLETED)

Results & Analysis

  • lona_list_reports — List backtest reports
  • lona_get_report — Summary metrics (return, Sharpe, drawdown, win rate)
  • lona_get_full_report — Detailed results with trade history
  • lona_get_report_chart — Interactive chart with trade markers

Strategy Code Standards

All strategies use Python Backtrader:

  • Import: import backtrader as bt
  • Inherit from bt.Strategy
  • Parameters as tuples: params = (('name', default_value),)
  • __init__ for indicators, next for trading logic
  • Orders: self.buy(), self.sell(), self.close()

Async Operations

Two operations are async and require polling:

  • Strategy creation: Poll lona_get_strategy_creation_status every 10-15 seconds (3-5 min typical)
  • Backtest execution: Poll lona_get_report_status every 5-10 seconds (30s-5 min typical)

Read the full file on GitHub · 65 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. 12d ago First seen · 65 lines · 0 tokens per session scan A fbcde0303ba6

Subscribe to this mod's changes

lona-trading is a cursor rule published in the GitHub repository mindsightventures/lona-agent-skills (4 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 605 tokens. 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.