Login  Register

Re: Net yield (after taxes) of a Bond. How to differentiate on cashflow type?

Posted by Luigi Ballabio on Dec 24, 2010; 9:53am
URL: http://quantlib.414.s1.nabble.com/Net-yield-after-taxes-of-a-Bond-How-to-differentiate-on-cashflow-type-tp167p168.html

On Tue, 2010-12-14 at 15:20 +0100, Martino Fornasa wrote:
> I'm trying to build a function to calculate the net yield (after taxes)
> of a fixed rate bond. In order to do that, I need to differentiate
> between coupon-cashflows and, for example, redemption cashflows.
>
> With a plain-vanilla fixed-rate bond I can assume that only the last
> cashflow is a redemption.
> In the general case what is my best option? Till now the better option I
> can think is to intersect the cashflow vector with the redemption
> vector. Any ideas?

Yes, it's either that or switching on the type of each cashflow (you can
try casting to Coupon, or use a visitor; <ql/cashflows/cashflows.cpp>
has examples of both approaches.)

Luigi


--

Vin: It's like this fellow I knew in El Paso. One day, he just took
all his clothes off and jumped in a mess of cactus. I asked him that
same question, "Why?"
Calvera: And?
Vin: He said, "It seemed like a good idea at the time."
-- The Magnificent Seven



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users