# FpML 4.2 Validation Rules - Rules for Equity Derivatives (EQD)

This is the Equity Derivatives part of the validation rule set accompanying the FpML 4.2 Trial Recommendation. The introductory section in the draft contains background information and documentation for this page.

The rules contained on this page contain links to cut down versions of valid and invalid test cases. These test cases have been analysed using Systemwire's xlinkit rule engine to highlight relevant document portions accessed by a rule. The cut down test cases are non-normative and are provided for the purpose of documentation only.

## Content

- Preconditions
  - ISDA1999
  - SameCurrency
- Rules
- Rules with comments
  - eqd-25

## Preconditions

The following preconditions are always to be executed relative to the root of the FpML document being validated. The context of the rule is NOT carried through to the precondition.

Precondition: ISDA1999
The documentation/contractualDefinitions element or the documentation/masterConfirmation/masterConfirmationType element contains ISDA1999Credit.
Precondition: SameCurrency
All instances of currency values within the context of this rule must be identical.

## Rules

#### Unique contexts:

- EquityAmericanExercise (data type): eqd-1 eqd-2 eqd-3
- EquityBermudanExercise (data type): eqd-4 eqd-5 eqd-6 eqd-7 eqd-8 eqd-9 eqd-10
- EquityEuropeanExercise (data type): eqd-12
- Trade (data type): eqd-13 eqd-14
- EquityExercise (data type): eqd-15
- EquityMultipleExercise (data type): eqd-16
- EquityOption, EquityDerivativeShortFormBase (data type): eqd-17 eqd-18 eqd-19 eqd-20
- CalculationAgent (data type): eqd-21
- EquityDerivativeBase (data type): eqd-22 eqd-23
- EquitySchedule (data type): eqd-24
- BrokerEquityOption (data type): eqd-25
- Deprecated rules

#### Context: EquityAmericanExercise (data type)

eqd-1 (Mandatory)
commencementDate/adjustableDate/unadjustedDate must be equal to ../../../tradeHeader/tradeDate.
Test cases: [Valid] [Invalid]
eqd-2 (Mandatory)
expirationDate/adjustableDate/unadjustedDate must be greater than or equal to ../../../tradeHeader/tradeDate.
Test cases: [Valid] [Invalid]
eqd-3 (Mandatory)
If latestExerciseTimeType is equal to SpecificTime then latestExerciseTime must be present.
Test cases: [Valid] [Invalid]

#### Context: EquityBermudanExercise (data type)

eqd-4 (Mandatory)
commencementDate/adjustableDate/unadjustedDate must be ../../../tradeHeader/tradeDate.
Test cases: [Valid] [Invalid]
eqd-5 (Mandatory)
expirationDate/adjustableDate/unadjustedDate must be greater than or equal to ../../../tradeHeader/tradeDate.
Test cases: [Valid] [Valid] [Invalid]
eqd-6 (Mandatory)
If latestExerciseTimeType is equal to SpecificTime then latestExerciseTime must be present.
Test cases: [Valid] [Invalid]
eqd-7 (Mandatory)
The elements in bermudanExerciseDates/date should be in order, earliest date first.
Test cases: [Valid] [Invalid]
eqd-8 (Mandatory)
All dates in bermudanExerciseDates/date must be greater than commencementDate/adjustableDate/unadjustedDate.
Test cases: [Valid] [Invalid] [Invalid]
eqd-9 (Mandatory)
All dates in bermudanExerciseDates/date must be less than or equal to expirationDate/adjustableDate/unadjustedDate.
Test cases: [Valid] [Invalid]
eqd-10 (Mandatory)
The dates in bermudanExerciseDates/date must be unique.
Test cases: [Valid] [Invalid]

#### Context: EquityEuropeanExercise (data type)

eqd-12 (Mandatory)
expirationDate/adjustableDate/unadjustedDate must be greater than or equal to ../../../tradeHeader/tradeDate.
Test cases: [Valid] [Invalid]

#### Context: Trade (data type)

eqd-13 (Mandatory)
If equityOption/equityPremium/paymentDate/unadjustedDate exists, it must be greater than or equal to tradeHeader/tradeDate.
Test cases: [Valid] [Invalid]
eqd-14 (Mandatory)
If brokerEquityOption/equityPremium/paymentDate/unadjustedDate exists, it must be greater than or equal to tradeHeader/tradeDate.
Test cases: [Valid] [Invalid]

#### Context: EquityExercise (data type)

eqd-15 (Mandatory)
If equityValuation/equityValuationDate/adjustableDate exists, and equityEuropeanExercise exists, then equityValuation/equityValuationDate/adjustableDate/unadjustedDate must be equal to equityEuropeanExercise/expirationDate/adjustableDate/unadjustedDate.
Test cases: [Valid] [Invalid]

#### Context: EquityMultipleExercise (data type)

eqd-16 (Mandatory)
minimumNumberOfOptions < maximumNumberOfOptions.
Test cases: [Valid] [Invalid]

#### Context: EquityOption, EquityDerivativeShortFormBase (data type)

eqd-17 (Mandatory)
If equityExercise/equityAmericanExercise/equityMultipleExercise is present, and numberOfOptions is present then: maximumNumberOfOptions * integralMultipleExercise (in equityExercise/equityAmericanExercise/equityMultipleExercise) is less than or equal to numberOfOptions.
Test cases: [Valid] [Valid] [Invalid] [Invalid]
eqd-18 (Mandatory)
If equityExercise/equityBermudanExercise/equityMultipleExercise is present, and numberOfOptions is present then: maximumNumberOfOptions * integralMultipleExercise (in equityExercise/equityBermudanExercise/equityMultipleExercise) is less than or equal to numberOfOptions.
Test cases: [Valid] [Valid] [Invalid] [Invalid]
eqd-19 (Mandatory)
Preconditions: SameCurrency
If notional, equityPremium/percentageOfNotional and equityPremium/paymentAmount are present, then equityPremium/paymentAmount/amount = notional * equityPremium/percentageOfNotional
Test cases: [Valid] [Invalid]
eqd-20 (Mandatory)
Preconditions: SameCurrency
If numberOfOptions, optionEntitlement, equityPremium/paymentAmount and equityPremium/pricePerOption are present then: equityPremium/pricePerOption * numberOfOptions * optionEntitlement = equityPremium/paymentAmount/amount.
Test cases: [Valid] [Valid] [Invalid] [Invalid]

#### Context: CalculationAgent (data type)

eqd-21 (Mandatory)
calculationAgentPartyReference must be present.
Test cases: [Valid] [Invalid]

#### Context: EquityDerivativeBase (data type)

eqd-22 (Mandatory)
buyerPartyReference/@href must not be equal to sellerPartyReference/@href
Test cases: [Valid] [Invalid]
eqd-23 (Mandatory)
equityEffectiveDate >= ../../tradeHeader/tradeDate
Test cases: [Valid] [Invalid]

#### Context: EquitySchedule (data type)

eqd-24 (Mandatory)
startDate <= endDate
Test cases: [Valid] [Invalid]

#### Context: BrokerEquityOption (data type)

eqd-25 (Mandatory)
Preconditions: SameCurrency
If numberOfOptions, equityPremium/paymentAmount and equityPremium/pricePerOption are present then: equityPremium/pricePerOption * numberOfOptions = equityPremium/paymentAmount/amount.
Comment: This is equivalent to eqd-20, but for brokerEquityOption, where there is no optionEntitlement.
Test cases: [Valid] [Invalid]

#### Deprecated rules