When retrieving period data for several RICS with LSEG API the financial periods, periodenddates and values seem to be correct for several periods, but for the relative financial periods always "FY0" is given.
How must I change the statement to get the correct rfperiods?
This is my program:
# list of RICS for retrievalric_list = ["1COVG.DE", "A2.MI", "AAK.ST", "WTB.L", "YAR.OL", "ZALG.DE", "ZELA.CO", "ZURN.S"]
## ## open the session
ld.open_session(name='platform.ldp')
retr_fields = ["TR.CommonStockTotal.periodenddate","TR.CommonStockTotal.rfperiod","TR.CommonStockTotal.fperiod","TR.CommonStockTotal"]
retr_param = {'curn': 'EUR', 'scale': '6', 'IncludePartial': 'No', 'FRQ': 'FY', 'SDate': '2024-12-13', 'EDate': '2021-12-13', 'ReportingState': 'ORIG'}
response = fundamental_and_reference.Definition( universe=ric_list, fields=retr_fields, parameters=retr_param).get_data()
universe_period_fy = response.data.df
desired_columns = ["Instrument", "Period End Date", "Financial Period Relative", "Financial Period Absolute", "Common Stock, Total"]
universe_period_fy = universe_period_fy[desired_columns]
print(tabulate(universe_period_fy, headers=desired_columns, tablefmt='pretty'))
And I get this output:
+----+------------+---------------------+---------------------------+---------------------------+---------------------+
| | Instrument | Period End Date | Financial Period Relative | Financial Period Absolute | Common Stock, Total |
+----+------------+---------------------+---------------------------+---------------------------+---------------------+
| 0 | 1COVG.DE | 2023-12-31 00:00:00 | FY0 | FY2023 | 189.0 |
| 1 | 1COVG.DE | 2022-12-31 00:00:00 | FY0 | FY2022 | 190.0 |
| 2 | 1COVG.DE | 2021-12-31 00:00:00 | FY0 | FY2021 | 193.0 |
| 3 | A2.MI | 2023-12-31 00:00:00 | FY0 | FY2023 | 1629.0 |
| 4 | A2.MI | 2022-12-31 00:00:00 | FY0 | FY2022 | 1629.0 |
| 5 | A2.MI | 2021-12-31 00:00:00 | FY0 | FY2021 | 1629.0 |
| 6 | AAK.ST | 2023-12-31 00:00:00 | FY0 | FY2023 | 38.9743011820801 |
| 7 | AAK.ST | 2022-12-31 00:00:00 | FY0 | FY2022 | 38.8742289436769 |
| 8 | AAK.ST | 2021-12-31 00:00:00 | FY0 | FY2021 | 41.9432538277724 |
| 9 | WTB.L | 2024-02-29 00:00:00 | FY0 | FY2024 | 177.375291593032 |
| 10 | WTB.L | 2023-03-02 00:00:00 | FY0 | FY2023 | 185.831243656338 |
| 11 | WTB.L | 2022-03-03 00:00:00 | FY0 | FY2022 | 198.789766312109 |
| 12 | YAR.OL | 2023-12-31 00:00:00 | FY0 | FY2023 | 57.08619 |
| 13 | YAR.OL | 2022-12-31 00:00:00 | FY0 | FY2022 | 58.8672 |
| 14 | YAR.OL | 2021-12-31 00:00:00 | FY0 | FY2021 | 55.41858 |
| 15 | ZALG.DE | 2023-12-31 00:00:00 | FY0 | FY2023 | 260.5 |
| 16 | ZALG.DE | 2022-12-31 00:00:00 | FY0 | FY2022 | 259.0 |
| 17 | ZALG.DE | 2021-12-31 00:00:00 | FY0 | FY2021 | 258.7 |
| 18 | ZELA.CO | 2023-12-31 00:00:00 | FY0 | FY2023 | 7.8819169746232 |
| 19 | ZELA.CO | 2022-12-31 00:00:00 | FY0 | FY2022 | 6.95443142787223 |
| 20 | ZELA.CO | 2021-12-31 00:00:00 | FY0 | FY2021 | 5.86852449201131 |
| 21 | ZURN.S | 2023-12-31 00:00:00 | FY0 | FY2023 | 9.0613 |
| 22 | ZURN.S | 2022-12-31 00:00:00 | FY0 | FY2022 | 10.2784 |
| 23 | ZURN.S | 2021-12-31 00:00:00 | FY0 | FY2021 | 9.67626 |
+----+------------+---------------------+---------------------------+---------------------------+---------------------+