Skip to content

Return global index data #307

Answered by alvarobartt
enricomosca96 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @enricomosca96, in order to retrieve the information from that concrete index you need to introduce its name and the country='world', as I'm tagging the country as world whenever Investing.com says Global Indices.

So that the function call should look like:

import investpy

data = investpy.get_index_historical_data(index="MSCI Emerging Markets",
                                          country="world",
                                          from_date="01/01/2020",
                                          to_date="01/01/2021")

print(data.head())

For more information please check this doc entry which explains to you how to use the investpy.search_indices() function so that you can …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@enricomosca96
Comment options

Answer selected by alvarobartt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants