All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.cdm-java.5.0.1.source-code.base-datetime-type.rosetta Maven / Gradle / Ivy

There is a newer version: 6.0.0-dev.92
Show newest version
namespace cdm.base.datetime : <"Basic date and time concepts: relative date, date range, offset, business centre etc.">
version "${project.version}"

type AdjustableDate: <"A class for defining a date that shall be subject to adjustment if it would otherwise fall on a day that is not a business day in the specified business centers, together with the convention for adjusting the date.">
    [metadata key]

    unadjustedDate date (0..1) <"A date subject to adjustment. While in FpML this date is required, this cardinality constraint has been relaxed as part of the CDM in order to support the FRA representation, which effective and termination dates are specified in FpML as adjusted dates.">
    dateAdjustments BusinessDayAdjustments (0..1) <"The business day convention and financial business centers used for adjusting the date if it would otherwise fall on a day that is not a business date in the specified business centers.">
    dateAdjustmentsReference BusinessDayAdjustments (0..1) <"A pointer style reference to date adjustments defined elsewhere in the document.">
        [metadata reference]
    adjustedDate date (0..1) <"The date once the adjustment has been performed. (Note that this date may change if the business center holidays change).">
        [metadata id]

    condition AdjustableDateChoice: <"Choice rule to represent an FpML choice construct.">
        optional choice dateAdjustments, dateAdjustmentsReference

type AdjustableDates: <"A class for defining a series of dates that shall be subject to adjustment if they would otherwise fall on a day that is not a business day in the specified business centers, together with the convention for adjusting the dates.">
    [metadata key]

    unadjustedDate date (0..*) <"A date subject to adjustment.">
    dateAdjustments BusinessDayAdjustments (0..1) <"The business day convention and financial business centers used for adjusting the date if it would otherwise fall on a day that is not a business date in the specified business centers.">
    adjustedDate date (0..*) <"The date(s) once the adjustment has been performed. (Note that this date may change if the business center holidays change).">
        [metadata id]

    condition AdjustedDate: <"FpML specifies a choice between adjustedDate and [unadjustedDate (required), dateAdjutsments (required), adjustedDate (optional)].">
        if adjustedDate is absent
        then unadjustedDate exists and dateAdjustments exists

type AdjustableOrAdjustedDate: <"A class for defining a date that shall be subject to adjustment if it would otherwise fall on a day that is not a business day in the specified business centers, together with the convention for adjusting the date.">
    [metadata key]

    unadjustedDate date (0..1) <"A date subject to adjustment.">
    dateAdjustments BusinessDayAdjustments (0..1) <"The business day convention and financial business centers used for adjusting the date if it would otherwise fall on a day that is not a business date in the specified business centers.">
    adjustedDate date (0..1) <"The date once the adjustment has been performed. (Note that this date may change if the business center holidays change).">
        [metadata id]

    condition AdjustedDate: <"FpML specifies a choice between adjustedDate and [unadjustedDate (required), dateAdjutsments (required), adjustedDate (optional)].">
        if adjustedDate is absent
        then unadjustedDate exists and dateAdjustments exists

type AdjustableOrAdjustedOrRelativeDate: <"This Rosetta class specifies the date as either an unadjusted, adjusted or relative date. It supplements the features of the AdjustableOrAdjustedDate to support the credit default swap option premium, which uses the relative date construct.">

    unadjustedDate date (0..1) <"A date subject to adjustment.">
    dateAdjustments BusinessDayAdjustments (0..1) <"The business day convention and financial business centers used for adjusting the date if it would otherwise fall on a day that is not a business date in the specified business centers.">
    adjustedDate date (0..1) <"The date once the adjustment has been performed. (Note that this date may change if the business center holidays change).">
        [metadata id]
    relativeDate RelativeDateOffset (0..1) <"A date specified as some offset to another date (the anchor date).">

    condition AdjustedDate: <"This data rule extends the data rule AdjustableOrAdjustedDate_adjustedDate by specifying logic applicable to the relative date.">
        adjustedDate exists
            or relativeDate exists
            or unadjustedDate exists
            or (unadjustedDate exists and dateAdjustments exists and adjustedDate is absent)

