Package com.opengamma.strata.product.dsf
Class DsfTrade.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<DsfTrade>
-
- com.opengamma.strata.product.dsf.DsfTrade.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DsfTrade
build()
Object
get(String propertyName)
DsfTrade.Builder
info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.DsfTrade.Builder
price(double price)
Sets the price that was traded, in decimal form.DsfTrade.Builder
product(Dsf product)
Sets the future that was traded.DsfTrade.Builder
quantity(double quantity)
Sets the quantity that was traded.DsfTrade.Builder
set(String propertyName, Object newValue)
DsfTrade.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
String
toString()
-
-
-
Method Detail
-
set
public DsfTrade.Builder set(String propertyName, Object newValue)
-
set
public DsfTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
-
build
public DsfTrade build()
-
info
public DsfTrade.Builder info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.This allows additional information to be attached to the trade. The trade date is required when calling
DsfTrade.resolve(ReferenceData)
.- Parameters:
info
- the new value, not null- Returns:
- this, for chaining, not null
-
product
public DsfTrade.Builder product(Dsf product)
Sets the future that was traded.The product captures the contracted financial details of the trade.
- Parameters:
product
- the new value, not null- Returns:
- this, for chaining, not null
-
quantity
public DsfTrade.Builder quantity(double quantity)
Sets the quantity that was traded.This is the number of contracts that were traded. This will be positive if buying and negative if selling.
- Parameters:
quantity
- the new value- Returns:
- this, for chaining, not null
-
price
public DsfTrade.Builder price(double price)
Sets the price that was traded, in decimal form.This is the price agreed when the trade occurred.
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.
- Parameters:
price
- the new value- Returns:
- this, for chaining, not null
-
-