Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE - to be superceded] 442 Define more context types used to visualize (or otherwise represent) financial data #443

Closed
wants to merge 19 commits into from

Conversation

kriswest
Copy link
Contributor

@kriswest kriswest commented Aug 4, 2021

resolves #442
Adds Chart, Currency, DateRange, Indicator, Trade and Valuation context types to the standardized set and enhances Position to better represent data commonly associated with Positions.

Submitted on behalf of the ChartIQ development team (@rbruckheimer)

@kriswest kriswest requested a review from rikoe August 4, 2021 17:35
@finos-cla-bot

This comment has been minimized.

1 similar comment
@finos-cla-bot

This comment has been minimized.

@finos-cla-bot

This comment has been minimized.

@kriswest kriswest mentioned this pull request Sep 21, 2021
14 tasks
@kriswest kriswest mentioned this pull request Nov 18, 2021
10 tasks
@kriswest kriswest added the Context Data & Intents Contexts & Intents Discussion Group label Nov 22, 2021
@kriswest kriswest changed the title Define more context types used to visualize (or otherwise represent) financial data 442 Define more context types used to visualize (or otherwise represent) financial data Nov 26, 2021
@kriswest kriswest force-pushed the new_enhanced_schemas branch from f584189 to 87033b4 Compare December 1, 2021 17:54
@kriswest kriswest force-pushed the new_enhanced_schemas branch from 87033b4 to 4a4eff1 Compare December 2, 2021 10:20
@kriswest kriswest force-pushed the new_enhanced_schemas branch from dc558be to 35a0f03 Compare December 2, 2021 10:32
@kriswest
Copy link
Contributor Author

kriswest commented Dec 2, 2021

PR comments from an anonymous contributor and responses from me (@kriswest):

Is there a naming convention for context keys?

Only this:

Where an identifier is the name of an existing standard, external to FDC3, it is represented in all caps.

https://fdc3.finos.org/docs/context/spec#identifiers

Country
Should we mention ISONUMERIC as an alternate ID?

As in ISO 3166-1 numeric? As opposed to alpha-2 and alpha-3? If you think it's often used... I assume using a field name like ISONUMERIC. However, as these are pretty easy to convert (e.g. with https://www.npmjs.com/package/i18n-iso-countries ) I would be tempted to err on the opinionated side. At the end of the day the more variation that's encouraged, the harder it will be to be compatible with other applications using the standard. Hence, perhaps it's even worth encouraging a particular code (2 or 3 characters).

N.B. this PR just moved the Country type into alphabetical order and didn't change it. Hence, if this change were applied it would need to go in a new issue/PR.

Currency
There is an ISO for currency (ISO 4217) should we use that in an id object in a similar fashion to Country?

Absolutely. This PR is I think using the ISO 3 character codes, but hasn't identified that (and named the field ISOCODE rather than code). I'll update the PR for that.

DateRange
Do we need a Date as well as a DateRange - or is there a better approach that can combine both – or is the assumption that a DateRange with just a starttime is effectively a Date?

We probably do need a basic date type AND datetime... its reasonable to think someone might want to send a single date as context. This is probably a good point to bring up in the discussion of primitive types. If we create a Date and/or DateTime type do we recommend they are used (full object with a type field) OR do we allow for (any primitive type that we add to the standard) to be used as a normal field? I feel like DateRange might be a bit cumbersome if composed of two embedded DateTime context objects:

as proposed now:

{
    "type": "fdc3.dateRange",
    "starttime": "2020-09-01T08:00:00.000Z",
    "endtime": "2020-10-31T08:00:00.000Z"
}

if composed of date types:

{
    "type": "fdc3.dateRange",
    "starttime": {
        "type": "fdc3.dateTime",
        "ISODATETIME": "2020-09-01T08:00:00.000Z"
    },
    "endtime": {
        "type": "fdc3.dateTime",
        "ISODATETIME": "2020-10-31T08:00:00.000Z"
    }
}

but I've seen worse... it also allows us to acknowledge the ISO standard (ISO 8601) behind the date time format - although the Context spec could also define conventions for certain 'primitive types' and do so there.

@hampshan
Copy link

hampshan commented Dec 2, 2021

I agree with the points about requiring to agree primitive data types. I think date and datetime particularly need to be defined.

I was also wondering whether it would be helpful to further define date/datetime ranges and instants too.

Regarding charting data, I wondered whether it would be helpful to define a more generic data structure to pass series/grid-like data to other apps that support charting, grids, or used for calculations, etc.

@kriswest kriswest changed the title 442 Define more context types used to visualize (or otherwise represent) financial data [DO NOT MERGE - to be superceded] 442 Define more context types used to visualize (or otherwise represent) financial data May 11, 2022
@kriswest
Copy link
Contributor Author

Superceded by #715, #706

@kriswest kriswest closed this May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-present Context Data & Intents Contexts & Intents Discussion Group
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define more context types used to visualize (or otherwise represent) financial data
3 participants