Bond Mortgage
financepy.products.bonds.bond_mortgage
Classes
BondMortgage
BondMortgage(start_dt: financepy.utils.date.Date, end_dt: financepy.utils.date.Date, principal: float, freq_type: financepy.utils.frequency.FrequencyTypes = <FrequencyTypes.MONTHLY: 12>, accrual_dc_type: financepy.utils.day_count.DayCountTypes = <DayCountTypes.ACT_360: 8>, cal_type: financepy.utils.calendar.CalendarTypes = <CalendarTypes.WEEKEND: 2>, bd_type: financepy.utils.calendar.BusDayAdjustTypes = <BusDayAdjustTypes.FOLLOWING: 2>, dg_type: financepy.utils.calendar.DateGenRuleTypes = <DateGenRuleTypes.BACKWARD: 2>)
A mortgage is a vector of dates and flows generated in order to repay
a fixed amount given a known interest rate. Payments are all the same
amount but with a varying mixture of interest and repayment of principal.
Methods
repayment_amount
repayment_amount(self, zero_rate: float)
Determine monthly repayment amount based on current zero rate.
generate_flows
generate_flows(self, zero_rate: float, mortgage_type: financepy.products.bonds.bond_mortgage.BondMortgageTypes)
Generate the bond flow amounts.
print_leg
print_leg(self)
No description available.
BondMortgageTypes
BondMortgageTypes(*values)
Inherits from: Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum):
... RED = 1
... BLUE = 2
... GREEN = 3
Access them by:
- attribute access:
>>> Color.RED
<Color.RED: 1>
- value lookup:
>>> Color(1)
<Color.RED: 1>
- name lookup:
>>> Color['RED']
<Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own
attributes -- see the documentation for details.
Generated automatically from the FinancePy source code.
Do not edit this file manually.