FpML Issues Tracker

126: Evaluation of dates in validation rules is unclear

September 11, 2005

closed

Major

Always

Validation Rules

Admin

mgratacos

Summary

The evaluation of dates in the validation rules is unclear.

For example rules cd-1 (Mandatory): tradeHeader/tradeDate must be before creditDefaultSwap/generalTerms/effectiveDate/unadjustedDate.

How is this evaluated when timezones are included or excluded? The answer is normally indeterminate as any ISO8601 date is +/- 18 hours of timezone, and +/- 24 hours of day.

Notes:

  • hpegeron

    10/19/05 10:58 am

    This will be discussed as a cross-asset issue prior to the Credit Derivatives call for comments

  • matthew

    11/02/05 5:09 pm

    Is there any progress on this?

    We seem to be unclear whether we use the XPath 1.0 or XPath 2.0 comparison operators. Either way this needs to be public.

  • matthew

    05/16/06 6:05 am

    We agreed with Christian the XPath 2.0 evaluation rules should be used. Please add a note to this effect to the FpML documentation, and then resolve this issue.

  • matthew

    05/16/06 8:57 am

    Marc Gratacos agreed to forward this to the Validation Rules Working Group.

  • mgratacos

    07/07/06 6:19 am

    Extracted from the Validation Working Group Minutes on July 2006-07-05:

    Time zone handling
    It was agreed that time zones are a replication of the businessCenters and can therefore cause confusion. Nobody on the call has seen any use of time zones in FpML documents although since they would represent valid XML according to the current schema we can not rule out that possibility. To disallow their use we have two options, either we add a shared validation rule or we change the schema to disallow the time zone by deriving a new type from xs:dateTime. This would represent a backwards in-compatible change but is the preferred approach. We will therefore seek input from the standards / coordination committee on whether this is acceptable.

    Action: SH: Check during the next standards committee meeting whether the schema change is acceptable.

  • matthew

    07/07/06 3:03 pm

    Thank you for updating the minutes. My opinion is the comments of the Validation Working Group are nonsense.

    1. “It was agreed that time zones are a replication of the businessCenters”. The Validation Working Group cannot arbitrarily agree to reinvent XML Schema. The definition of XML Schema is quite independent of what opinion the Validation Working Group members have. Did you really mean what you typed or did you mean that timezones are a property of the businessCenter?

    2. The +/- figures are not timezones. The only timezone in the format is “Z” which represents UTC. The offsets are time offsets from UTC and not timezones. The difference is very significant as they change at different times.

    3. “Nobody on the call has seen any use of time zones in FpML documents” – I have seen this at about a dozen institutions. Normally it is only implemented in truly global systems, which is a small subset.

    4. If you disallow the use of time offsets then my global systems cannot use FpML.

    5. The VWG is confused between the locale and the time representation.

  • mgratacos

    07/31/06 9:38 am

    Extracted from minutes of the AWG/VWG July 27, 2006:

    It was decided the FpML standard should follow the W3C recommendations and adopt the XPath 2.0 date/time comparison rules which defines a definitive true / false value even for indeterminate calculations.

    It was decided however that to avoid confusion the AWG would issue advice to always either include or exclude offsets in a single document. Mixed representations should be considered illegal. The advice issued should also proceed to suggest that time offsets appear on all date/time values used in FpML documents. This would be included as a recommendation in the architecture spec v2.1 but would not be added as a constraining facet in the schema. Reference to the XPath 2.0 specification would also be made from the validation rules specification.

  • matthew

    07/31/06 2:01 pm

    “It was decided however that to avoid confusion the AWG would issue advice to always either include or exclude offsets in a single document.” We agreed the advice was they would always be included so that documents can be compared from different producers. For example a matching algorithm takes documents from different sources.

    “Mixed representations should be considered illegal.” We agreed they would be strongly discouraged and advised against, but not illegal, because they are legal in XML Schema.

  • mgratacos

    08/08/06 4:37 am

    Minutes have been updated accordingly:

    The meeting began with Matthew Rawlings explaining the difference between time zones and time offsets, and that schema has no concept of time zones apart from UTC. Time offsets on the other hand are expressed in XML and are just a different format of the same data. The participants of the call accepted this and it was decided that although related, time offsets could not be replaced by the businessCenters element.

    The discussion then moved on to cover the complications in comparing date/times with and without offsets. Andrew Jacobs discussed that this problem is most serious when attempting to match two FpML documents with disparate time offsets.
    It was decided the FpML standard should follow the W3C recommendations and adopt the XPath 2.0 date/time comparison rules which defines a definitive true / false value even for indeterminate calculations.

    It was decided however that to avoid confusion the AWG would issue advice to always include offsets in an FpML document. Mixed representations should be strongly discouraged and advised against. The advice issued should also proceed to suggest that time offsets appear on all date/time values used in FpML documents. This would be included as a recommendation in the architecture spec v2.1 but would not be added as a constraining facet in the schema. Reference to the XPath 2.0 specification would also be made from the validation rules specification.

    Action: AJ: Update architecture spec 2.1 to include recommendation on using time offsets
    Action: MG: Update validation rules specification to include a brief discussion of date/time comparisons and a link to the XPath 2.0 specification.

  • Leave an update

    You must be logged in to post an update.