class xf::fintech::MCEuropean

#include "xf_fintech_mc_european.hpp"

Overview

This class implements the Monte-Carlo European model.

class MCEuropean: public xf::fintech::OCLController

// fields

static const int NUM_KERNELS

Inherited Members


Methods

run

run overload (1)

int run (
    OptionType optionType,
    double stockPrice,
    double strikePrice,
    double riskFreeRate,
    double dividendYield,
    double volatility,
    double timeToMaturity,
    double requiredTolerance,
    double* pOptionPrice
    )

Runs a single asset until the specified TOLERANCE is met

Parameters:

optionType either American/European Call or Put
stockPrice the stock price
strikePrice the strike price
riskFreeRate the risk free interest rate
dividendYield the dividend yield
volatility the volatility
timeToMaturity the time to maturity
requiredTolerance the tolerance
pOptionPrice the returned option price

run overload (2)

int run (
    OptionType optionType,
    double stockPrice,
    double strikePrice,
    double riskFreeRate,
    double dividendYield,
    double volatility,
    double timeToMaturity,
    unsigned int requiredSamples,
    double* pOptionPrice
    )

Runs a single asset for the REQUIRED NUMBER OF SAMPLES…

Parameters:

optionType either American/European Call or Put
stockPrice the stock price
strikePrice the strike price
riskFreeRate the risk free interest rate
dividendYield the dividend yield
volatility the volatility
timeToMaturity the time to maturity
requiredSamples the number of samples
pOptionPrice the returned option price

run overload (3)

int run (
    OptionType* optionType,
    double* stockPrice,
    double* strikePrice,
    double* riskFreeRate,
    double* dividendYield,
    double* volatility,
    double* timeToMaturity,
    double* requiredTolerance,
    double* outputOptionPrice,
    unsigned int numAssets
    )

Process arrays of asset data until required TOLERANCE is met

Parameters:

optionType either American/European Call or Put
stockPrice the stock price
strikePrice the strike price
riskFreeRate the risk free interest rate
dividendYield the dividend yield
volatility the volatility
timeToMaturity the time to maturity
requiredTolerance the required tolerance
outputOptionPrice the option price
numAssets the number of assets

run overload (4)

int run (
    OptionType* optionType,
    double* stockPrice,
    double* strikePrice,
    double* riskFreeRate,
    double* dividendYield,
    double* volatility,
    double* timeToMaturity,
    unsigned int* requiredSamples,
    double* outputOptionPrice,
    unsigned int numAssets
    )

Process arrays of asset data for the REQUIRED NUMBER OF SAMPLES

Parameters:

optionType either American/European Call or Put
stockPrice the stock price
strikePrice the strike price
riskFreeRate the risk free interest rate
dividendYield the dividend yield
volatility the volatility
timeToMaturity the time to maturity
requiredSamples the number of samples
outputOptionPrice the option price
numAssets the number of assets

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