Hello,
When using the Workspace API get_history function to retrieve historical Fundamental data.
When requesting historical Fundamental data with Financial segment fields
(e.g. TR.F.GEOTotRevBizActiv), I observed that the returned data becomes misaligned
depending on the order of fields specified in the request.
Specifically, if the segment name field is specified before the value field,
the segment names and the corresponding numeric values appear to be mismatched
(row misalignment occurs).
However, when the segment name field is specified after the value field,
the issue does not occur and the data is returned correctly.
If this behavior is not intended by design, I kindly request that it be investigated
and fixed in a future update.
import lseg.data as ld
ld.open_session()
mismatch issue observed
df = ld.get_history(
universe=["1332.T"],
fields=["TR.F.GEOTotRevBizActiv.segmentname", "TR.F.GEOTotRevBizActiv"],
parameters={
"SDate": "-2", "EDate": "0", "Frq": "FY", "Period": "FY0",
},
)
print(df)
no issue observed
df = ld.get_history(
universe=["1332.T"],
fields=["TR.F.GEOTotRevBizActiv", "TR.F.GEOTotRevBizActiv.segmentname"],
parameters={
"SDate": "-2", "EDate": "0", "Frq": "FY", "Period": "FY0",
},
)
print(df)