Creates an object describing a process of form
where:
is the risk free rate (defined by parameter <RiskFreeRate> below). The rate passed in the Addin is a flat-forward rate, not a term structure.
the dividend rate (parameter <DividendYield> below)
volatility defined by the term structure in parameter <BlackVolId> below
Usage:
=qlGeneralizedBlackScholesProcess(<ObjPref>, <BlackVolId>,
<Underlying>, <DayCounter>,
<SettlementDate>,
<RiskFreeRate>, <DividendYield>)
Optional prefix for names of objects created with this function
An object representing the volatility term structure to use for this process. See for example qlBlackConstantVol – Create a Volatility Structure with constant volatility for all times and strikes.
The present value of the underlying being modelled.
Day count convention used to calculate the interest earned over a specific period of time. For example, “Actual/360”.
Value date from which interest begins to be earned. (Does not affect volatility/variance calculations)
The risk-free rate as a number
The dividend yield as a number
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;
public class qlGeneralizedBlackScholesProcess{
public static void main(String[] args) throws Exception {
property_t settlementdate=new property_t(41030);
property_t dcc=new property_t("Actual/365 (Fixed)");
String vol=qlw.qlBlackConstantVol("vol",
settlementdate,
"TARGET",
0.2,
dcc,
qlw.OH_NULL(),
qlw.OH_NULL(),
false);
String process=qlw.qlGeneralizedBlackScholesProcess("process",
"vol",
100.0,
dcc,
settlementdate,
0.05,
0.02,
qlw.OH_NULL(),
qlw.OH_NULL(),
false) ;
}
}