CDS

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

CDS

Simon Ibbotson
There's a function in QuantLib for deriving the next CME IMM date (3rd Wednesday). Is there anything similar for other exchanges?
In particular, most CDS roll on the 20th of the IMM month (except emerging markets which roll on the 20th of every month). I could write some external code, but I guessed that it would be better within QuantLib - anyone done/doing this?
 
Cheers,
 
Simon
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: CDS

japari
This is what I used to do (removed the code to get this done by the
user-coupons) but only applies to the CDSs and it is not the 3rd Wedn rule.
Theres a broken period from "start date" to the (badly named) "first date"

Another feature to be added is the specific day count convention for CDS that
adds an extra day to the last coupon period. Again one can do it passing the
coupon schedule that way.

Rgds
pp


            Date cdsFstDate;
            if( (cds_start_date.month() == Month::March) ||
                (cds_start_date.month() == Month::April) ||
                (cds_start_date.month() == Month::May)){
                    cdsFstDate = Date(20, Month::June, cds_start_date.year());
            }else if( (cds_start_date.month() == Month::June) ||
                (cds_start_date.month() == Month::July) ||
                (cds_start_date.month() == Month::August)){
                    cdsFstDate = Date(20, Month::September,
cds_start_date.year());
            }else if( (cds_start_date.month() == Month::September) ||
                (cds_start_date.month() == Month::October) ||
                (cds_start_date.month() == Month::November)){
                    cdsFstDate = Date(20, Month::December,
cds_start_date.year());
            }else if( (cds_start_date.month() == Month::December)) {
                cdsFstDate = Date(20, Month::March, cds_start_date.year()+1);
            }else if( (cds_start_date.month() == Month::January) ||
                (cds_start_date.month() == Month::February)){
                    cdsFstDate = Date(20, Month::March, cds_start_date.year());
            }
            cdsFstDate = cal.adjust(cdsFstDate, bdc);


Quoting Simon Ibbotson <[hidden email]>:

> There's a function in QuantLib for deriving the next CME IMM date (3rd
> Wednesday). Is there anything similar for other exchanges?
> In particular, most CDS roll on the 20th of the IMM month (except emerging
> markets which roll on the 20th of every month). I could write some external
> code, but I guessed that it would be better within QuantLib - anyone
> done/doing this?
>
> Cheers,
>
> Simon
>



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: CDS

Luigi Ballabio
In reply to this post by Simon Ibbotson
On Thu, 2008-05-22 at 09:30 +0100, Simon Ibbotson wrote:
> There's a function in QuantLib for deriving the next CME IMM date (3rd
> Wednesday). Is there anything similar for other exchanges?
> In particular, most CDS roll on the 20th of the IMM month (except
> emerging markets which roll on the 20th of every month). I could write
> some external code, but I guessed that it would be better within
> QuantLib - anyone done/doing this?

If I'm not mistaken, I've had a contribution for generating a schedule
on IMM dates. I'll have to check it.

Luigi


--

Olmstead's Law:
After all is said and done, a hell of a lot more is said
than done.



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev