Class DsfSecurity
- java.lang.Object
-
- com.opengamma.strata.product.dsf.DsfSecurity
-
- All Implemented Interfaces:
Security,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class DsfSecurity extends Object implements Security, org.joda.beans.ImmutableBean, Serializable
A security representing a deliverable swap futures security.A deliverable swap future is a financial instrument that physically settles an interest rate swap on a future date. The delivered swap is cleared by a central counterparty. The last future price before delivery is quoted in term of the underlying swap present value. The futures product is margined on a daily basis.
Price
The price of a DSF is based on the present value (NPV) of the underlying swap on the delivery date. For example, a price of 100.182 represents a present value of $100,182.00, if the notional is $100,000. This price can also be viewed as a percentage present value -(100 + percentPv), or 0.182% in this example.Strata uses decimal prices for DSFs in the trade model, pricers and market data. The decimal price is based on the decimal multiplier equivalent to the implied percentage. Thus the market price of 100.182 is represented in Strata by 1.00182.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDsfSecurity.BuilderThe bean-builder forDsfSecurity.static classDsfSecurity.MetaThe meta-bean forDsfSecurity.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DsfSecurity.Builderbuilder()Returns a builder used to create an instance of the bean.DsfPositioncreatePosition(PositionInfo positionInfo, double longQuantity, double shortQuantity, ReferenceData refData)Creates a position based on this security from a long and short quantity.DsfPositioncreatePosition(PositionInfo positionInfo, double quantity, ReferenceData refData)Creates a position based on this security from a net quantity.DsfcreateProduct(ReferenceData refData)Creates the product associated with this security.DsfTradecreateTrade(TradeInfo info, double quantity, double tradePrice, ReferenceData refData)Creates a trade based on this security.booleanequals(Object obj)CurrencygetCurrency()Gets the currency that the security is traded in.SecurityInfogetInfo()Gets the standard security information.LocalDategetLastTradeDate()Gets the last date of trading.doublegetNotional()Gets the notional.ImmutableSet<SecurityId>getUnderlyingIds()Gets the set of underlying security identifiers.SwapgetUnderlyingSwap()Gets the underlying swap.inthashCode()static DsfSecurity.Metameta()The meta-bean forDsfSecurity.DsfSecurity.MetametaBean()DsfSecurity.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()DsfSecuritywithInfo(SecurityInfo info)Returns an instance with the specified info.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.product.Security
getSecurityId
-
-
-
-
Method Detail
-
getCurrency
public Currency getCurrency()
Description copied from interface:SecurityGets the currency that the security is traded in.- Specified by:
getCurrencyin interfaceSecurity- Returns:
- the trading currency
-
getUnderlyingIds
public ImmutableSet<SecurityId> getUnderlyingIds()
Description copied from interface:SecurityGets the set of underlying security identifiers.The set must contain all the security identifiers that this security directly refers to. For example, a bond future will return the identifiers of the underlying basket of bonds, but a bond future option will only return the identifier of the underlying future, not the basket.
- Specified by:
getUnderlyingIdsin interfaceSecurity- Returns:
- the underlying security identifiers
-
withInfo
public DsfSecurity withInfo(SecurityInfo info)
Description copied from interface:SecurityReturns an instance with the specified info.
-
createProduct
public Dsf createProduct(ReferenceData refData)
Description copied from interface:SecurityCreates the product associated with this security.The product of a security is distinct from the security. The product includes the financial details from this security, but excludes the additional information. The product also includes the products of any underlying securities.
- Specified by:
createProductin interfaceSecurity- Parameters:
refData- the reference data used to find underlying securities- Returns:
- the product
-
createTrade
public DsfTrade createTrade(TradeInfo info, double quantity, double tradePrice, ReferenceData refData)
Description copied from interface:SecurityCreates a trade based on this security.This creates a trade of a suitable type for this security.
- Specified by:
createTradein interfaceSecurity- Parameters:
info- the trade informationquantity- the number of contracts in the tradetradePrice- the price agreed when the trade occurredrefData- the reference data used to find underlying securities- Returns:
- the trade
-
createPosition
public DsfPosition createPosition(PositionInfo positionInfo, double quantity, ReferenceData refData)
Description copied from interface:SecurityCreates a position based on this security from a net quantity.This creates a position of a suitable type for this security.
- Specified by:
createPositionin interfaceSecurity- Parameters:
positionInfo- the position informationquantity- the number of contracts in the positionrefData- the reference data used to find underlying securities- Returns:
- the position
-
createPosition
public DsfPosition createPosition(PositionInfo positionInfo, double longQuantity, double shortQuantity, ReferenceData refData)
Description copied from interface:SecurityCreates a position based on this security from a long and short quantity.This creates a position of a suitable type for this security.
The long quantity and short quantity must be zero or positive, not negative.
- Specified by:
createPositionin interfaceSecurity- Parameters:
positionInfo- the position informationlongQuantity- the long quantity in the positionshortQuantity- the short quantity in the positionrefData- the reference data used to find underlying securities- Returns:
- the position
-
meta
public static DsfSecurity.Meta meta()
The meta-bean forDsfSecurity.- Returns:
- the meta-bean, not null
-
builder
public static DsfSecurity.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public DsfSecurity.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getInfo
public SecurityInfo getInfo()
Gets the standard security information.This includes the security identifier.
-
getNotional
public double getNotional()
Gets the notional.This is also called face value or contract value.
- Returns:
- the value of the property
-
getLastTradeDate
public LocalDate getLastTradeDate()
Gets the last date of trading.This date must be before the delivery date of the underlying swap.
- Returns:
- the value of the property, not null
-
getUnderlyingSwap
public Swap getUnderlyingSwap()
Gets the underlying swap.The delivery date of the future is the start date of the swap. The swap must be a single currency swap with a notional of 1. There must be two legs, the fixed leg must be received and the floating rate must be paid.
- Returns:
- the value of the property, not null
-
toBuilder
public DsfSecurity.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-