Compare commits
2 Commits
27cfe80cbd
...
ce94312099
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce94312099 | ||
|
|
8c9ef5ced8 |
@ -69,7 +69,13 @@ def get_risk_pool_health() -> float:
|
|||||||
def compute_mre(home_value: float,
|
def compute_mre(home_value: float,
|
||||||
down_payment: float,
|
down_payment: float,
|
||||||
consumer_fico: int) -> float:
|
consumer_fico: int) -> float:
|
||||||
|
if down_payment < 0 or down_payment > 1:
|
||||||
|
raise ValueError('The down_payment must be between 0 and 1')
|
||||||
|
|
||||||
|
if consumer_fico < 620 or consumer_fico > 850:
|
||||||
|
raise ValueError('The consumer_fico must between 620 and 850')
|
||||||
|
|
||||||
|
down_payment *= home_value
|
||||||
investor_value = home_value - down_payment
|
investor_value = home_value - down_payment
|
||||||
loan_to_value = float(investor_value/home_value)
|
loan_to_value = float(investor_value/home_value)
|
||||||
# the monthly payment is made on the value from the investors
|
# the monthly payment is made on the value from the investors
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user