FinancePy

FinancePy API Reference

Fx Double One Touch Option

financepy.products.fx.fx_double_one_touch_option

Classes

FXDoubleOneTouchOption

FXDoubleOneTouchOption(expiry_dt: financepy.utils.date.Date, option_type: financepy.utils.global_types.DoubleBarrierTypes, lower_barrier_fx_rate: float, upper_barrier_fx_rate: float, payment_size: float = 1.0)
Inherits from: FXOption
A FinFXOneTouchOption is an option in which the buyer receives a rebate if the FX rate touches either a lower barrier or an upper barrier at any time before the option expiry date and zero otherwise.

Methods

value

value(self, value_dt: financepy.utils.date.Date, spot_fx_rate: float | numpy.ndarray, domestic_curve: financepy.market.curves.discount_curve.DiscountCurve, foreign_curve: financepy.market.curves.discount_curve.DiscountCurve, model)
FX One-Touch Option valuation using the Black-Scholes model assuming a continuous (American) barrier from value date to expiry. Handles both cash-or-nothing and asset-or-nothing options.

value_mc_slow

value_mc_slow(self, value_dt: financepy.utils.date.Date, stock_price: float, domestic_curve: financepy.market.curves.discount_curve.DiscountCurve, foreign_curve: financepy.market.curves.discount_curve.DiscountCurve, model, num_paths: int = 10000, num_steps_per_year: int = 252, seed: int = 4242)
Double one touch Option valuation using the Black-Scholes model and Monte Carlo simulation. Accuracy is not great when compared to the analytical result as we only observe the barrier a finite number of times. The convergence is slow.

value_mc_bb_slow

value_mc_bb_slow(self, value_dt, stock_price, domestic_curve: financepy.market.curves.discount_curve.DiscountCurve, foreign_curve: financepy.market.curves.discount_curve.DiscountCurve, model, num_steps_per_year=52, num_paths=100000, seed=42)

No description available.

value_mc

value_mc(self, value_dt, spot_fx_rate: float, domestic_curve: financepy.market.curves.discount_curve.DiscountCurve, foreign_curve: financepy.market.curves.discount_curve.DiscountCurve, model, num_steps_per_year: int = 52, num_paths: int = 1000000, seed: int = 42) -> float
PV via Brownian-bridge Monte Carlo with Numba parallelism. - KNOCK_IN (double one-touch): pays K if a barrier is touched before expiry. - KNOCK_OUT (double no-touch): pays K if neither barrier is touched before expiry.
Generated automatically from the FinancePy source code. Do not edit this file manually.