Exercise 8.2

This forum is to discuss the book "C++ design patterns and derivatives pricing."

Exercise 8.2

Postby pzling » Mon Mar 05, 2012 2:39 am

Hi

I just wanted check to see if I'm on the right (reasonable) path and what approach you would have taken.

Exercise 8.2 concerns developing a binomial tree which has memory requirements which grows linearly with the number of time steps required. Since the exponential growth of the simple (recombining) binomial tree arises from adding nodes for all the previous time steps, I was thinking of 'linearising' the memory growth by having the class store only 1 time layer of nodes for the number of time steps required at any one time. We would then move to the time layer before/after since we know the relationship between each time layer (ie. expected/branching present/future value).

I would then think this approach essentially trades off cache memory against computation time. Is that the intention?

Any comments appreciated, thanks.
pzling
 
Posts: 41
Joined: Sat Jan 14, 2012 8:52 pm

Re: Exercise 8.2

Postby pzling » Mon Mar 05, 2012 9:52 am

Sorry, just flipped back through the book and the approach outlined is pretty much as described. Thanks anyway.
pzling
 
Posts: 41
Joined: Sat Jan 14, 2012 8:52 pm


Return to C++ design patterns and derivatives pricing

Who is online

Users browsing this forum: No registered users and 1 guest

cron