TASK-FIN-103-02 · Task family
Strategy implementation & backtest repair. Quantitative coding, financial calculations and translating a strategy into code.
Overview. Implement the strategy exactly as specified, with realistic execution and costs, and make the backtest reproducible.
The agent implements a written strategy specification and repairs an existing backtest that doesn't follow it. The existing code trades at the same close it uses for the signal, uses price returns without dividends and ignores costs.
The verifier reruns the submitted code against the specification. Plausible-looking returns earn nothing if the implementation is wrong.
Value to the buyer
Trains agents to turn a specification into exact code, the core skill in quant development.
Specification. The task family, field by field.
- task_id:
- TASK-FIN-103-02
- domain:
- Quantitative Research
- parent_environment:
- ENV-FIN-103 · Systematic Alpha Research
- target_role:
- Quantitative Developer
- objective:
- Implement the strategy exactly as specified, with realistic execution and costs, and make the backtest reproducible.
- starting_context:
- The strategy specification, the existing backtest code, price and dividend data and the cost model.
- tools:
inspect_research_notebookquery_market_dataget_corporate_actionsexecute_pythonrun_backtestsubmit_research_artifacts
- required_actions:
- Compare the existing code with the specification
- Fix signal timing, return calculation and costs
- Rerun and document the changes
- expected_outputs:
- Corrected code
- Backtest results
- Change log
- interaction:
- Single agent with sandboxed code execution.
- verification:
- The verifier reruns the code and checks it against a reference implementation of the specification.
- reward:
- Credit per specification element implemented correctly, and for reproducibility.
- difficulty:
- Calibrated against reference models during acceptance testing
- task_horizon:
- Long multi-step coding task. Execution limits are agreed with the buyer.
- delivery:
- Task instances with seeded code and data, reference implementations and verifier code.
- commercial_unit:
- Per validated task instance
Sample prompt. What the agent is asked to do, as a buyer would see it.
Implement this strategy and fix the existing backtest to match it: each month-end, rank the universe by total return from twelve months ago to one month ago (skipping the most recent month), buy the top decile equal-weighted at the next day's open, and hold for one month. Use total returns including dividends and charge 10 basis points per side. The current backtest trades at the same close used to compute the signal, ignores dividends and charges no costs.
Verification criteria. What the verifier checks, and how.
Signal window
Returns from t−12 to t−1 months, skipping the latest month.
Execution timing
Trades at the next day's open, not the signal close.
Total returns
Dividends included in both the signal and the strategy returns.
Costs
10 bps charged on each side of every trade.
Universe
Includes securities that later delisted, as of each rebalance date.
Reproducible
The verifier's rerun matches the submitted results.
Key failure modes. Where agents go wrong on this task.
- Fixing execution timing but still computing the signal on price returns
- Charging costs only on buys
- Including the most recent month in the momentum window
Other task families. The rest of Systematic Alpha Research, on the same FinanceWorld state.
- TASK-FIN-103-01
Point-in-time factor reconstruction & leakage audit
Temporal reasoning, data lineage and feature engineering.
Quantitative Researcher
- TASK-FIN-103-03
Market data integrity & corporate action handling
Data validation, adjusted prices and historical consistency.
Data Scientist
- TASK-FIN-103-04
Strategy robustness & overfitting audit
Statistical testing, out-of-sample analysis and methodological validity.
Quantitative Researcher