public final class ImmutableFixedOvernightSwapConvention extends Object implements FixedOvernightSwapConvention, org.joda.beans.ImmutableBean, Serializable
This defines the market convention for a Fixed-Overnight single currency swap. This is often known as an OIS swap, although Fed Fund swaps are also covered. The convention is formed by combining two swap leg conventions in the same currency.
The convention is defined by four key dates.
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableFixedOvernightSwapConvention.Builder
The bean-builder for
ImmutableFixedOvernightSwapConvention. |
static class |
ImmutableFixedOvernightSwapConvention.Meta
The meta-bean for
ImmutableFixedOvernightSwapConvention. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableFixedOvernightSwapConvention.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
FixedRateSwapLegConvention |
getFixedLeg()
Gets the market convention of the fixed leg.
|
OvernightRateSwapLegConvention |
getFloatingLeg()
Gets the market convention of the floating leg.
|
String |
getName()
Gets the convention name, such as 'USD-FIXED-TERM-FED-FUND-OIS'.
|
DaysAdjustment |
getSpotDateOffset()
Gets the offset of the spot value date from the trade date.
|
int |
hashCode() |
static ImmutableFixedOvernightSwapConvention.Meta |
meta()
The meta-bean for
ImmutableFixedOvernightSwapConvention. |
ImmutableFixedOvernightSwapConvention.Meta |
metaBean() |
static ImmutableFixedOvernightSwapConvention |
of(String name,
FixedRateSwapLegConvention fixedLeg,
OvernightRateSwapLegConvention floatingLeg,
DaysAdjustment spotDateOffset)
Obtains a convention based on the specified name and leg conventions.
|
ImmutableFixedOvernightSwapConvention.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
SwapTrade |
toTrade(TradeInfo tradeInfo,
LocalDate startDate,
LocalDate endDate,
BuySell buySell,
double notional,
double fixedRate)
Creates a trade based on this convention.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateTrade, createTrade, extendedEnum, of, toTemplate, toTradecalculateSpotDateFromTradeDatepublic static ImmutableFixedOvernightSwapConvention of(String name, FixedRateSwapLegConvention fixedLeg, OvernightRateSwapLegConvention floatingLeg, DaysAdjustment spotDateOffset)
The two leg conventions must be in the same currency.
name - the unique name of the conventionfixedLeg - the market convention for the fixed legfloatingLeg - the market convention for the floating legspotDateOffset - the offset of the spot value date from the trade datepublic SwapTrade toTrade(TradeInfo tradeInfo, LocalDate startDate, LocalDate endDate, BuySell buySell, double notional, double fixedRate)
FixedOvernightSwapConventionThis returns a trade based on the specified dates.
The notional is unsigned, with buy/sell determining the direction of the trade. If buying the swap, the floating rate is received from the counterparty, with the fixed rate being paid. If selling the swap, the floating rate is paid to the counterparty, with the fixed rate being received.
toTrade in interface FixedOvernightSwapConventiontoTrade in interface SingleCurrencySwapConventiontradeInfo - additional information about the tradestartDate - the start dateendDate - the end datebuySell - the buy/sell flagnotional - the notional amountfixedRate - the fixed rate, typically derived from the marketpublic static ImmutableFixedOvernightSwapConvention.Meta meta()
ImmutableFixedOvernightSwapConvention.public static ImmutableFixedOvernightSwapConvention.Builder builder()
public ImmutableFixedOvernightSwapConvention.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic String getName()
getName in interface NamedgetName in interface FixedFloatSwapConventiongetName in interface FixedOvernightSwapConventiongetName in interface SingleCurrencySwapConventionpublic FixedRateSwapLegConvention getFixedLeg()
getFixedLeg in interface FixedFloatSwapConventionpublic OvernightRateSwapLegConvention getFloatingLeg()
getFloatingLeg in interface FixedFloatSwapConventiongetFloatingLeg in interface FixedOvernightSwapConventionpublic DaysAdjustment getSpotDateOffset()
The offset is applied to the trade date to find the start date. A typical value is "plus 2 business days".
getSpotDateOffset in interface SingleCurrencySwapConventionpublic ImmutableFixedOvernightSwapConvention.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.