## Class ResolvedFxSingleBarrierOption

• java.lang.Object
• com.opengamma.strata.product.fxopt.ResolvedFxSingleBarrierOption
• All Implemented Interfaces:
ResolvedProduct, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

public final class ResolvedFxSingleBarrierOption
extends Object
implements ResolvedProduct, org.joda.beans.ImmutableBean, Serializable
Resolved FX (European) single barrier option.

An FX option is a financial instrument that provides an option to exchange two currencies at a specified future time only when barrier event occurs (knock-in option) or does not occur (knock-out option).

Depending on the barrier defined in Barrier, the options are classified into four types: up-and-in, down-and-in, up-and-out and down-and-out.

For example, an up-and-out call on a 'EUR 1.00 / USD -1.41' exchange with barrier of 1.5 is the option to perform a foreign exchange on the expiry date, where USD 1.41 is paid to receive EUR 1.00, only when EUR/USD rate does not exceed 1.5 during the barrier event observation period.

In case of the occurrence (non-occurrence for knock-in options) of the barrier event, the option becomes worthless, or alternatively, a rebate is made.

Serialized Form
• ### Nested Class Summary

Nested Classes
Modifier and Type Class Description
static class  ResolvedFxSingleBarrierOption.Meta
The meta-bean for ResolvedFxSingleBarrierOption.
• ### Method Summary

All Methods
Modifier and Type Method Description
boolean equals​(Object obj)
Barrier getBarrier()
Gets the barrier description.
CurrencyPair getCurrencyPair()
Gets currency pair of the base currency and counter currency.
Optional<CurrencyAmount> getRebate()
Gets for a 'out' option, the amount is paid when the barrier is reached; for a 'in' option, the amount is paid at expiry if the barrier is not reached.
ResolvedFxVanillaOption getUnderlyingOption()
Gets the underlying FX vanilla option.
int hashCode()
static ResolvedFxSingleBarrierOption.Meta meta()
The meta-bean for ResolvedFxSingleBarrierOption.
ResolvedFxSingleBarrierOption.Meta metaBean()
static ResolvedFxSingleBarrierOption of​(ResolvedFxVanillaOption underlyingOption, Barrier barrier)
Obtains FX single barrier option without rebate.
static ResolvedFxSingleBarrierOption of​(ResolvedFxVanillaOption underlyingOption, Barrier barrier, CurrencyAmount rebate)
Obtains FX single barrier option with rebate.
String toString()
• ### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• ### Methods inherited from interface org.joda.beans.Bean

property, propertyNames
• ### Method Detail

• #### of

public static ResolvedFxSingleBarrierOption of​(ResolvedFxVanillaOption underlyingOption,
Barrier barrier,
CurrencyAmount rebate)
Obtains FX single barrier option with rebate.
Parameters:
underlyingOption - the underlying FX vanilla option
barrier - the barrier
rebate - the rebate
Returns:
the instance
• #### of

public static ResolvedFxSingleBarrierOption of​(ResolvedFxVanillaOption underlyingOption,
Barrier barrier)
Obtains FX single barrier option without rebate.
Parameters:
underlyingOption - the underlying FX vanilla option
barrier - the barrier
Returns:
the instance
• #### getCurrencyPair

public CurrencyPair getCurrencyPair()
Gets currency pair of the base currency and counter currency.

This currency pair is conventional, thus indifferent to the direction of FX.

Returns:
the currency pair
• #### meta

public static ResolvedFxSingleBarrierOption.Meta meta()
The meta-bean for ResolvedFxSingleBarrierOption.
Returns:
the meta-bean, not null
• #### metaBean

public ResolvedFxSingleBarrierOption.Meta metaBean()
Specified by:
metaBean in interface org.joda.beans.Bean
• #### getUnderlyingOption

public ResolvedFxVanillaOption getUnderlyingOption()
Gets the underlying FX vanilla option.
Returns:
the value of the property, not null
• #### getBarrier

public Barrier getBarrier()
Gets the barrier description.

The barrier level stored in this field must be represented based on the direction of the currency pair in the underlying FX transaction.

For example, if the underlying option is an option on EUR/GBP, the barrier should be a certain level of EUR/GBP rate.

Returns:
the value of the property, not null
• #### getRebate

public Optional<CurrencyAmount> getRebate()
Gets for a 'out' option, the amount is paid when the barrier is reached; for a 'in' option, the amount is paid at expiry if the barrier is not reached.

This is the notional amount represented in one of the currency pair. The amount should be positive.

Returns:
the optional value of the property, not null
• #### equals

public boolean equals​(Object obj)
Overrides:
equals in class Object
• #### hashCode

public int hashCode()
Overrides:
hashCode in class Object
• #### toString

public String toString()
Overrides:
toString in class Object