FXOptionStrat#

class rateslib.instruments.FXOptionStrat(options, rate_weight, rate_weight_vol)#

Bases: object

Create a custom option strategy composed of a list of FXOption.

Parameters:
  • options (list) – The FXOptions which make up the strategy.

  • rate_weight (list) – The multiplier for the ‘pips_or_%’ metric that sums the options to a final rate.

  • rate_weight_vol (list) – The multiplier for the ‘vol’ metric that sums the options to a final rate.

Methods Summary

analytic_greeks([curves, solver, fx, base, ...])

Return various pricing metrics of the FX Option.

npv([curves, solver, fx, base, local, vol])

rate([curves, solver, fx, base, vol, metric])

Return the mid-market rate of an option strategy.

Methods Documentation

analytic_greeks(curves=NoInput.blank, solver=NoInput.blank, fx=NoInput.blank, base=NoInput.blank, local=False, vol=NoInput.blank)#

Return various pricing metrics of the FX Option.

Parameters:
  • curves (list of Curve) – Curves for discounting cashflows. List follows the structure used by IRDs and should be given as: [None, Curve for domestic ccy, None, Curve for foreign ccy]

  • solver (Solver, optional) – The numerical Solver that constructs Curves from calibrating instruments.

  • fx (float, FXRates, FXForwards, optional) – The immediate settlement FX rate that will be used to convert values into another currency. A given float is used directly. If giving a FXRates or FXForwards object, converts from local currency into base.

  • base (str, optional) – The base currency to convert cashflows into (3-digit code), set by default. Only used if fx is an FXRates or FXForwards object.

Return type:

float, Dual, Dual2

Notes

npv(curves=NoInput.blank, solver=NoInput.blank, fx=NoInput.blank, base=NoInput.blank, local=False, vol=NoInput.blank)#
rate(curves=NoInput.blank, solver=NoInput.blank, fx=NoInput.blank, base=NoInput.blank, vol=NoInput.blank, metric=NoInput.blank)#

Return the mid-market rate of an option strategy.

See rate().