class xf::fintech::CFB76

#include "xf_fintech_cf_b76.hpp"

Overview

This class implements the Closed Form Black 76 model.

The parameter passed to the constructor controls the size of the underlying buffers that will be allocated. This prameter therefore controls the maximum number of assets that can be processed per call to run()

It is intended that the user will populate the input buffers with appropriate asset data prior to calling run() When run completes, the calculated output data will be available in the relevant output buffers.

class CFB76: public xf::fintech::OCLController

// typedefs

typedef float KDataType

// fields

KDataType* forwardPrice
KDataType* strikePrice
KDataType* volatility
KDataType* riskFreeRate
KDataType* timeToMaturity
KDataType* optionPrice
KDataType* delta
KDataType* gamma
KDataType* vega
KDataType* theta
KDataType* rho

Inherited Members


Typedefs

typedef float KDataType

Parameters:

KDataType This is the data type that the underlying HW kernel has been built with.

Methods

run

int run (
    OptionType optionType,
    unsigned int numAssets
    )

This method is used to begin processing the asset data that is in the input buffers. If this function returns successfully, calculated results are available in the output buffers.

Parameters:

optionType The option type of ALL the assets data
numAssets The number of assets to process.

getLastRunTime

long long int getLastRunTime (void)

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

Returns:

Execution time in microseconds