R: Hull White Calibration?

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

R: Hull White Calibration?

Berardi Luca
R: [Quantlib-users] Hull White Calibration?

Luigi, Nando

I perhaps managed to find the exact location where the exception is thrown.
I list in the following the sequence of functions called from the point where the exception is thrown (I won't list the function arguments were needed, for brevity):

1) CapHelper::CapHelper()
2) Instrument::NPV()
3) Instrument::calculate()
4) LazyObject::calculate()
5) Swap::performCalculations() -----> secondLegNPV_ = ...
6) TermStructure::discount()
7) PiecewiseFlatForward::discountImpl()
8) ParCoupon::amount()
9) XiborManager::getHistory()

at this point the exception is thrown, and is subsequently catched by ParCoupon::amount() but no action is taken: there is only a comment "//fall through and forecast".

I also rebuilt all the QuantLib library from scratch, but there was no improvement.
I'm now including in the attachment the (self-contained) source code which is giving me pain...perhaps on someone else's machine is it going to work?

Ciao,
Luca




-----Messaggio originale-----
Da: Luigi Ballabio [[hidden email]]
Inviato: mercoledì 24 marzo 2004 15.47
A: Berardi Luca
Cc: [hidden email]
Oggetto: Re: [Quantlib-users] Hull White Calibration?


