Class ResolvedDsfTrade
- java.lang.Object
-
- com.opengamma.strata.product.dsf.ResolvedDsfTrade
-
- All Implemented Interfaces:
ResolvedTrade
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class ResolvedDsfTrade extends Object implements ResolvedTrade, org.joda.beans.ImmutableBean, Serializable
A trade in a Deliverable Swap Future, resolved for pricing.This is the resolved form of
DsfTrade
and is the primary input to the pricers. Applications will typically create aResolvedDsfTrade
from aDsfTrade
usingDsfTrade.resolve(ReferenceData)
.A
ResolvedDsfTrade
is bound to data that changes over time, such as holiday calendars. If the data changes, such as the addition of a new holiday, the resolved form will not be updated. Care must be taken when placing the resolved form in a cache or persistence layer.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 class
ResolvedDsfTrade.Builder
The bean-builder forResolvedDsfTrade
.static class
ResolvedDsfTrade.Meta
The meta-bean forResolvedDsfTrade
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResolvedDsfTrade.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
PortfolioItemInfo
getInfo()
Gets the additional information, defaulted to an empty instance.ResolvedDsf
getProduct()
Gets the future that was traded.double
getQuantity()
Gets the quantity that was traded.Optional<TradedPrice>
getTradedPrice()
Gets the price that was traded, together with the trade date, optional.int
hashCode()
static ResolvedDsfTrade.Meta
meta()
The meta-bean forResolvedDsfTrade
.ResolvedDsfTrade.Meta
metaBean()
ResolvedDsfTrade.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
Method Detail
-
meta
public static ResolvedDsfTrade.Meta meta()
The meta-bean forResolvedDsfTrade
.- Returns:
- the meta-bean, not null
-
builder
public static ResolvedDsfTrade.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public ResolvedDsfTrade.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getInfo
public PortfolioItemInfo getInfo()
Gets the additional information, defaulted to an empty instance.This allows additional information to be attached.
- Specified by:
getInfo
in interfaceResolvedTrade
- Returns:
- the value of the property, not null
-
getProduct
public ResolvedDsf getProduct()
Gets the future that was traded.The product captures the contracted financial details of the trade.
- Specified by:
getProduct
in interfaceResolvedTrade
- Returns:
- the value of the property, not null
-
getQuantity
public double getQuantity()
Gets the quantity that was traded.This is the number of contracts that were traded. This will be positive if buying and negative if selling.
- Returns:
- the value of the property
-
getTradedPrice
public Optional<TradedPrice> getTradedPrice()
Gets the price that was traded, together with the trade date, optional.This is the price agreed when the trade occurred, in decimal form. 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.
This is optional to allow the class to be used to price both trades and positions. When the instance represents a trade, the traded price should be present. When the instance represents a position, the traded price should be empty.
- Returns:
- the optional value of the property, not null
-
toBuilder
public ResolvedDsfTrade.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-