type AdjustableOrRelativeDate: <"A class giving the choice between defining a date as an explicit date together with applicable adjustments or as relative to some other (anchor) date.">
    [metadata key]

    adjustableDate AdjustableDate (0..1) <"A date that shall be subject to adjustment if it would otherwise fall on a day that is not a business day in the specified business centers, together with the convention for adjusting the date.">
    relativeDate AdjustedRelativeDateOffset (0..1) <"A date specified as some offset to another date (the anchor date).">

    condition AdjustableOrRelativeDateChoice: <"Choice rule to represent an FpML choice construct.">
        required choice adjustableDate, relativeDate

type AdjustableOrRelativeDates: <"A class giving the choice between defining a series of dates as an explicit list of dates together with applicable adjustments or as relative to some other series of (anchor) dates.">
    [metadata key]

    adjustableDates AdjustableDates (0..1) <"A series of dates that shall be subject to adjustment if they would otherwise fall on a day that is not a business day in the specified business centers, together with the convention for adjusting the date.">
    relativeDates RelativeDates (0..1) <"A series of dates specified as some offset to another series of dates (the anchor dates).">

    condition AdjustableOrRelativeDatesChoice: <"Choice rule to represent an FpML choice construct.">
        required choice adjustableDates, relativeDates

type AdjustedRelativeDateOffset extends RelativeDateOffset: <"A type defining a date (referred to as the derived date) as a relative offset from another date (referred to as the anchor date) plus optional date adjustments.">

    relativeDateAdjustments BusinessDayAdjustments (0..1) <"The business day convention and financial business centers used for adjusting the relative date if it would otherwise fall on a day that is not a business date in the specified business centers.">

type BusinessCenters: <"A class for specifying the business day calendar location used in determining whether a day is a business day or not, either by specifying this business center by reference to an enumerated list that is maintained by the FpML standard, or by reference to such specification when it exists elsewhere as part of the instance document. This class corresponds to the FpML BusinessCentersOrReference.model.">
    [metadata key]

    businessCenter BusinessCenterEnum (0..*) <"A code identifying one or several business day calendar location(s). The set of business day calendar locations are specified by the business day calendar location enumeration which is maintained by the FpML standard.">
        [metadata scheme]
    commodityBusinessCalendar CommodityBusinessCalendarEnum (0..*)
        [metadata scheme]
    businessCentersReference BusinessCenters (0..1) <"A reference to a financial business center location specified elsewhere in the instance document.">
        [metadata reference]

    condition BusinessCentersChoice: <"Choice rule to represent an FpML choice construct.">
        required choice businessCenter, businessCentersReference, commodityBusinessCalendar

type BusinessCenterTime: <"A class for defining a time with respect to a business day calendar location. For example, 11:00:00 GBLO.">

    hourMinuteTime time (1..1) <"A time specified in hh:mm:ss format where the second component must be '00', e.g. 11am would be represented as 11:00:00.">
    businessCenter BusinessCenterEnum (1..1) <"A code identifying a business day calendar location. A business day calendar location is drawn from the list identified by the business day calendar location enumeration.">
        [metadata scheme]

type BusinessDateRange extends DateRange: <"A class defining a range of contiguous business days by defining an unadjusted first date, an unadjusted last date and a business day convention and business centers for adjusting the first and last dates if they would otherwise fall on a non business day in the specified business centers. The days between the first and last date must also be good business days in the specified centers to be counted in the range.">

    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) <"The business center(s), specified either explicitly or by reference to those specified somewhere else in the instance document.">

type BusinessDayAdjustments: <"A class defining the business day convention and financial business centers used for adjusting any relevant date if it would otherwise fall on a day that is not a business day in the specified business center.">
    [metadata key]

    businessDayConvention BusinessDayConventionEnum (1..1) <"The convention for adjusting a date if it would otherwise fall on a day that is not a business day.">
    businessCenters BusinessCenters (0..1) <"The business center(s), specified either explicitly or by reference to those specified somewhere else in the instance document.">