On 2004.03.24 12:34, Berardi Luca wrote:
> - the QuantLib version I'm using is 0.3.4 (currently using the debug
> libraries)
> - when I step through the code in the Visual Studio 6.0 Debugger, I
> noticed that when each CapHelper is instantiated (pls refer to the 
> code I previously sent out) at the line:
>
> Handle<CalibrationHelper>
> hCapHelper(new CapHelper(volaLength[i],
>            rhMarketElement,index, rhTermStructure));
> I get the following message in the Output Window: "First-chance
> exception in
> EXCEL.EXE (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception."

Luca,
        can you step into the CapHelper instantiation? After executing 
the line above, does the Handle contain a non-null pointer?

Also, how does your code work if you use it without Excel in the 
picture---say, if you write a short main() to test it?

Later,
        Luigi


DISCLAIMER: Privileged/Confidential Information may be contained in this message and in any of its attachments (the "message"). If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply e-mail. The contents of this message shall be understood as neither given nor endorsed by Banca Profilo S.p.A., nor Profilo SGR S.p.A., nor Profilo Asset Management SGR S.p.A., nor Profilo Academy S.p.A.. Banca Profilo S.p.A., Profilo SGR S.p.A., Profilo Asset Management SGR S.p.A., Profilo Academy S.p.A. do not accept liability for corruption, interception or amendment, if any, or the consequences thereof.

Il presente messaggio e/o i suoi allegati (di seguito il "messaggio") possono contenere informazioni privilegiate e/o confidenziali. Se non siete i destinatari indicati nel messaggio (o persona incaricata di inoltrare il messaggio al/i destinatario/i), non potete copiare o inoltrare il messaggio ad altri e siete invitati a distruggerlo dandone informazione al mittente a mezzo e-mail. Il contenuto del presente messaggio non deve essere considerato come trasmesso o autorizzato nè da Banca Profilo S.p.A., nè da Profilo SGR S.p.A., nè da Profilo Asset Management SGR S.p.A., nè da Profilo Academy S.p.A.. Nè Banca Profilo S.p.A., nè Profilo SGR S.p.A., nè Profilo Asset Management SGR S.p.A., nè Profilo Academy S.p.A. si assumono alcuna responsabilità per eventuali intercettazioni, modifiche o danneggiamenti del presente messaggio e-mail e per le eventuali conseguenze.


 

 


peppo.cpp (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: R: Hull White Calibration?

Liguo Song
The attached program compiles and runs smoothly on RH Linux 9.0 with
QuantLib 0.3.5, the near-released version. Maybe, it is MS Windows
specific or solved by 0.3.5. The latter is less likely though.


Liguo



Berardi Luca wrote:

>
> Luigi, Nando
>
> I perhaps managed to find the exact location where the exception is
> thrown.
> I list in the following the sequence of functions called from the
> point where the exception is thrown (I won't list the function
> arguments were needed, for brevity):
>
> 1) CapHelper::CapHelper()
> 2) Instrument::NPV()
> 3) Instrument::calculate()
> 4) LazyObject::calculate()
> 5) Swap::performCalculations() -----> secondLegNPV_ = ...
> 6) TermStructure::discount()
> 7) PiecewiseFlatForward::discountImpl()
> 8) ParCoupon::amount()
> 9) XiborManager::getHistory()
>
> at this point the exception is thrown, and is subsequently catched by
> ParCoupon::amount() but no action is taken: there is only a comment
> "//fall through and forecast".
>
> I also rebuilt all the QuantLib library from scratch, but there was no
> improvement.
> I'm now including in the attachment the (self-contained) source code
> which is giving me pain...perhaps on someone else's machine is it
> going to work?
>
> Ciao,
> Luca
>
>
>
>
> -----Messaggio originale-----
> Da: Luigi Ballabio [mailto:[hidden email]]
> Inviato: mercoledì 24 marzo 2004 15.47
> A: Berardi Luca
> Cc: [hidden email]
> Oggetto: Re: [Quantlib-users] Hull White Calibration?
>
>
> On 2004.03.24 12:34, Berardi Luca wrote:
> > - the QuantLib version I'm using is 0.3.4 (currently using the debug
> > libraries)
> > - when I step through the code in the Visual Studio 6.0 Debugger, I
> > noticed that when each CapHelper is instantiated (pls refer to the
> > code I previously sent out) at the line:
> >
> > Handle<CalibrationHelper>
> > hCapHelper(new CapHelper(volaLength[i],
> >            rhMarketElement,index, rhTermStructure));
> > I get the following message in the Output Window: "First-chance
> > exception in
> > EXCEL.EXE (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception."
>
> Luca,
>         can you step into the CapHelper instantiation? After executing
> the line above, does the Handle contain a non-null pointer?
>
> Also, how does your code work if you use it without Excel in the
> picture---say, if you write a short main() to test it?
>
> Later,
>         Luigi
>
>
> *DISCLAIMER: Privileged/Confidential Information may be contained in
> this message and in any of its attachments (the "message"). If you are
> not the addressee indicated in this message (or responsible for
> delivery of the message to such person), you may not copy or deliver
> this message to anyone. In such case, you should destroy this message
> and kindly notify the sender by reply e-mail. The contents of this
> message shall be understood as neither given nor endorsed by Banca
> Profilo S.p.A., nor Profilo SGR S.p.A., nor Profilo Asset Management
> SGR S.p.A., nor Profilo Academy S.p.A.. Banca Profilo S.p.A., Profilo
> SGR S.p.A., Profilo Asset Management SGR S.p.A., Profilo Academy
> S.p.A. do not accept liability for corruption, interception or
> amendment, if any, or the consequences thereof. *
>
> *Il presente messaggio e/o i suoi allegati (di seguito il "messaggio")
> possono contenere informazioni privilegiate e/o confidenziali. Se non
> siete i destinatari indicati nel messaggio (o persona incaricata di
> inoltrare il messaggio al/i destinatario/i), non potete copiare o
> inoltrare il messaggio ad altri e siete invitati a distruggerlo
> dandone informazione al mittente a mezzo e-mail. Il contenuto del
> presente messaggio non deve essere considerato come trasmesso o
> autorizzato nè da Banca Profilo S.p.A., nè da Profilo SGR S.p.A., nè
> da Profilo Asset Management SGR S.p.A., nè da Profilo Academy S.p.A..
> Nè Banca Profilo S.p.A., nè Profilo SGR S.p.A., nè Profilo Asset
> Management SGR S.p.A., nè Profilo Academy S.p.A. si assumono alcuna
> responsabilità per eventuali intercettazioni, modifiche o
> danneggiamenti del presente messaggio e-mail e per le eventuali
> conseguenze.*
>
>
>  
>
>  
>



Reply | Threaded
Open this post in threaded view
|

Re: R: Hull White Calibration?

Luigi Ballabio-2
In reply to this post by Berardi Luca
On 2004.03.24 18:37, Berardi Luca wrote:
> I perhaps managed to find the exact location where the exception is
> thrown.
>
> 9) XiborManager::getHistory()
>
> at this point the exception is thrown, and is subsequently catched by
> ParCoupon::amount() but no action is taken: there is only a comment
> "//fall through and forecast".

That's ok. The code first tries to fetch a stored fixing, and when it's  
told (by an exception) that the fixing isn't there it estimates it.

> I'm now including in the attachment the (self-contained) source code
> which is giving me pain...perhaps on someone else's machine is it  
> going to work?

I didn't really look at the results, but on my machine it compiled,  
linked and ran without errors in release mode with version 0.3.5 (to be  
released in a few days.) Now I'm trying with 0.3.4... ok, it doesn't  
give any error either. Maybe you can try on a coworker's machine?

Later,
        Luigi