Class DefaultTableFields

java.lang.Object
com.caplin.motif.commodities.trading.dealbreakdown.DefaultTableFields

public class DefaultTableFields extends Object
Static builder methods to build standard Tables
  • Method Details

    • addSwapDealBreakdownRow

      public static Table addSwapDealBreakdownRow(Table table, String tradeId, LocalDate effectiveDate, LocalDate terminationDate, FormattedAmount notionalQuantity, FormattedAmount fixedPricePerUnit, LocalDate paymentDate)
      Adds a deal breakdown row to your table configuration for a commodities trade that is a FIXED_SWAP or BASIS_SWAP
      Parameters:
      table - The Table to add the row to
      tradeId - The id of the trade
      effectiveDate - The effective date of the trade
      terminationDate - The termination date of the trade
      notionalQuantity - The quantity of the trade
      fixedPricePerUnit - The fixed price of the trade
      paymentDate - The payment date of the trade
    • addPutCallCapFloorDealBreakdownRow

      public static Table addPutCallCapFloorDealBreakdownRow(Table table, String tradeId, LocalDate paymentDate, LocalDate effectiveDate, LocalDate tradeDate, LocalDate expirationDate, FormattedAmount notionalQuantity, FormattedAmount strike, FormattedAmount premium)
      Adds a deal breakdown row to your table configuration for a commodities trade that is EURO PUT/CALL or ASIAN CAP/FLOOR
      Parameters:
      table - The Table to add the row to
      tradeId - The id of the trade
      paymentDate - The payment date of the trade
      effectiveDate - The effective date of the trade
      tradeDate - The trade date of the trade
      expirationDate - The expirationDate date of the trade
      notionalQuantity - The quantity of the trade
      strike - The strike of the trade
      premium - The premium of the trade
    • addCollarDealBreakdownRow

      public static Table addCollarDealBreakdownRow(Table table, String callOrCapTradeId, String putOrFloorTradeId, FormattedAmount notionalQuantity, FormattedAmount callOrCapStrike, FormattedAmount putOrFloorStrike, FormattedAmount callOrCapPremium, FormattedAmount putOrFloorPremium, LocalDate effectiveDate, LocalDate terminationDate, LocalDate expirationDate, LocalDate paymentDate, String currency, String unit, String tradingType)
      Adds a deal breakdown row to your table configuration for a commodities trade that is a EURO/ASIAN COLLAR
      Parameters:
      table - The Table to add the row to
      callOrCapTradeId - The id of the call or cap option
      putOrFloorTradeId - The id of the put or floor option
      notionalQuantity - The quantity of the trade
      callOrCapStrike - The strike of the call or cap option
      putOrFloorStrike - The strike of the put or floor option
      callOrCapPremium - The premium of the call or cap option
      putOrFloorPremium - The premium of the put or floor option
      effectiveDate - The effective date of the trade
      terminationDate - The termination date of the trade
      paymentDate - The payment date of the trade
    • add3WayCollarDealBreakdownRow

      public static Table add3WayCollarDealBreakdownRow(Table table, String tradeId1, String tradeId2, String tradeId3, FormattedAmount notionalQuantity, FormattedAmount strike1, FormattedAmount strike2, FormattedAmount strike3, FormattedAmount premium1, FormattedAmount premium2, FormattedAmount premium3, LocalDate effectiveDate, LocalDate terminationDate, LocalDate expirationDate, LocalDate paymentDate, String currency, String unit, String tradingType)
      Adds a deal breakdown row to your table configuration for a commodities trade that is a EURO/ASIAN 3_WAY_COLLAR
      Parameters:
      table - The Table to add the row to
      tradeId1 - The id of the first option
      tradeId2 - The id of the second option
      tradeId3 - The id of the third option
      notionalQuantity - The quantity of the trade
      strike1 - The strike of the first trade
      strike2 - The strike of the second trade
      strike3 - The strike of the third trade
      premium1 - The premium of the first trade
      premium2 - The premium of the second trade
      premium3 - The premium of the third trade
      effectiveDate - The effective date of the trade
      terminationDate - The termination date of the trade
      paymentDate - The payment date of the trade
    • addCallCapFloorSpreadDealBreakdownRow

      public static Table addCallCapFloorSpreadDealBreakdownRow(Table table, String tradeId, LocalDate paymentDate, LocalDate effectiveDate, LocalDate tradeDate, LocalDate expirationDate, FormattedAmount notionalQuantity, FormattedAmount strike, FormattedAmount premium)
      Adds a deal breakdown row to your table configuration for a commodities trade that is a EURO_CALL_SPREAD or as ASIAN CAP/FLOOR SPREAD
      Parameters:
      table - The Table to add the row to
      tradeId - The id of the trade
      paymentDate - The payment date of the trade
      effectiveDate - The effective date of the trade
      tradeDate - The trade date of the trade
      expirationDate - The expirationDate date of the trade
      notionalQuantity - The quantity of the trade
      strike - The strike of the trade
      premium - The premium of the trade
    • addPutSpreadDealBreakdownRow

      public static Table addPutSpreadDealBreakdownRow(Table table, String tradeId, LocalDate paymentDate, LocalDate effectiveDate, LocalDate tradeDate, LocalDate expirationDate, FormattedAmount notionalQuantity, FormattedAmount strike, FormattedAmount premium)
      Adds a deal breakdown row to your table configuration for a commodities trade that is a PUT_SPREAD
      Parameters:
      table - The Table to add the row to
      tradeId - The id of the trade
      paymentDate - The payment date of the trade
      effectiveDate - The effective date of the trade
      tradeDate - The trade date of the trade
      expirationDate - The expirationDate date of the trade
      notionalQuantity - The quantity of the trade
      strike - The strike of the trade
      premium - The premium of the trade
    • createTextCell

      public static TableCell createTextCell(String text)
      Create a text cell
      Parameters:
      text - The text to show
      Returns:
    • createDateCell

      public static TableCell createDateCell(LocalDate date)
      Creates a date cell
      Parameters:
      date - The date to show
    • createAmountCell

      public static TableCell createAmountCell(FormattedAmount amount)
      Creates an amount cell
      Parameters:
      amount - The amount of the new trade
    • createAmountCellNoUnit

      public static TableCell createAmountCellNoUnit(FormattedAmount amount)
      Creates an amount cell with no units
      Parameters:
      amount - The amount of the new trade
    • createDealBreakdownTable

      public static Table createDealBreakdownTable(String tradingType, String currency, String unit)
      Creates a deal breakdown table for a commodities trade of the given trading type
      Parameters:
      currency - The currency of the trade (e.g. USD)
      unit - The unit of the trade (e.g. bbl)