Posted by
Neil P Firth on
URL: http://quantlib.414.s1.nabble.com/Policy-Based-Design-Templates-Quantlib-tp2601p2605.html
Hello,
Before taking on Basket options I thought I'd port the Barrier option code
to the PricingEngine framework, and then attempt Monte Carlo for
Barriers.
I need some guidance on the separation of concerns of the different
directories. I think that it would be cleanest if all enum declarations
(for OptionType, BarrierType, CapFloor::Type) were in the same location.
It would also make sense if we had a pattern for the declarations for
Arguments and Results, currently some are in with the Instruments, and
some are in with the PricingEngines.
I suggest that the Instruments have 'ownership' of their Arguments and
Results, as there may be many Engines for each Instrument (I realise it is
actually a many-to-many relationship). This would mean, for example,
moving the VanillaOptionArguments from vanillaengines.hpp to
vanillaoption.hpp. There should then be no references to specific
PricingEngines in the Instruments.
Any suggestions / objections / comments?
Thanks,
Neil
---------------------------------------------------
Neil Firth
Brasenose College Oxford OX1 4AJ United Kingdom
Office: 01865 280616
[hidden email]
http://www.maths.ox.ac.uk/~firth---------------------------------------------------