Consulting and technology services in financial engineering and risk management
 

Products > iLib > Functions > Sens

iLib FxBarrier function

Returns the premium and greeks for a barrier option onan FX deal. The premium and greeks are as at value date spot. Refer function Barrier for a description of the option attributes.

The function returns a 1 x 5 range containing the Premium, Delta, Gamma, Vega and Time Decay of the option as at spot value date.

Syntax:
FxBarrier(CallOrPut, UpOrDown, InOrOut, SpotExchange, Strike, Barrier, Rebate, Volatility, TodaysDate, SpotValueDate, ExpiryDate, DeliveryDate, DomesticIntrRate, ForeignIntrRate, {CurrencyPair | DomesticDCT, ForeignDCT})

CallOrPut is "C" for call, "P" for put.

UpOrDown is "U" for up, "D" for down. This refers to the direction in which the spot price has to travel to reach the barrier price (as in down and out call).

InOrOut is "I" for in, "O" for out. Specifies whether the option is a knock in or knock out.

SpotExchange is the current spot exchange rate of the currency pair.

Strike is the option strike exchange rate.

Barrier is the spote exchange rate that must be observed in the market for the option to be knocked out or in.

Rebate are the points paid at expiry is the option has been knocked out, or has not been knocked in.

Volatility is the vol expressed as part of 1 (15% would be entered as 0.15).

TodaysDate is today's date.

SpotValueDate is the spot value date.

ExpiryDate is the expiry date off the option.

DeliveryDate is the value date of the FX deal that would result from option exercise.

DomesticInterestRate is the interest rate of the second exchange rate of the pair. Interest rates are expressed as an excel percentage. Ie 5% would be entered as 0.05. This is a money market, interest paid at maturity rate, not a continuously compounded rate.

ForeignInterestRate is the interest rate of the first currency of the pair (see below). It is mandatory if a spot exchange rate is supplied and not required if a forward exchange rate is supplied. This is a money market, interest paid at maturity rate, not a continuously compounded rate.

CurrencyPair is the pair to which the spot exchange rates apply. Format ccy1/ccy2, e.g. USD/DEM. The first term is referred to as the foreign currency and the second the domestic currency. Either the currency pair or the DomesticDCT and ForeignDCT must be supplied to the function.

DomesticDCT is the day count type associated with the domestic interest rate. If a CurrencyPair is provided, DomesticDCT will default to the domestic currency's CashDCT specified in the iLib control file.

ForeignDCT is the day count type associated with the foreign interest rate. The function needs to know the ForeignDCT a foreign interest rate is entered, and ignores it otherwise. If CurrencyPair is provided, ForeignDCT will default to the foreign currency's CashDCT specified in the iLib control file.

The Output:

  • FxBarrier returns a 1 row by 5 column array containing:
  • Premium in terms of domestic currency per unit of foreign currency,
  • Delta in terms of premium sensitivity to a change in spot exchange rate (even if the spot exchange rate hasn't been supplied),
  • Gamma in terms of change in delta for a 1% change in spot exchange rate,
  • Vega in terms of change in premium for a 1% (.01) increase in volatility and
  • Time Decay is the one day time decay of the option.

Back

 
Projects
Some of our recent projects..
 
Implementing IAS39?
We can help with fair values..
 
 
 
 

 

ABN 35 083 867 350

Privacy Policy  
Copyright © 2003 Wingate Financial Engineering Pty Ltd. All rights reserved.