AFAIK, there is not such class coupon in QuantLib. But you can always create you’re a coupon with hard coded fixed date, like:
https://github.com/lballabio/QuantLib/blob/master/ql/cashflows/indexedcashflow.hpp
发件人: fagoal [mailto:[hidden email]]
发送时间: 2017年7月3日 17:48
收件人: [hidden email]
主题: [Quantlib-users] 回复:答复: Adjustable Rate Bonds Pricing
Ok,i will try it. Another question , this solution supports calculation of a coupon which is divided into several parts, for example payment semiannual,fixing 3month,but does it support payment 1month , and fixing 6mont? which means that one rate fixing determines next several coupon payment
发自我的iPhone
------------------ 原始邮件 ------------------
发件人: cheng li <[hidden email]>
发送时间: 2017年7月3日 11:43
收件人: '冬' <[hidden email]>
主题: 回复:答复: 回复:答复: [Quantlib-users] Adjustable Rate Bonds Pricing
FYI. I attached the Peter Casper’s answer which should be an easier solution. It still use sub period coupon. However there is no need to create a new class.
Regards,
Cheng
发件人: [hidden email] [mailto:[hidden email]] 代表 冬
发送时间: 2017年7月3日 11:00
收件人: cheng li <[hidden email]>
主题: 回复:答复: [Quantlib-users] Adjustable Rate Bonds Pricing
I am using floatingratebond to do the job, but it does'n work . So what you mean is that i need to create a new instrument like floatingratebond and using the subperiodcoupon to solve this case?
------------------ 原始邮件 ------------------
发件人: cheng li <[hidden email]>
发送时间: 2017年7月2日 22:42
收件人: 'fagoal' <[hidden email]>, quantlib-users <[hidden email]>
主题: 回复:答复: [Quantlib-users] Adjustable Rate Bonds Pricing
Hi Fagoal,
Floating rate bond class under the instruments folder should partially meets
your requirements:
https://github.com/lballabio/QuantLib/blob/master/ql/instruments/bonds/float
ingratebond.hpp
This is a bond with variable rate linked to a ibor index.
According to your further description, you are looking forward to the sub
period coupon class under QuantLib experimental folder:
https://github.com/lballabio/QuantLib/blob/master/ql/experimental/coupons/su
bperiodcoupons.hpp
Peter Casper has another similar version of this in his open risk engine
project:
https://github.com/OpenSourceRisk/Engine/blob/master/QuantExt/qle/cashflows/
subperiodscoupon.hpp
also based on QuantLib.
It should be easy for yourself to extend QuantLib with a new type of bond
class based on sub period coupon. It will be very similar to floating rate
bond class.
Regards,
Cheng
-----邮件原件-----
发件人: fagoal [[hidden email]]
发送时间: 2017年7月1日 15:24
收件人: [hidden email]
主题: Re: [Quantlib-users] Adjustable Rate Bonds Pricing
Does quantlib 1.9 support this non-trival case? like fixing rate frequency
is quarterly and payment frequency is semiannual.
--
View this message in context:
http://quantlib.10058.n7.nabble.com/Adjustable-Rate-Bonds-Pricing-tp5756p183
73.html
Sent from the quantlib-users mailing list archive at Nabble.com.
----------------------------------------------------------------------------
--
Check out the vibrant tech community on one of the world's most engaging
tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
------------------ 原始邮件 ------------------
发件人: Peter Caspers-4 [via QuantLib] <[hidden email]>
发送时间: 2017年7月3日 03:12
收件人: fagoal <[hidden email]>
主题: 回复:答复: Adjustable Rate Bonds Pricing
Hi Cheng, Fagoal,
I think you can also make do without creating a new class, simply set up a leg of sub period coupons (which you can take from QuantLib or ORE / QuantExt, the latter being a bit more general, if needed) and then pass this leg into the generic Bond constructor (see bond.hpp)
Bond(Natural settlementDays,
const Calendar& calendar,
const Date& issueDate = Date(),
const Leg& coupons = Leg());
The leg only needs to contain the coupons, amortisation and redemption flows are added automatically based on the notional information that comes with the coupons.
Best Regards
Peter
If you reply to this email, your message will be added to the discussion below:
http://quantlib.10058.n7.nabble.com/Adjustable-Rate-Bonds-Pricing-tp5756p18375.html
To unsubscribe from Adjustable Rate Bonds Pricing, click here.
NAML
View this message in context: 回复:答复: Adjustable Rate Bonds Pricing
Sent from the quantlib-users mailing list archive at Nabble.com.
Free forum by Nabble | Disable Popup Ads | Edit this page |