Portfolio Agent EvalsHarbor task suite · ETF analyze → backtest → rebalance
Portfolio Analytics & Exposure/pf-analyze-weights-drift

Weights, drift and band breaches (absolute and 5/25 relative)

Compute per-account and household market-value weights, drift versus IPS targets, and band breaches under both absolute and relative rules.

T1easyAnalyzepartialready
Edit
readystatic
Agent budget
15 min
Verifier budget
2 min
Tier target
≥ 90% pass expected

instruction.md

What the agent sees (CONVENTIONS.md is appended automatically)

Weights, drift and band breaches

Using /app/portfolio/holdings.csv, /app/portfolio/accounts.csv (cash per account), the latest closes in /app/data/prices/ and /app/policy/ips.yaml (sleeve targets, ticker-to-sleeve map, absolute band, relative band), write /app/output/drift.json containing:

  • as_of: the last trading date on which every held ticker has a close
  • per-account weights by sleeve (cash is a sleeve)
  • household weights by sleeve
  • drift = weight - target per sleeve
  • breaches: list of {sleeve, rule: "absolute" | "relative", drift} for sleeves where |drift| > absolute band, or |drift| / target > relative band (skip the relative rule when target is 0)

Weights are market value divided by total household value including cash.

Verification

reward.json metrics · weights sum to 1.00 · tolerance abs 1e-8

MetricWeightCheck
as_of_and_weights
0.5
as_of exact; all weights within tolerance.
breaches_exact
0.5
Breach set (sleeve, 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-analyze-weights-drift"
version = "1.0.0"
description = "Compute per-account and household market-value weights, drift versus IPS targets, and band breaches under both absolute and relative rules."
keywords = ["etf", "portfolio", "analyze", "portfolio-analytics", "weights-math", "policy-parsing", "json-contract"]

[metadata]
author_name = "portfolio-agent-evals"
difficulty = "easy"
category = "quant-finance"
tags = ["portfolio-analytics", "tier-1", "analyze", "partial"]
theme = "Portfolio Analytics & Exposure"
tier = 1
reward_type = "partial"

[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

  • One ticker lags a day, so as_of is not simply the max date in the files.
  • A sleeve with target 0 that has a small holding: absolute rule applies, relative rule skipped.
  • Cash must be included in the denominator and as its own sleeve.

Inputs

Fixtures mounted in the environment

Outputs

What the verifier reads from /app/output

  • /app/output/drift.json
    JSON
    Weights, drift and breaches.

Anti-gaming

Holdings and the lagging ticker vary by seed.

Oracle notes

solution/solve.sh must score 1.0 on five seeds

Twenty lines of pandas.

Reviews (0)

Design review before a task is marked ready

    Reviews are read-only in static export.
    Tier 1 · Foundations≥ 90% pass expected. Created 2026-01-01, updated 2026-01-01.