Options pricing

Quotek SDK embedds some options pricing functionalities. This is accomplished mostly through the Black & Scholes model, which can be used by instanciating a new quotek::quant::blackscholes object.

class quotek::quant::option

Option is a class meant to modelize the behaviour of options, for instance in the context of black-sholes modeling. Please Note that this class is good for vanilla options only, if you need something more exotic the best way to do is to create a new class which will inherit from it.

Public Functions


Option first constructor

option(int type, std::string underlying, float price, float strike, float expires)

Option second constructor


option destructor

bool is_in_money()

returns wether the option is IN or OUT of the money

Public Members

std::string underlying

Underlying contains the asset_id of the option’s underlying

float expires

gives the option expiration, in years

float price

price stores the current price of the modelized option

float strike

gives the option’s strike

int type

tells wether the option is a put or a call

class quotek::quant::blackscholes

blackscholes provides an option pricing modelisation context. Please note that this class only support vanilla options pricing by default, and if you want to price exotics contracts with this class you’ll probably have to inherit it.

Public Functions

blackscholes(option &modelized_option, float underlying_price, float safe_interest_rate, float implied_volatility)

black-sholes model object constructor.

  • modelized_option -

    Option object to modelize within Black & Sholes context.

  • underlying_price -

    current price of the underlying asset for modelized option.

  • safe_interest_rate -

    interest safe rate to use for option price calculation.

  • implied_volatility -

    implied price volatility of the underlying asset for modelized option.


blackscholes object destructor

_greeks compute_greeks()

compute greeks.

a greeks_ structure containing beta, gamme, delta..