question

Upvotes
Accepted
46 6 10 15

Trading session meta data queried with Refinitiv Data Library for .NET is ambiguous

Using the 3.2.06-Endpoint-TSIMetadata (beta5) example for the Refinitiv Data Library for .NET I queried the session meta data for the Instruments SQ3 and JPY=TF. (example query: "/data/historical-pricing/v1/metadata/instrument-metadata?version=v2&types=TradingSessions&ric=SQ3")

Checking the session definition for the currently valid session of both instruments, I noticed that both instruments are using overnight sessions. When I look at the instrument sessions using the EIKON application I can see that instruments have daily sessions that either start on the previous day (SQ3) or end on the next day (JPY=TF). Looking at the session data in JSON form it seems ambiguous as to in what "direction" the sessions are supposed to go.

  1. Is there a way to tell which way the sessions are supposed to go?
  2. Is there any documentation explaining how to interpret the session objects?

Looking at the example below it seems to me the information is missing.

Example SQ3

Monday session is supposed to start on Sunday and end on Monday, but looking only at the data it could also be possible that it starts on Monday and ends on Tuesday.

"trades": [

1,

2,

3,

4,

5

],

"tradesText": {

"tue": "tue",

"wed": "wed",

"thu": "thu",

"fri": "fri",

"mon": "mon"

},

"tradingPhase": "Electronic",

"startTime": [

19,

0,

0

],

"endTime": [

7,

45,

0

],

"classificationText": "Normal",

"classification": 1,

"isOvernight": true

},

Example JPY=TF

The session definition looks similar but is supposed to go from Monday to Tuesday.

"trades": [

null,

1

],

"tradesText": {

"mon": "mon"

},

"tradingPhase": "Normal",

"startTime": [

7,

10,

0

],

"endTime": [

5,

55,

0

],

"classificationText": "Normal",

"classification": 1,

"isOvernight": true

#productrdp-apisessionmetadata
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
17.9k 82 39 63

Hi @martin.grunwald

Researching this, the rollover time is only applicable if the summarization mode == 0. With this, I believe the direction is determined as following:

The rollover time will embed the 'Day', 'Hour', 'Minute' and 'Seconds' value which will help to determine the direction. For example, 'P0DT21H30M0S' contains Day (0), Hour (21), Minute (30), Seconds (0). The value 'P1DT60M0S' contains Day(1), Hour (6), Minute (0), Seconds (0).

In some cases, the 1st character within the rollover time will contain a dash (-).

To determine the direction:

if (rollovertime[0] == '-')
   direction = Yesterday;
else if (Hour >= 24 || Day > 0)
   direction = Tomorrow;
else
   direction = Today
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you, this is useful information. Do you have an example for a RIC having a "-" in front of the rollover time?
Upvotes
17.9k 82 39 63

Hi @martin.grunwald

I don't believe there is any public-facing documentation for the TSI Metadata rules as they are almost entirely used internally. Regarding the 'TradingSessions' section, it contains multiple sessions, where there is only typically one that is current. That is, when you look at the 'validFrom' / 'validTo' dates, most entries have expired and are likely still in there for historical reasons. The current session typically does not contain a 'validTo' definition.

For example, here is the valid session for SQ3:

1690905638798.png

Which contains many phases, such as pre, regular, closing run, etc which defines the different dates/times. The above screenshot does show the regular trading from 'mon'-'fri'. There is quite a bit of rules/properties that will require much more investigation. I'm not clear on how you plan to use this.


1690905638798.png (34.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I think I found a way to tell the direction by using the rolloverTime. My assumption is a rollover starting with "P0DT" means the rollover is on the same day as the trading day. A session that ends on the next day will therefore have a rollover time starting with "P1DT". This should work unless there are exchanges that use forward and backward sessions but I am not aware those exist.

Do you think this is a reasonable assumption?

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.