strategy-generate

strategy-generate is a skill for Claude Code, Codex from skloxo/TideTrading. It costs 21 tokens per session (3,108 once invoked), scanned A, original, MIT.

A workflow for creating and testing quantitative trading strategies. It turns a strategy description into code, runs a backtest using historical data, and reviews the results.

In plain words
What is it for?
It is for implementing trading signals, configuring instruments and dates, running backtests, and evaluating strategy metrics.
Why use it?
It provides a repeatable process for checking how a trading idea would have performed before judging or changing it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for implementing trading signals, configuring instruments and dates, running backtests, and evaluating strategy metrics.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skloxo/tidetrading/strategy-generate
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 skloxo/TideTrading --skill strategy-generate
Clone the repo
git clone --depth 1 https://github.com/skloxo/TideTrading

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/skloxo/tidetrading/strategy-generate/github.svg)](https://agentmods.dev/skills/skloxo/tidetrading/strategy-generate)
Your own site
<a href="https://agentmods.dev/skills/skloxo/tidetrading/strategy-generate"><img src="https://agentmods.dev/badge/skills/skloxo/tidetrading/strategy-generate/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-generate

Your own site · 80×15
<a href="https://agentmods.dev/skills/skloxo/tidetrading/strategy-generate"><img src="https://agentmods.dev/badge/skills/skloxo/tidetrading/strategy-generate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,108 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.00021 $0.03108
Opus 5 $0.00010 $0.01554
Sonnet 5 $0.00004 $0.00622
Haiku 4.5 $0.00002 $0.00311

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

Security

Grade A, and why

strategy-generate 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 5d 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.

agent/src/skills/strategy-generate/SKILL.md · 203 lines

How it starts

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

Workflow

  1. Requirements parsing: parse user intent, extract instrument codes, time range, and strategy logic, then write config.json
  2. Strategy design: think through the 5 questions of data / signal / position sizing / backtest / validation
  3. Strategy coding: write code/signal_engine.py (following the SignalEngine contract)
  4. Syntax check: bash("python -c \"import ast; ast.parse(open('code/signal_engine.py').read()); print('OK')\"")
  5. Run backtest: call the backtest tool (built into the engine; no need to write run_backtest.py)
  6. Evaluate results: read artifacts/metrics.csv and judge by the review criteria
  7. Iterative fixing: if results are poor, modify with edit_file → run backtest → re-evaluate

You only need to write signal_engine.py and config.json. The backtest tool automatically handles data loading and backtest execution.

Requirements Parsing

Extract the following from the user's description:

  • Instrument codes: process them according to the normalization rules below
  • Time range: if the user does not specify dates, default to 10 years back from today (for example, if today is 2026-03-18, then start_date=2016-03-18, end_date=2026-03-18)
  • Strategy logic: entry / exit conditions and indicator parameters

If critical information is missing, you must ask the user instead of guessing:

  • Instrument not specified → ask which instrument they want to backtest (offer several popular suggestions)
  • Strategy description is vague (for example, "help me build a strategy") → provide 2-3 strategy directions for the user to choose from
  • Mixed markets but not clearly specified → confirm the data source

Write config.json first, then write code. config.json must be placed in the root of run_dir.

Strategy Design

Before writing code, think through these 5 questions:

  1. Data requirements: what fields are needed (basic OHLCV only, daily valuation fields such as pe/pb/roe, or statement fields such as income_total_revenue / fina_indicator_roe?), data frequency (daily), and market (which determines the data source)
  2. Signal logic: what are the entry conditions? What are the exit conditions? Direction (long / short / long-short)? Are there filters (volume, trend confirmation, and so on)?
  3. Position management: equal-weight allocation or scaling in/out? Risk control (stop-loss, maximum position)? In portfolio strategies, once top N names are selected, each weight = 1/N
  4. Backtest parameters: time range, initial capital (default 1,000,000), commission (default 0.1%)
  5. Validation checklist: signal consistency (no NaN signals), position check (normalized to prevent leverage), and completeness of generated artifacts

Read the full file on GitHub · 203 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 203 lines · 21 tokens per session scan A 010dd17f6ce3

Subscribe to this mod's changes

strategy-generate is a skill published in the GitHub repository skloxo/TideTrading (10 stars, last pushed 2d ago), licensed MIT. It adds 21 tokens to every session and 3,108 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-09-03.

Related

Other skills, from other repositories

daily-deep-brief

A scheduled, pre-market investment briefing for Hong Kong and United States stocks. A deterministic preparation step gathers data and an agent adds judgment, while a later step validates and publishes the result.

KCNyu/clawock · 163 tokens

hk-stock-analysis

A workspace-aware analysis workflow for Hong Kong-listed stocks. It retrieves prices, technical indicators, market comparisons, and news through a local data pipeline, then adds Hong Kong-specific investment context.

KCNyu/clawock · 126 tokens

us-stock-analysis

Workspace-aware US stock analysis for kcn. Routes through clawock analyze-us / clawock us-quotes instead of generic web search, then layers fundamental/technical/news analysis on top. Use when user asks to analyze a US ticker (e.g. "analyze AAPL", "look at RKLB", "compare TSLA vs NVDA"), check earnings, run…

KCNyu/clawock · 97 tokens

invest-analyst

A framework for producing professional investment research, including company reports, industry studies, event analysis, analyst-expectation reviews, comparisons, and market summaries. It connects several investment research workflows into one process.

taxueseek/fund-investment-guide · 193 tokens

invest-fund

A Chinese-language guide for analysing investment funds, with different workflows for comparing funds, reviewing ETFs, examining new funds, and studying industry funds.

taxueseek/fund-investment-guide · 142 tokens

invest-cli

An investment-analysis command-line tool that fetches data for Chinese stocks and funds, US stocks, and stock screening, then applies matching analysis frameworks. A command-line tool is a program operated from a terminal.

taxueseek/fund-investment-guide · 107 tokens