http://quantlib.414.s1.nabble.com/Problem-within-the-Bond-YieldSolver-class-tp4278p4297.html
Okay.
I agree on all four scenarios.
cash position.
price should reflect this position.
that the cash position is treated on it's own. The BOND class has no
knowledge of this.
daily has to manage two portfolios. The BOND portfolio and the CASH
portfolio.
Seems that FinancialCAD looks at it the other way. (ie, when you request the
dirty price, it returns the same value as the clean price. It also reports
the accrued as zero). Thus no CASH position to manage.
Interesting... but I think we are on the same page now.
Thanks for the detailed breakdown...
Toy out.
I agree totally.
>From: Luigi Ballabio <
[hidden email]>
>To: Toyin Akin <
[hidden email]>
>CC:
[hidden email]
>Subject: Re: [Quantlib-users] Re: accrualAmount() function within the bond
>class...
>Date: Fri, 09 Dec 2005 17:36:24 +0000
>
>
>On 12/09/2005 05:13:40 PM, Toyin Akin wrote:
>>
>>>If the coupon is still included in the bond (QL_TODAYS_COUPON is
>>>defined) we pay the dirty price and tonight we'll receive the
>>>coupon. The PV is the clean price.
>>
>>Above you write "equal's to the clean Price if QL_TODAYS_COUPON is
>>defined".
>
>I probably meant the other way around. I even wrote the wrong name for the
>define :)
>
>>Okay, so maybe it's a question of timing, the coupon is received
>>tonight so it's in tomorrow's cashflow etc...
>
>No, it's still today's cashflow. Let's try and put it this way.
>
>1) At all times and regardless of whether QL_TODAYS_PAYMENTS is defined,
>
>clean price = dirty price - accrued amount.
>
>2) Upon a coupon payment, both the dirty price and the accrued amount drop
>by the amount of the coupon. Since the clean price is given by their
>difference, it doesn't change.
>
>For instance:
>
>- the bond pays 5$ tomorrow. The dirty price is 102$ and the accrued
>amount is almost 5$. The clean price is 97$. If I buy the bond, I'll pay
>102$ today and receive 5$ tomorrow. After the payment, I'll be short of
>97$ in cash and I will hold a bond whose value is the NPV of the future
>coupons.
>
>- Let's say I didn't buy the bond. Forward 2 days. The bond paid 5$
>yesterday. The dirty price dropped and is now 97$; the accrued amount
>dropped and is almost 0. The clean price is still 97$. If I buy the bond,
>I'll pay 97$ and I will hold a bond whose value is the NPV of the same
>future coupons.
>
>- The bond pays today, and QL_TODAYS_PAYMENTS _is not_ defined.
>The current holder already received the payment. The dirty price is
>already down to 97$ and the accrued amount is already down to 0. The clean
>price is 97$ as usual. If I buy the bond, I'll pay 97$ and I will hold a
>bond whose value is the NPV of the same future coupons.
>
>- The bond pays today, and QL_TODAYS_PAYMENTS _is_ defined.
>The current holder didn't receive the payment yet. The dirty price is
>still 102$ and the accrued amount is still 5$. Not surprisingly, the clean
>price is 97$. If I buy the bond, I'll pay 102$ and receive 5$ shortly
>thereafter. When the day closes, I'll be short of 97$ in cash and I will
>hold a bond whose value is the NPV of the now familiar future coupons.
>
>Did you expect different figures in any of the above cases?
>
>Luigi
>
>
>
>----------------------------------------
>
>I have yet to see any problem, however complicated, which, when you
>looked at it in the right way, did not become still more complicated.
>-- Poul Anderson
>