devcartel/pyrfa

Date in timeseries response lagging behind for one day.

Closed this issue · 11 comments

Example:

import pyrfa
p = pyrfa.Pyrfa()
p.createConfigDb("./pyrfa.cfg")
p.acquireSession("Session1")
p.createOMMConsumer()
p.login()
p.directoryRequest()
p.dictionaryRequest()
p.setTimeSeriesPeriod('daily')
p.setTimeSeriesMaxRecords(10)
ts = p.getTimeSeries('EUR=')
for row in ts:
    print(row)

Output:

DATE,BID,OPEN,HIGH,LOW,ASK,HIGH BID,LOW BID,OPEN ASK,HIGH ASK,LOW ASK
2018/06/27,No data available
2018/06/26,1.1552,1.1646,1.1672,1.1539,1.1555,1.1672,1.1539,1.165,1.1674,1.1541
2018/06/25,1.1645,1.1702,1.172,1.1633,1.1649,1.172,1.1633,1.1706,1.1722,1.1636
2018/06/24,1.1702,1.1657,1.1713,1.1625,1.1706,1.1713,1.1625,1.1658,1.1715,1.1629
2018/06/21,1.1655,1.1602,1.1675,1.1598,1.1659,1.1675,1.1598,1.1605,1.1677,1.16
2018/06/20,1.1601,1.157,1.1633,1.1507,1.1605,1.1633,1.1507,1.1573,1.1636,1.1509
2018/06/19,1.157,1.1588,1.16,1.1535,1.1574,1.16,1.1535,1.1592,1.1603,1.1538
2018/06/18,1.1588,1.1622,1.1644,1.1528,1.1592,1.1644,1.1528,1.1623,1.1647,1.1531
2018/06/17,1.1622,1.1608,1.1624,1.1562,1.1624,1.1624,1.1562,1.161,1.1627,1.1566
2018/06/14,1.1607,1.1566,1.1627,1.1541,1.1611,1.1627,1.1541,1.157,1.1629,1.1544

Expected:

DATE,BID,OPEN,HIGH,LOW,ASK,HIGH BID,LOW BID,OPEN ASK,HIGH ASK,LOW ASK
2018/06/28,No data available
2018/06/27,1.1552,1.1646,1.1672,1.1539,1.1555,1.1672,1.1539,1.165,1.1674,1.1541
2018/06/26,1.1645,1.1702,1.172,1.1633,1.1649,1.172,1.1633,1.1706,1.1722,1.1636
2018/06/25,1.1702,1.1657,1.1713,1.1625,1.1706,1.1713,1.1625,1.1658,1.1715,1.1629
2018/06/22,1.1655,1.1602,1.1675,1.1598,1.1659,1.1675,1.1598,1.1605,1.1677,1.16
2018/06/21,1.1601,1.157,1.1633,1.1507,1.1605,1.1633,1.1507,1.1573,1.1636,1.1509
2018/06/20,1.157,1.1588,1.16,1.1535,1.1574,1.16,1.1535,1.1592,1.1603,1.1538
2018/06/19,1.1588,1.1622,1.1644,1.1528,1.1592,1.1644,1.1528,1.1623,1.1647,1.1531
2018/06/18,1.1622,1.1608,1.1624,1.1562,1.1624,1.1624,1.1562,1.161,1.1627,1.1566
2018/06/15,1.1607,1.1566,1.1627,1.1541,1.1611,1.1627,1.1541,1.157,1.1629,1.1544

The date should be in UTC. Does it explain what you see?

No. Other tools show different date.

It seems incorrect indeed based on the EUR= time-series price table below from Thomson Reuters. We will check with Thomson Reuters team and our developers to get this fixed. Many thanks for feedback.

screen shot 2018-06-29 at 11 17 02

Thanks.

@vmarunov are you able to try getTimeSeries with an equity symbol instead of an FX? We just want to confirm whether it's data issue or decoding issue. Thanks.

