Hi, I'd like to find out what other bonds follow the Actual/Actual day count, besides US Treasury Notes/Bond?
When I instantiate FixedRateCoupon object with US Treasury securities whose daycount are Actual/Actual, I am not sure the coupon amount is what we should be getting. However, the implementation of Actual/Actual in QuantLib appears to be correct. There are a number of objects in QuantLib I think are very useful, namely Coupon, InterestRate, DayCount, Schedule, CashFlow, Frequency and Compouding. If we can verify the behavior of these objects cover all scenarios, definitely they can be the building block of a lot of things. Any input would be appreciated. Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. |
On 04/07/05 16:44:03, [hidden email] wrote:
> Hi, I'd like to find out what other bonds follow the Actual/Actual day > count, besides US Treasury Notes/Bond? > > When I instantiate FixedRateCoupon object with US Treasury securities > whose daycount are Actual/Actual, > I am not sure the coupon amount is what we should be getting. However, > the implementation of Actual/Actual in QuantLib appears to be correct. You can try something like the following: FixedCouponBond bond(...); std::vector<boost::shared_ptr<CashFlow> >& cashflows = bond.cashflows(); for (int i=0; i<cashflows().size(); i++) { boost::shared_ptr<Coupon> coupon = boost::dynamic_pointer_cast<Coupon>(cashflows[i]); // now you can inspect coupon using Coupon methods and check dates, // accrual period, whatever. } This should give you quite a few data to check against your data provider. Later, Luigi ---------------------------------------- Everything that can be invented has been invented. -- Charles Duell, Director of U.S. Patent Office, 1899 |
In reply to this post by Jeffrey-J.Yu
I did.
Let's say for CT2, CUSIP = 912828DQ0, coupon = 3.75%, maturity date = 3/31/07, issue date = 3/31/05, A/A, 2 payments a year; The expected cash flow are: 9/30/05 18750 3/31/06 18750 9/30/06 18750 3/31/07 18750 + 1000000(par) When using the FixedCouponBond and the day count is 30/360, the cash flow appear to be right, not with A/A. And it is unlikely it will produce above cash flow with the current implementation. As I said in my previous email, the interpratation of A/A in QuantLib seems to be correct too. We just need to make it work for the US treasuries. By the way, I compare the results to Bloomberg. Cheers, Jeff Code fragment: BusinessDayConvention convention; convention = Unadjusted; freq = QuantLib::Semiannual; ActualActual aa; d1 = Date(31, March, 2005); d2 = Date(31, March, 2007); FixedCouponBond bond = FixedCouponBond(d1, d1, d2, 3, 0.0375, freq, aa, us, convertion); std::vector<boost::shared_ptr<CashFlow> > bCF = bond.cashflows(); for ( i = 0; i < bCF.size(); i++ ) { cout<<bCF[i]->date()<<"\t"<<bCF[i]->amount()<<endl; } Results: 09/30/2005 1.88014 03/31/2006 1.86986 09/30/2006 1.88014 03/31/2007 1.86986 -----Original Message----- From: Luigi Ballabio [mailto:[hidden email]] Sent: Thursday, April 07, 2005 11:12 AM To: Yu, Jeffrey-J Cc: [hidden email] Subject: Re: [Quantlib-users] Actual/Actual daycount usage On 04/07/05 16:44:03, [hidden email] wrote: > Hi, I'd like to find out what other bonds follow the Actual/Actual day > count, besides US Treasury Notes/Bond? > > When I instantiate FixedRateCoupon object with US Treasury securities > whose daycount are Actual/Actual, > I am not sure the coupon amount is what we should be getting. However, > the implementation of Actual/Actual in QuantLib appears to be correct. You can try something like the following: FixedCouponBond bond(...); std::vector<boost::shared_ptr<CashFlow> >& cashflows = bond.cashflows(); for (int i=0; i<cashflows().size(); i++) { boost::shared_ptr<Coupon> coupon = boost::dynamic_pointer_cast<Coupon>(cashflows[i]); // now you can inspect coupon using Coupon methods and check dates, // accrual period, whatever. } This should give you quite a few data to check against your data provider. Later, Luigi ---------------------------------------- Everything that can be invented has been invented. -- Charles Duell, Director of U.S. Patent Office, 1899 Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. |
On 04/07/05 17:31:17, [hidden email] wrote:
> > As I said in my previous email, the interpratation of A/A in QuantLib > seems to be correct too. We just need to make it work for the US > treasuries. Oh, I see. There's three actual/actual conventions in QuantLib. If you don't specify one, you get the one according to ISDA---which is not what you want. Try replacing ActualActual aa; with ActualActual aa(ActualActual::ISMA); to get the right convention. Later, Luigi ---------------------------------------- Innovation is hard to schedule. -- Dan Fylstra |
Free forum by Nabble | Edit this page |