Add minimum mre value

This commit is contained in:
Chris Diesch 2025-04-08 19:43:39 -06:00
parent ce94312099
commit f07e0a086a

View File

@ -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