Fetching monthly economic indicators

Hide code cell content

import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)

import lseg.data as ld

ld.open_session()
<lseg.data.session.Definition object at 0x7f0a707a63c0 {name='rdp'}>

You can use the LSEG Data Library for Python to retrieve monthly economic indicators like inflation and unemployment by passing the relevent Refinitiv Instrument Code to the get_history function with the interval parameter set to "monthly".

Here’s how to retrieve the Consumer Price Index, a monthly inflation indicator released by the US Bureau of Labor Statistics:

ld.get_history(
    "USCPI=ECI",
    interval="monthly",
)
USCPI=ECI VALUE
Date
2024-01-31 0.3
2024-02-29 0.4
2024-03-31 0.3
2024-04-30 0.3
2024-05-31 0.0
2024-06-30 0.0
2024-07-31 0.1
2024-08-31 0.2
2024-09-30 0.2
2024-10-31 0.2
2024-11-30 0.3
2024-12-31 0.4
2025-01-31 0.5
2025-02-28 0.2
2025-03-31 -0.1
2025-04-30 0.2
2025-05-31 0.1
2025-06-30 0.3
2025-07-31 0.2
2025-08-31 0.4

Hide code cell content

ld.close_session()