Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

opprofit

Syntax

Profit = opprofit(AssetPrice, Strike, Cost, PosFlag, OptType)

Arguments

AssetPrice

Asset price.

Strike

Strike or exercise price.

Cost

Cost of the option.

PosFlag

Option position. 0 = long, 1 = short.

OptType

Option type. 0 = call option, 1 = put option.

Description

Profit = opprofit(AssetPrice, Strike, Cost, PosFlag, OptType) returns the profit of an option.

Examples

collapse all

This example shows how to return the profit of an option. For example, consider buying (going long on) a call option with a strike price of $90 on an underlying asset with a current price of $100 for a cost of $4.

Profit = opprofit(100, 90, 4, 0, 0)
Profit =

     6

Related Examples

See Also

|

Introduced before R2006a

Was this topic helpful?