Build and review the exercise
Linked challenge: Build a Margin Agreement Netting and Collateral Calculator
Prompt source
Implementation with evidence-linked review4 lines4 sectionsNo variables0 checklist items
Calculate margin calls under two fictional collateral agreements. Separate legal netting sets, apply eligible collateral haircuts and compare the result with broker calls. Show why a surplus at one counterparty cannot automatically cover another. Contract: For each netting set, exposure is max(sum of signed marks, zero). Required collateral is exposure plus independent amount minus threshold, floored at zero. Existing eligible collateral receives its haircut. Use the attached inputs and dictionary. Show source records, calculation traces and unresolved cases. Return an export with stable record references. Use the supplied fictional contract. Do not execute payments, trades, credit decisions or regulatory filings. Do not present results as legal, accounting or investment advice.