Class ResolvedDsfTrade.Builder

  • All Implemented Interfaces:
    org.joda.beans.BeanBuilder<ResolvedDsfTrade>
    Enclosing class:
    ResolvedDsfTrade

    public static final class ResolvedDsfTrade.Builder
    extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedDsfTrade>
    The bean-builder for ResolvedDsfTrade.
    • Method Detail

      • get

        public Object get​(String propertyName)
        Specified by:
        get in interface org.joda.beans.BeanBuilder<ResolvedDsfTrade>
        Overrides:
        get in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedDsfTrade>
      • info

        public ResolvedDsfTrade.Builder info​(PortfolioItemInfo info)
        Sets the additional information, defaulted to an empty instance.

        This allows additional information to be attached.

        Parameters:
        info - the new value, not null
        Returns:
        this, for chaining, not null
      • product

        public ResolvedDsfTrade.Builder product​(ResolvedDsf 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 ResolvedDsfTrade.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
      • tradedPrice

        public ResolvedDsfTrade.Builder tradedPrice​(TradedPrice tradedPrice)
        Sets 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.

        Parameters:
        tradedPrice - the new value
        Returns:
        this, for chaining, not null
      • toString

        public String toString()
        Overrides:
        toString in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedDsfTrade>