Cumulative 30 Plus Delinquency Curves by Loan Vintage

Last updated: November 29, 2026

Quick Overview

Using a loans table and a monthly loan status table with days past due, compute for each origination month (vintage) and month on book the cumulative share of loans, by count and by principal, that have ever been 30 or more days past due.

Upstart
Data Manipulation (SQL/Python)
Data Scientist
Upstart
November 29, 2026
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
Medium

0

0

0 solved


Using a loans table and a monthly loan status table with days past due, compute for each origination month (vintage) and month on book the cumulative share of loans, by count and by principal, that have ever been 30 or more days past due.

Vintage curves are the standard way Upstart, its partner banks and loan buyers compare credit performance across origination cohorts and model versions. The interviewer checks whether you can compute months on book correctly, use a running window to make delinquency an "ever" flag, and choose the right denominator.

What the Interviewer Expects
  • Computes months on book from funded date and snapshot month
  • Uses a running MAX window to build an ever-delinquent flag
  • Uses the full vintage size as the denominator, not only loans observed that month
  • Reports both count-weighted and dollar-weighted rates
  • Explains handling of paid-off and charged-off loans
Key Topics to Cover
window functions
vintage analysis
months on book
cumulative metrics
credit performance
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
  • How do paid-off loans affect the curve if their rows stop?
  • How would you compare two model versions with these curves?
  • How would you plot this and what shape do you expect?
  • What changes if you want current delinquency instead of ever delinquency?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice SQL Problems
Sample Answer
Clarify the Data

loans(loan_id, funded_date, principal) and loan_months(loan_id, as_of_month, days_past_due), one row per loan per month while the loan is active. A loan that cures after going 30+ DPD should still...

Approach

Compute months on book (MOB), flag dq30, take a running MAX over each loan's history to make it sticky, then aggregate by vintage and MOB. Divide by the vintage's original count and principal so loa...


Submit Your Answer
Markdown supported