Skip to content

Commit

Permalink
Forward and Option Commodity Delivery
Browse files Browse the repository at this point in the history
Forward and Option Commodity Delivery
  • Loading branch information
JanBaserba committed Nov 14, 2023
1 parent deb5bec commit 9d50499
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2361,6 +2361,8 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
[value "equityValuation" path "equityExercise"]
+ schedule
[value "schedule"]
+ delivery
[value "ignore"]

ForwardPayout:
[meta "id"]
Expand All @@ -2370,6 +2372,8 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
- priceQuantity
+ priceQuantity
[value "ignore"]
+ delivery
[value "ignore"]

SecurityLeg:
[meta "id"]
Expand Down Expand Up @@ -2398,6 +2402,8 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
+ calculationPeriodDates
[hint "calculationPeriodsSchedule"]
[hint "calculationPeriods"]
+ delivery
[value "ignore"]

CommodityPriceReturnTerms:
+ spread
Expand Down
20 changes: 10 additions & 10 deletions rosetta-source/src/main/rosetta/product-asset-type.rosetta
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ type CommodityPayout extends PayoutBase: <"Payout based on the averaged price of
averagingFeature AveragingCalculation (0..1) <"Indicates if the averaging calculation, when applicable, is weighted or unweighted.">
commodityPriceReturnTerms CommodityPriceReturnTerms (0..1) <"Defines parameters in which the commodity price is assessed.">
pricingDates PricingDates (1..1) <"Specifies specific dates or parametric rules for the dates on which the price will be determined.">
schedule CommoditySchedule (0..1) <"Allows the full representation of a commodity payout by defining a set of schedule periods. It supports standard schedule customization by expressing all the dates, quantities, and pricing data in a non-parametric way.">
schedule CalculationSchedule (0..1) <"Allows the full representation of a payout by defining a set of schedule periods. It supports standard schedule customization by expressing all the dates, quantities, and pricing data in a non-parametric way.">
calculationPeriodDates CalculationPeriodDates (0..1) <"Defines the calculation period dates schedule.">
paymentDates PaymentDates (1..1) <"Defines the payment date schedule, as defined by the parameters that are needed to specify it, either in a parametric way or by reference to another schedule of dates (e.g. the valuation dates).">
underlier Product (1..1) <"Identifies the underlying product that is referenced for pricing of the applicable leg in a swap. Referenced in the '2018 ISDA CDM Equity Confirmation for Security Equity Swap' as Security.">
fxFeature FxFeature (0..1) <"Defines quanto or composite FX features that are included in the swap leg.">
delivery CommodityDeliveryInformation (0..1) <"Contains the information relative to the delivery of the commodity.">
delivery AssetDeliveryInformation (0..1) <"Contains the information relative to the delivery of the asset.">

condition Quantity: <"When there is an OptionPayout the quantity can be expressed as part of the payoutQuantity, or as part of the underlier in the case of a Swaption. For all other payouts that extend PayoutBase the payoutQuantity is a mandatory attribute.">
priceQuantity exists
Expand Down Expand Up @@ -66,26 +66,26 @@ type CommodityPayout extends PayoutBase: <"Payout based on the averaged price of
then schedule -> schedulePeriod -> deliveryPeriod -> priceTimeIntervalQuantity is absent
and delivery -> periods -> profile -> block -> priceTimeIntervalQuantity is absent

type CommodityDeliveryInformation: <"Contains the information relative to the delivery of the commodity.">
periods CommodityDeliveryPeriods (0..1) <"Defines the periods of delivery, including the delivery profile.">
type AssetDeliveryInformation: <"Contains the information relative to the delivery of the asset.">
periods AssetDeliveryPeriods (0..1) <"Defines the periods of delivery, including the delivery profile.">
location LocationIdentifier (0..*) <"Defines the location of the delivery of the commodity.">
deliveryCapacity Quantity (0..1) <"The number of units included in the transaction for each delivery interval">

type CommodityDeliveryPeriods: <"Defines the periods of delivery, including the delivery profile.">
profile CommodityDeliveryProfile (0..*) <"Defines the delivery profile of the commodity, including the load type and the delivery intervals.">
type AssetDeliveryPeriods: <"Defines the periods of delivery, including the delivery profile.">
profile AssetDeliveryProfile (0..*) <"Defines the delivery profile of the asset, including the load type and the delivery intervals.">
startDate date (0..1) <"Delivery start date">
endDate date (0..1) <"Delivery end date">

type CommodityScheduleDeliveryPeriods extends CommodityDeliveryPeriods:
type CalculationScheduleDeliveryPeriods extends AssetDeliveryPeriods: <"Period and time profile over which the delivery takes place.">
deliveryCapacity Quantity (0..1) <"The number of units included in the transaction for each delivery interval">
priceTimeIntervalQuantity Price (0..1) <"Price per quantity per delivery time interval.">

