Login  Register

Re: extending instrument question

Posted by Roland Lichters-2 on Mar 01, 2012; 1:42pm
URL: http://quantlib.414.s1.nabble.com/extending-instrument-question-tp204p206.html

Hi Pepe,
I also went down that road decorating the instrument and extending the pricing engines to provide things like cva of pfe. That works fine e.g. for single-trade cva, but does not work so well when you have to deal with portfolios (and netting requires cva/pfe calculation for portfolios of trades). Then you need to either map a portfolio to a flexible instrument or take a different approach where cva/pfe is produced by some portfolio analytics tool. The latter can be made quite generic and scalable, the former is perfect for single deals, so I am using both.
Hope this helps!
Regards,
Roland

> Hi Pepe,
>    in the short term I'd abuse the pricing engine.  Not that it's
> much of an abuse.
> For the long term, I'm not sure, but then again I think I haven't
> grasped the problem yet.  Do you have a use case you can share?
>
> Luigi
>
> P.S. Not sure about the visitor pattern.  It would require your
> visitor to specialize for all instruments, giving lots of coupling in
> a single class.
>
>
> On Wed, Feb 22, 2012 at 9:51 AM,  <[hidden email]> wrote:
>> The library is pricing oriented, ok; but say I want to use Instruments for other things like mitigation, c.v.a, etc... So I need to ask an instrument for something else. I have tried some solutions which are not very neat, decorating them, abusing the PricingEngine concepts for other things than pricing, etc... Also wondered if all instruments were visitable would it allow one to do this?
>> Is anyone else in this situation? and whats the correct way to do it?
>> Thanks
>> Pepe
>>
>> ------------------------------------------------------------------------------
>> Virtualization & Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>> _______________________________________________
>> QuantLib-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users