@wiwat-tharateeraparb below example for RIC LU097678774=

import pyrfa
p = pyrfa.Pyrfa()
p.createConfigDb("./pyrfa.cfg")
p.acquireSession("Session1")
p.createOMMConsumer()
p.login()
p.directoryRequest()
p.dictionaryRequest()
p.setTimeSeriesPeriod('daily')
p.setTimeSeriesMaxRecords(10)
ts = p.getTimeSeries('LU097678774=')
for row in ts:
    print(row)

Output:

DATE,CLOSE,NATIVE YIELD,ASK,ASK YIELD,BMK SPRD,SWAP SPRD,ASSET SWP SPRD,ISMA BID YLD,ISMA ASK YLD,Z-SPREAD,INTERPOLATED CDS,INTERPOLATED BASIS,TED SPREAD,OIS SPREAD
2018/07/09,86.929,6.336,87.929,6.249,336.98,339.55,303.4,6.44,6.35,87.429,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/08,86.929,6.336,87.929,6.249,336.98,339.07,302.92,6.44,6.35,87.429,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/05,87.327,6.301,88.327,6.214,336.97,339.59,304.36,6.4,6.31,87.827,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/04,87.155,6.316,88.155,6.229,336.81,339.98,304.19,6.42,6.33,87.655,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/03,86.877,6.34,87.877,6.253,337.99,341.59,305.34,6.44,6.35,87.377,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/02,86.994,6.33,87.994,6.243,336.96,340.96,304.7,6.43,6.34,87.494,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/01,85.721,6.443,86.721,6.354,345,348.67,308.66,6.55,6.45,86.221,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/06/28,84.979,6.51,85.979,6.42,352.02,356.28,313.32,6.62,6.52,85.479,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/06/27,87.254,6.307,88.254,6.22,333.88,338,302.7,6.41,6.32,87.754,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/06/26,84.114,6.589,85.114,6.497,361.93,366.4,320,6.7,6.6,84.614,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)

Expected:

DATE,CLOSE,NATIVE YIELD,ASK,ASK YIELD,BMK SPRD,SWAP SPRD,ASSET SWP SPRD,ISMA BID YLD,ISMA ASK YLD,Z-SPREAD,INTERPOLATED CDS,INTERPOLATED BASIS,TED SPREAD,OIS SPREAD
2018/07/10,86.929,6.336,87.929,6.249,336.98,339.55,303.4,6.44,6.35,87.429,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/09,86.929,6.336,87.929,6.249,336.98,339.07,302.92,6.44,6.35,87.429,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/06,87.327,6.301,88.327,6.214,336.97,339.59,304.36,6.4,6.31,87.827,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/05,87.155,6.316,88.155,6.229,336.81,339.98,304.19,6.42,6.33,87.655,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/04,86.877,6.34,87.877,6.253,337.99,341.59,305.34,6.44,6.35,87.377,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/03,86.994,6.33,87.994,6.243,336.96,340.96,304.7,6.43,6.34,87.494,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/07/02,85.721,6.443,86.721,6.354,345,348.67,308.66,6.55,6.45,86.221,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/06/29,84.979,6.51,85.979,6.42,352.02,356.28,313.32,6.62,6.52,85.479,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/06/28,87.254,6.307,88.254,6.22,333.88,338,302.7,6.41,6.32,87.754,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)
2018/06/27,84.114,6.589,85.114,6.497,361.93,366.4,320,6.7,6.6,84.614,No trade or suspended,No trade or suspended,No data available before this point (chronologically),No data available before this point (chronologically)

@wiwat-tharateeraparb Hi. Have any updates?

@vmarunov We just released PyRFA 8.5.0 with a fixed for TS1 date decoding. Let us know if it resolves this issue.

@vmarunov any chance to test out this date from TS1?

@wiwat-tharateeraparb Hi!
All tests passed. All correct. Thank your!