Early Redemption Payoff

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Early Redemption Payoff

Jason Bowsher

Hi Quantlib Users

 

Does anyone know if an example early redemption payoff class exist for quantlib

 

Regards

 

Jason


--
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com!

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Early Redemption Payoff

Jason Bowsher
Hi Quantlib Users
 
Here is what I am trying to do.
 
Take an underlying equity and mcSimulate with daily or monthly observation dates and 5 annual 'coupon dates'.
 
I am interested in the max underlying simulated spot price at each of the coupon dates.
 
At a coupon date, if a cap was exceed on any of the observation dates then a % is retunred on the notional and the notional is redeemed thus zero for all future coupon dates.
 
Haveing looked at quantlib my questions are how to create a payoff that is passed the max of all the simulated points at a coupon date.  If the max simulated obs date price is > x% of the original spot price then generate a cashflow of x% of the notional and return the notional.  Thus set the instrument to expired.
 
As have not really used quantlib before can anyone give me a clude on the following:
 
1.) How to get the mcSimulator to simulate a 1yr path with daily path points (observation points).  Does this have anything to do with StepsPerYear parameter assigned to the pricingengine?.  Also Can anyone suggest a line in the code where I can put a break point to view the simulated patch points.
 
2.) How to pass the max price of all observation dates from the path generator to the payoff class. of pass all simulated points to the payoff on a coupon date.
 
3.) How to include in the payoff class a trigger that defaults the cashflow to zero if the cap was hit in the previous coupon.
 
Fairly new at OO C++ so might seem like a silly question
 
Regards
 
Jason
----- Original Message -----
From: "Jason Bowsher"
To: [hidden email]
Subject: Early Redemption Payoff
Date: Tue, 16 Sep 2008 12:21:41 +0000


Hi Quantlib Users

 

Does anyone know if an example early redemption payoff class exist for quantlib

 

Regards

 

Jason


--
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com!

--
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com!

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Early Redemption Payoff

Luigi Ballabio
On Wed, 2008-09-17 at 12:57 +0000, Jason Bowsher wrote:

> Here is what I am trying to do.
>  
> Take an underlying equity and mcSimulate with daily or monthly
> observation dates and 5 annual 'coupon dates'.
>  
> At a coupon date, if a cap was exceed on any of the observation dates
> then a % is retunred on the notional and the notional is redeemed thus
> zero for all future coupon dates.
>  
> [...]
>  
> As have not really used quantlib before can anyone give me a clude on
> the following:
>  
> 1.) How to get the mcSimulator to simulate a 1yr path with daily path
> points (observation points).  Does this have anything to do with
> StepsPerYear parameter assigned to the pricingengine?.

Yes, you can use that parameter.

>   Also Can anyone suggest a line in the code where I can put a break
> point to view the simulated patch points.

I'd put it inside the path pricer's operator() (see later.)

> 2.) How to pass the max price of all observation dates from the path
> generator to the payoff class. of pass all simulated points to the
> payoff on a coupon date.

I wouldn't use a payoff class. You can:
1) pass a NullPayoff to the base Option class since it won't be used
(see e.g. the EverestOption class constructor.)
2) write a custom option, path pricer and pricing engine. The option
will store parameters such as the coupon dates, the notional, and the
rate paid when triggered.  The pricing engine will define the
corresponding arguments, which must be filled by the option's
setupArguments() method (see chapter 2 at
<http://luigi.ballabio.googlepages.com/qlbook> if you're not familiar
with the framework. Also, it will inherit from McSimulation, like the
other existing MC engines.  The path pricer will perform the
calculation; its operator() has access to all path points, so it can
check them and return the appropriate result. It will also need discount
factors at all coupon dates.

In short: it's possible, but it needs some work. Write back if you need
details.

Luigi


--

There is no opinion so absurd that some philosopher will not
express it.
-- Marcus Tullius Cicero, "Ad familiares"



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users