Multi-currency, multi-calendar alignment to USD returns
Merge a London-listed ETF quoted in pence with USD ETFs and FX rates, aligning trading calendars per an explicit rule, and produce USD daily returns.
instruction.md
What the agent sees (CONVENTIONS.md is appended automatically)
Multi-currency, multi-calendar alignment
The household holds one LSE-listed ETF (currency GBX in etf_meta.csv, i.e. pence sterling) alongside US ETFs. /app/data/fx/usd_gbp.csv gives GBP per USD at London 4pm on London business days (/app/data/lse_calendar.csv).
Produce /app/output/returns_usd.csv: daily simple returns in USD, indexed by NYSE trading days 2015-01-02 to 2024-12-31, one column per held ticker, computed from total-return-adjusted closes. Rules:
(a) Convert GBX to GBP (divide by 100), then to USD using the FX rate of the same calendar date. If there is no FX print or no price on an NYSE date (UK holiday or half-day), carry forward the last available USD price for at most 3 NYSE days so the return on that date is 0 and the catch-up lands on the next date. (b) A US holiday that is a UK business day is not in the index; the UK move is absorbed into the next NYSE date.
Also write /app/output/alignment_log.json listing every date where rule (a) or (b) was applied and which rule.
Verification
reward.json metrics · weights sum to 1.00 · tolerance rel 1e-8
| Metric | Weight | Check |
|---|---|---|
| returns_match | 0.7 | All cells within tolerance. |
| alignment_log_exact | 0.3 | Set of (date, rule) equals oracle. |
Harbor scaffold
Generated from this record — task.toml, Dockerfile, verifier, oracle stub
schema_version = "1.4" [task] name = "portfolio-agent-evals/pf-data-currency-and-calendar" version = "1.0.0" description = "Merge a London-listed ETF quoted in pence with USD ETFs and FX rates, aligning trading calendars per an explicit rule, and produce USD daily returns." keywords = ["etf", "portfolio", "analyze", "data-forensics", "currency-conversion", "calendar-alignment", "returns-math"] [metadata] author_name = "portfolio-agent-evals" difficulty = "medium" category = "quant-finance" tags = ["data-forensics", "tier-2", "analyze", "partial"] theme = "Data Forensics & Canonicalization" tier = 2 reward_type = "partial" [agent] timeout_sec = 1800.0 [verifier] timeout_sec = 180.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
- GBX vs GBP scaling.
- FX is quoted GBP per USD: divide, do not multiply.
- Boxing Day, Easter Monday and a UK half-day with no FX print.
- Dividends on the UK ETF are in GBX too.
Inputs
Fixtures mounted in the environment
- /app/data/prices/Includes the GBX-quoted ticker with LSE calendar dates.
- /app/data/fx/usd_gbp.csv
- /app/data/trading_calendar.csv, /app/data/lse_calendar.csv
- /app/data/etf_meta.csv
- /app/data/dividends.csv
Outputs
What the verifier reads from /app/output
- /app/output/returns_usd.csvCSV wideUSD daily simple returns.
- /app/output/alignment_log.jsonJSONDates where alignment rules fired.
Anti-gaming
FX path and half-day placement are seed-dependent.
Oracle notes
solution/solve.sh must score 1.0 on five seeds
Oracle builds a USD price series on the union calendar then reindexes to NYSE with the stated carry rule.
Reviews (0)
Design review before a task is marked ready