agentleFS
YichengYang-EthanYichengYang-Ethan/oracle3/.claude/skills/pm-quant-strategy-authoring/SKILL.md

pm-quant-strategy-authoring

Skill466 starsChanged 34 days agoApache-2.0View on GitHub

Turn an agent's quantitative idea into Strategy code with tunable parameters and verifiable behavior.

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user asks the agent to come up with a strategy and write the code.

    line 8
  2. Distinctive:

    Put parameters in the constructor.

    line 32
  3. Very specific:

    Call trader.place_order(...) to act.

    line 33
  4. Distinctive:

    Every parameter has a clear meaning, bounds and a default.

    line 46
  5. Distinctive:

    Do not hard-code strategy logic in a command-line script.

    line 52
  6. Distinctive:

    Never use future information (no look-ahead).

    line 53
  7. Distinctive:

    Keep runs reproducible: record the strategy file path, class name, kwargs and command.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PM Quant Strategy Authoring

Use this skill when the user asks the agent to come up with a strategy and write the code.

Goals

  • A runnable strategy class (a QuantStrategy subclass).
  • Exposed numeric parameters, so the strategy can be auto-tuned.
  • strategy validate and backtest run both succeed.

Code entry points

  • Base class contract: oracle3/strategy/quant_strategy.py (QuantStrategy).
  • For LLM-driven strategies use AgentStrategy instead (see pm-agent-strategy-authoring).
  • Example strategies: examples/strategies/*.py, strategies/*.py.
  • New strategies go in strategies/.

Steps

  1. Create the skeleton
  • oracle3 strategy create --output strategies/<name>.py --class-name <ClassName> --type quant
  1. Implement the strategy
  • In process_event, handle only the event types you need (usually PriceChangeEvent).
  • Put parameters in the constructor; numeric parameters are what tuning searches over.
  • Call trader.place_order(...) to act.
  • Record actions and signals with self.record_decision(...).
  1. Quick validation
  • oracle3 strategy validate --strategy-ref strategies/<name>.py:<ClassName> --strategy-kwargs-json '<json>' --dry-run --events 10 --json
  1. Single-market backtest
  • oracle3 backtest run --history-file <history.jsonl> --market-id <M> --event-id <E> --strategy-ref strategies/<name>.py:<ClassName> --strategy-kwargs-json '<json>' --json
  1. Prepare for tuning
  • Every parameter has a clear meaning, bounds and a default.
  • Parameter types stay JSON-serializable.
  • Tune with oracle3 research auto-tune --param-grid-json '<json>' ....

Hard rules

  • Do not hard-code strategy logic in a command-line script; it belongs in its own strategy file.
  • Never use future information (no look-ahead).
  • Keep runs reproducible: record the strategy file path, class name, kwargs and command.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.