Mortgage#

class metric_forge.mortgage.Mortgage(
principal: float,
annual_interest_rate: float,
term_years: int,
start_date: str = None,
extra_principal_payment: float = 0,
)[source]#

Bases: object

Attributes:
start_date

Methods

refinance_assessment(refinance_option[, ...])

Determine if refinancing is worth it by calculating the break-even point, total savings, and monthly savings.

amortization_to_dict

calculate_monthly_payment

calculate_principal_only_payment

generate_amortization_schedule

loan_to_value_ratio

to_dict

total_interest_paid

amortization_to_dict() DataFrame[source]#
annual_interest_rate: float#
calculate_monthly_payment() float[source]#
calculate_principal_only_payment() Dict[str, float][source]#
extra_principal_payment: float = 0#
generate_amortization_schedule() DataFrame[source]#
loan_to_value_ratio(home_value: float) float[source]#
principal: float#
refinance_assessment(
refinance_option: RefinanceOption,
break_even_threshold=36,
) Dict[str, float][source]#

Determine if refinancing is worth it by calculating the break-even point, total savings, and monthly savings.

Parameters:
  • refinance_option -- RefinanceOption object containing new loan details

  • break_even_threshold -- Optional maximum acceptable break-even point in months

Returns:

A dictionary containing old and new monthly mortgage payments, break-even point (BEP), total savings (TSOT), monthly savings (MS), and refinance recommendation

start_date: str = None#
term_years: int#
to_dict() Dict[str, float][source]#
total_interest_paid() float[source]#
class metric_forge.mortgage.RefinanceOption(
new_loan_amount: float,
new_annual_interest_rate: float,
new_term_years: int,
associated_costs: float,
)[source]#

Bases: object

Methods

calculate_new_payment

associated_costs: float#
calculate_new_payment() float[source]#
new_annual_interest_rate: float#
new_loan_amount: float#
new_term_years: int#