type CommodityDeliveryProfile: <"Defines the delivery profile of the commodity, including the load type and the delivery intervals.">
type AssetDeliveryProfile: <"Defines the delivery profile of the asset, including the load type and the delivery intervals.">
loadType LoadTypeEnum (0..1) <"Identification of the delivery profile.">
block CommodityDeliveryProfileBlock (0..*) <"Defines a delivery profile block, including start and end time, days of the week, duration, delivery capacity and price time interval quantity.">
block AssetDeliveryProfileBlock (0..*) <"Defines a delivery profile block, including start and end time, days of the week, duration, delivery capacity and price time interval quantity.">
bankHolidaysTreatment BankHolidayTreatmentEnum (0..1) <"Specifies whether the dates defined include holidays or not.">

type CommodityDeliveryProfileBlock:
type AssetDeliveryProfileBlock: <"Defines a delivery profile block, including start and end time, days of the week, duration, delivery capacity and price time interval quantity.">
startTime time (0..1) <"The start time of the delivery interval for each block or shape.">
endTime time (0..1) <"The end time of the delivery interval for each block or shape.">
dayOfWeek DayOfWeekEnum (0..7) <"The days of the week of the delivery.">
Expand Down
72 changes: 65 additions & 7 deletions rosetta-source/src/main/rosetta/product-template-type.rosetta
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,42 @@ type OptionPayout extends PayoutBase: <" The option payout specification terms.
exerciseTerms OptionExercise (1..1) <"The terms for exercising the option, which include the option style (e.g. American style option), the exercise procedure (e.g. manual exercise) and the settlement terms (e.g. physical vs. cash).">
underlier Product (1..1) <"The product underlying the option, which can be of any type including ContractualProduct or Security.">
observationTerms ObservationTerms (0..1) <"Class containing terms that are associated with observing a price/benchmark/index across either single or multple observations. To be used for option contracts that reference a benchmark price.">
schedule CommoditySchedule (0..1) <"Allows the full representation of a commodity payout by defining a set of schedule periods. It supports standard schedule customization by expressing all the dates, quantities, and pricing data in a non-parametric way.">
schedule CalculationSchedule (0..1) <"Allows the full representation of a payout by defining a set of schedule periods. It supports standard schedule customization by expressing all the dates, quantities, and pricing data in a non-parametric way.">
delivery AssetDeliveryInformation (0..1) <"Contains the information relative to the delivery of the asset.">

condition ClearedPhysicalSettlementExists:
if settlementTerms -> physicalSettlementTerms exists
and underlier -> contractualProduct -> economicTerms -> payout -> interestRatePayout only exists
and underlier -> contractualProduct -> economicTerms -> payout -> interestRatePayout count = 2
then settlementTerms -> physicalSettlementTerms -> clearedPhysicalSettlement exists

condition DeliveryCapacity: <"Checks that only one of the representations of delivery capacity is present simultaneously.">
if delivery -> deliveryCapacity exists
then schedule -> schedulePeriod -> deliveryPeriod -> deliveryCapacity is absent
and delivery -> periods -> profile -> block -> deliveryCapacity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> deliveryCapacity is absent
else if schedule -> schedulePeriod -> deliveryPeriod -> deliveryCapacity exists
then delivery -> deliveryCapacity is absent
and delivery -> periods -> profile -> block -> deliveryCapacity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> deliveryCapacity is absent
else if delivery -> periods -> profile -> block -> deliveryCapacity exists
then schedule -> schedulePeriod -> deliveryPeriod -> deliveryCapacity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> deliveryCapacity is absent
else if schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> deliveryCapacity exists
then delivery -> deliveryCapacity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> deliveryCapacity is absent
and delivery -> periods -> profile -> block -> deliveryCapacity is absent

condition PriceTimeIntervalQuantity: <"Checks that only one of the representations of price time interval quantity is present simultaneously.">
if schedule -> schedulePeriod -> deliveryPeriod -> priceTimeIntervalQuantity exists
then delivery -> periods -> profile -> block -> priceTimeIntervalQuantity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> priceTimeIntervalQuantity is absent
else if delivery -> periods -> profile -> block -> priceTimeIntervalQuantity exists
then schedule -> schedulePeriod -> deliveryPeriod -> priceTimeIntervalQuantity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> priceTimeIntervalQuantity is absent
else if schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> priceTimeIntervalQuantity exists
then schedule -> schedulePeriod -> deliveryPeriod -> priceTimeIntervalQuantity is absent
and delivery -> periods -> profile -> block -> priceTimeIntervalQuantity is absent
type SecurityLeg: <" Terms defining a security leg in a securities financing transaction, which can either be the near leg or the far leg and is closely modelled onto the nearLeg and farLeg types in FpML">
[metadata key]

Expand Down Expand Up @@ -411,6 +439,8 @@ type ForwardPayout extends PayoutBase: <"Represents a forward settling payout. T

underlier Product (1..1) <"Underlying product that the forward is written on, which can be of any type: FX, a contractual product, a security, etc.">
deliveryTerm string (0..1) <"Also called contract month or delivery month. However, it's not always a month. It is usually expressed using a code, e.g. Z23 would be the Dec 2023 contract, (Z = December). For crude oil, the corresponding contract might be called CLZ23.">
delivery AssetDeliveryInformation (0..1) <"Contains the information relative to the delivery of the asset.">
schedule CalculationSchedule (0..1) <"Allows the full representation of a payout by defining a set of schedule periods. It supports standard schedule customization by expressing all the dates, quantities, and pricing data in a non-parametric way.">

