Bojan Nikolic: Using and Understanding the QuantLib Addin

[website home] | [BN Algorithms]

qlOISRateHelper – create a Rate Helper referencing an overnight index swap

Makes a rate helper object (see “Rate Helpers” in QuantLib) that contains information about a market quote for an Overnight Index Swap (OIS). Used to bootstrap yield curves based on OIS market inputs which are generally less sensitive to credit quality of counter-parties (when compared to non-swap term rates like LIBOR and EURIBOR).

Usage:

=qlOISRateHelper(<ObjPrefix>, <SettlDays>,
                 <Tenor>, <FixedRate>,
                 <ONIndex>)
<ObjPrefix>

Optional prefix for objected names

<SettlDays>

Settlement days for the swap (e.g. 2)

<Tenor>

Duration of the swap, as a period (see Periods of time in QuantLib)

<FixedRate>

The interest rate on the fixed leg of the reference swap

<ONIndex>

Object representing the overnight index that the floating leg of the reference swap is tied to. For example this can be an object representing the EONIA index (see qlEONIA – Create an EONIA object)

Here is example usage in QLW – QuantLib-Addin like interface from Java and Python

// Copyright (C) 2012 Bojan Nikolic <bojan@bnikolic.co.uk>
//

import co.uk.bnikolic.qlw.property_t;
import co.uk.bnikolic.qlw.qlw;
import co.uk.bnikolic.qlw.StringVector;
import co.uk.bnikolic.qlw.LongVector;
import co.uk.bnikolic.qlw.PropertyVector;
import co.uk.bnikolic.qlw.DoubleVector;

public class qlOISRateHelper {
    
    public static void main(String[] args) throws Exception {
        String index=qlw.qlEonia("eonia", 
                                 qlw.OH_NULL(),
                                 qlw.OH_NULL(),
                                 qlw.OH_NULL(),
                                 false);
        
        String oishelp=qlw.qlOISRateHelper("OISHelp", 
                                           2,
                                           "3M", 
                                           new property_t(0.01),
                                           index,
                                           qlw.OH_NULL(),
                                           qlw.OH_NULL(),
                                           false);
    }

}