Posted by
Rahul Gupta on
Aug 14, 2008; 11:38am
URL: http://quantlib.414.s1.nabble.com/Exposure-Issues-tp12286p12290.html
Eric,
Thank you for such a thorough reply. I should first clarify the
following issues:
1) I was explicitly providing a null, I merely didn't type it correctly.
2) The boosts issue is again a testament to my typing skills.
Now with regards to the engine. I believe that I may have taken an
excessively complex route towards adding an engine. My terminal goal is
to expose Analytic and MC heston engines. Assuming I strip my code,
would this be the best way to add the engines?
1) Provide a type in enumeratedclasses.xml - Analytic = without
timesteps, MC = with timesteps [in terms of type] (say, AHE and MCHE)
2) Add a similar definition in pricingengines.xml/cpp/hpp to what I have
already done in my own files.
Many thanks,
Rahul
-----Original Message-----
From: Eric Ehlers [mailto:
[hidden email]]
Sent: 14 August 2008 12:50 PM
To: Rahul Gupta
Cc:
[hidden email]
Subject: Re: [Quantlib-dev] Exposure Issues
Hello,
On Wed, August 13, 2008 11:15, Rahul Gupta wrote:
>
> Lack of label for the engine simply means I get a excel assigned name
> rather
than my
> own.
Not exactly ;)
For excel to assign the name you would need explicitly to provide a
null:
qlPricingEngine(, "AE", B30)
Note the comma before the "AE". In this case QLXL generates an ID like
obj_00000.
You have this:
qlPricingEngine("AE", B30)
In that case "AE" is interpreted as the object ID, and the contents of
B30 are used as the Engine ID.
> Any other ideas?
Assuming the above is sorted out...
> When I try to instantiate a qlPricingEngine("AE",B30), i.e. a
> GeneralizedBlackScholesEngine, I get #NUM, and the following error
> from
> ohRetrieveError():
>
> qlPricingEngine - Error retrieving Enumeration from Registry - the
> type 'class boost::shared_ptr<class QuantLib::PricingEngine>
> (__cdecl*)(class boosts::shared_ptr<class
QuantLib::GeneralizedBlackScholesProcess> const &)'
> is not available!
That error indicates that the enumeration registry is in an inconsistent
state. In the standard release of QLXL I believe it's completely
impossible to trigger that error regardless of the inputs, so your
change has somehow broken the initialization of the app.
The long type name you are looking at is the signature of function
AE_Engine() in file
QuantLibAddin\qlo\Enumerations\Constructors\enumeratedclasses.hpp.
The link between the string "AE" and the function AE_Engine() is
established in line 51 of file
QuantLibAddin\qlo\Enumerations\Register\register_classes.cpp:
create.registerType("AE",
reinterpret_cast<void*>(AE_Engine));
That code is autogenerated by gensrc based on the contents of
QuantLibAddin\gensrc\metadata\Enumerations\enumeratedclasses.xml.
Did you edit enumeratedclasses.xml?
I notice in the error message you have "boosts" instead of "boost". You
didn't do some hard core hackage in which you hard coded a type name and
misspelled it?
Otherwise... I see nothing in your description of your changes which
would corrupt the enumeration registry. Whatever the cause of the
problem, I'm afraid there's not enough info in your email to identify
it.
Maybe a sanity check - comment out all of your changes, rebuild, and see
if the problem goes away? Also compare the behavior of your XLL with
that of the binary release.
Good luck. Pls send another message if you come across more details
that might help identify the problem. I'd be curious to know the
resolution once you find it.
Regards,
Eric
-------------------------
Eric Ehlers
nazcatech sprl | Brussels |
http://www.nazcatech.be Distributed
computing for pricing analytics - Use Microsoft Excel as a client to the
Grid
*********** Legal Disclaimer and Other Information***********
The information contained in this e-mail message is intended only for the use of the individual named above. If the reader of this e-mail message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this message is strictly prohibited. If you have received this message in error, please immediately notify us by telephone at 020.7470.7400, and destroy the original message.
Moore Europe Capital Management, LLP - One Curzon Street, London, W1J 5HA, UK
Registered as a limited liability partnership in England and Wales No: OC322533
with its registered office at One Silk Street, London, EC2Y 8HQ
Authorised and regulated by the Financial Services Authority
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev