Fx Rainbow Option
financepy.products.fx.fx_rainbow_option
Classes
FXRainbowOption
FXRainbowOption(expiry_dt: financepy.utils.date.Date, payoff_type: financepy.products.fx.fx_rainbow_option.FXRainbowOptionTypes, payoff_params: numpy.ndarray, num_assets: int)
Inherits from: FXOption
Class that is used to perform perturbation risk for FX options.
Methods
validate
validate(self, stock_prices, foreign_rates, volatilities, betas)
No description available.
validate_payoff
validate_payoff(self, payoff_type, payoff_params, num_assets)
No description available.
value
value(self, value_dt, stock_prices, domestic_curve, foreign_rates, volatilities, betas)
Calculate the option value.
value_mc
value_mc(self, value_dt, expiry_dt, stock_prices, discount_curve, foreign_rates, volatilities, betas, num_paths=10000, seed=4242)
No description available.
FXRainbowOptionTypes
FXRainbowOptionTypes(*values)
Inherits from: Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum):
... RED = 1
... BLUE = 2
... GREEN = 3
Access them by:
- attribute access:
>>> Color.RED
<Color.RED: 1>
- value lookup:
>>> Color(1)
<Color.RED: 1>
- name lookup:
>>> Color['RED']
<Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own
attributes -- see the documentation for details.
Functions
payoff_value
payoff_value(s, payoff_type_value, payoff_params)
No description available.
value_mc_fast
value_mc_fast(t, stock_prices, r, foreign_rates, volatilities, betas, num_assets, payoff_type, payoff_params, num_paths=10000, seed=4242)
No description available.
Generated automatically from the FinancePy source code.
Do not edit this file manually.