Products.AmericanOption¶
Classes
AmericanOption(strike: float, ...) |
Class to represent the notion of an american option. |
OptionType |
Enum to represent the different types of an option. |
date |
date(year, month, day) –> date object |
-
class
Products.AmericanOption.AmericanOption(strike: float, option_type: Products.OptionType.OptionType, expiry_date: datetime.date)[source]¶ Class to represent the notion of an american option.
Parameters: strike : float
The exercise price of the american option.
option_type :
OptionTypeThe type of the option that can be
CALLandPUTexpiry_date : date
The maturity of the american option
Examples
>>> from Products.AmericanOption import AmericanOption >>> from Products.OptionType import OptionType >>> from datetime import date >>> strike = 50.0 >>> option_type = OptionType.CALL >>> expiry_date = date(2018,12,1) >>> american_option = AmericanOption(strike, option_type, expiry_date) >>> print(american_option) American option: OptionType.CALL, strike 50.0, expiry 2018-12-01
Attributes
expiry_dateoption_typestrike