{"kind":"x402/portfolio-risk-attestation","profileVersion":"portfolio-risk/v1","service":"portfolio-risk-attestation","summary":"A paying agent submits the positions it holds plus the risk model it intends to use, and receives ONE Ed25519-signed, SHA-256-reproducible exposure report: gross and net exposure, per-instrument concentration, marginal risk contribution under the caller's own model, a portfolio risk grade, and the NAMED assumptions the report required.","input":{"positions":"list of {instrument, notional, side, currency?, vol?} — notional may be positive; `side` is long/buy or short/sell and selects the sign.","model":"object — the caller's declared risk model. A correlation matrix whose dimension does not match the position count is a named mismatch and is NOT applied.","asOf":"string — the report timestamp (SUPPLIED, never the wall clock)."},"output":{"report_id":"string — derived from the canonical content, never random.","gross_exposure":"sum of |notional| over the INCLUDED positions.","net_exposure":"long exposure minus short exposure.","concentration":"per-instrument gross share, sorted descending.","top_contributors":"per-instrument marginal risk contribution under the caller's own weight model.","risk_grade":"one of R1_LOW, R2_MODERATE, R3_ELEVATED, R4_CRITICAL","assumptions":"list of {id, assumption, effect} — every substitution the report required.","warnings":"list of strings — positions that were excluded, and why.","sha256":"SHA-256 over the canonical evidenceCore.","ed25519Sig":"Ed25519 signature over the canonical evidenceCore."},"riskGrades":[{"grade":"R1_LOW","rule":"the effective number of positions (N_eff = 1/HHI over gross shares) is at or above the moderate threshold; every position supplied a volatility; the supplied model is consistent with the position set; the book is not effectively one-sided"},{"grade":"R2_MODERATE","rule":"one or more of: N_eff is below the moderate threshold; a position supplied no volatility; no model was supplied; a position had an unresolved side"},{"grade":"R3_ELEVATED","rule":"N_eff is below the elevated threshold, or the supplied model contradicts the supplied positions (e.g. a correlation matrix whose dimension does not match the position count)"},{"grade":"R4_CRITICAL","rule":"N_eff is below the critical threshold (the book is effectively one bet), OR a single position's share of gross exposure exceeds the dominance threshold, OR the book is effectively unhedged (net/gross ratio beyond the unhedged threshold)"}],"thresholds":{"effectivePositionsCritical":1.5,"effectivePositionsElevated":3.0,"effectivePositionsModerate":6.0,"unhedgedNetRatioPct":90.0,"dominancePct":75.0},"concentrationMeasure":{"name":"effective number of positions (N_eff)","formula":"N_eff = 1 / HHI, where HHI = sum of squared gross shares (each share expressed as a fraction of gross exposure)","why":"A raw single-position share is not a usable concentration measure: a two-position book is 50% concentrated by construction and would grade critical on any sane allocation. N_eff is count-aware — ten equal positions give N_eff 10, one position gives N_eff 1 — and it is deterministic and published.","reportedAs":"effective_positions and hhi on every report"},"checks":["positions_supplied","positions_well_formed","notionals_parsed","sides_resolved","vols_supplied","model_supplied","model_covers_positions","netting_computed","concentration_computed","contributors_computed"],"honestRefusals":[{"id":"REF-POR-001","trigger":"a position supplies no volatility","behaviour":"the position is reported with `vol_assumed: none-supplied`, the missing vol is named in `assumptions`, and the grade is degraded to at most R2_MODERATE."},{"id":"REF-POR-002","trigger":"no model was supplied","behaviour":"the report is computed on gross exposure only, the absent model is named in `assumptions`, and the grade is degraded to at most R2_MODERATE."},{"id":"REF-POR-003","trigger":"a position supplies neither a resolvable side nor a signed notional","behaviour":"the position is EXCLUDED from the report, named in `warnings`, and counted against the well-formedness check."},{"id":"REF-POR-004","trigger":"the supplied model's correlation dimension does not match the position count","behaviour":"the model is NOT applied, the mismatch is named in `warnings` and `assumptions`, and the grade is R3_ELEVATED."},{"id":"REF-POR-005","trigger":"no positions were supplied","behaviour":"the report records zero exposure and a named assumption; it never fabricates a portfolio."},{"id":"REF-POR-006","trigger":"a notional is not a finite number","behaviour":"the position is excluded and named in `warnings`. The engine never substitutes a number it did not receive."}],"readOnly":true,"note":"This report is computed ONLY from the numbers the caller supplied. It does NOT fetch market data, does NOT estimate a volatility, does NOT infer a correlation, and does NOT assert that the positions were good or bad. It reports exposure, concentration and the assumptions the caller's own model required. A missing input is named, never filled in."}