public static final class ResolvedDsfTrade.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedDsfTrade>
ResolvedDsfTrade.| Modifier and Type | Method and Description |
|---|---|
ResolvedDsfTrade |
build() |
Object |
get(String propertyName) |
ResolvedDsfTrade.Builder |
info(PortfolioItemInfo info)
Sets the additional information, defaulted to an empty instance.
|
ResolvedDsfTrade.Builder |
product(ResolvedDsf product)
Sets the future that was traded.
|
ResolvedDsfTrade.Builder |
quantity(double quantity)
Sets the quantity that was traded.
|
ResolvedDsfTrade.Builder |
set(org.joda.beans.MetaProperty<?> property,
Object value) |
ResolvedDsfTrade.Builder |
set(String propertyName,
Object newValue) |
String |
toString() |
ResolvedDsfTrade.Builder |
tradedPrice(TradedPrice tradedPrice)
Sets the price that was traded, together with the trade date, optional.
|
public Object get(String propertyName)
get in interface org.joda.beans.BeanBuilder<ResolvedDsfTrade>get in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedDsfTrade>public ResolvedDsfTrade.Builder set(String propertyName, Object newValue)
public ResolvedDsfTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
set in interface org.joda.beans.BeanBuilder<ResolvedDsfTrade>set in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedDsfTrade>public ResolvedDsfTrade build()
public ResolvedDsfTrade.Builder info(PortfolioItemInfo info)
This allows additional information to be attached.
info - the new value, not nullpublic ResolvedDsfTrade.Builder product(ResolvedDsf product)
The product captures the contracted financial details of the trade.
product - the new value, not nullpublic ResolvedDsfTrade.Builder quantity(double quantity)
This is the number of contracts that were traded. This will be positive if buying and negative if selling.
quantity - the new valuepublic ResolvedDsfTrade.Builder tradedPrice(TradedPrice tradedPrice)
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.
tradedPrice - the new valuepublic String toString()
toString in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedDsfTrade>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.