coupon_rs
Description
This package countains of PRICE function and YIELD function, similar in LibreOffice Calc or Microsoft Excel. The package also countains some function to calculate days of coupons.
Syntax and usage
Firstly, add package to Cargo.toml
[]
= "0.1.0"
Then in rust code:
use ;
// PRICE(settlement, maturity, rate, yld, redemption, frequency, basis)
get_price_
// YIELD(settlement, maturity, coupon_rate, price, redemption, frequency, basis)
get_yield_
// return payment date before settlement
lcl_get_couppcd
// return payment date after settlement
lcl_get_coupncd
// return number of days in one period
get_coupdays
// return number of days in period before settlement
get_coupdaybs
// return number of days after settlement until the next payment date
get_coupdaysnc
// return number of payment in one year
get_coupnum
License
This project is licensed under