qlSwapLegAnalysis on SwapRateHelper2

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

qlSwapLegAnalysis on SwapRateHelper2

Alexander Zvyagin
Hello,

in Excel from SwapRateHelper object ID I would like get
QuantLibAddin::Swap object id. How can I achieve that?

Here is the full question.
I have a set of Excel files which builds a yield curve. One of the
(many) instruments used in the curve construction is a swap
(SwapRateHelper), which should be evaluated to PV=0. Unfortunately it
does not, and I need to investigate why. I planned to use
qlSwapLegAnalysis() function as a debugging tool, but it requires as
an argument object of type QuantLibAddin::Swap. The object which I
have access to is SwapRateHelper. There is a method
SwapRateHelper::swap() which  returns the object which I need, but I
have no idea how can I get access to it from Excel. Any help is deeply
appreciated.

Thanks a lot in advance!
Alexander

------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: qlSwapLegAnalysis on SwapRateHelper2

Eric Ehlers-3
Hi Alexander,

The exact task that you are attempting is not possible.

The only objects that are stored in the repository with IDs are those
that are created explicitly using constructors exported to Excel.  So
the QuantLib::Swap object that you are interested in exists in memory
but does not have an ID in the repository.

There is a little technique that can be used to grab such an object,
attach an ID to it, and return it to the spreadsheet.  Effectively you
would be implementing a function "qlSwapRateHelperSwap" which would
return the ID of the swap.  See
QuantLibAddin::MarketModelMultiProduct::evolution().

Regards,
Eric

On Thu, 22 Sep 2016 13:10:21 +0200
Alexander Zvyagin <[hidden email]> wrote:

> Hello,
>
> in Excel from SwapRateHelper object ID I would like get
> QuantLibAddin::Swap object id. How can I achieve that?
>
> Here is the full question.
> I have a set of Excel files which builds a yield curve. One of the
> (many) instruments used in the curve construction is a swap
> (SwapRateHelper), which should be evaluated to PV=0. Unfortunately it
> does not, and I need to investigate why. I planned to use
> qlSwapLegAnalysis() function as a debugging tool, but it requires as
> an argument object of type QuantLibAddin::Swap. The object which I
> have access to is SwapRateHelper. There is a method
> SwapRateHelper::swap() which  returns the object which I need, but I
> have no idea how can I get access to it from Excel. Any help is deeply
> appreciated.
>
> Thanks a lot in advance!
> Alexander
>
> ------------------------------------------------------------------------------
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users