Apama Capital Markets Foundation
10.1.0.0
|
#include <QuantlibPlugin.hpp>
Public Member Functions | |
QuantlibPlugin () | |
custom_t< OptionResultsChunk > | modelPrice (double _underlying, double _strike, const char *_currentBussinessDate, const char *_maturity, double _riskFreeRate, double _volatility, double _dividendYield, const char *_t, const char *_modelName) |
custom_t< OptionResultsChunk > | modelImplVol (double _price, double _underlying, double _strike, const char *_currentBussinessDate, const char *_maturityDate, double _riskFreeRate, double _dividendYield, const char *_t, const char *_modelName) |
custom_t< OptionResultsChunk > | modelGreeks (double _underlying, double _strike, const char *_currentBussinessDate, const char *_maturity, double _riskFreeRate, double _volatility, double _dividendYield, const char *_t, const char *_modelName) |
custom_t< OptionResultsChunk > | btcoxrossrubinsteinGreeks (double _underlying, double _strike, const char *_currentBussinessDate, const char *_maturity, double _riskFreeRate, double _volatility, double _dividendYield, int64_t _timeSteps, const char *_t) |
custom_t< OptionResultsChunk > | btcoxrossrubinsteinPrice (double _underlying, double _strike, const char *_currentBussinessDate, const char *_maturity, double _riskFreeRate, double _volatility, double _dividendYield, int64_t _timeSteps, const char *_t) |
custom_t< OptionResultsChunk > | btcoxrossrubinsteinImplVol (double _price, double _underlying, double _strike, const char *_currentBussinessDate, const char *_maturity, double _riskFreeRate, double _dividendYield, int64_t _timeSteps, const char *_t) |
const char * | error (const custom_t< OptionResultsChunk > &results) |
double | npv (const custom_t< OptionResultsChunk > &results) |
double | delta (const custom_t< OptionResultsChunk > &results) |
double | gamma (const custom_t< OptionResultsChunk > &results) |
double | theta (const custom_t< OptionResultsChunk > &results) |
double | vega (const custom_t< OptionResultsChunk > &results) |
double | rho (const custom_t< OptionResultsChunk > &results) |
double | implVol (const custom_t< OptionResultsChunk > &results) |
double | yield (const char *_symbol, double _price, const char *_issueDate, const char *_maturityDate, const char *_settlementDate, double _rate, int64_t _freq) |
double | dv01 (const char *_symbol, double _yield, const char *_issueDate, const char *_maturityDate, const char *_settlementDate, double _rate, int64_t _freq) |
double | price (const char *_symbol, double _yield, const char *_issueDate, const char *_maturityDate, const char *_settlementDate, double _rate, int64_t _freq) |
int64_t | createBond (const char *_symbol, const char *_issueDate, const char *_maturityDate, const char *_settlementDate, double _rate, int64_t _frequency, bool _updateFlag) |
void | addToDataset (double _value, double _weight) |
void | removeFromDataset (double _value, double _weight) |
void | resetDataset () |
double | mean () |
double | stddev () |
double | weightSum () |
double | variance () |
double | kurtosis () |
double | skew () |
double | min () |
double | max () |
int64_t | numSamples () |
Static Public Member Functions | |
static void | initialize (base_plugin_t::method_data_t &md) |
static bond_ptr | _getBond (const char *symbol, const char *issueDate, const char *maturityDate, const char *settlementDate, Rate rate, Frequency frequency, bool updateFlag, int &ouputValue, std::string &discrepancyMessage) |
static Rate | _yield (bond_ptr bond, const Real &price, const char *settlementDate) |
static Real | _dv01 (bond_ptr bond, const Rate &yield, const char *settlementDate) |
static Real | _price (bond_ptr bond, const Rate &yield, const char *settlementDate) |
static std::string | getDiscrepancyErrorMessage (int outputValue, BondKey cachedBondKey, BondKey inputBondKey) |
static void | dumpCaches () |
Static Public Attributes | |
static Logger * | _logger |
QuantlibPlugin Class
|
inline |
QuantlibPlugin constructor
|
static |
Helper method for QuantlibPlugin::dv01
|
static |
getBond: return a bond matching the specs. updateFlag is a boolean to indicate whether the input specs should override the specs of any matching bond found in the cache (keyed by symbol). outputValue is actually a return value containing an indicator of the discrepancies between the specs of the input compared to the specs of the matching bond found in the cache. The values are OR'ed together (see QuantlibPlugin.hpp)
|
static |
Helper method for QuantlibPlugin::price
|
static |
Helper method for QuantlibPlugin::yield()
void QuantlibPlugin::addToDataset | ( | double | _value, |
double | _weight | ||
) |
adds data to the GeneralStatistics instance for use in stats calculations.
[in] | _value | |
[in] | _weight |
custom_t<OptionResultsChunk> QuantlibPlugin::btcoxrossrubinsteinGreeks | ( | double | _underlying, |
double | _strike, | ||
const char * | _currentBussinessDate, | ||
const char * | _maturity, | ||
double | _riskFreeRate, | ||
double | _volatility, | ||
double | _dividendYield, | ||
int64_t | _timeSteps, | ||
const char * | _t | ||
) |
Calculates all the Greeks(delta,gamma,rho,theta,vega) values of QuantLib for europeanOption and americanOption by Cox-Ross-Rubinstein Option Pricing Model
[in] | _underlying | float value |
[in] | _strike | float value |
[in] | _currentBussinessDate | Current Business date in form of const char* |
[in] | _maturity | Maturity date in form of const char* |
[in] | _riskFreeRate | Risk free rate |
[in] | _volatility | volatility value |
[in] | _dividendYield | dividendYield value |
[in] | _timeSteps | timeSteps value |
[in] | _t | Option value |
custom_t<OptionResultsChunk> QuantlibPlugin::btcoxrossrubinsteinImplVol | ( | double | _price, |
double | _underlying, | ||
double | _strike, | ||
const char * | _currentBussinessDate, | ||
const char * | _maturity, | ||
double | _riskFreeRate, | ||
double | _dividendYield, | ||
int64_t | _timeSteps, | ||
const char * | _t | ||
) |
Calculates Implied volatility for europeanOption and americanOption by Cox-Ross-Rubinstein Option Pricing Model
[in] | _price | float value |
[in] | _underlying | float value |
[in] | _strike | float value |
[in] | _currentBussinessDate | Current Business date in form of const char* |
[in] | _maturity | Maturity date in form of const char* |
[in] | _riskFreeRate | Risk free rate |
[in] | _dividendYield | dividendYield value |
[in] | _timeSteps | timeSteps value |
[in] | _t | Option value |
custom_t<OptionResultsChunk> QuantlibPlugin::btcoxrossrubinsteinPrice | ( | double | _underlying, |
double | _strike, | ||
const char * | _currentBussinessDate, | ||
const char * | _maturity, | ||
double | _riskFreeRate, | ||
double | _volatility, | ||
double | _dividendYield, | ||
int64_t | _timeSteps, | ||
const char * | _t | ||
) |
Calculates Net present value of cash flows for europeanOption and americanOption by Cox-Ross-Rubinstein Option Pricing Model
[in] | _underlying | float value |
[in] | _strike | float value |
[in] | _currentBussinessDate | Current Business date in form of const char* |
[in] | _maturity | Maturity date in form of const char* |
[in] | _riskFreeRate | Risk free rate |
[in] | _volatility | volatility value |
[in] | _dividendYield | dividendYield value |
[in] | _timeSteps | timeSteps value |
[in] | _t | Option value |
int64_t QuantlibPlugin::createBond | ( | const char * | _symbol, |
const char * | _issueDate, | ||
const char * | _maturityDate, | ||
const char * | _settlementDate, | ||
double | _rate, | ||
int64_t | _frequency, | ||
bool | _updateFlag | ||
) |
creates a bond with the supplied specs or validates an existing bond with the same symbol. the bond is checked against the internal cache (bondSpecCache) and if it is different an exception is thrown
[in] | _symbol | |
[in] | _issueDate | |
[in] | _maturityDate | |
[in] | _settlementDate | |
[in] | _rate | |
[in] | _frequency | |
[in] | _updateFlag |
double QuantlibPlugin::delta | ( | const custom_t< OptionResultsChunk > & | results | ) |
returns delta value of OptionResultsChunk set by either modelGreeks or btcoxrossrubinsteinGreeks
[in] | results | Reference of Chunk object |
|
static |
Dumps all cache created by bond and instruments
double QuantlibPlugin::dv01 | ( | const char * | _symbol, |
double | _yield, | ||
const char * | _issueDate, | ||
const char * | _maturityDate, | ||
const char * | _settlementDate, | ||
double | _rate, | ||
int64_t | _freq | ||
) |
returns dv01 which is calculated as the price from a given yield less one basis point minus the price based on the given yield
[in] | _symbol | |
[in] | _yield | |
[in] | _issueDate | |
[in] | _maturityDate | |
[in] | _settlementDate | |
[in] | _rate | |
[in] | _freq |
const char* QuantlibPlugin::error | ( | const custom_t< OptionResultsChunk > & | results | ) |
returns error value of OptionResultsChunk set by either modelGreeks or btcoxrossrubinsteinGreeks
[in] | results | Reference of Chunk object |
double QuantlibPlugin::gamma | ( | const custom_t< OptionResultsChunk > & | results | ) |
returns gamma value of OptionResultsChunk set by either modelGreeks or btcoxrossrubinsteinGreeks
[in] | results | Reference of Chunk object |
|
static |
Returns error while creating bond by _getBond method in string format
double QuantlibPlugin::implVol | ( | const custom_t< OptionResultsChunk > & | results | ) |
returns Implied volatility value of OptionResultsChunk set by either modelImplVol or btcoxrossrubinsteinImplVol
[in] | results | Reference of Chunk object |
|
static |
Plugin intitialization
double QuantlibPlugin::kurtosis | ( | ) |
mean: see quantlib Incremental Stats in docs
double QuantlibPlugin::max | ( | ) |
mean: see quantlib Incremental Stats in docs
double QuantlibPlugin::mean | ( | ) |
mean: see quantlib Incremental Stats in docs
double QuantlibPlugin::min | ( | ) |
mean: see quantlib Incremental Stats in docs
custom_t<OptionResultsChunk> QuantlibPlugin::modelGreeks | ( | double | _underlying, |
double | _strike, | ||
const char * | _currentBussinessDate, | ||
const char * | _maturity, | ||
double | _riskFreeRate, | ||
double | _volatility, | ||
double | _dividendYield, | ||
const char * | _t, | ||
const char * | _modelName | ||
) |
Calculates all the Greeks(delta,gamma,rho,theta,vega) values of QuantLib for europeanOption and americanOption
[in] | _underlying | float value |
[in] | _strike | float value |
[in] | _currentBussinessDate | Current Business date in form of const char* |
[in] | _maturity | Maturity date in form of const char* |
[in] | _riskFreeRate | Risk free rate |
[in] | _volatility | volatility value |
[in] | _dividendYield | dividendYield value |
[in] | _t | Option value |
[in] | _modelName | modelName value |
custom_t<OptionResultsChunk> QuantlibPlugin::modelImplVol | ( | double | _price, |
double | _underlying, | ||
double | _strike, | ||
const char * | _currentBussinessDate, | ||
const char * | _maturityDate, | ||
double | _riskFreeRate, | ||
double | _dividendYield, | ||
const char * | _t, | ||
const char * | _modelName | ||
) |
Calculates Implied volatility for europeanOption and americanOption
[in] | _price | price value |
[in] | _underlying | float value |
[in] | _strike | float value |
[in] | _currentBussinessDate | Current Business date in form of const char* |
[in] | _maturityDate | Maturity date in form of const char* |
[in] | _riskFreeRate | Risk free rate |
[in] | _dividendYield | dividendYield value |
[in] | _t | Option value |
[in] | _modelName | modelName value |
custom_t<OptionResultsChunk> QuantlibPlugin::modelPrice | ( | double | _underlying, |
double | _strike, | ||
const char * | _currentBussinessDate, | ||
const char * | _maturity, | ||
double | _riskFreeRate, | ||
double | _volatility, | ||
double | _dividendYield, | ||
const char * | _t, | ||
const char * | _modelName | ||
) |
Calculates Net present value of cash flows for europeanOption and americanOption
[in] | _underlying | float value |
[in] | _strike | float value |
[in] | _currentBussinessDate | Current Business date in form of const char* |
[in] | _maturity | Maturity date in form of const char* |
[in] | _riskFreeRate | Risk free rate |
[in] | _volatility | volatility value |
[in] | _dividendYield | dividendYield value |
[in] | _t | value Option value |
[in] | _modelName | modelName value |
double QuantlibPlugin::npv | ( | const custom_t< OptionResultsChunk > & | results | ) |
returns npv value of OptionResultsChunk set by either modelGreeks or btcoxrossrubinsteinGreeks
[in] | results | Reference of Chunk object |
int64_t QuantlibPlugin::numSamples | ( | ) |
mean: see quantlib Incremental Stats in docs
double QuantlibPlugin::price | ( | const char * | _symbol, |
double | _yield, | ||
const char * | _issueDate, | ||
const char * | _maturityDate, | ||
const char * | _settlementDate, | ||
double | _rate, | ||
int64_t | _freq | ||
) |
returns Price calculated as the price from a given yield
[in] | _symbol | |
[in] | _yield | |
[in] | _issueDate | |
[in] | _maturityDate | |
[in] | _settlementDate | |
[in] | _rate | |
[in] | _freq |
void QuantlibPlugin::removeFromDataset | ( | double | _value, |
double | _weight | ||
) |
Removes from dataset
[in] | _value | |
[in] | _weight |
void QuantlibPlugin::resetDataset | ( | ) |
Resets complete dataset created by addToDataset
double QuantlibPlugin::rho | ( | const custom_t< OptionResultsChunk > & | results | ) |
returns rho value of OptionResultsChunk set by either modelGreeks or btcoxrossrubinsteinGreeks
[in] | results | Reference of Chunk object |
double QuantlibPlugin::skew | ( | ) |
mean: see quantlib Incremental Stats in docs
double QuantlibPlugin::stddev | ( | ) |
mean: see quantlib Incremental Stats in docs
double QuantlibPlugin::theta | ( | const custom_t< OptionResultsChunk > & | results | ) |
returns theta value of OptionResultsChunk set by either modelGreeks or btcoxrossrubinsteinGreeks
[in] | results | Reference of Chunk object |
double QuantlibPlugin::variance | ( | ) |
mean: see quantlib Incremental Stats in docs
double QuantlibPlugin::vega | ( | const custom_t< OptionResultsChunk > & | results | ) |
returns vega value of OptionResultsChunk set by either modelGreeks or btcoxrossrubinsteinGreeks
[in] | results | Reference of Chunk object |
double QuantlibPlugin::weightSum | ( | ) |
mean: see quantlib Incremental Stats in docs
double QuantlibPlugin::yield | ( | const char * | _symbol, |
double | _price, | ||
const char * | _issueDate, | ||
const char * | _maturityDate, | ||
const char * | _settlementDate, | ||
double | _rate, | ||
int64_t | _freq | ||
) |
returns bond yield value
[in] | _symbol | |
[in] | _price | |
[in] | _issueDate | |
[in] | _maturityDate | |
[in] | _settlementDate | |
[in] | _rate | |
[in] | _freq |
|
static |
Logger object for not resgistered method in QuantlibPlugin class