Skip to main content

macro

This functions groups the data queried from the EconDB database [Source: EconDB]

Source Code: [link]

openbb.economy.macro(parameters: Optional[list] = None, countries: Optional[list] = None, transform: str = "", start_date: str = "1900-01-01", end_date: Optional[str] = None, symbol: str = "")

Parameters

NameTypeDescriptionDefaultOptional
parameterslistThe type of data you wish to download. Available parameters can be accessed through economy.macro_parameters().NoneTrue
countrieslistThe selected country or countries. Available countries can be accessed through economy.macro_countries().NoneTrue
transformstrThe selected transform. Available transforms can be accessed through get_macro_transform().True
start_datestrThe starting date, format "YEAR-MONTH-DAY", i.e. 2010-12-31.1900-01-01True
end_dateOptional[str]The end date, format "YEAR-MONTH-DAY", i.e. 2020-06-05.NoneTrue
symbolstrIn what currency you wish to convert all values.True

Returns

TypeDescription
Tuple[pd.DataFrame, Dict[Any, Dict[Any, Any]], str]A DataFrame with the requested macro data of all chosen countries,
A dictionary containing the units of each country's parameter (e.g. EUR),
A string denomination which can be Trillions, Billions, Millions, Thousands

Examples

from openbb_terminal.sdk import openbb
macro_df = openbb.economy.macro()