QLXL, #num, engine linking and dependency/triggers

Posted by Phillip Blom on
URL: http://quantlib.414.s1.nabble.com/QLXL-num-engine-linking-and-dependency-triggers-tp13855.html

Hi all

First time on the list so I apologize for any breach of etiquette.

I started using QLXL for the first time this last week. First of all, great job!

Some house keeping:
1. Excel 2010 with auto calc on
2. I have searched for a solution on the net and use group but no luck

Here is what I'm doing:
1. Created rate helpers and stripped a curve (South African curve, Q/Q A/365F). Strips to within 0.05 bps across the curve. Again great job

2. I want to get a fwd swap curve matrix
   A) I can't use qlmakevanillaswap as it doesn't do Q/Q swaps but you do attached the pricing engine at creation time.

   B) So I create a qlschedule (I use it for fix and float legs) then I use this to create a qlvanillaswap (can't attach a engine at this stage).

All these objects create successfully and I can inspect them

   C) Then I call qlinstrumentsetpricingengine and set the single engine (created earlier) to each swap

So I have a 6x5 'matrix' of swap objects. The corresponding 'matrix' of setting the pricing engine all return TRUE.

However, when I ask it for its fair value rate or NPV some of the swaps return #num and some return the correct answer. If I ctrl-alt-F9 it, it doesn't correct. If I F2 the engine formula and then full recalc it comes right. If I close the workbook and then open it again and do a full recalc the problem persists but different cells work and don't work. It's a bit random.

I always use cell addresses and not string so I keep the dependency tree in line. However, when I inspect the #num error it says ' qlvanillaswapfairrate - null pricing engine '. So it seems to me that the pricing engine is randomly not linking sometimes.

I'm thinking triggers are the answers but if it is I'm clearly not using it properly.

Could anyone give me a helping hand here. Clearly I'm the one missing things here.

Regards,
Phil

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users