type DateRange: <"A class defining a contiguous series of calendar dates. The date range is defined as all the dates between and including the start and the end date. The start date must fall on or before the end date.">

    startDate date (1..1) <"The first date of a date range.">
    endDate date (1..1) <"The last date of a date range.">

    condition DatesOrdered: <"The start date must fall on or before the end date (a date range of only one date is allowed).">
        startDate <= endDate

type DateList: <"List of dates.">
    date date (1..*)

type DateTimeList: <"List of dateTimes.">
    dateTime zonedDateTime (1..*) <"The CDM specifies that the zoned date time is to be expressed in accordance with ISO 8601, either as UTC as an offset to UTC.">

type Frequency: <"A class for defining a date frequency, e.g. one day, three months, through the combination of an integer value and a standardized period value that is specified as part of an enumeration.">
    [metadata key]

    periodMultiplier int (1..1) <"A time period multiplier, e.g. 1, 2, or 3. If the period value is T (Term) then period multiplier must contain the value 1.">
    period PeriodExtendedEnum (1..1) <"A time period, e.g. a day, week, month, year or term of the stream.">

    condition TermPeriod: <"FpML specifies that if period value is T (Term) then periodMultiplier must contain the value 1.">
        if period = PeriodExtendedEnum -> T then periodMultiplier = 1

    condition PositivePeriodMultiplier: <"FpML specifies periodMultiplier as a positive integer.">
        periodMultiplier > 0

type Offset extends Period: <"A class defining an offset used in calculating a new date relative to a reference date, e.g. calendar days, business days, commodity Business days, etc.">

    dayType DayTypeEnum (0..1) <"In the case of an offset specified as a number of days, this element defines whether consideration is given as to whether a day is a good business day or not. If a day type of business days is specified then non-business days are ignored when calculating the offset. The financial business centers to use for determination of business days are implied by the context in which this element is used. This element must only be included when the offset is specified as a number of days. If the offset is zero days then the dayType element should not be included.">
    condition DayType: <"FpML specifies that the dayType must only be included when the offset is specified as a number of days, while should not be included if the offset is zero days.">
        if period <> PeriodEnum -> D or periodMultiplier = 0
        then dayType is absent

type CustomisableOffset: <"A class to specify an offset either as a normalized [multiplier, period, dayType] or as a custom provision of type string.">

    offset Offset (0..1)
    customProvision string (0..1)

type Period: <"A class to define recurring periods or time offsets.">
    [metadata key]

    periodMultiplier int (1..1) <"A time period multiplier, e.g. 1, 2 or 3 etc. A negative value can be used when specifying an offset relative to another date, e.g. -2 days.">
    period PeriodEnum (1..1) <"A time period, e.g. a day, week, month or year of the stream. If the periodMultiplier value is 0 (zero) then period must contain the value D (day).">

    condition DayPeriod: <"FpML specifies that if the periodMultiplier value is 0 (zero) then period must contain the value D (day).">
        if periodMultiplier = 0 then period = PeriodEnum -> D

type RelativeDates extends RelativeDateOffset: <"A class describing a set of dates defined as relative to another set of dates.">

    periodSkip int (0..1) <"The number of periods in the referenced date schedule that are between each date in the relative date schedule. Thus a skip of 2 would mean that dates are relative to every second date in the referenced schedule. If present this should have a value greater than 1.">
    scheduleBounds DateRange (0..1) <"The first and last dates of a schedule. This can be used to restrict the range of values in a reference series of dates.">

    condition PeriodSkipGreaterThanOne: <"FpML specifies that, if present, the period skip should have a value greater than 1.">
        if periodSkip exists then periodSkip > 1

