wilsonfreitas / R-fixedincome

Fixed income tools for R
http://wilsonfreitas.github.io/R-fixedincome/
Other
50 stars 25 forks source link

Amortization with Spotrate and Compound? #30

Closed rac359 closed 1 year ago

rac359 commented 1 year ago

If a loan has an annual amortization percentage (i.e. 1%), is it possible to build this in to the spotrate or compound functions? I'd be happy to fork and try to build this if you have a view on how it can be incorporated (provided it's not already here and I've simply missed it).

wilsonfreitas commented 1 year ago

Hi @rac359

I have plans to apply fixedincome to any real world problem. I'm affraid I've not understood your use case. fixedincome doesn't have classes/data-types for abstracting bonds, but I have plans to that. Please, give more details I'd love to help you on that.

rac359 commented 1 year ago

Hi @wilsonfreitas,

Thanks for getting back to me.

A loan may have a clause where the borrower is to pay 1% of the total loan amount per year, and this amount is applied to the principal. Over the life of the loan, the principal is reduced, thus reducing the interest.

I was able to write my own function to handle this, so no worries!

Thanks again for getting back to me, Alex