From f07e0a086ae0d8455ef7f41105d22843b572564a Mon Sep 17 00:00:00 2001 From: Chris Diesch Date: Tue, 8 Apr 2025 19:43:39 -0600 Subject: [PATCH] Add minimum mre value --- __init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/__init__.py b/__init__.py index cd03222..7b5fdaf 100644 --- a/__init__.py +++ b/__init__.py @@ -5,6 +5,7 @@ GROSS_RENT_YIELD: float = 0.03686 RISK_POOL_ALLOCATION: float = 0.01 LOSS_SEVERITY: float = 0.19 RECOVERY_RATE: float = 0.9 +MIN_MRE: float = 0.05 def get_default_risk_by_fico(consumer_fico: int, loan_to_value: float) -> float: @@ -107,6 +108,7 @@ def compute_mre(home_value: float, mre += at_risk_value - recovery_value # make the mre a percentage of the home value mre /= home_value + mre = max(mre, MIN_MRE) return mre