Skip to content

Commit

Permalink
ObservationTerms_ValuationTerms_FRAGMOS
Browse files Browse the repository at this point in the history
make these two types generic (info : pleas ignore presence of observable in ObservationTerms, agreed to remove it per ARTForce)
  • Loading branch information
JBZ-Fragmos committed Nov 7, 2024
1 parent 27d085d commit 37c467e
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 66 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace cdm.base.datetime.daycount: <"Day count concepts: Day count fraction, day count basis, year fraction">
namespace cdm.base.datetime.daycount: <"Day count concepts: Day count fraction, day count basis, year fraction">
version "${project.version}"

enum DayCountFractionEnum: <"The enumerated values to specify the day count fraction.">
Expand Down
26 changes: 26 additions & 0 deletions rosetta-source/src/main/rosetta/base-datetime-enum.rosetta
Original file line number Diff line number Diff line change
Expand Up @@ -448,3 +448,29 @@ enum CompoundingTypeEnum: <"The enumerated values to specify how the compounding
enum RoundingFrequencyEnum: <"How often is rounding performed">
Daily <"Rounding is done on each day">
PeriodEnd <"Rounding is done only at the end of the period">

enum DateRelativeToEnum: <"The enumerated values to specify the type of date to be used as an anchor.">
CalculationDate <"The date is relative to each Calculation Date.">
CalculationPeriodStartDate <"The date is relative to each relevant Start Date of the Calculation Periods i.e. either every Start Date when frequency of the related date is the same as the Calculation Period frequency or each Start Date falling on a related date when respective related frequencies differ.">
CalculationPeriodEndDate <"The date is relative to each relevant End Date of the Calculation Periods i.e. either every End Date when frequency of the related date is the same as the Calculation Period frequency or each End Date falling on a related date when respective related frequencies differ.">
ObservationDate <"The date is relative to each Observation Date.">
ObservationPeriodStartDate <"The date is relative to each relevant Start Date of the Observation Periods i.e. either every Start Date when frequency of the related date is the same as the Observation Period frequency or each Start Date falling on a related date when respective related frequencies differ.">
ObservationPeriodEndDate <"The date is relative to each relevant End Date of the Observation Periods i.e. either every End Date when frequency of the related date is the same as the Observation Period frequency or each End Date falling on a related date when respective related frequencies differ.">
ValuationDate <"The date is relative to each Valuation Date.">
InitialValuationDate <"The date is relative to the Initial Valuation Date.">
InterimValuationDate <"The date is relative to each Interim Valuation Date.">
FinalValuationDate <"The date is relative to the Final Valuation Date.">
ExpirationDate <"The date is relative to the Expiration Date.">
TradeDate <"The date is relative to the Trade Date.">
EffectiveDate <"The date is relative to the Effective Date.">
SettlementDate <"The date is relative to each Settlement Date.">
TerminationDate <"The date is relative to any Termination Date whether being a Termination at Maturity or an Early Termination Settlement Date">
MaturityTerminationDate <"The date is relative to any Termination Date at Maturity.">
EarlyTerminationDate <"The date is relative to the Early Termination Settlement Date.">
ExerciseDate <"The date is relative to the Exercise Date of any kind of optional right e.g. vanilla option, extendible maturity provision, cancellation, callable, etc.">
FixingDate <"The date is relative to the Fixing Date of each Calculation Period.">
PaymentDate <"The date is relative to each Payment Date.">
ResetDate <"The date is relative to each Reset Date.">
KnockObservationDate <"The date is relative to any Knocking date.">
KnockInObservationDate <"The date is relative to any Knocking date that relates to a Knock-In type.">
KnockOutObservationDate <"The date is relative to any Knocking date that relates to a Knock-Out type.">
9 changes: 7 additions & 2 deletions rosetta-source/src/main/rosetta/base-datetime-type.rosetta
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,16 @@ type RelativeDateOffset extends Offset: <"A class defining a date (referred to a
businessDayConvention BusinessDayConventionEnum (1..1) <"The convention for adjusting a date if it would otherwise fall on a day that is not a business day, as specified by an ISDA convention (e.g. Following, Precedent).">
businessCenters BusinessCenters (0..1)
businessCentersReference BusinessCenters (0..1) <"A pointer style reference to a set of financial business centers defined elsewhere in the document. This set of business centers is used to determine whether a particular day is a business day or not.">
[metadata reference]
[metadata reference]
dateRelativeTo date (0..1) <"Specifies the anchor as an href attribute. The href attribute value is a pointer style reference to the element or component elsewhere in the document where the anchor date is defined.">
[metadata reference]
[metadata reference]
dateIsRelativeTo DateRelativeToEnum (0..1) <"Specifies the anchor as a type of date that is defined elsewhere in the document.">
adjustedDate date (0..1) <"The date once the adjustment has been performed. (Note that this date may change if the business center holidays change).">

