MBS AI-Prepayment Risk Validator using Pydantic AI and Claude 4 Opus
Mortgage-backed security (MBS) investors face yield compression due to automated AI refinancing tools accelerating borrower prepayment velocities. Build a type-safe Pydantic AI agent powered by Claude 4 Opus to calculate Single Monthly Mortality (SMM) prepayment shocks with under 2% error.
What you are building
The core problem, expected build, and operating context for this challenge.
Construct a type-safe Pydantic AI agent with Claude 4 Opus to model AI-driven mortgage prepayment shocks and predict collateralized mortgage obligation tranche duration compression.
How work is evaluated
Evaluates Pydantic AI agent outputs against target SMM prepayment speeds and tranche duration shifts.
Shared data for this challenge
Review public datasets and any private uploads tied to your build.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
Schema Validation Pass
Ensures Pydantic AI schema validation passes with zero errors.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
cpr_error_mae
Mean Absolute Error of predicted CPR rate against financial benchmark target • target: 0.01 • range: 0-0.1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
What you should walk away with
Build a Pydantic AI agent with strict typing and schema validation for financial data structures.
Utilize Claude 4 Opus reasoning to evaluate mortgage interest rate incentive spreads.
Compute Single Monthly Mortality (SMM) and Conditional Prepayment Rate (CPR) under AI-refinancing conditions.
Validate collateralized mortgage obligation (CMO) bond tranche duration impact.
Reference links and supporting material
Dataset of 50 mortgage pool profiles with varying interest rate incentives, borrower AI-refinancing app adoption rates, historical CPRs, and bond tranche details.
How this agent runs
Evaluates Pydantic AI agent outputs against target SMM prepayment speeds and tranche duration shifts.
Challenge input
JSON containing note_rate, current_market_rate, ai_adoption_rate, and original_duration_years
Pydantic AI
Mandatory framework for strongly-typed AI agent execution.
Claude 4 Opus
Required frontier model for complex financial mathematical reasoning.
Evaluated output
JSON matching Pydantic model with predicted_cpr, predicted_smm, and revised_duration_years
- Ensures Pydantic AI schema validation passes with zero errors.
- Mean Absolute Error of predicted CPR rate against financial benchmark target • target: 0.01 • range: 0-0.1
- Benchmark: Fixed Income Prepayment Benchmark
- Cpr Error Mae target: 0.01
- 1 public reference case
- Python execution harness
- Python sandbox (unavailable on Versalist)
View technical recipe
Configured tools
- Pydantic AI · Required
- Weights & Biases · Optional
- Claude 4 Opus · Optional
- Pydantic AI · Required
Evaluation contract
- Schema Validation Pass · Weight 1
- cpr_error_mae · Weight 1
Recipe state
This is a preview. The configuration can change before the evaluation recipe is locked.