extracting "Arguments" from "Instrument"

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

extracting "Arguments" from "Instrument"

Michael Dirkmann
Hi,

is there a way to extract the 'Argument*' from an 'Instrument'?
In my special case I would like to extract the Swaption::arguments* from a
Swaption to provide it to the swaption-function of the G2-model.
Or do I need to setup Swaption::arguments indepenedntly form the Swaption?

TIA

  Michael



Reply | Threaded
Open this post in threaded view
|

Re: extracting "Arguments" from "Instrument"

Luigi Ballabio-2
On 2004.07.12 20:28, Michael Dirkmann wrote:
> is there a way to extract the 'Argument*' from an 'Instrument'?
> In my special case I would like to extract the Swaption::arguments*
> from a Swaption to provide it to the swaption-function of the G2-
> model.

Michael,
        the following should work:

Swaption swaption(...);
Swaption::arguments args;
swaption.setupArguments(&args);

The same applies to all instruments providing arguments.

Later,
        Luigi