Hello
I'm using QuantLib wrapper for C#. I have to do some calculations based on three types of securities: Fixed Rate Bond, Zero Coupon Bond and Fixed Rate Bond. I'm getting some problems with last type. The calculations I'm implementing are the next ones: Theoretical Clean Price Theoretical Dirty Price Theoretical Bond Yield Yield To Maturity Time To Maturity Accrued Amount Net Present Value Basis-Point Sensivity Internal Rate of Return Modified Duration Macaulay Duration Duration Convexity Basis-Point Value Z-Spread When I create the bond and try to execute all calculations, I get the same error in all calculations except Time To Maturity and Basis-Point Sensivity. The thrown exception message is "empty Handle cannot be dereferenced". Please, say me what part of the code you need to check and I'll put here. Thank you in advance. Sergio |
On Tue, 2011-10-25 at 03:05 -0700, sergvil wrote:
> Hello > > I'm using QuantLib wrapper for C#. I have to do some calculations based on > three types of securities: Fixed Rate Bond, Zero Coupon Bond and Fixed Rate > Bond. I'm getting some problems with last type. I think you mean floating-rate bond? > When I create the bond and try to execute all calculations, I get the same > error in all calculations except Time To Maturity and Basis-Point Sensivity. > The thrown exception message is "empty Handle cannot be dereferenced". My guess is that you're passing to the bond constructor an Euribor or Libor index without linking it to a yield term structure for forecasting index fixings. How are you creating the index and the bond? Luigi -- Though this be madness, yet there is method in't. -- Hamlet, Act II, scene II ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by sergvil
> I think you mean floating-rate bond?
Yes, I'm sorry. > My guess is that you're passing to the bond constructor an Euribor or > Libor index without linking it to a yield term structure for forecasting > index fixings. How are you creating the index and the bond? Here it is: This is all the processes I make to create the bond, some parts can be a little confused because DB related code (LINQ2SQL) has been omitted and the code is separated in several methods, I put all together for better reading understanding. I think that thrown exception has relation with iborcurve handle. Thank you very much for your help!! Sergio |
Hello
I'm still looking for a solution and I didn´t find nothing. Can somebody help me on this issue? Thank you very much! |
On Wed, 2011-10-26 at 18:56 -0700, sergvil wrote:
> Hello > > I'm still looking for a solution and I didn´t find nothing. > > Can somebody help me on this issue? Can you send a self-contained program that shows the problem and that we can execute? Thanks, Luigi -- Humphrey's Requirements Uncertainty Principle: For a new software system, the requirements will not be completely known until after the users have used it. ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
>Can you send a self-contained program that shows the problem and that we
>can execute? When I was making the self-contained program from my code I found the error. I was creating IborIndex without iborcurve, and that was the cause of exception. I was doing instead of Thanks for your help! Kind regards. Sergio. |
Free forum by Nabble | Edit this page |