Here we share our current projects, research ideas, events, news and anything else that comes out of our brainstorming sessions

Review of Lattice Construction Methods

Just before year end we put out our paper, titled "Review of Lattice Construction Methods"!

lattice

This paper extends the generalized procedure for building trees for short rates by Hull & White. A generalization for any mean and standard deviation of the underlying short rate model is presented. In addition we review the methodologies for constructing lattice models and give a step-by-step explanation on how to construct trinominal trees. We apply the formalism to some explicit examples of various complexity.

 

Full text can be found here

 

World Finance Conference Talk 2015 - The Geometry of Interest Rate Risk

In this talk the process of interest rate risk management is considered. The yield curve construction is revisited and emphasis is given to aspects such as input instruments, bootstrap and interpolation. For various financial products new formulas are presented that are crucial to define sensitivities to changes in the instruments and/or in the curve rates. Such sensitivities are exploited for hedging purposes. The risk space is constructed, which eventually turns out to be a curve property, and show how to hedge any product or any portfolio of products in terms of the original curve instruments. Continue reading

UD @ World Finance Conference (Buenos Aires, July 2015)

We are happy to announce that our work from last year on interest rate risk has been accepted for presentation at the World Finance Conference. The conference will take place in Buenos Aires (Argentina) on 21-24 July, where we will talk about our geometry paper (and maybe mention our related works).

More detailed information about the content of the conference will follow in future posts. Stay tuned!
 

Theta : A Test for Short Rate Model Lattice

While short rate models have lost ground to libor market models for valuation of (complex) interest rate derivatives, they remain popular for Asset and Liability Management. As a result you may find yourself implementing a short rate model. Often the choice is to implement a lattice approach, perhaps in combination with a Monte Carlo framework. One critical step in these models is to match the model discounts to the ones observed in the market. This makes to model (almost) arbitrage free. To match the market a numerical root finding algorithm needs to be used, for example Newton Raphson. This poses the challenge that mistakes in the model may not be obvious as the root finder can still find parameters to match the market even though there are mistakes in the model. Our suggestion is to check the root finder solution to known analytical solution of the Hull White model using functional form for the zero curve that is continuous and two times differentiable.

Continue reading

Warning NlOptNet Contains Malware

For a recent project building short rate lattice trees we needed to do some root solving. Fortunately there are quite a few Open Source solvers available enabling us to test a wide range of algorithms with little effort. One of the algorithms we tried was NlOpt, which is excellent. To use this code in .Net we used https://github.com/BrannonKing/NLoptNet via NuGet repo with the following command.

 

PM> Install-Package NLoptNet

Installing 'NLoptNet 1.0.2.0'.

Install failed. Rolling back…

 

This made the virus scanner go on full alert!

 

image00

Downloading the zip from github directly resulted in a zip with the virus included.

image01

Hope this helps keeps PCs safe and that the next version of this otherwise great package will be without virus.

Generalized Procedure for Building Short Rate Trees in Excel / VBA using LevmarExcel

In a previous we blog we reproduced example 1 of the  2014 paper John Hull and Alan White “Generalized Procedure for Building Short Rate Trees”. In the paper the authors derive a generalized method for the construction of short rate trees. This generalization is interesting as it allows for one tree (or lattice) construction algorithm for all one-factor short rate models. Continue reading

Wrapping C++ DLL for use in Excel / VBA using some pretty awesome open source projects

In this blog it’s explained how you can wrap up C++ managed or unmanaged code and make the functionality available in Excel / VBA. The blog uses levmar as specific example, but most steps are generic. The levmar specific example is due to the fact that we are currently working on some short rate lattice models that need to be calibrated to the interests market. The calibration requires a robust solver for a nonlinear least squares problem. To share our models and their implementation with the wider finance community we choose Excel / VBA for the implementation. This allows us to easily share our ideas and algorithms. For most simple cases this worked wonderfully using a solver algorithm that was originally part of MINPACK developed by Jorge More, Burt Garbow, and Ken Hillstrom at Argonne National Laboratory. The algorithm we used was translated from Fortran to VBA by Vanna and shared on quantcode.com. This algorithm proved not to be stable enough for more complex problems. So we started looking for more stable implementations and found levmar by Lourakis. This package was written in ANSI C. Here we explain how we took this code and build xll add-in for Excel using:

Continue reading

Levmar Excel version 1.1 released

We are happy to announce that a new version of Levmar Excel has been released. This version exposes more functionalities from the original levmar package to Excel.

New in this version is the ability to pass a VBA class (i.e. object) as extra parameter to LevmarExcel. This object can contain extra information needed to evaluate the error function. This addition offers a lot of extra flexibility using the package. Complex object models can now be passed as arguments to be used for the evaluation of the error function (the error function can be only a thin wrapper for the “real” error function in the object).

The latest version of Excel Levmar is available here. The package contains the example “demo_vba_object.xlsm” which shows how to use this new functionality. The example contains a module with some code to build the LevmarExcelSolver object. Continue reading

Levmar Excel An Introduction

Levmar Excel is a wrapper around levmar, one of the best Levenberg-Marquardt algorithms out there. The wrapper allows you to use levmar in Excel via VBA. This is handy if you want to solve a nonlinear least squares problem. Alternatively you could also try to use the build-in Excel solver. While this solver is excellent, it isn’t too easy to integrate in VBA code. Levmar Excel fills the gap. It gives you an easy to integrate least squares solver for VBA code. In the remainder of the post it will be explained how to set things up to get the demo spreadsheet working. (If you are a developer wanting more details on the source code of this project look here.) Continue reading