type RelativeDateOffset extends Offset: <"A class defining a date (referred to as the derived date) as a relative offset from another date (referred to as the anchor date). If the anchor date is itself an adjustable date then the offset is assumed to be calculated from the adjusted anchor date. A number of different scenarios can be supported, namely; 1) the derived date may simply be a number of calendar periods (days, weeks, months or years) preceding or following the anchor date; 2) the unadjusted derived date may be a number of calendar periods (days, weeks, months or years) preceding or following the anchor date with the resulting unadjusted derived date subject to adjustment in accordance with a specified business day convention, i.e. the derived date must fall on a good business day; 3) the derived date may be a number of business days preceding or following the anchor date. Note that the businessDayConvention specifies any required adjustment to the unadjusted derived date. A negative or positive value in the periodMultiplier indicates whether the unadjusted derived precedes or follows the anchor date. The businessDayConvention should contain a value NONE if the day type element contains a value of Business (since specifying a negative or positive business days offset would already guarantee that the derived date would fall on a good business day in the specified business centers).">

    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]
    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]
    adjustedDate date (0..1) <"The date once the adjustment has been performed. (Note that this date may change if the business center holidays change).">

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.">
        [metadata scheme]

type PeriodRange: <"Indicates The period range defined as either a lower and upper period bound, or both.">
    lowerBound PeriodBound (0..1) <"Specifies the lower bound of a period range, e.g. greater than or equal to 5Y.">
    upperBound PeriodBound (0..1) <"Specifies the upper bound of a period range, e.g. less than to 10Y.">

    condition AtLeastOneOf:
        lowerBound exists or upperBound exists

type PeriodBound: <"Indicator to specify if the period bound is defined as a period and whether the bound is inclusive.">
    period Period (1..1) <"Specifies the period is to be used as the bound, e.g. 5Y.">
    inclusive boolean (1..1) <"Specifies whether the period bound is inclusive, e.g. for a lower bound, false would indicate greater than, whereas true would indicate greater than or equal to.">

type AveragingSchedule: <"Class to representing a method for generating a series of dates.">

    startDate date (1..1) <"Date on which this period begins.">
    endDate date (1..1) <"Date on which this period ends.">
    averagingPeriodFrequency CalculationPeriodFrequency (1..1) <"The frequency at which averaging period occurs with the regular part of the valuation schedule and their roll date convention.">

type AdjustableRelativeOrPeriodicDates: <"A class giving the choice between defining a series of dates as an explicit list of dates together with applicable adjustments or as relative to some other series of (anchor) dates, or as a calculation period schedule.">
    [metadata key]

    adjustableDates AdjustableDates (0..1) <"A series of dates that shall be subject to adjustment if they would otherwise fall on a day that is not a business day in the specified business centers, together with the convention for adjusting the date.">
    relativeDates RelativeDates (0..1) <"A series of dates specified as some offset to another series of dates (the anchor dates).">
    periodicDates PeriodicDates (0..1) <"A calculation period schedule.">

    condition AdjustableRelativeOrPeriodicDatesChoice: <"Choice rule to represent an FpML choice construct.">
        required choice adjustableDates, relativeDates, periodicDates

type PeriodicDates: <"A class for specifying a calculation period schedule.">

    startDate AdjustableOrRelativeDate (0..1) <"The start date of the calculation period. FpML specifies that for interest rate swaps this date must only be specified if it is not equal to the effective date. It is always specified in the case of equity swaps and credit default swaps with periodic payments. This date may be subject to adjustment in accordance with a business day convention.">
    endDate AdjustableOrRelativeDate (0..1) <"The end date of the calculation period. FpML specifies that for interest rate swaps this date must only be specified if it is not equal to the termination date. It is always specified in the case of equity swaps with periodic payments. This date may be subject to adjustment in accordance with a business day convention.">
    periodFrequency CalculationPeriodFrequency (0..1) <"The frequency at which calculation period end dates occur with the regular part of the calculation period schedule and their roll date convention.">
    periodDatesAdjustments BusinessDayAdjustments (0..1) <"The specification of the business day convention and financial business centers used for adjusting any calculation period date if it would otherwise fall on a day that is not a business day in the specified business center.">
    dayType DayTypeEnum (0..1) <"Denotes the enumerated values to specify the day type classification used in counting the number of days between two dates.">

