Serving the Quantitative Finance Community

 
User avatar
gileper
Topic Author
Posts: 0
Joined: October 26th, 2002, 11:26 am

Yield curve class c++

October 15th, 2008, 10:38 am

I am building my own library in c++ .. I have many ideas for structuring yield curve class, but I am confused..What could be a Simple and efficient design in terms of base class, derived class, composition?What relationship between rates, discount factor, and zc curve/ zcb? I thought to create a simple structure for rates and to create private pointers in the others mentioned classes.Moreover, how to deal with discount factors and other basic rate's functions? ( friend functions? .. I dont like this way..)brgdsDaniel do you have some pdf about that?
 
User avatar
quantmeh
Posts: 0
Joined: April 6th, 2007, 1:39 pm

Yield curve class c++

October 15th, 2008, 11:17 am

look at "financial numerical recipes" book
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Yield curve class c++

October 15th, 2008, 12:32 pm

QuoteOriginally posted by: gileperI am building my own library in c++ .. I have many ideas for structuring yield curve class, but I am confused..What could be a Simple and efficient design in terms of base class, derived class, composition?What relationship between rates, discount factor, and zc curve/ zcb? I thought to create a simple structure for rates and to create private pointers in the others mentioned classes.Moreover, how to deal with discount factors and other basic rate's functions? ( friend functions? .. I dont like this way..)brgdsDaniel do you have some pdf about that?Have you written up what you want to have in the library? how flexible should it be and what products should it suppport? A nice way to do this is concept maps. Then the concepts will be the basis for the OO implementation.hthDaniel Quotefriend functions? .. I dont like this wayAgree So, to answer, I don't have any pdf But just a cubic spline C++ in my 2006 book.
Last edited by Cuchulainn on October 14th, 2008, 10:00 pm, edited 1 time in total.
 
User avatar
gileper
Topic Author
Posts: 0
Joined: October 26th, 2002, 11:26 am

Yield curve class c++

October 15th, 2008, 3:56 pm

thx.. i love your book .. i learnt c++ programming there..When a new book with credit derivatives and more ir??My impression (i dont have big experience!) ....I found maps and multimaps slower with respect to vector<pair> when used in intensive calibration routines..brdgsg.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Yield curve class c++

October 15th, 2008, 4:05 pm

QuoteWhen a new book with credit derivatives and more ir??There's a new MC Framework book with Dr. Kienitz (a chapter on hybrid ir), early next year.//vector uses int as index while map needs to build them up, so I suppose it's slower. BTW have you tried boost vectors and matrix?
Last edited by Cuchulainn on October 14th, 2008, 10:00 pm, edited 1 time in total.
 
User avatar
gileper
Topic Author
Posts: 0
Joined: October 26th, 2002, 11:26 am

Yield curve class c++

October 21st, 2008, 9:15 pm

Sorry I misunderstood your post.. you said concept maps.. not maps ! I should thinking about that.....Boost? I started some weeks ago.. It is a huge library.. I need to improve my knowledge..it is not trivialI wait your new book.brgds
 
User avatar
jjyu
Posts: 0
Joined: September 28th, 2005, 12:34 pm

Yield curve class c++

October 21st, 2008, 9:56 pm

QuoteOriginally posted by: gileperI am building my own library in c++ .. I have many ideas for structuring yield curve class, but I am confused..What could be a Simple and efficient design in terms of base class, derived class, composition?What relationship between rates, discount factor, and zc curve/ zcb? I thought to create a simple structure for rates and to create private pointers in the others mentioned classes.Moreover, how to deal with discount factors and other basic rate's functions? ( friend functions? .. I dont like this way..)brgdsDaniel do you have some pdf about that?I would lay everything on the paper first. As soon as you can define the components with their roles and relationship one another, then apply them in a few use cases.These are the steps I would take before anything else.Regards,Jeff