Binomial Tree

template struct xf::fintech::BinomialTreeInputDataType

#include "bt_engine.hpp"
template <typename DT>
struct BinomialTreeInputDataType

// fields

DT S
DT K
DT T
DT rf
DT V
DT q
int N
int packed

template struct xf::fintech::BinomialTreeInputDataType <double>

#include "bt_engine.hpp"
template <>
struct BinomialTreeInputDataType <double>

// fields

double S
double K
double T
double rf
double V
double q
int N
int packed[3]

class xf::fintech::BinomialTree

#include "xf_fintech_binomialtree.hpp"

Overview

This class implements the Binomial Tree Model.

It is intended that the user will populate the inputData structure with appropriate asset data prior to calling run() method. When the run completes the calculated output data (one or more options) will be available to the user.

class BinomialTree: public xf::fintech::OCLController

Inherited Members


Methods

run

int run (
    xf::fintech::BinomialTreeInputDataType <double>* inputData,
    double* outputData,
    int optionType,
    int numOptions
    )

Calculate one or more options based on input data and option type

Parameters:

inputData structure to be populated with the asset data
outputData one or more calculated option values returned
optionType option type is American/European Call or Put
numOptions number of options to be calculate

getLastRunTime

long long int getLastRunTime (void)

This method returns the time the execution of the last call to run() took.