type CalculationPeriodFrequency extends Frequency: <"A class to specify the frequency at which calculation period end dates occur within the regular part of the calculation period schedule and their roll date convention.">

    rollConvention RollConventionEnum (1..1) <"The roll convention specifies the period term as part of a periodic schedule, i.e. the calculation period end date within the regular part of the calculation period. The value could be a rule, e.g. IMM Settlement Dates, which is the 3rd Wednesday of the month, or it could be a specific day of the month, such as the first day of the applicable month. It is used in conjunction with a frequency and the regular period start date of a calculation period.">
    balanceOfFirstPeriod boolean (0..1) <"Indicates, when true, that that the first Calculation Period should run from the Effective Date to the end of the calendar period in which the Effective Date falls, e.g. Jan 15 - Jan 31 if the calculation periods are one month long and Effective Date is Jan 15. If false, the first Calculation Period should run from the Effective Date for one whole period, e.g. Jan 15 to Feb 14 if the calculation periods are one month long and Effective Date is Jan 15. Mostly used in Commmodity Swaps.">

    condition FpML_ird_57: <"FpML validation rule ird-57 - Context: CalculationPeriodFrequency. [period eq ('M', 'Y')] not(rollConvention = ('NONE', 'SFE', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT','SUN')).">
        if period = PeriodExtendedEnum -> M or period = PeriodExtendedEnum -> Y
        then rollConvention <> RollConventionEnum -> NONE
                and rollConvention <> RollConventionEnum -> SFE
                and rollConvention <> RollConventionEnum -> MON
                and rollConvention <> RollConventionEnum -> TUE
                and rollConvention <> RollConventionEnum -> WED
                and rollConvention <> RollConventionEnum -> THU
                and rollConvention <> RollConventionEnum -> FRI
                and rollConvention <> RollConventionEnum -> SAT
                and rollConvention <> RollConventionEnum -> SUN

    condition FpML_ird_58: <"FpML validation rule ird-58 - Context: CalculationPeriodFrequency. When the period is 'W', the rollConvention must be a week day, 'SFE' or 'NONE'.">
        if period = PeriodExtendedEnum -> W
        then rollConvention = RollConventionEnum -> NONE
                or rollConvention = RollConventionEnum -> SFE
                or rollConvention = RollConventionEnum -> MON
                or rollConvention = RollConventionEnum -> TUE
                or rollConvention = RollConventionEnum -> WED
                or rollConvention = RollConventionEnum -> THU
                or rollConvention = RollConventionEnum -> FRI
                or rollConvention = RollConventionEnum -> SAT
                or rollConvention = RollConventionEnum -> SUN

    condition FpML_ird_60: <"FpML validation rule ird-60 - Context: CalculationPeriodFrequency. When the period is 'T', the rollConvention must be 'NONE'.">
        if period = PeriodExtendedEnum -> T
        then rollConvention = RollConventionEnum -> NONE

type CalculationFrequency: <"Represents the parameters for describing how often something (such as collateral interest) is to be calculated.">
    period Period (1..1) <"Specifies the time period at which calculation is performed, e.g. 1 month.">
    monthOfYear number (0..1) <"Specifies the month of the year if used.">
    dayOfMonth number (0..1) <"Specifies the day of the month if used.">
    dayOfWeek DayOfWeekEnum (0..1) <"Specifies the day of the week if used.">
    weekOfMonth number (0..1) <"Specifies the week of the month if used.">
    offsetDays number (1..1) <"Specifies how many days from the trigger event should the payment occur.">
    dateLocation BusinessCenterTime (1..1) <"Specifies where is the time measured.">
    businessCenter BusinessCenterEnum (0..*) <"Specifies the business center for adjustment of calculation period.">

    condition Moy:
        if monthOfYear exists then monthOfYear <= 12

    condition Dom:
        if dayOfMonth exists then dayOfMonth <= 31

    condition Wom:
        if weekOfMonth exists then weekOfMonth <= 5

    condition MoyTerm:
        if monthOfYear exists
        then (period -> period = PeriodEnum -> Y)

    condition DomTerm:
        if dayOfMonth exists then (period -> period = PeriodEnum -> M)

    condition DowTerm:
        if dayOfWeek exists then (period -> period = PeriodEnum -> W)

    condition WomTerm:
        if weekOfMonth exists
        then (period -> period = PeriodEnum -> M)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy