public final class FxSingleBarrierOption extends Object implements FxOptionProduct, Resolvable<ResolvedFxSingleBarrierOption>, org.joda.beans.ImmutableBean, Serializable
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.
Modifier and Type | Class and Description |
---|---|
static class |
FxSingleBarrierOption.Builder
The bean-builder for
FxSingleBarrierOption . |
static class |
FxSingleBarrierOption.Meta
The meta-bean for
FxSingleBarrierOption . |
Modifier and Type | Method and Description |
---|---|
static FxSingleBarrierOption.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
Barrier |
getBarrier()
Gets the barrier description.
|
CurrencyPair |
getCurrencyPair()
Gets currency pair of the base currency and counter currency.
|
ZonedDateTime |
getExpiry()
Gets the underlying Fx vanilla option's expiry.
|
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.
|
FxVanillaOption |
getUnderlyingOption()
Gets the underlying FX vanilla option.
|
int |
hashCode() |
static FxSingleBarrierOption.Meta |
meta()
The meta-bean for
FxSingleBarrierOption . |
FxSingleBarrierOption.Meta |
metaBean() |
static FxSingleBarrierOption |
of(FxVanillaOption underlyingOption,
Barrier barrier)
Obtains FX single barrier option without rebate.
|
static FxSingleBarrierOption |
of(FxVanillaOption underlyingOption,
Barrier barrier,
CurrencyAmount rebate)
Obtains FX single barrier option with rebate.
|
ResolvedFxSingleBarrierOption |
resolve(ReferenceData refData) |
FxSingleBarrierOption.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
allCurrencies, isCrossCurrency
allPaymentCurrencies
public static FxSingleBarrierOption of(FxVanillaOption underlyingOption, Barrier barrier, CurrencyAmount rebate)
underlyingOption
- the underlying FX vanilla optionbarrier
- the barrierrebate
- the rebatepublic static FxSingleBarrierOption of(FxVanillaOption underlyingOption, Barrier barrier)
underlyingOption
- the underlying FX vanilla optionbarrier
- the barrierpublic CurrencyPair getCurrencyPair()
This currency pair is conventional, thus indifferent to the direction of FX.
getCurrencyPair
in interface FxProduct
public ZonedDateTime getExpiry()
getExpiry
in interface FxOptionProduct
public ResolvedFxSingleBarrierOption resolve(ReferenceData refData)
resolve
in interface Resolvable<ResolvedFxSingleBarrierOption>
public static FxSingleBarrierOption.Meta meta()
FxSingleBarrierOption
.public static FxSingleBarrierOption.Builder builder()
public FxSingleBarrierOption.Meta metaBean()
metaBean
in interface org.joda.beans.Bean
public FxVanillaOption getUnderlyingOption()
public Barrier getBarrier()
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.
public Optional<CurrencyAmount> getRebate()
This is the notional amount represented in one of the currency pair. The amount should be positive.
public FxSingleBarrierOption.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.