联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Database作业Database作业

日期:2025-02-14 10:31

Financial Risk Management-Fixed Income Markets

In this project you will implement the mortgage calculator is Python:

1. Write a function in Python that will calculate the mortgage payment with the following parameters:

a. yield (the yield should be already adjusted to unit of payment)

b. Principal

c. Number of payments

2. Create a payment column using a replication function in python (hint use numpy arrays and repeat function (see here:

R function rep) in Python (replicates elements of a list/vector) - Stack Overflow)

1. Create a PV column using the formula : P/(1+y) ^ (payment number)

2. Create a first element in the column for outstanding principal assuming that Now Principal utstanding = Intial PrincipalUse the for loop to update the next element in each of the columns as follows;

1. calculate the interest paid through the formula: next interestpaid-principal outstanding*yield

2. calculate the next principal paid as principal paid = payment - interest paid

3. calculate the next amount utstanding = principal outstanding - principal paid

4. complete the amortization table by calculating the PV of principal and interest paid.



版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp