> Thanks for responding back Peter! It's comforting to know I am not the only
> one working tonight...
>
> I have been sort of suspecting an answer along these lines, but I wanted to
> be sure that using the MarketModelMultiProduct was indeed the right way to
> go.
>
> Looking at the code I understand that in order to price a bermudan swaption
> I must first create the appropriate MarketModelMultiProduct object that
> represents that swaption and then do what the function "simulate" in
> marketmodel.cpp does, namely use a MarketModelEvolver to generate a
> SequenceStatisticsInc object. If I am looking for the swaption's npv, that
> will then be given by stats.mean(), where stats is the generated
> SequenceStatisticsInc object.
>
> Perfect! (If I understand it correctly).
>
> Do you know by chance if there is any mapping function that maps an existing
> QuantLib::Swaption object to the corresponding MarketModelMultiProduct
> object?
>
> Of' course I can write my own, but it wouldn't hurt if one was available
> already. I am asking, because I work already extensively with
> QuantLib::Swaption objects, which I would now like to price using the
> available market model apparatus.
>
> Best regards and thanks a lot once more and a happy new year,
>
> Ioannis
>
>
>
> Peter Caspers <
[hidden email]> schrieb am 18:35 Samstag, 31.Dezember
> 2016:
>
>
> Hi Ioannis,
>
> no, there isn't. There are two Libor Market Model implementations and
> the "non-legacy" one under ql/models/marketmodels requires instruments
> to inherit from MarketModelMultiProduct. This interface is quite
> different from QuantLib::Instrument, for example it is obviously
> designed towards pricing in the specific model implementation.
> Otherwise there is lots of example code for this e.g.
>
>
https://github.com/lballabio/QuantLib/blob/master/test-suite/marketmodel.cpp>
https://github.com/lballabio/QuantLib/blob/master/Examples/MarketModels/MarketModels.cpp#L113>
> Is there a reason why you want the usual QuantLib instrument interface
> (like e.g. you have an existing infrastructure with pluggable pricing
> engines)?
>
> Best Regards
> Peter
>
> On 29 December 2016 at 10:05, Yannis <
[hidden email]> wrote:
>> Hi,
>>
>> I am looking for code that demonstrates the usage of market models.
>>
>> Is there anywhere in the test folder a piece of code that prices any kind
>> of
>> Instrument (i.e. an object the type of which derives from
>> QuantLib::Instrument) based on a non-experimental, non-legacy Market
>> Model?
>>
>> For example, searching for a pricing example of a QuantLib::Swaption, I
>> have
>> only found code that makes use of QuantLib::LfmSwaptionEngine, which
>> unfortunately is part of the legacy folder.
>>
>> Thanks,
>>
>> Ioannis
>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org!
http://sdm.link/slashdot>> _______________________________________________
>> QuantLib-users mailing list
>>
[hidden email]>>
https://lists.sourceforge.net/lists/listinfo/quantlib-users>
>>
>
>