condition SettlementTerms: <"For foreign exchange contracts, the settlement terms must exist.">
if underlier -> foreignExchange exists
Expand All @@ -430,21 +460,49 @@ type ForwardPayout extends PayoutBase: <"Represents a forward settling payout. T
if underlier -> foreignExchange exists
then settlementTerms -> physicalSettlementTerms is absent

type CommoditySchedule: <"A class that allows the full representation of a commodity payout by defining a set of schedule periods. It supports standard schedule customization by expressing all the dates, quantities, and pricing data in a non-parametric way.">
schedulePeriod SchedulePeriod (1..*) <"Defines a period of a commodity schedule structure.">

type SchedulePeriod: <"A class that defines the commodity period of a schedule. The period contains a set of start and end dates, quantities, fixing, and pricing data.">
condition DeliveryCapacity: <"Checks that only one of the representations of delivery capacity is present simultaneously.">
if delivery -> deliveryCapacity exists
then schedule -> schedulePeriod -> deliveryPeriod -> deliveryCapacity is absent
and delivery -> periods -> profile -> block -> deliveryCapacity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> deliveryCapacity is absent
else if schedule -> schedulePeriod -> deliveryPeriod -> deliveryCapacity exists
then delivery -> deliveryCapacity is absent
and delivery -> periods -> profile -> block -> deliveryCapacity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> deliveryCapacity is absent
else if delivery -> periods -> profile -> block -> deliveryCapacity exists
then schedule -> schedulePeriod -> deliveryPeriod -> deliveryCapacity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> deliveryCapacity is absent
else if schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> deliveryCapacity exists
then delivery -> deliveryCapacity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> deliveryCapacity is absent
and delivery -> periods -> profile -> block -> deliveryCapacity is absent

condition PriceTimeIntervalQuantity: <"Checks that only one of the representations of price time interval quantity is present simultaneously.">
if schedule -> schedulePeriod -> deliveryPeriod -> priceTimeIntervalQuantity exists
then delivery -> periods -> profile -> block -> priceTimeIntervalQuantity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> priceTimeIntervalQuantity is absent
else if delivery -> periods -> profile -> block -> priceTimeIntervalQuantity exists
then schedule -> schedulePeriod -> deliveryPeriod -> priceTimeIntervalQuantity is absent
and schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> priceTimeIntervalQuantity is absent
else if schedule -> schedulePeriod -> deliveryPeriod -> profile -> block -> priceTimeIntervalQuantity exists
then schedule -> schedulePeriod -> deliveryPeriod -> priceTimeIntervalQuantity is absent
and delivery -> periods -> profile -> block -> priceTimeIntervalQuantity is absent

type CalculationSchedule: <"A class that allows the full representation of a payout by defining a set of schedule periods. It supports standard schedule customization by expressing all the dates, quantities, and pricing data in a non-parametric way.">
schedulePeriod SchedulePeriod (1..*) <"Defines a period of a calculation schedule structure.">

type SchedulePeriod: <"A class that defines the period of a schedule. The period contains a set of start and end dates, quantities, fixing, and pricing data.">
calculationPeriod DateRange (1..1) <"Period for which the payment is generated.">
paymentDate date (1..1) <"Adjusted payment date.">
fixingPeriod DateRange (1..1) <"Period over which the underlying price is observed.">
deliveryPeriod CommodityScheduleDeliveryPeriods (0..1) <"Period and time profile over which the delivery takes place.">
deliveryPeriod CalculationScheduleDeliveryPeriods (0..1) <"Period and time profile over which the delivery takes place.">

type FixedPricePayout extends PayoutBase: <"Represents a fixed price payout. There is no underlier associated with this payout type and is based on fixed pricing per a given unit (e.g. in commodities price per barrel)">
[metadata key]

paymentDates PaymentDates (1..1) <"Specifies the parameters to generate the payment date schedule, either through a parametric representation or by reference to specified dates.">
fixedPrice FixedPrice (1..1) <"Specifies the fixed price on which fixed forward payments are based.">
schedule CommoditySchedule (0..1) <"Allows the full representation of a commodity payout by defining a set of schedule periods. It supports standard schedule customization by expressing all the dates, quantities, and pricing data in a non-parametric way.">
schedule CalculationSchedule (0..1) <"Allows the full representation of a payout by defining a set of schedule periods. It supports standard schedule customization by expressing all the dates, quantities, and pricing data in a non-parametric way.">

condition Quantity: <"When there is an OptionPayout the quantity can be expressed as part of the payoutQuantity, or as part of the underlier in the case of a Swaption. For all other payouts that extend PayoutBase the payoutQuantity is a mandatory attribute.">
priceQuantity exists
Expand Down

0 comments on commit 9d50499

Please sign in to comment.