Economic Indicators
Implementation details
Class names
| Model name | Parameters class | Data class |
|---|---|---|
EconomicIndicators | EconomicIndicatorsQueryParams | EconomicIndicatorsData |
Import Statement
from openbb_core.provider.standard_models.economic_indicators import (
EconomicIndicatorsData,
EconomicIndicatorsQueryParams,
)
Parameters
- standard
- econdb
- imf
symbol: str | list[str]
Symbol to get data for. Multiple items allowed for provider(s): econdb, imf.
country: str | None | list[str | None]
The country to get data. Multiple items allowed for provider(s): econdb, imf.
frequency: str | None
The frequency of the data.
start_date: date | None | str
Start date of the data, in YYYY-MM-DD format.
end_date: date | None | str
End date of the data, in YYYY-MM-DD format.
symbol: str
Symbol to get data for. The base symbol for the indicator (e.g. GDP, CPI, etc.). Use available_indicators() to get a list of available symbols.
country: str | None
The country to get data. ISO country codes or country names.
frequency: str | None
Default: quarter
The frequency of the data, default is 'quarter'. Only valid when 'symbol' is 'main'.
start_date: date | None | str
Start date of the data, in YYYY-MM-DD format.
end_date: date | None | str
End date of the data, in YYYY-MM-DD format.
transform: None | str | None
Description
The transformation to apply to the data, default is None.
tpop: Change from previous period
toya: Change from one year ago
tusd: Values as US dollars
tpgp: Values as a percent of GDP
Only 'tpop' and 'toya' are applicable to all indicators. Applying transformations across multiple indicators/countries may produce unexpected results.
This is because not all indicators are compatible with all transformations, and the original units and scale differ between entities.
tusd should only be used where values are currencies.
use_cache: bool | None
Default: True
If True, the request will be cached for one day. Using cache is recommended to avoid needlessly requesting the same data.
symbol: str | None
Description
Symbol to get data for. Symbol format: 'dataflow::identifier' where identifier is either:
- A table ID (starts with 'H_') for hierarchical table data
- An indicator code for individual indicator data
Examples:
- 'BOP::H_BOP_BOP_AGG_STANDARD_PRESENTATION' - Balance of Payments table
- 'BOP_AGG::GS_CD,BOP_AGG::GS_DB' - Multiple BOP_AGG indicators (Goods & Services)
- 'IL::RGV_REVS' - Gold reserves in millions of fine troy ounces
- 'WEO::NGDP_RPCH' - Real GDP growth (annual only)
- 'WEO::POILBRE' - Brent crude oil price (use country='G001' for world)
- 'PCPS::PGOLD' - Gold price per troy ounce (monthly/quarterly available)
Use obb.economy.available_indicators(provider='imf') to discover symbols. Use obb.economy.imf_utils.list_tables() to see available tables.
country: str | None
ISO3 country code(s). Use comma-separated values for multiple countries. Validated against the dataflow's available countries via constraint API.
frequency: str | None
The frequency of the data. Choices vary by indicator and country. Common options: 'annual', 'quarter', 'month'. Use 'all' or '*' to return all available frequencies. Direct IMF codes (e.g., 'A', 'Q', 'M') are also accepted.
start_date: date | None | str
Start date of the data, in YYYY-MM-DD format.
end_date: date | None | str
End date of the data, in YYYY-MM-DD format.
transform: str | None
Transformation to apply to the data. User-friendly options: 'index' (raw values), 'yoy' (year-over-year %), 'period' (period-over-period %). Use 'all' or '*' to return all available transformations. Direct IMF codes (e.g., 'USD', 'IX') are also accepted.
dimension_values: list[str] | None
list of additional dimension filters in 'DIM_ID:DIM_VALUE' format. Parameter can be entered multiple times.
limit: int | None
Maximum number of records to retrieve per series.
pivot: bool | None
Default: False
If True, pivots the data to presentation view with 'indicator' and 'country' as the index, date as values.
Data
- standard
- econdb
- imf
date: date | None | str
The date of the data.
symbol_root: str | None
The root symbol for the indicator (e.g. GDP).
symbol: str | None
Symbol representing the entity requested in the data.
country: str | None
The country represented by the data.
value: int | float | None
date: date | None | str
The date of the data.
symbol_root: str | None
The root symbol for the indicator (e.g. GDP).
symbol: str | None
Symbol representing the entity requested in the data.
country: str | None
The country represented by the data.
value: int | float | None
date: date | None | str
The date of the data.
symbol_root: str | None
The root symbol for the indicator (e.g. GDP).
symbol: str | None
Symbol representing the entity requested in the data.
country: str | None
The country represented by the data.
value: int | float | None
unit: str | None
The unit of measurement.
unit_multiplier: int | float | None
The multiplier for the unit.
scale: str | None
The scale/multiplier of the value.
order: int | float | None
Sort order within the table hierarchy.
level: int | None
Indentation level in the table hierarchy.
title: str | None
Human-readable title of the series.
description: str | None
Description of the indicator.
country_code: str | None
ISO3 country code.