|
From: Sebastian P. <Seb...@gm...> - 2012-11-18 21:37:10
|
Hi Jan, you are right that deriving from a STL container may be a bad idea. This problem can be circumvented by redefining the Leg (Class) via composition. What I'm trying to do is (somehow) making a snapshot of a QuantLib environment, e.g. a swap, including legs, pricing engines, market data objects,... . This snapshot should contain enough information to reopen it in an Excel session. In the current QL Leg design the leg type informations are lost after passing (casting) it into a swap instrument. For example if you want to "export" a simple QL swap including an iborLeg and a FixedRateLeg into Excel a nice result would be a call to three QLXL functions (either just in single cells or including some fancy parameter boxes): qlswap, qlIborLeg, qlFixedRateLeg. But because the swap has lost the information of the underlying leg types this is difficult to achieve. I imagine that leg type information could also be helpful in other algorithmic tasks. Regards, Sebastian -- View this message in context: http://old.nabble.com/Why-doesn%27t-there-exist-a-QuantLib-Leg-Hierachy--tp34689442p34694954.html Sent from the quantlib-dev mailing list archive at Nabble.com. |