Additional result as an array

View: New views
5 Messages — Rating Filter:   Alert me  

Additional result as an array

by Yomi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Here is what I am trying to do:
I have a PDE engine that I am happy with but I would like to see the delta on the full grid (to see the behavior at the barrier).
As of today the additionalResults_ should be a single value due to the boost::any type.
Is there any otherway to see my result instead of developping a pecial function for this special model?

Cheers

Re: Additional result as an array

by Luigi Ballabio :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Oct 21, 2009, at 6:31 PM, Yomi wrote:
> Here is what I am trying to do:
> I have a PDE engine that I am happy with but I would like to see the  
> delta
> on the full grid (to see the behavior at the barrier).
> As of today the additionalResults_ should be a single value due to the
> boost::any type.

As far as I know, boost::any can contain any type including arrays. Am  
I wrong?

Luigi


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
QuantLib-users mailing list
QuantLib-users@...
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Re: Additional result as an array

by Dimathematician :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Luigi Ballabio schrieb:

> On Oct 21, 2009, at 6:31 PM, Yomi wrote:
>  
>> Here is what I am trying to do:
>> I have a PDE engine that I am happy with but I would like to see the  
>> delta
>> on the full grid (to see the behavior at the barrier).
>> As of today the additionalResults_ should be a single value due to the
>> boost::any type.
>>    
>
> As far as I know, boost::any can contain any type including arrays. Am  
> I wrong?
>
> Luigi
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> QuantLib-users mailing list
> QuantLib-users@...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
>  
Yes it can include arrays, or any-thing


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
QuantLib-users mailing list
QuantLib-users@...
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Re: Additional result as an array

by Yomi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I doubled check and indeed it can contain arrays.
But if you use the qlInstrumentResults function, you get the following error message:

qlInstrumentResults - boost::bad_any_cast: failed conversion using boost::any_cast

I don't know if I do something wrong but I would like to dump my greeks in excel when needed and it was sounding the natural way.

Tx

Dimathematician wrote:
Luigi Ballabio schrieb:
> On Oct 21, 2009, at 6:31 PM, Yomi wrote:
>  
>> Here is what I am trying to do:
>> I have a PDE engine that I am happy with but I would like to see the  
>> delta
>> on the full grid (to see the behavior at the barrier).
>> As of today the additionalResults_ should be a single value due to the
>> boost::any type.
>>    
>
> As far as I know, boost::any can contain any type including arrays. Am  
> I wrong?
>
> Luigi
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> QuantLib-users mailing list
> QuantLib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
>  
Yes it can include arrays, or any-thing


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Re: Additional result as an array

by Luigi Ballabio :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-10-22 at 00:00 -0700, Yomi wrote:
> I doubled check and indeed it can contain arrays.
> But if you use the qlInstrumentResults function, you get the following error
> message:
>
> qlInstrumentResults - boost::bad_any_cast: failed conversion using
> boost::any_cast

Oh, you meant in Excel.  Yes, that's limited to doubles (no templates
there.)  You'll need to generalize the function somehow.  At a pinch,
you can probably create another one that performs the correct cast.
Nando? Eric?

Luigi


--

fix, n.,v.
What one does when a problem has been reported too many times
to be ignored.
-- the Jargon file



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
QuantLib-users mailing list
QuantLib-users@...
https://lists.sourceforge.net/lists/listinfo/quantlib-users