Usage:
=qlConstantSwaptionVolatility(<ObjPrefix>, <NDays>,
<Calendar>, <BusinessDayConvention>,
<Volatility>, <DayCounter>)
Optional prefix for names of objects created with this function
Number of dates from the EvaluationDate at which the variance is 0, i.e., the value date
The calendar used for determining the business days. For example, “TARGET” (see TARGET Calendar)
Business day convention to adjust the exercise date if the expiry falls on a non-working day
Constant in time volatility to assume
Day count convention used to calculate the interest earned over a specific period of time. For example, “Actual/360”
// 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.PropertyMatrix;
import co.uk.bnikolic.qlw.DoubleVector;
public class qlConstantSwaptionVolatility {
public static void main(String[] args) throws Exception {
String vol=qlw.qlConstantSwaptionVolatility("vol",
new property_t(0),
"TARGET",
"Following",
new property_t(0.20),
new property_t("Actual/365 (Fixed)"),
qlw.OH_NULL(),
qlw.OH_NULL(),
false);
}
}