Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

🏦 ABS Cash Flow Simulation & IRR Analysis

Simulates a 100-loan securitized portfolio, structures Senior/Mezzanine/Equity tranches, and calculates Internal Rate of Return (IRR) for each tranche β€” modeling the core mechanics of Asset-Backed Securities.

Python NumPy Financial License: MIT


Overview

Models the full lifecycle of an Asset-Backed Security (ABS) from loan origination through cash flow waterfall to tranche-level IRR. Generates a portfolio of 100 randomized amortizing loans, computes month-by-month cash flows using the annuity formula, allocates payments across a 70/20/10 Senior/Mezzanine/Equity capital structure, and calculates the IRR for each tranche.

Tranche Structure

Tranche Share Risk Level Priority
Senior 70% Low First in line
Mezzanine 20% Medium Second
Equity 10% High Last (residual)

Features

  • Loan Portfolio Generation β€” 100 loans with randomized principals ($10K–$50K) and interest rates (5%–15%)
  • Amortization Engine β€” Monthly payment calculation using the annuity formula with balance tracking
  • Cash Flow Aggregation β€” Sums individual loan cash flows into monthly portfolio-level flows
  • Tranche Structuring β€” Allocates principal and interest across Senior/Mezzanine/Equity tranches
  • IRR Computation β€” numpy-financial IRR calculation per tranche
  • Cash Flow Visualization β€” Monthly portfolio cash flow plot

Tech Stack

Component Technology
Language Python 3.9+
Finance numpy-financial (IRR)
Analytics NumPy
Visualization Matplotlib

Quick Start

git clone https://github.com/RHarmit/ABS-Cash-Flow-Simulation-IRR.git
cd ABS-Cash-Flow-Simulation-IRR
pip install numpy numpy-financial matplotlib
python ABS.PY

Sample Output

Total Principal: $2,987,432.11
Total Cash Collected: $3,412,876.54

Senior     Investment: $2,091,202.48 | Cash: $2,389,013.58 | IRR: 0.79%
Mezzanine  Investment: $597,486.42   | Cash: $682,575.31   | IRR: 0.79%
Equity     Investment: $298,743.21   | Cash: $341,287.65   | IRR: 0.79%

About

Asset-Backed Securities simulation: 100-loan portfolio, Senior/Mezzanine/Equity tranche structuring, and IRR calculation.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages