strategy-translate
Skill0 starsChanged 3 months agoMITView on GitHub
Translate an immutable quantitative replication with a replicated or partially replicated verdict into framework-specific event-driven research or paper-trading code with trace equivalence and failure-mode tests. Use after a finalized run and benchmark exist and an import-probed framework contract defines events, APIs, positions, contracts, risk, persistence, testing, and clock semantics. A direct bounded translation request authorizes local execution without a second acceptance prompt.
In this repository11 other files it gives its agents.
- paper-extractSkill
- paper-replicateSkill
- paper-searchSkill
- paper-theory-reconstructSkill
- quant-paperSkill
- paper-extractSkill
- paper-replicateSkill
- paper-searchSkill
- paper-theory-reconstructSkill
- quant-paperSkill
- strategy-translateSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
Create review.json conforming to references/review.schema.json.
- Distinctive: line 40
Keep signal logic, portfolio intent, execution, sizing, persistence, and risk checks separate.
- Very specific: line 41
Use size_contracts only for conservative single-position conversion.
- Distinctive: line 67
All machine-readable inputs and outputs are checked against their bundled current JSON Schemas.
- Distinctive: line 71
Do not translate an unauthorized, changed, or unfinalized benchmark.
- Distinctive: line 73
Do not infer framework APIs from examples.
- Distinctive: line 74
Do not treat one-day or NAV-only agreement as equivalence.
- Very specific: line 75
Use only research or paper_trading deployment mode.
- Distinctive: line 76
Keep credentials, connectivity, live deployment, and operational authorization outside this skill.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.
Files
Strategy translate
Translate a validated research implementation. Never claim generated code is production-ready or authorize live trading.
Preconditions
Resolve the absolute workspace root and this skill's directory. Require:
- a valid finalized
run_manifest.json; - a
replicatedorpartially replicatedbenchmark and a framework contract authorized by the direct request or explicit acceptance; - workspace-root
frameworks/<framework-id>/spec.jsonconforming toreferences/framework_spec.mdandreferences/framework_spec.schema.json; - successful structural, installed-version, and declared API probes;
- an unchanged vectorized run, benchmark, and framework specification.
Validate the framework contract and record hash-bound request authorization:
QPA_TRANSLATE_SKILL_DIR="/absolute/path/to/strategy-translate"
QPA_WORKSPACE_ROOT="/absolute/path/to/workspace"
python3 "$QPA_TRANSLATE_SKILL_DIR/scripts/check_spec.py" \
"$QPA_WORKSPACE_ROOT/frameworks/<framework-id>/spec.json"
python3 "$QPA_TRANSLATE_SKILL_DIR/scripts/record_acceptance.py" \
<paper-id> <run-id> <framework-id> --root "$QPA_WORKSPACE_ROOT/papers" \
--expected-benchmark-sha256 <sha> --expected-run-manifest-sha256 <sha> \
--expected-framework-spec-sha256 <sha> --confirm-user-acceptedFor a direct translation request, replace --confirm-user-accepted with --confirm-translation-request and continue without presenting hashes. When invoked by $quant-paper, use --workflow-request <absolute-workflow.json>; the recorder verifies that translation is authorized and binds the workflow ID and request hash. Retain --confirm-user-accepted for separately reviewed handoffs.
Workflow
- Create
review.jsonconforming toreferences/review.schema.json; bind it to acceptance, declare per-field equivalence tolerances, and map every required failure-mode scenario to an exactunittestID. - Map observation, signal, decision, submission, fill, position update, P&L recognition, rebalance, session, and restart semantics explicitly.
- Translate rolling state, pending orders, fills, positions, capital, contract metadata, and duplicate/out-of-order event handling.
- Keep signal logic, portfolio intent, execution, sizing, persistence, and risk checks separate.
- Use
size_contractsonly for conservative single-position conversion; enforce portfolio margin, limits, fees, reserved capital, and framework risk APIs separately. - Generate:
strategy/<framework-id>/
├── strategy.py
├── sizing.py
├── review.json
├── traces/{vectorized.json,event_driven.json}
├── equivalence_report.json
├── test_report.json
├── tests/{test_equivalence.py,test_sizing.py,test_event_ordering.py}
└── translation_manifest.jsonRequired validation
Replay a representative multi-day window through both implementations. Record signals, target and filled positions, turnover, costs, P&L, and NAV using references/trace.schema.json, then run:
python3 "$QPA_TRANSLATE_SKILL_DIR/scripts/compare_traces.py" <paper-id> <run-id> <framework-id> --root "$QPA_WORKSPACE_ROOT/papers"
python3 "$QPA_TRANSLATE_SKILL_DIR/scripts/run_translation_tests.py" <paper-id> <run-id> <framework-id> --root "$QPA_WORKSPACE_ROOT/papers"
python3 "$QPA_TRANSLATE_SKILL_DIR/scripts/finalize_translation.py" <paper-id> <run-id> <framework-id> --root "$QPA_WORKSPACE_ROOT/papers"Tests must cover partial fills, rejections, duplicates/out-of-order bars, missing bars, sessions, rolls where applicable, restart/restoration, actual risk APIs, and sizing. All machine-readable inputs and outputs are checked against their bundled current JSON Schemas. Finalization also rechecks lineage against the current review, traces, strategy, and tests.
Rules
- Do not translate an unauthorized, changed, or unfinalized benchmark.
- Reject
not replicatedandinconclusiveverdicts; a new conversational approval does not override this scientific eligibility rule. - Do not infer framework APIs from examples; probe installed authoritative contracts.
- Do not treat one-day or NAV-only agreement as equivalence.
- Use only
researchorpaper_tradingdeployment mode. - Keep credentials, connectivity, live deployment, and operational authorization outside this skill.
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
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.

