economic_calendar(time_zone=None, time_filter='time_only', countries=None, importances=None, categories=None, from_date=None, to_date=None)¶
This function retrieves the economic calendar, which covers financial events and indicators from all over the world updated in real-time. By default, the economic calendar of the currrent day from you local timezone will be retrieved, but note that some parameters can be specified so that the economic calendar to retrieve can be filtered.
str, optional) – time zone in GMT +/- hours:minutes format, which will be the reference time, if None, the local GMT time zone will be used.
str, optional) – it can be time_only or time_remain, so that the calendar will display the time when the event will occurr according to the time zone or the remaining time until an event occurs.
str, optional) – list of countries from where the events of the economic calendar will be retrieved, all contries will be taken into consideration if this parameter is None.
str, optional) – list of importances of the events to be taken into consideration, can contain: high, medium and low; if None all the importance ratings will be taken into consideration including holidays.
str, optional) – list of categories to which the events will be related to, if None all the available categories will be taken into consideration.
str, optional) – date from when the economic calendar will be retrieved in dd/mm/yyyy format, if None just current day’s economic calendar will be retrieved.
str, optional) – date until when the economic calendar will be retrieved in dd/mm/yyyy format, if None just current day’s economic calendar will be retrieved.
pandas.DataFramewill contain the retrieved information from the economic calendar with the specified parameters which will include information such as: date, time, zone or country of the event, event’s title, etc. Note that some of the retrieved fields may be None since Investing.com does not provides that information.
- Return type
ValueError – raised if any of the introduced parameters is not valid or errored.
>>> data = investpy.economic_calendar() >>> data.head() id date time zone currency importance event actual forecast previous 0 323 27/01/2020 All Day singapore None None Singapore - Chinese New Year None None None 1 9 27/01/2020 All Day hong kong None None Hong Kong - New Year's Day None None None 2 71 27/01/2020 All Day australia None None Australia - Australia Day None None None 3 750 27/01/2020 All Day china None None China - Spring Festival None None None 4 304 27/01/2020 All Day south korea None None South Korea - Market Holiday None None None