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

Risk report with exact conventions

Produce a full risk report — vol, beta, downside deviation, drawdown geometry, historical and parametric VaR/CVaR, tracking error and information ratio — with exactly the conventions specified.

T2mediumAnalyzemulti-metricready
Edit
readystatic
Agent budget
20 min
Verifier budget
2 min
Tier target
60–80% pass expected

instruction.md

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

Risk report with exact conventions

For the household (current weights, daily rebalanced, total-return) and each held ETF, over the trailing 756 daily return observations ending at the as-of date, write /app/output/risk.json with:

  • ann_vol: std (ddof=1) x sqrt(252)
  • beta: OLS slope of excess returns on excess policy_bm returns (/app/data/benchmarks.csv, index levels)
  • downside_dev: sqrt(mean(min(r - rf_daily, 0)^2)) x sqrt(252), mean over all observations
  • max_drawdown with peak_date, trough_date, recovery_date (null if not recovered) and longest_underwater_days
  • var_95_hist, var_99_hist: 1-day empirical quantiles (numpy linear interpolation) reported as positive losses; cvar_95_hist: mean loss beyond var_95_hist
  • var_95_param: normal VaR from sample mean and std (ddof=1)
  • tracking_error: std (ddof=1) of active returns vs policy_bm x sqrt(252); information_ratio: annualised mean active return / tracking_error

Verification

reward.json metrics · weights sum to 1.00 · tolerance rel 1e-6; dates exact

MetricWeightCheck
vol_beta
0.2
ann_vol and beta.
downside
0.1
downside_dev.
drawdown
0.25
max_drawdown value and all dates; underwater days.
var_cvar
0.25
Historical and parametric VaR, CVaR.
te_ir
0.2
Tracking error and information ratio.

Harbor scaffold

Generated from this record — task.toml, Dockerfile, verifier, oracle stub

schema_version = "1.4"

[task]
name = "portfolio-agent-evals/pf-analyze-risk-suite"
version = "1.0.0"
description = "Produce a full risk report — vol, beta, downside deviation, drawdown geometry, historical and parametric VaR/CVaR, tracking error and information ratio — with exactly the conventions specified."
keywords = ["etf", "portfolio", "analyze", "portfolio-analytics", "risk-metrics", "convention-adherence"]

[metadata]
author_name = "portfolio-agent-evals"
difficulty = "medium"
category = "quant-finance"
tags = ["portfolio-analytics", "tier-2", "analyze", "multi-metric"]
theme = "Portfolio Analytics & Exposure"
tier = 2
reward_type = "multi-metric"

[agent]
timeout_sec = 1200.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

  • Trailing window is 756 observations, not 3 calendar years.
  • Recovery date is the first date the equity curve exceeds the prior peak; longest underwater period may differ from the max-drawdown episode.
  • Positive-loss sign convention for VaR; CVaR is mean of losses strictly beyond VaR per the stated definition.
  • Benchmark is given as levels, not returns.

Inputs

Fixtures mounted in the environment

Outputs

What the verifier reads from /app/output

  • /app/output/risk.json
    JSON
    Risk metrics per ETF and household.

Anti-gaming

Household weights and window end vary by seed.

Oracle notes

solution/solve.sh must score 1.0 on five seeds

Straightforward numpy; the value is in the conventions.

Reviews (0)

Design review before a task is marked ready

    Reviews are read-only in static export.
    Tier 2 · Practitioner60–80% pass expected. Created 2026-01-01, updated 2026-01-01.