condition DateRelativeTo:
optional choice dateRelativeTo, dateIsRelativeTo


type TimeZone: <"The time alongside with the timezone location information. This class makes use of the FpML TimezoneLocation construct.">
time time (1..1) <"The observation time.">
location string (0..1) <"FpML specifies the timezoneLocationScheme by reference to the Time Zone Database (a.k.a. tz database) maintained by IANA, the Internet Assigned Numbers Authority.">
Expand Down
28 changes: 14 additions & 14 deletions rosetta-source/src/main/rosetta/event-common-func.rosetta
Original file line number Diff line number Diff line change
Expand Up @@ -213,39 +213,39 @@ func ResolvePerformanceObservationIdentifiers: <"Defines which attributes on the

alias adjustedFinalValuationDate:
ResolveAdjustableDate(
payout -> valuationDates -> finalValuationDate -> valuationDate
payout -> valuationTerms -> finalValuation -> valuationDate
)
alias valuationDates: <"Determine which valuation date to get valuation time and type from.">
if adjustedDate < adjustedFinalValuationDate
then payout -> valuationDates -> interimValuationDate
else payout -> valuationDates -> finalValuationDate
then payout -> valuationTerms -> interimValuation
else payout -> valuationTerms -> finalValuation
add identifiers -> observable -> asset -> Instrument -> Security -> identifier: <"Represents the identifer for the equity underlier.">
payout -> underlier -> security -> identifier
set identifiers -> observationDate: <"Specifies the date for which to retrieve the market data value(s). Selects the most recent valuation date.">
AdjustedValuationDates(payout -> valuationDates)
AdjustedValuationDates(payout -> valuationTerms)
filter item <= adjustedDate
then last
set identifiers -> observationTime: <"Specifies the time for which to retrieve the market data value(s).">
ResolvePerformanceValuationTime(
valuationDates -> valuationTime,
valuationDates -> valuationTimeType,
payout -> valuationTerms -> valuationTime,
payout -> valuationTerms -> valuationTimeType,
identifiers -> observable -> asset ->> identifier only-element,
valuationDates -> determinationMethod
payout -> valuationTerms -> valuationMethod
)
set identifiers -> determinationMethodology -> determinationMethod: <"Identifies a more specific price should multiple prices for the underlier be available at the given date time, for example bid or ask prices.">
valuationDates -> determinationMethod
valuationDates -> valuationMethod

func AdjustedValuationDates:
inputs:
valuationDates ValuationDates (1..1)
valuationTerms ValuationTerms (1..1)
output:
adjustedValuationDates date (0..*)
set adjustedValuationDates: <"Build sorted list of adjusted valuation dates.">
[
ResolveAdjustableDates(
valuationDates -> interimValuationDate -> valuationDates
valuationTerms -> interimValuation -> valuationDates
),
ResolveAdjustableDate(valuationDates -> finalValuationDate -> valuationDate)
ResolveAdjustableDate(valuationTerms -> finalValuation -> valuationDate)
]
sort

Expand All @@ -254,7 +254,7 @@ func ResolvePerformanceValuationTime: <"Defines how to resolve the observation t
valuationTime BusinessCenterTime (0..1) <"Represents the Equity Valuation terms from the Equity product definition.">
valuationTimeType TimeTypeEnum (0..1) <"The time of day at which the calculation agent values the underlying, for example the official closing time of the exchange.">
assetIdentifier AssetIdentifier (1..1) <"Specifies the asset identifier, along with the source, which should be used to determine the correct valuation time i.e. close times are different across exchanges.">
determinationMethod DeterminationMethodEnum (1..1) <"Specifies the method according to which an amount or a date is determined.">
valuationMethod DeterminationMethodEnum (1..1) <"Specifies the method according to which an amount or a date is determined.">
output:
time TimeZone (1..1)
set time:
Expand All @@ -265,7 +265,7 @@ func ResolvePerformanceValuationTime: <"Defines how to resolve the observation t
then ResolveTimeZoneFromTimeType(
assetIdentifier,
valuationTimeType,
determinationMethod
valuationMethod
)

