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

[repository schema] New attribute to identify fields sharing characteristics #194

Open
kleihan opened this issue Nov 15, 2023 · 3 comments
Assignees
Labels
DeFIXify Remove FIX-specific elements

Comments

@kleihan
Copy link
Member

kleihan commented Nov 15, 2023

Orchestra support FIX and non-FIX protocols. The FIX Protocol has a naming convention for fields due to its tag=value encoding. Whenever the same field is needed more than once in a single message, it requires to have a different tag number and field name. Examples are:

  • Party identifier: PartyID, RootPartyID, NestedPartyID, Nested2PartyID, Nested3PartyID, Nested4PartyID
  • Security type: SecurityType, LegSecurityType, UnderlyingSecurityType, DerivativeSecurityType, RelatedSecurityType, InstrumentScopeSecurityType
  • Encoded security description: EncodedSecurityDesc, DerivativeEncodedSecurityDesc, InstrumentScopeEncodedSecurityDesc

These fields may or may not have a code set that they share. These fields may have one or more of the alternate field names in a given message. They generally have in common that their abbreviation in the FIXML encoding is identical due to the XML path making them distinguishable from one another.

It is proposed to add an attribute baseFieldId to express such a relationship to support validation and treatment of related fields. For example, they could be required to have the same datatype or code set. One of the fields would be identified as the base field and all others would point to the base field to express a relationship.

Note that some fields would have the attributes nonEncodedFieldId and baseFieldId point to the same field, e.g. like EncodedLegSecurityDesc(622) would have value "207" (field name SecurityDesc) in both cases.

Example: A data field with a datatype as base field for other fields.

<fixr:field name="PartyID" id="448" type="String"/>
<fixr:field name="RootPartyID" id="1117" type="String" baseFieldId="448">
<fixr:field name="NestedPartyID" id="524" type="String" baseFieldId="448">
<fixr:field name="Nested2PartyID" id="757" type="String" baseFieldId="448">
<fixr:field name="Nested3PartyID" id="949" type="String" baseFieldId="448">
<fixr:field name="Nested4PartyID" id="1415" type="String" baseFieldId="448">

Example: A data field with a code set as base field for other fields.

<fixr:field name="SecurityType" id="167" codeSet="SecurityTypeCodeSet"/>
<fixr:field name="LegSecurityType" id="609" codeSet="SecurityTypeCodeSet" baseFieldId="167">
<fixr:field name="UnderlyingSecurityType" id="310" codeSet="SecurityTypeCodeSet" baseFieldId="167">
<fixr:field name="DerivativeSecurityType" id="1249" codeSet="SecurityTypeCodeSet" baseFieldId="167">
<fixr:field name="RelatedSecurityType" id="1652" codeSet="SecurityTypeCodeSet" baseFieldId="167">
<fixr:field name="InstrumentScopeSecurityType" id="1547" codeSet="SecurityTypeCodeSet" baseFieldId="167">
@kleihan
Copy link
Member Author

kleihan commented Jul 22, 2024

Needs to be weighed against using the existing capability of Orchestra v1.0 for so-called "instance names" of fields and components.

		<xs:attribute name="instanceName" type="fixr:Name_t">
			<xs:annotation>
				<xs:documentation>Override the field name for this instance, for
					code generation and the like. Allows more than one instance of a
					field in a message or component.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>

		<xs:attribute name="instanceName" type="fixr:ComponentName_t">
			<xs:annotation>
				<xs:documentation>Override the component name for this instance, for
					code generation and the like. Allows more than one instance of a
					component in a message.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>

@donmendelson
Copy link
Member

donmendelson commented Jul 22, 2024

@kleihan, as I understand it, baseFieldId refers to a field with some semantic relationship. On the other hand, instanceName is used to distinguish multiple instances of fields with identical semantics. The attribute could be applied to groups or components as well as individual fields. It was originally requested by Yuval Cohen who used for a non-FIX protocol.

@kleihan
Copy link
Member Author

kleihan commented Jul 22, 2024

@donmendelson, thanks for the background. How can we define identical fields/components vs those that are only semantically related? I am thinking of ESMA or SEC-CAT messages where there is a buyer and a seller component. Would these qualify as two identical instances of a single component? In FIX (e.g. TrdCapRptSideGrp) we always need a repeating group, even for just two instances.

A valid question is probably what one would actually do with the information provided by baseFieldId as opposed to using instanceName. Changes to FIX would be quite invasive with the latter, having to change the field tag and name and moving the current field name to instanceName. The upside is that this would reduce the number of FIX fields needed for FIX Latest.

@kleihan kleihan self-assigned this Aug 9, 2024
@kleihan kleihan added DeFIXify Remove FIX-specific elements and removed enhancement labels Aug 21, 2024
@kleihan kleihan moved this to In progress in Orchestra v1.1 RC2 Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeFIXify Remove FIX-specific elements
Projects
Status: No status
Development

No branches or pull requests

2 participants