OS_Binomial (Function)

image\trumpet2.gif Disclaimer

The OS_Binomial function is used to calculate the theoretical value of on option using the Binomial option pricing algorithm.

Syntax

OS_Binomial(AssetPr, StrikePr, Volty, DaysToExp, IntRate, Carry, OptType, EuroAmer01, Branches, oBinoTV) ;

Return Value

A numeric value of 0, if successful, or1, if not successful.  The theoretical value of the option is returned to the caller (by reference) in the variable oBinoTV.

Parameters

Name

Type

Description

AssetPr

Numeric

Specifies the price of underlying asset.

StrikePr

Numeric

Specifies the strike price of the option.

Volty

Numeric

Volatility of the underlying asset expressed as a decimal number that represents a percentage (e.g., 0.35 for 35%).

DaysToExp

Numeric

Days left until expiration of the option.

IntRate

Numeric

Risk-free short-term interest rate, usually the 90-day T-Bill rate.

Carry

Numeric

Broker fees for margin accounts. Expressed as a decimal number that represents a percentage (e.g., 0.06 for 6%).

OptType

Numeric

Specifies type of option: 2 for a Put, 3 for a Call, or the reserved words Put and Call, which have the values 2 and 3, respectively, can be used.

EuroAmer01

Numeric

Type of options where 0 = European Options and 1 = American options.

Branches

Numeric

Number of binomial branches (iterations) the function calculates. The more branches used, the slower the calculation. For end-of-day values, use 50; for real time values, use 10 to 20.

oBinoTV

Numeric

Output variable, passed by reference by the calling study. Following calculation this variable will contain the theoretical value of the option.

 

Example

The EasyLanguage code below assigns to the variable oBinoValue the theoretical price of an option with the following characteristics, under the conditions specified below:

  • An underlying asset price of $97.25

  • An option strike price of $100

  • An underlying volatility of 32.5%

  • With 30 days until expiration

  • Using a risk free interest rate of 5.0%

  • Using a carrying cost rate of 6.0%

  • For a call option

  • Of American style

  • Using 50 calculation iterations

 

variables: oBinoValue(0);

Value1 = OS_Binomial( 97.25, 100, 0.325, 30, 0.05, 0.06, Call, 1, 50, oBinoValue);