Class DefaultTableFields
- java.lang.Object
-
- com.caplin.motif.commodities.trading.dealbreakdown.DefaultTableFields
-
public class DefaultTableFields extends java.lang.Object
Static builder methods to build standard Tables
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Table
add3WayCollarDealBreakdownRow(Table table, java.lang.String tradeId1, java.lang.String tradeId2, java.lang.String tradeId3, FormattedAmount notionalQuantity, FormattedAmount strike1, FormattedAmount strike2, FormattedAmount strike3, FormattedAmount premium1, FormattedAmount premium2, FormattedAmount premium3, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate expirationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
Adds a deal breakdown row to your table configuration for a commodities trade that is a EURO/ASIAN 3_WAY_COLLARstatic Table
addCallCapFloorSpreadDealBreakdownRow(Table table, java.lang.String tradeId, java.lang.String direction, FormattedAmount notionalQuantity, FormattedAmount strike, FormattedAmount premium, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate expirationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
Adds a deal breakdown row to your table configuration for a commodities trade that is a EURO_CALL_SPREAD or as ASIAN CAP/FLOOR SPREADstatic Table
addCollarDealBreakdownRow(Table table, java.lang.String callOrCapTradeId, java.lang.String putOrFloorTradeId, FormattedAmount notionalQuantity, FormattedAmount callOrCapStrike, FormattedAmount putOrFloorStrike, FormattedAmount callOrCapPremium, FormattedAmount putOrFloorPremium, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate expirationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
Adds a deal breakdown row to your table configuration for a commodities trade that is a EURO/ASIAN COLLARstatic Table
addPutCallCapFloorDealBreakdownRow(Table table, java.lang.String tradeId, FormattedAmount notionalQuantity, FormattedAmount strike, FormattedAmount premium, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate expirationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
Adds a deal breakdown row to your table configuration for a commodities trade that is EURO PUT/CALL or ASIAN CAP/FLOORstatic Table
addPutSpreadDealBreakdownRow(Table table, java.lang.String tradeId, FormattedAmount notionalQuantity, FormattedAmount strike, FormattedAmount premium, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate expirationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
Adds a deal breakdown row to your table configuration for a commodities trade that is a PUT_SPREADstatic Table
addSwapDealBreakdownRow(Table table, java.lang.String tradeId, FormattedAmount notionalQuantity, FormattedAmount fixedPricePerUnit, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
Adds a deal breakdown row to your table configuration for a commodities trade that is a FIXED_SWAP or BASIS_SWAPstatic TableCell
createAmountCell(FormattedAmount amount)
Creates an amount cellstatic TableCell
createDateCell(java.time.LocalDate date)
Creates a date cellstatic Table
createDealBreakdownTable(java.lang.String tradingType, java.lang.String currency, java.lang.String unit)
Creates a deal breakdown table for a commodities trade of the given trading typestatic TableCell
createTextCell(java.lang.String text)
Create a text cell
-
-
-
Method Detail
-
addSwapDealBreakdownRow
public static Table addSwapDealBreakdownRow(Table table, java.lang.String tradeId, FormattedAmount notionalQuantity, FormattedAmount fixedPricePerUnit, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
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 totradeId
- The id of the tradenotionalQuantity
- The quantity of the tradefixedPricePerUnit
- The fixed price of the tradeeffectiveDate
- The effective date of the tradeterminationDate
- The termination date of the tradepaymentDate
- The payment date of the tradeuniqueIdentifier
- Either the unique swap identifier, or the unique transaction identifier, of the trade
-
addPutCallCapFloorDealBreakdownRow
public static Table addPutCallCapFloorDealBreakdownRow(Table table, java.lang.String tradeId, FormattedAmount notionalQuantity, FormattedAmount strike, FormattedAmount premium, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate expirationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
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 totradeId
- The id of the tradenotionalQuantity
- The quantity of the tradestrike
- The strike of the tradepremium
- The premium of the tradeeffectiveDate
- The effective date of the tradeterminationDate
- The termination date of the tradepaymentDate
- The payment date of the tradeuniqueIdentifier
- Either the unique swap identifier, or the unique transaction identifier, of the trade
-
addCollarDealBreakdownRow
public static Table addCollarDealBreakdownRow(Table table, java.lang.String callOrCapTradeId, java.lang.String putOrFloorTradeId, FormattedAmount notionalQuantity, FormattedAmount callOrCapStrike, FormattedAmount putOrFloorStrike, FormattedAmount callOrCapPremium, FormattedAmount putOrFloorPremium, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate expirationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
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 tocallOrCapTradeId
- The id of the call or cap optionputOrFloorTradeId
- The id of the put or floor optionnotionalQuantity
- The quantity of the tradecallOrCapStrike
- The strike of the call or cap optionputOrFloorStrike
- The strike of the put or floor optioncallOrCapPremium
- The premium of the call or cap optionputOrFloorPremium
- The premium of the put or floor optioneffectiveDate
- The effective date of the tradeterminationDate
- The termination date of the tradepaymentDate
- The payment date of the tradeuniqueIdentifier
- Either the unique swap identifier, or the unique transaction identifier, of the trade
-
add3WayCollarDealBreakdownRow
public static Table add3WayCollarDealBreakdownRow(Table table, java.lang.String tradeId1, java.lang.String tradeId2, java.lang.String tradeId3, FormattedAmount notionalQuantity, FormattedAmount strike1, FormattedAmount strike2, FormattedAmount strike3, FormattedAmount premium1, FormattedAmount premium2, FormattedAmount premium3, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate expirationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
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 totradeId1
- The id of the first optiontradeId2
- The id of the second optiontradeId3
- The id of the third optionnotionalQuantity
- The quantity of the tradestrike1
- The strike of the first tradestrike2
- The strike of the second tradestrike3
- The strike of the third tradepremium1
- The premium of the first tradepremium2
- The premium of the second tradepremium3
- The premium of the third tradeeffectiveDate
- The effective date of the tradeterminationDate
- The termination date of the tradepaymentDate
- The payment date of the tradeuniqueIdentifier
- Either the unique swap identifier, or the unique transaction identifier, of the trade
-
addCallCapFloorSpreadDealBreakdownRow
public static Table addCallCapFloorSpreadDealBreakdownRow(Table table, java.lang.String tradeId, java.lang.String direction, FormattedAmount notionalQuantity, FormattedAmount strike, FormattedAmount premium, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate expirationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
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 totradeId
- The id of the tradedirection
- The direction of the tradenotionalQuantity
- The quantity of the tradestrike
- The strike of the tradepremium
- The premium of the tradeeffectiveDate
- The effective date of the tradeterminationDate
- The termination date of the tradepaymentDate
- The payment date of the tradeuniqueIdentifier
- Either the unique swap identifier, or the unique transaction identifier, of the trade
-
addPutSpreadDealBreakdownRow
public static Table addPutSpreadDealBreakdownRow(Table table, java.lang.String tradeId, FormattedAmount notionalQuantity, FormattedAmount strike, FormattedAmount premium, java.time.LocalDate effectiveDate, java.time.LocalDate terminationDate, java.time.LocalDate expirationDate, java.time.LocalDate paymentDate, java.lang.String uniqueIdentifier)
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 totradeId
- The id of the tradenotionalQuantity
- The quantity of the tradestrike
- The strike of the tradepremium
- The premium of the tradeeffectiveDate
- The effective date of the tradeterminationDate
- The termination date of the tradepaymentDate
- The payment date of the tradeuniqueIdentifier
- Either the unique swap identifier, or the unique transaction identifier, of the trade
-
createTextCell
public static TableCell createTextCell(java.lang.String text)
Create a text cell- Parameters:
text
- The text to show- Returns:
-
createDateCell
public static TableCell createDateCell(java.time.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
-
createDealBreakdownTable
public static Table createDealBreakdownTable(java.lang.String tradingType, java.lang.String currency, java.lang.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)
-
-