func ResolvePerformanceReset: <"Defines how to resolve the reset value for a performance payout.">
Expand Down Expand Up @@ -1044,7 +1044,7 @@ func NewSingleNameEquityPerformancePayout: <"Function specification to create th
// or masterConfirmation -> typeOfSwapElection -> Total exists then
masterConfirmation -> typeOfSwapElection

set performancePayout -> valuationDates: <"Equity payout must inherit terms from the Master Confirmation Agreement.">
set performancePayout -> valuationTerms: <"Equity payout must inherit terms from the Master Confirmation Agreement.">
masterConfirmation -> valuationDates
set performancePayout -> paymentDates: <"Equity payout must inherit terms from the Master Confirmation Agreement.">
masterConfirmation -> equityCashSettlementDates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type EquitySwapMasterConfirmation2018 extends EquityMasterConfirmation: <"Specif
pricingMethodElection PriceReturnTerms (1..1) <"Per Part 1 Section 5, 'Pricing', of the 2018 ISDA CDM Equity Confirmation, Para 5.1">
linearInterpolationElection InterpolationMethodEnum (1..1) <"Per Part 1 Section 3, 'Floating Obligations', of the 2018 ISDA CDM Equity Confirmation. Para 3.3">
settlementTerms SettlementTerms (1..1) <"Per Part 1 Section 8, 'Settlement', of the 2018 ISDA CDM Equity Confirmation for Security Equity Swap">
valuationDates ValuationDates (1..1) <"The parameters used to generate the 'Equity Valuation Dates' schedule, including the Effective Date and Termination Date for the Swap.">
valuationDates ValuationTerms (1..1) <"The parameters used to generate the 'Equity Valuation Dates' schedule, including the Effective Date and Termination Date for the Swap.">
equityCashSettlementDates PaymentDates (1..1) <"The parameters used to generate the payment date schedule, relative to the equityCalculationPeriod. Per Part 1 Section 12, 'Definitions', of the 2018 ISDA CDM Equity Confirmation. Para 73">

type EquityMasterConfirmation extends MasterConfirmationBase: <"Specification for General Terms and Elections of an Equity Master Confirmation that is applicable across multiple Equity confirmations and is referenced by each of these confirmations, an example of which being the 2018 ISDA CDM Equity Confirmation for Security Equity Swap.">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,20 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
+ finalValuationPrice
[value "ignore"]

ValuationDates:
+ initialValuationDate
ValuationTerms:
+ initialValuation
[value "initialPrice" path "rateOfReturn"]
+ interimValuationDate
+ interimValuation
[value "valuationPriceInterim" path "rateOfReturn"]
+ finalValuationDate
+ finalValuation
[value "valuationPriceFinal" path "rateOfReturn"]
[value "valuation"]
[hint "valuationDate"]
[hint "valuationDateOffset"]

PerformanceValuationDates:
ValuationBase:
[meta "id" path "valuationRules"]
+ determinationMethod
+ valuationMethod
[value "determinationMethod"]
+ valuationDate
[value "valuationDate" path "valuationRules"]
Expand Down Expand Up @@ -178,7 +178,7 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
// Common for variance, volatility and correlation (ReturnTermsBase)
+ dividendApplicability
[value "amount" set when path = "volatilityLeg"]
+ valuationTerms
+ valuationProvisions
[value "valuation" set when path = "volatilityLeg"]
// Volatility specific
+ volatilityStrikePrice
Expand All @@ -195,7 +195,7 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
// Common for variance, volatility and correlation (ReturnTermsBase)
+ dividendApplicability
[value "amount" set when path = "varianceLeg"]
+ valuationTerms
+ valuationProvisions
[value "valuation" set when path = "varianceLeg"]
// Variance specific
+ varianceStrikePrice
Expand All @@ -217,7 +217,7 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
// Common for variance, volatility and correlation (ReturnTermsBase)
+ dividendApplicability
[value "amount" set when path = "correlationLeg"]
+ valuationTerms
+ valuationProvisions
[value "valuation" set when path = "correlationLeg"]
// Correlation specific
+ correlationStrikePrice
Expand Down Expand Up @@ -264,7 +264,7 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
+ lowerBarrier
[value "lowerBarrier"]

ValuationTerms:
ValuationProvisions:
+ futuresPriceValuation
[value "futuresPriceValuation"]
+ optionsPriceValuation
Expand Down Expand Up @@ -432,7 +432,7 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
+ rate
[value "rate"]

FxSpotRateSource:
InformationSourceBase:
+ primarySource
[value "primaryRateSource"]
[hint "rateSource"]
Expand Down
Loading

0 comments on commit 37c467e

Please sign in to comment.