## FX Option

FX Option is a
direct subtype of Vanilla Option with functions FX Option Functions, keys FX Option keys and example object FXOpt that represents a specialization where the underlying - also known as the foreign currency - is one of the two currencies defined in a supplied FX object.
The entry
Underl Ccy should be set to either the base currency (BASE) or the quote currency (QUOTE) of the supplied fx rate BASE/QUOTE.
The remaining currency is the denomination currency of the strike and is referred as the strike currency - also known as the domestic currency.

The strike K is a number that represents a fixed exchange rate of either the currency ratio BASE/QUOTE (FX quotation) or its inverse ratio QUOTE/BASE (inverse FX quotation).
The flag
Strike in FX Terms determines which of the above two quotation types applies.

In the vanilla (call or put) case with notional = N the following holds:

If
Underl Ccy = BASE, the option is exercised by exchanging N units of the base currency for:
NK units of the quote currency, if
Strike in FX Terms = true
or
N/K units of the quote currency, if
Strike in FX Terms = false

If
Underl Ccy = QUOTE, the option is exercised by exchanging N units of the quote currency for:
N/K units of the base currency, if
Strike in FX Terms = true
or
NK units of the base currency, if
Strike in FX Terms = false

Example:

Consider a European call option on the FX rate USD/JPY with
Underl Ccy = JPY so that the underlying is assumed to be the quote currency, i.e. JPY.
Further assume a strike of 125 quoted according to
Strike in FX Terms = true and a notional of 100,000,000.
Then upon exercise the option holder would receive 100,000,000 JPY (the underlying currency) and pay 100,000,000/125 = 800,000 USD (the strike currency).

Note this option is equivalent to a put option on the FX rate JPY/USD with a strike of 1/125 = 0.008 quoted according to
Strike in FX Terms = true or a strike of 125 quoted according to Strike in FX Terms = false.

The pricing of fx options relies on a volatility input that is conventionally represented by a delta based vol surface, which in Deriscope is represented by an object of type
Vol Curve that has Vol Input = ATM-RR-BF

The pricing methodology is specified in
Model[Vanilla Option]

The following labels may be assigned to the key
Output of the Price function in order for the latter to return the respective quantities.
List of valid values:
Delta
Refers to the output of QuantLib's delta function.

Gamma
Refers to the output of QuantLib's gamma function.

Price
The output is a number that represents the price of the referenced tradable, which is the present value of all expected future cash flows, whereby "today" represents the currently set global valuation (trade) date or its overwrite through the
As Of.
The cash flows occurring on the trade date are included only if
Trade Date CFs is set to TRUE

Rho
Refers to the output of QuantLib's rho function.

Theta
Refers to the output of QuantLib's theta function.

Vega
Refers to the output of QuantLib's vega function.