OpenBI Docs Buy

QUANT.OPTION.PRICE OpenBI

What a call or put option is worth today, by Black–Scholes or, for an American option, a binomial tree.

Group: Quantitative finance. OpenBI’s own: DAX has no function of this name.

Syntax

QUANT.OPTION.PRICE ( <optionType>, <spot>, <strike>, <valuationDate>, <expiry>, <volatility>, <riskFreeRate> [, <dividendYield>] [, <style>] )
ParameterTypeDescription
optionTypeText"call" or "put".
spotNumberThe price of what the option is on, today.
strikeNumberThe price at which the option lets its holder buy (a call) or sell (a put).
valuationDateDateThe day the option is valued.
expiryDateThe day the option expires; it must come after the valuation date.
volatilityNumberThe yearly volatility as a decimal: 0.2 for 20 %.
riskFreeRateNumberThe risk-free rate as a decimal, continuously compounded.
dividendYieldNumber
optional
A continuous dividend yield (or, for a commodity or a currency, its carry) as a decimal; 0 when left out.
styleText
optional
"european" (when left out), exercised at expiry only, or "american", any day until then.

Returns

Number. The option's value, in the units of the spot and the strike.

Remarks

  • Time runs from the valuation date to the expiry in days over 365. The rate, the dividend yield and the volatility are flat over that time.
  • A European option is valued with the Black–Scholes–Merton formula; an American one with a Cox–Ross–Rubinstein binomial tree, close to the exact value but not equal to it.
  • Without dividends an American call is worth as much as a European one; the tree's answer then differs from the formula's in the third decimal.
  • An expiry on or before the valuation date, a type other than call or put, or a style other than european or american is an error.
  • The Brewery's trading page values a call on malting barley this way, with the last close as the spot.

Compared with DAX

An OpenBI function: DAX has none like it, so a measure or query that uses it works in OpenBI only, not in Power BI or Analysis Services.

Examples

A call and a put at the money

Spot and strike 100, one year, 20 % volatility, a 5 % rate. The put is worth less than the call, as put–call parity says: call − put = spot − strike × e^(−rate × time). The American put is worth more than the European one: exercising it early can pay.

EVALUATE
VAR Today = DATE ( 2026, 1, 1 )
VAR Expiry = DATE ( 2027, 1, 1 )
RETURN
    ROW (
        "Call", QUANT.OPTION.PRICE ( "call", 100, 100, Today, Expiry, 0.2, 0.05 ),
        "Put", QUANT.OPTION.PRICE ( "put", 100, 100, Today, Expiry, 0.2, 0.05 ),
        "Call − put", QUANT.OPTION.PRICE ( "call", 100, 100, Today, Expiry, 0.2, 0.05 )
            - QUANT.OPTION.PRICE ( "put", 100, 100, Today, Expiry, 0.2, 0.05 ),
        "Parity", 100 - 100 * EXP ( -0.05 ),
        "American put", QUANT.OPTION.PRICE ( "put", 100, 100, Today, Expiry, 0.2, 0.05, 0, "american" )
    )
CallPutCall − putParityAmerican put
10.45058357218565.573526022256974.877057549928614.877057549928596.09222914606866

A call on malting barley

A call at 6,000 a tonne, six months out, with 25 % volatility and a 4 % rate, on the last close of the Prices table.

EVALUATE
VAR Close =
    CALCULATE (
        MAX ( Prices[Close] ),
        Prices[Commodity] = "Malting barley",
        Prices[Date] = DATE ( 2026, 10, 14 )
    )
RETURN
    ROW (
        "Close", Close,
        "Call", QUANT.OPTION.PRICE ( "call", Close, 6000, DATE ( 2026, 10, 14 ), DATE ( 2027, 4, 14 ), 0.25, 0.04 )
    )
CloseCall
5916.59432.68641138398

The call's value by the barley price

Today's value against what it would pay at expiry, for prices from 5,000 to 7,000.

EVALUATE
ADDCOLUMNS (
    GENERATESERIES ( 5000, 7000, 500 ),
    "At expiry", MAX ( [Value] - 6000, 0 ),
    "Today", QUANT.OPTION.PRICE ( "call", [Value], 6000, DATE ( 2026, 10, 14 ), DATE ( 2027, 4, 14 ), 0.25, 0.04 )
)
ValueAt expiryToday
5000092.483139576831
55000237.960768738868
60000479.747081971747
6500500812.461639696762
700010001215.12936825922

QUANT.OPTION.GREEK, QUANT.OPTION.IMPLIEDVOL, MONTECARLO, GENERATESERIES.

Last updated · OpenBI Studio 0.3.74