Feasible trade list to IPS targets (whole shares, cash buffer, min trade)
Generate a feasible single-account trade list to IPS targets with whole shares, a cash buffer, a minimum trade size and no shorting.
instruction.md
What the agent sees (CONVENTIONS.md is appended automatically)
Trade list to target
Given current holdings, cash, latest closes and IPS targets (single account in this variant), write /app/output/trades.csv (account_id, ticker, side, shares, est_price, est_notional) moving the account to target weights subject to:
- whole shares; no short positions
- post-trade cash >= 5,000 USD
- no trade with notional < 250 USD
- sells listed before buys
Also write /app/output/post_trade.json with post-trade weights and drift per sleeve.
Verification
reward.json metrics · weights sum to 1.00
| Metric | Weight | Check |
|---|---|---|
| feasibilitygate | 0.5 | All constraints hold. GATE: any violation caps total reward at 0.2. |
| closeness | 0.5 | Sum of |post-trade drift| <= oracle + 1e-6 (oracle is MILP). |
Gates: feasibility. A gate failure caps or zeroes the trial reward regardless of other metrics.
Harbor scaffold
Generated from this record — task.toml, Dockerfile, verifier, oracle stub
schema_version = "1.4" [task] name = "portfolio-agent-evals/pf-rb-basic-trade-list" version = "1.0.0" description = "Generate a feasible single-account trade list to IPS targets with whole shares, a cash buffer, a minimum trade size and no shorting." keywords = ["etf", "portfolio", "rebalance", "trade-generation", "trade-generation", "constraint-satisfaction"] [metadata] author_name = "portfolio-agent-evals" difficulty = "easy" category = "quant-finance" tags = ["trade-generation", "tier-1", "rebalance", "multi-metric"] theme = "Rebalancing & Trade Generation" tier = 1 reward_type = "multi-metric" [agent] timeout_sec = 900.0 [verifier] timeout_sec = 120.0 [environment] # Offline by design: all data is synthetic and generated at build time. network_mode = "none" cpus = 2 memory_mb = 4096 storage_mb = 10240 build_timeout_sec = 900.0
Traps
Each must carry signal: a trap-blind solution must lose credit
- Buying to target would breach the cash buffer: buys must be scaled.
- The min-trade rule leaves one sleeve slightly under target; that is correct, not an error.
- Rounding direction interacts with the cash buffer.
Inputs
Fixtures mounted in the environment
- /app/portfolio/holdings.csv, /app/portfolio/accounts.csv
- /app/data/prices/
- /app/policy/ips.yaml
Outputs
What the verifier reads from /app/output
- /app/output/trades.csvCSVTrade list.
- /app/output/post_trade.jsonJSONPost-trade weights and drift.
Anti-gaming
Holdings and prices are seeded; the oracle is recomputed per trial.
Oracle notes
solution/solve.sh must score 1.0 on five seeds
scipy.optimize.milp over integer shares with L1 drift objective.
Reviews (0)
Design review before a task is marked ready