diff --git a/README.md b/README.md
index 52edc766..6cf58407 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ are some of the features that currently lead investpy to be one of the most cons
In order to get this package working you will need to install [**investpy**](https://pypi.org/project/investpy/) using
pip on the terminal by typing:
-``$ pip install investpy==0.9.1``
+``$ pip install investpy==0.9.2``
Every package used is listed in [requirements.txt](https://github.com/alvarob96/investpy/blob/master/requirements.txt)
file, which can also be installed via pip:
@@ -96,13 +96,13 @@ df = investpy.get_fund_recent_data(fund='bbva plan multiactivo moderado pp',
print(df.head())
>>>
- Close High Low Open
-Date
-2019-07-12 1.128 1.128 1.128 1.128
-2019-07-15 1.130 1.130 1.130 1.130
-2019-07-16 1.130 1.130 1.130 1.130
-2019-07-17 1.129 1.129 1.129 1.129
-2019-07-18 1.126 1.126 1.126 1.126
+ Open High Low Close Currency
+Date
+2019-08-13 1.110 1.110 1.110 1.110 EUR
+2019-08-16 1.109 1.109 1.109 1.109 EUR
+2019-08-19 1.114 1.114 1.114 1.114 EUR
+2019-08-20 1.112 1.112 1.112 1.112 EUR
+2019-08-21 1.115 1.115 1.115 1.115 EUR
```
@@ -116,13 +116,13 @@ df = investpy.get_fund_historical_data(fund='bbva plan multiactivo moderado pp',
print(df.head())
>>>
- Close High Low Open
-Date
-2018-02-15 1.105 1.105 1.105 1.105
-2018-02-16 1.113 1.113 1.113 1.113
-2018-02-17 1.113 1.113 1.113 1.113
-2018-02-18 1.113 1.113 1.113 1.113
-2018-02-19 1.111 1.111 1.111 1.111
+ Open High Low Close Currency
+Date
+2018-02-15 1.105 1.105 1.105 1.105 EUR
+2018-02-16 1.113 1.113 1.113 1.113 EUR
+2018-02-17 1.113 1.113 1.113 1.113 EUR
+2018-02-18 1.113 1.113 1.113 1.113 EUR
+2018-02-19 1.111 1.111 1.111 1.111 EUR
```
diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle
index 1ec62153..c11aec05 100644
Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ
diff --git a/docs/_build/doctrees/equities_api.doctree b/docs/_build/doctrees/equities_api.doctree
index 45bbca6c..b94c3f73 100644
Binary files a/docs/_build/doctrees/equities_api.doctree and b/docs/_build/doctrees/equities_api.doctree differ
diff --git a/docs/_build/doctrees/etfs_api.doctree b/docs/_build/doctrees/etfs_api.doctree
index 486b9c8e..6bab4cfa 100644
Binary files a/docs/_build/doctrees/etfs_api.doctree and b/docs/_build/doctrees/etfs_api.doctree differ
diff --git a/docs/_build/doctrees/funds_api.doctree b/docs/_build/doctrees/funds_api.doctree
index 260061e4..bf6f1d11 100644
Binary files a/docs/_build/doctrees/funds_api.doctree and b/docs/_build/doctrees/funds_api.doctree differ
diff --git a/docs/_build/doctrees/installation.doctree b/docs/_build/doctrees/installation.doctree
index 92f3ab96..50ddbd44 100644
Binary files a/docs/_build/doctrees/installation.doctree and b/docs/_build/doctrees/installation.doctree differ
diff --git a/docs/_build/doctrees/main_api.doctree b/docs/_build/doctrees/main_api.doctree
index 9fd752a3..9d8d29c0 100644
Binary files a/docs/_build/doctrees/main_api.doctree and b/docs/_build/doctrees/main_api.doctree differ
diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo
index 6a661067..27e1000c 100644
--- a/docs/_build/html/.buildinfo
+++ b/docs/_build/html/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 70a5174f2acc3480f905925e73085ea0
+config: d489656db2532687c5b4eb366b70bbeb
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/docs/_build/html/_sources/installation.rst.txt b/docs/_build/html/_sources/installation.rst.txt
index 1db6e166..c1bc48bc 100644
--- a/docs/_build/html/_sources/installation.rst.txt
+++ b/docs/_build/html/_sources/installation.rst.txt
@@ -5,7 +5,7 @@ Installation
.. note::
- After installing the package you are now available to use it! As investpy's latest release is 0.9.1 the installation is
+ After installing the package you are now available to use it! As investpy's latest release is 0.9.2 the installation is
optimized for it. If you try installing another investpy release, some features may not work.
First Installation
@@ -48,7 +48,7 @@ If you already had `investpy
test_mode (bool
) – variable to avoid time waste on travis-ci since it just needs to test the basics in order to determine code
+
test_mode (bool
) – variable to avoid time waste on travis-ci since it just needs to test the basics in order to improve code
coverage.
ValueError – if any of the introduced arguments is not valid.
FileNotFoundError – raised if equity_countries.csv file does not exists or is empty.
ConnectionError – if GET requests does not return 200 status code.
IndexError – if equities information was unavailable or not found.
test_mode (bool
) – variable to avoid time waste on travis-ci since it just needs to test the basics in order to determine code
+
test_mode (bool
) – variable to avoid time waste on travis-ci since it just needs to test the basics in order to improve code
coverage.
ValueError – raised if any of the introduced arguments is not valid.
ConnectionError – raised if connection to Investing.com could not be established.
RuntimeError – raised if no countries were retrieved from Investing.com equity listing.
investpy.equities.
retrieve_info
(tag)¶This function retrieves both the ISIN code and the currency of an equity indexed in Investing.com, so to add -additional information to the equities.csv file. The ISIN code will later be used in order to retrieve more -information from the specified equity as the ISIN code is an unique identifier of every equity; and the currency -which will be required in order to know which currency is the value in.
+investpy.equities.
retrieve_equity_info
(tag)¶This function retrieves both the ISIN code, the currency and the symbol of an equity indexed in Investing.com, so +to include additional information in equities.csv file. The ISIN code will later be used in order to retrieve more +information from the specified equity, as the ISIN code is an unique identifier of each equity; the currency +will be required in order to know which currency is the value in, and the symbol will be used for processing the +request to HistoricalDataAjax to retrieve historical data from Investing.com.
tag (str
) – is the tag of the equity to retrieve the information from as indexed by Investing.com.
dict
contains the needed information for the equities listing, so on, both the the ISINcode of the introduced equity and the currency of its values.
+dict
contains the needed information for the equities listing, so on, the ISINcode of the introduced equity, the currency of its values and the symbol of the equity.
investpy.etfs.
retrieve_etf_info
(tag)¶This function retrieves additional information from the specified etf as indexed in Investing.com, in order to add +more information to etfs.csv which can later be useful. Currently just the currency value is retrieved, since it +is needed so to determine in which currency the historical data values are.
+tag (str
) – is the tag of the etf to retrieve the information from as indexed by Investing.com.
The resulting dict
contains the needed information for the etfs listing.
dict
- info
ConnectionError – raised if GET requests does not return 200 status code.
IndexError – raised if the information from the etf was not found or unable to retrieve.
investpy.etfs.
retrieve_etfs
(test_mode=False)¶test_mode (bool
) – variable to avoid time waste on travis-ci since it just needs to test the basics in order to determine code
+
test_mode (bool
) – variable to avoid time waste on travis-ci since it just needs to test the basics in order to improve code
coverage.
investpy.funds
¶investpy.funds.
fund_information_as_json
(df)¶This function converts a pandas.DataFrame
into a json
object, where the introduced
-pandas.DataFrame
, is the one created by the investpy.get_fund_information(fund, as_json) function,
-when as_json is True, which retrieves all the information listed on Investing.com from a fund.
investpy.funds.
fund_countries_as_list
()¶This function retrieves all the country names indexed in Investing.com with available funds to retrieve data +from, via reading the fund_countries.csv file from the resources directory. So on, this function will display a +listing containing a set of countries, in order to let the user know which countries are taken into account and also +the return listing from this function can be used for country param check if needed.
df (pandas.DataFrame
) – generated by investpy.get_fund_information(fund, as_json) which contains all the available fund
-information listed on Investing.com
The resulting json
as json
contains all the features from the pandas.DataFrame
In case the information was successfully retrieved, the json
will look like:
{
- 'Fund Name': fund_name,
- 'Rating': rating,
- '1-Year Change': year_change,
- 'Previous Close': prev_close,
- 'Risk Rating': risk_rating,
- 'TTM Yield': ttm_yield,
- 'ROE': roe,
- 'Issuer': issuer,
- 'Turnover': turnover,
- 'ROA': row,
- 'Inception Date': inception_date,
- 'Total Assets': total_assets,
- 'Expenses': expenses,
- 'Min Investment': min_investment,
- 'Market Cap': market_cap,
- 'Category': category
-}
-
The resulting list
contains all the available countries with funds as indexed in Investing.com
json
- funds_information
list
- countries
IndexError – if fund information was unavailable or not found.
+IndexError – if fund_countries.csv was unavailable or not found.
investpy.funds.
funds_as_df
()¶investpy.funds.
funds_as_df
(country=None)¶
This function retrieves all the available funds from Investing.com and returns them as a pandas.DataFrame
,
which contains not just the fund names, but all the fields contained on the funds file.
All the available funds can be found at: https://es.investing.com/funds/spain-funds?&issuer_filter=0
The resulting pandas.DataFrame
contains all the funds basic information retrieved from Investing.com,
+
country (str
, optional) – name of the country to retrieve all its available funds from.
The resulting pandas.DataFrame
contains all the funds basic information retrieved from Investing.com,
some of which is not useful for the user, but for the inner package functions, such as the id field,
for example.
In case the information was successfully retrieved, the pandas.DataFrame
will look like:
pandas.DataFrame
object.
pandas.DataFrame
- funds_df
pandas.DataFrame
- funds_df
IOError – if the funds file from investpy is missing or errored.
+IOError – if the funds file from investpy is missing or errored.
investpy.funds.
funds_as_dict
(columns=None, as_json=False)¶This function retrieves all the available funds on Investing.com and
-returns them as a dict
containing the asset_class, id, issuer,
-name, symbol and tag. All the available funds can be found at:
+investpy.funds.
funds_as_dict
(country=None, columns=None, as_json=False)¶
+
This function retrieves all the available funds on Investing.com and returns them as a dict
containing the
+asset_class, id, issuer, name, symbol and tag. All the available funds can be found at:
https://es.investing.com/etfs/spain-etfs
country (str
, optional) – name of the country to retrieve all its available funds from.
columns (list
of str
, optional) – description
a list containing the column names from which the data is going to be retrieved.
as_json (bool
, optional) – description
@@ -290,12 +268,15 @@
investpy.funds.
funds_as_list
()¶investpy.funds.
funds_as_list
(country=None)¶
This function retrieves all the available funds and returns a list of each one of them. All the available funds can be found at: https://es.investing.com/funds/spain-funds?&issuer_filter=0
The resulting list contains the retrieved data, which corresponds to the fund names of +
country (str
, optional) – name of the country to retrieve all its available funds from.
The resulting list contains the retrieved data, which corresponds to the fund names of every fund listed on Investing.com.
In case the information was successfully retrieved from the CSV file, the list
will look like:
funds = ['Blackrock Global Funds - Global Allocation Fund E2',
@@ -306,11 +287,11 @@
list
- funds_list
list
- funds_list
ValueError – raised when the introduced arguments are not correct.
IOError – if the funds file from investpy is missing or errored.
investpy.funds.
retrieve_fund_data
(fund)¶This function retrieves additional information from a fund as listed on -es.Investing.com. Every fund data is retrieved and stored in a CSV in order -to get all the possible information from a fund.
+investpy.funds.
retrieve_fund_countries
(test_mode=False)¶This function retrieves all the country names indexed in Investing.com with available funds to retrieve data +from, via Web Scraping https://www.investing.com/funds/ where the available countries are listed and retrieved.
+test_mode (bool
) – variable to avoid time waste on travis-ci since it just needs to test the basics in order to improve code
+coverage.
The resulting pandas.DataFrame
contains all the available countries with their corresponding ID,
+which will be used later by investpy.
pandas.DataFrame
- fund_countries
ConnectionError – raised if connection to Investing.com could not be established.
RuntimeError – raised if no countries were retrieved from Investing.com fund listing.
investpy.funds.
retrieve_fund_info
(tag)¶This function retrieves additional information from a fund as listed in Investing.com. Every fund data is retrieved +and stored in a CSV in order to get all the possible information from a fund.
fund (str
) – is the identifying tag of the specified fund.
tag (str
) – is the identifying tag of the specified fund.
The resulting dict
contains the retrieved data if found, if not, the corresponding
@@ -363,7 +369,7 @@
information contained in the resulting pandas.DataFrame
is useless.
test_mode (bool
) – variable to avoid time waste on travis-ci since it just needs to test the basics in order to determine code
+
test_mode (bool
) – variable to avoid time waste on travis-ci since it just needs to test the basics in order to improve code
coverage.
Note
-After installing the package you are now available to use it! As investpy’s latest release is 0.9.1 the installation is +
After installing the package you are now available to use it! As investpy’s latest release is 0.9.2 the installation is optimized for it. If you try installing another investpy release, some features may not work.
The returned data is case we use default arguments will look like:
-date || open | high | low | close
------||---------------------------
-xxxx || xxxx | xxxx | xxx | xxxxx
+date || open | high | low | close | currency
+-----||--------------------------------------
+xxxx || xxxx | xxxx | xxx | xxxxx | xxxxxxxx
but if we define as_json=True, then the output will be:
@@ -402,7 +402,8 @@
open: x,
high: x,
low: x,
- close: x
+ close: x,
+ currency: x
},
...
]
@@ -426,9 +427,13 @@
Examples
>>> investpy.get_etf_historical_data(etf='bbva accion dj eurostoxx 50', country='spain', from_date='01/01/2010', to_date='01/01/2019', as_json=False, order='ascending', debug=False)
- date || open | high | low | close
- -----||---------------------------
- xxxx || xxxx | xxxx | xxx | xxxxx
+ Open High Low Close Currency
+ Date
+ 2011-12-07 23.70 23.70 23.70 23.62 EUR
+ 2011-12-08 23.53 23.60 23.15 23.04 EUR
+ 2011-12-09 23.36 23.60 23.36 23.62 EUR
+ 2011-12-12 23.15 23.26 23.00 22.88 EUR
+ 2011-12-13 22.88 22.88 22.88 22.80 EUR
@@ -454,9 +459,9 @@
recent data from the specified etf via argument. The dataset contains the open, high, low and close
values for the selected etf on market days.
The returned data is case we use default arguments will look like:
-date || open | high | low | close
------||---------------------------
-xxxx || xxxx | xxxx | xxx | xxxxx
+date || open | high | low | close | currency
+-----||--------------------------------------
+xxxx || xxxx | xxxx | xxx | xxxxx | xxxxxxxx
but if we define as_json=True, then the output will be:
@@ -468,7 +473,8 @@
open: x,
high: x,
low: x,
- close: x
+ close: x,
+ currency: x
},
...
]
@@ -492,9 +498,13 @@
Examples
>>> investpy.get_etf_recent_data(etf='bbva accion dj eurostoxx 50', country='spain', as_json=False, order='ascending', debug=False)
- date || open | high | low | close
- -----||---------------------------
- xxxx || xxxx | xxxx | xxx | xxxxx
+ Open High Low Close Currency
+ Date
+ 2019-08-13 33.115 33.780 32.985 33.585 EUR
+ 2019-08-14 33.335 33.335 32.880 32.905 EUR
+ 2019-08-15 32.790 32.925 32.455 32.845 EUR
+ 2019-08-16 33.115 33.200 33.115 33.305 EUR
+ 2019-08-19 33.605 33.735 33.490 33.685 EUR
@@ -654,9 +664,29 @@
+
+-
+
investpy.
get_fund_countries
()¶
+This function retrieves all the country names indexed in Investing.com with available funds to retrieve data
+from, via reading the fund_countries.csv file from the resources directory. So on, this function will display a
+listing containing a set of countries, in order to let the user know which countries are taken into account and also
+the return listing from this function can be used for country param check if needed.
+
+- Returns
+The resulting list
contains all the available countries with funds as indexed in Investing.com
+
+- Return type
+list
- countries
+
+- Raises
+IndexError – if fund_countries.csv was unavailable or not found.
+
+
+
+
-
-
investpy.
get_fund_historical_data
(fund, from_date, to_date, as_json=False, order='ascending', debug=False)¶
+investpy.
get_fund_historical_data
(fund, country, from_date, to_date, as_json=False, order='ascending', debug=False)¶
This function retrieves historical data from the introduced fund from Investing
via Web Scraping on the introduced date range. The resulting data can it either be
stored in a pandas.DataFrame
or in a json
object with ascending or descending order.
@@ -664,6 +694,7 @@
- Parameters
fund (str
) – name of the fund to retrieve recent historical data from.
+country (str
) – name of the country from where the introduced fund is.
from_date (str
) – date as str formatted as dd/mm/yyyy, from where data is going to be retrieved.
to_date (str
) – date as str formatted as dd/mm/yyyy, until where data is going to be retrieved.
as_json (bool
, optional) – to determine the format of the output data (pandas.DataFrame
or json
).
@@ -713,7 +744,7 @@
Examples
->>> investpy.get_fund_historical_data(fund='bbva multiactivo conservador pp', from_date='01/01/2010', to_date='01/01/2019', as_json=False, order='ascending', debug=False)
+>>> investpy.get_fund_historical_data(fund='bbva multiactivo conservador pp', country='spain', from_date='01/01/2010', to_date='01/01/2019', as_json=False, order='ascending', debug=False)
date || open | high | low | close
-----||---------------------------
xxxx || xxxx | xxxx | xxx | xxxxx
@@ -723,7 +754,7 @@
-
-
investpy.
get_fund_information
(fund, as_json=False)¶
+investpy.
get_fund_information
(fund, country, as_json=False)¶
This function retrieves basic financial information from the specified fund.
As the information is also provided by Investing.com, the tags and names remain the same so
a new Web Scraping process is not needed, the headers can be created with the existing information.
@@ -734,6 +765,7 @@
- Parameters
fund (str
) – name of the fund to retrieve the financial information from.
+country (str
) – name of the country from where the introduced fund is.
as_json (bool
, optional) – optional argument to determine the format of the output data (dict
or json
).
@@ -765,14 +797,14 @@
- Return type
-dict
- fund_information
+dict
- fund_information
-
-
investpy.
get_fund_recent_data
(fund, as_json=False, order='ascending', debug=False)¶
+investpy.
get_fund_recent_data
(fund, country, as_json=False, order='ascending', debug=False)¶
This function retrieves recent historical data from the introduced fund from Investing
via Web Scraping. The resulting data can it either be stored in a pandas.DataFrame
or in a
json
file, with ascending or descending order.
@@ -780,6 +812,7 @@
- Parameters
fund (str
) – name of the fund to retrieve recent historical data from.
+country (str
) – name of the country from where the introduced fund is.
as_json (bool
, optional) – optional argument to determine the format of the output data (pandas.DataFrame
or json
).
order (str
, optional) – optional argument to define the order of the retrieved data (ascending, asc or descending, desc).
debug (bool
, optional) – optional argument to either show or hide debug messages on log, True or False, respectively.
@@ -826,7 +859,7 @@
Examples
->>> investpy.get_fund_recent_data(fund='bbva multiactivo conservador pp', as_json=False, order='ascending', debug=False)
+>>> investpy.get_fund_recent_data(fund='bbva multiactivo conservador pp', country='spain', as_json=False, order='ascending', debug=False)
date || open | high | low | close
-----||---------------------------
xxxx || xxxx | xxxx | xxx | xxxxx
@@ -836,13 +869,16 @@
-
-
investpy.
get_funds
()¶
+investpy.
get_funds
(country=None)¶
This function retrieves all the available funds from Investing.com and returns them as a pandas.DataFrame
,
which contains not just the fund names, but all the fields contained on the funds file.
All the available funds can be found at: https://es.investing.com/funds/spain-funds?&issuer_filter=0
-- Returns
-The resulting pandas.DataFrame
contains all the funds basic information retrieved from Investing.com,
+
- Parameters
+country (str
, optional) – name of the country to retrieve all its available funds from.
+
+- Returns
+The resulting pandas.DataFrame
contains all the funds basic information retrieved from Investing.com,
some of which is not useful for the user, but for the inner package functions, such as the id field,
for example.
In case the information was successfully retrieved, the pandas.DataFrame
will look like:
@@ -855,18 +891,18 @@
CSV file, this function just reads it and loads it into a pandas.DataFrame
object.
-- Return type
-pandas.DataFrame
- funds_df
+- Return type
+pandas.DataFrame
- funds_df
-- Raises
-IOError – if the funds file from investpy is missing or errored.
+- Raises
+IOError – if the funds file from investpy is missing or errored.
-
-
investpy.
get_funds_dict
(columns, as_json)¶
+investpy.
get_funds_dict
(country=None, columns=None, as_json=False)¶
This function retrieves all the available funds on Investing.com and
returns them as a dict
containing the asset_class, id, issuer,
name, symbol and tag. All the available funds can be found at:
@@ -874,6 +910,7 @@
- Parameters
+country (str
, optional) – name of the country to retrieve all its available funds from.
columns (list
of str
, optional) – description
a list containing the column names from which the data is going to be retrieved.
as_json (bool
, optional) – description
@@ -911,12 +948,15 @@
-
-
investpy.
get_funds_list
()¶
+investpy.
get_funds_list
(country=None)¶
This function retrieves all the available funds and returns a list of each one of them.
All the available funds can be found at: https://es.investing.com/funds/spain-funds?&issuer_filter=0
-- Returns
-The resulting list contains the retrieved data, which corresponds to the fund names of
+
- Parameters
+country (str
, optional) – name of the country to retrieve all its available funds from.
+
+- Returns
+The resulting list contains the retrieved data, which corresponds to the fund names of
every fund listed on Investing.com.
In case the information was successfully retrieved from the CSV file, the list
will look like:
funds = ['Blackrock Global Funds - Global Allocation Fund E2',
@@ -927,11 +967,11 @@
-- Return type
-list
- funds_list
+- Return type
+list
- funds_list
-- Raises
-
+- Raises
+
ValueError – raised when the introduced arguments are not correct.
IOError – if the funds file from investpy is missing or errored.
@@ -962,9 +1002,9 @@
recent data from the specified equity via argument. The dataset contains the open, high, low, close and
volume values for the selected equity on market days.
The returned data is case we use default arguments will look like:
-date || open | high | low | close | volume
------||-----------------------------------
-xxxx || xxxx | xxxx | xxx | xxxxx | xxxxxx
+date || open | high | low | close | volume | currency
+-----||-----------------------------------------------
+xxxx || xxxx | xxxx | xxx | xxxxx | xxxxxx | xxxxxxxx
but if we define as_json=True, then the output will be:
@@ -977,7 +1017,8 @@
high: x,
low: x,
close: x,
- volume: x
+ volume: x,
+ currency: x
},
...
]
@@ -1001,9 +1042,13 @@
Examples
>>> investpy.get_historical_data(equity='bbva', country='spain', from_date='01/01/2010', to_date='01/01/2019', as_json=False, order='ascending', debug=False)
- date || open | high | low | close | volume
- -----||-----------------------------------
- xxxx || xxxx | xxxx | xxx | xxxxx | xxxxxx
+ Open High Low Close Volume Currency
+ Date
+ 2010-01-04 12.73 12.96 12.73 12.96 0 EUR
+ 2010-01-05 13.00 13.11 12.97 13.09 0 EUR
+ 2010-01-06 13.03 13.17 13.02 13.12 0 EUR
+ 2010-01-07 13.02 13.11 12.93 13.05 0 EUR
+ 2010-01-08 13.12 13.22 13.04 13.18 0 EUR
@@ -1029,22 +1074,22 @@
recent data from the specified equity via argument. The dataset contains the open, high, low, close and
volume values for the selected equity on market days.
The return data is case we use default arguments will look like:
-date || open | high | low | close | volume
------||-----------------------------------
-xxxx || xxxx | xxxx | xxx | xxxxx | xxxxxx
+date || open | high | low | close | volume | currency
+-----||-----------------------------------------------
+xxxx || xxxx | xxxx | xxx | xxxxx | xxxxxx | xxxxxxxx
but if we define as_json=True, then the output will be:
{
name: name,
- full_name: full_name,
recent: [
dd/mm/yyyy: {
open: x,
high: x,
low: x,
close: x,
- volume: x
+ volume: x,
+ currency: x
},
...
]
@@ -1068,9 +1113,13 @@
Examples
>>> investpy.get_recent_data(equity='bbva', country='spain', as_json=False, order='ascending', debug=False)
- date || open | high | low | close | volume
- -----||-----------------------------------
- xxxx || xxxx | xxxx | xxx | xxxxx | xxxxxx
+ Open High Low Close Volume Currency
+ Date
+ 2019-08-13 4.263 4.395 4.230 4.353 27250000 EUR
+ 2019-08-14 4.322 4.325 4.215 4.244 36890000 EUR
+ 2019-08-15 4.281 4.298 4.187 4.234 21340000 EUR
+ 2019-08-16 4.234 4.375 4.208 4.365 46080000 EUR
+ 2019-08-19 4.396 4.425 4.269 4.269 18950000 EUR
diff --git a/docs/_build/html/model.html b/docs/_build/html/model.html
index 849ed048..9dccc215 100644
--- a/docs/_build/html/model.html
+++ b/docs/_build/html/model.html
@@ -8,7 +8,7 @@
- Model — investpy 0.9.1 documentation
+ Model — investpy 0.9.2 documentation
@@ -60,7 +60,7 @@
- 0.9.1
+ 0.9.2
diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv
index ee35088f..c4d4cef9 100644
Binary files a/docs/_build/html/objects.inv and b/docs/_build/html/objects.inv differ
diff --git a/docs/_build/html/py-modindex.html b/docs/_build/html/py-modindex.html
index ed7ef719..c80432b2 100644
--- a/docs/_build/html/py-modindex.html
+++ b/docs/_build/html/py-modindex.html
@@ -8,7 +8,7 @@
- Python Module Index — investpy 0.9.1 documentation
+ Python Module Index — investpy 0.9.2 documentation
@@ -61,7 +61,7 @@
- 0.9.1
+ 0.9.2
diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html
index 9e3bc40c..2b416a9c 100644
--- a/docs/_build/html/search.html
+++ b/docs/_build/html/search.html
@@ -8,7 +8,7 @@
- Search — investpy 0.9.1 documentation
+ Search — investpy 0.9.2 documentation
@@ -59,7 +59,7 @@
- 0.9.1
+ 0.9.2
diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js
index a4e62ecb..61096318 100644
--- a/docs/_build/html/searchindex.js
+++ b/docs/_build/html/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["api","disclaimer","equities","equities_api","etfs_api","funds_api","index","information","installation","introduction","main_api","model","user_agent"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:56},filenames:["api.rst","disclaimer.md","equities.rst","equities_api.rst","etfs_api.rst","funds_api.rst","index.rst","information.rst","installation.rst","introduction.rst","main_api.rst","model.rst","user_agent.rst"],objects:{"":{investpy:[10,0,0,"-"]},"investpy.equities":{equities_as_df:[3,1,1,""],equities_as_dict:[3,1,1,""],equities_as_list:[3,1,1,""],equity_countries_as_list:[3,1,1,""],retrieve_equities:[3,1,1,""],retrieve_equity_countries:[3,1,1,""],retrieve_info:[3,1,1,""]},"investpy.etfs":{etf_countries_as_list:[4,1,1,""],etfs_as_df:[4,1,1,""],etfs_as_dict:[4,1,1,""],etfs_as_list:[4,1,1,""],retrieve_etfs:[4,1,1,""]},"investpy.funds":{fund_information_as_json:[5,1,1,""],funds_as_df:[5,1,1,""],funds_as_dict:[5,1,1,""],funds_as_list:[5,1,1,""],retrieve_fund_data:[5,1,1,""],retrieve_funds:[5,1,1,""]},"investpy.user_agent":{clear_file:[12,1,1,""],delete_file:[12,1,1,""],get_random:[12,1,1,""]},investpy:{equities:[3,0,0,"-"],etfs:[4,0,0,"-"],funds:[5,0,0,"-"],get_equities:[10,1,1,""],get_equities_dict:[10,1,1,""],get_equities_list:[10,1,1,""],get_equity_company_profile:[10,1,1,""],get_equity_countries:[10,1,1,""],get_etf_countries:[10,1,1,""],get_etf_historical_data:[10,1,1,""],get_etf_recent_data:[10,1,1,""],get_etfs:[10,1,1,""],get_etfs_dict:[10,1,1,""],get_etfs_list:[10,1,1,""],get_etfs_overview:[10,1,1,""],get_fund_historical_data:[10,1,1,""],get_fund_information:[10,1,1,""],get_fund_recent_data:[10,1,1,""],get_funds:[10,1,1,""],get_funds_dict:[10,1,1,""],get_funds_list:[10,1,1,""],get_historical_data:[10,1,1,""],get_recent_data:[10,1,1,""],user_agent:[12,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"10k":12,"case":[2,3,4,5,10],"class":[5,10,11],"default":[2,10],"function":[2,3,4,5,9,10,12],"import":[2,9],"inversi\u00f3n":[5,10],"long":2,"new":[7,9,10],"public":[7,9],"return":[2,3,4,5,10,12],"true":[2,5,10],"try":[8,9],ACS:[3,10],And:11,For:[7,9],The:[2,3,4,5,9,10,11,12],These:2,__init__:11,abengoa:[3,10],about:9,accion:10,accord:[4,10],account:[3,10],activ:[4,10],add:3,addit:[2,3,5,6,10],addition:[2,3,4,5,7,9],administr:7,after:[2,3,8,10],again:[3,10],agent:12,all:[2,3,4,5,8,9,10],alloc:[5,10],allow:[2,3,4,9,10,12],along:[2,9],alreadi:[2,3,4,8,9,10],also:[2,3,4,7,9,10,11],altruist:1,alvarob96:8,anaconda:8,analys:2,analysi:9,ani:[1,3,4,5,7,9,10,12],anoth:8,anywai:2,api:[1,6,9],appendix:9,applic:1,archiv:8,argentaria:10,argument:[3,4,5,10],as_json:[2,3,4,5,9,10],asc:10,ascend:[2,9,10],asset:[2,5,10],asset_class:[5,10],asset_valu:5,atresmedia:[3,10],attach:5,australia:[4,10],australian:[4,10],austria:[4,10],automat:2,avail:[2,3,4,5,8,9,10],avoid:[3,4,5,12],banco:10,base:[2,9,11],basic:[3,4,5,7,10],bbva:[2,9,10],bear:[4,10],becaus:9,been:[1,2,11,12],befor:[2,3,10],belgium:[4,10],besid:2,betashar:[4,10],bilbao:10,blackrock:[5,10],block:9,bolsa:[2,10],bool:[3,4,5,10],both:[2,3,4,5,7,10],bought:2,brand:9,brazil:[4,10],broker:2,bug:7,call:[2,3,10,12],came:9,can:[2,3,4,5,7,8,9,10],cap:[5,10],cash:[4,10],categor:11,categori:[5,10],chang:[5,10,12],chart:9,check:[2,3,7,9,10],choos:9,clarifi:9,classifi:2,clear:12,clear_fil:12,close:[5,10,11],close_:11,cloud:8,code:[3,4,5,7,9,10,12],column:[3,4,5,10],com:[1,2,3,4,5,8,9,10,12],combin:10,come:2,common:11,commun:2,compani:[1,6,9,10],company_profil:10,complet:[3,4,5,10],concept:9,conclud:1,conda:8,conform:2,connect:3,connectionerror:[3,4,5,10],consecut:12,conservador:10,conservadora:[5,10],consid:2,consol:2,contact:7,contain:[2,3,4,5,10],content:[3,6,10,12],contrari:2,contribut:7,convert:5,corpor:2,correct:[5,10],correspond:[3,4,5,10,11],could:[3,9,10],countri:[2,3,4,9,10],country_cod:[4,10],cover:[1,9],coverag:[2,3,4,5,12],creat:[2,3,4,5,10,11],csv:[2,3,4,5,10,12],currenc:[3,4,10],current:[2,9,10],dai:[10,11],data:[1,3,4,5,6,7,10,11],datafram:[2,3,4,5,9,10,11],dataset:[2,10],date:[2,5,9,10,11],date_:11,debug:[2,9,10],decis:9,def:11,defin:[10,11],delet:12,delete_fil:12,depend:[1,8],desc:10,descend:[2,10],describ:2,descript:[2,5,10],detail:9,determin:[3,4,5,9,10],develop:[1,2,9],dict:[3,4,5,10],did:[3,10],differ:[10,12],directori:[3,10],disabl:2,disclaim:6,displai:[2,3,10],document:[7,9],doe:[1,2,3,4,5,9,10],due:[9,10,12],each:[5,10,11],earn:2,eas:[4,10],either:[2,3,4,8,10,11],email:7,empti:[3,4,5,10],enabl:2,english:[2,9,10],enhanc:7,entitl:2,equiti:[0,4,6,9,10,11],equities_as_df:3,equities_as_dict:3,equities_as_list:3,equities_df:[2,3],equities_dict:[3,10],equities_list:[2,3,10],equity_countri:[3,10],equity_countries_as_list:3,error:[2,5,10,12],establish:3,etc:10,etf:[0,2,5,6,9,10],etf_countri:[4,10],etf_countries_as_list:4,etfs_as_df:4,etfs_as_dict:4,etfs_as_list:4,etfs_dict:[4,10],etfs_list:[4,10],etfs_overview:10,eur:[5,10],eurostoxx:10,everi:[2,3,4,5,10,11,12],exampl:[2,5,9,10],except:11,exchang:2,exist:[3,4,9,10],expand:9,expect:9,expens:[5,10],explain:[2,9],extra:2,extract:[2,9,11],fail:[3,10],fals:[2,3,4,5,9,10],familiar:2,faster:7,featur:[2,5,8,9],feel:7,few:9,field:[3,4,5,10],file:[2,3,4,5,8,9,10,11,12],filenotfounderror:[4,10,12],fill:[3,4,5,10],filter:2,financi:[9,10,11],find:7,first:[2,3,6,9,10],fit:1,fix:7,focu:9,focus:2,folder:[3,4,5],follow:[2,3,8,10],format:[2,3,4,5,10],found:[2,3,4,5,10,12],foundat:2,fraudul:2,free:7,from:[2,3,4,5,8,9,10,11,12],from_dat:[2,10],full:[3,10],full_nam:[3,10],fund:[0,2,6,9,10],fund_data:5,fund_inform:10,fund_information_as_json:5,fund_nam:[5,10],funds_as_df:5,funds_as_dict:5,funds_as_list:5,funds_df:[5,10],funds_dict:[5,10],funds_inform:5,funds_list:[5,10],further:7,furthermor:2,fusion:9,futur:2,gener:[2,5,10],get:[3,4,5,6,8,10,12],get_company_profil:9,get_equ:[2,10],get_equities_dict:10,get_equities_list:[2,9,10],get_equity_company_profil:[2,10],get_equity_countri:[2,10],get_etf:10,get_etf_countri:10,get_etf_historical_data:10,get_etf_recent_data:10,get_etfs_dict:10,get_etfs_list:10,get_etfs_overview:10,get_fund:10,get_fund_historical_data:10,get_fund_inform:[5,10],get_fund_recent_data:10,get_funds_dict:10,get_funds_list:10,get_historical_data:[2,10],get_random:12,get_recent_data:[2,9,10],github:[7,8],global:[5,9,10],goal:9,goe:2,going:[5,9,10,12],govern:2,grow:7,had:8,happen:2,has:[1,2,11,12],have:[2,4,8,9,10],header:[10,12],hedg:[4,10],help:[4,10],hide:10,high:[4,9,10,11],high_:11,highest:11,histor:[6,9,10,11],hold:10,how:9,http:[3,4,5,8,10,12],hybrid:[4,10],idea:7,identifi:[3,5],improv:[2,7,9,12],incept:[5,10],inception_d:[5,10],includ:[2,3,4,10,11],index:[2,3,4,6,8,10],indexerror:[3,5,10],indic:11,info:3,inform:[2,3,4,5,6,9,10],inner:[3,4,5,10,11],input:[2,3,4,10],insid:2,insight:10,instal:[2,6,9],instead:[5,10],intend:2,interest:[4,10],interfac:1,intern:2,internet:9,introduc:[3,4,5,9,10],introduct:6,invest:[1,2,3,4,5,9,10,11,12],investor:2,investpi:[0,2,7,8,9,11],ioerror:[3,4,5,10,12],isin:[3,5,10],isin_valu:5,issu:[2,7],issuer:[5,10],issuer_filt:[5,10],issuer_valu:5,its:[2,3,4,7,8,9,10,11],json:[2,3,4,5,10,11],just:[2,3,4,5,9,10,11],kaggl:2,kernel:2,know:[2,3,4,10],known:2,languag:[2,9,10],last:[2,8,10],later:[3,4],latest:8,let:[2,3,10],life:9,like:[1,3,4,5,10,11],limit:12,list:[3,4,5,6,8,9,10,12],load:[3,5,10],log:[2,10],look:[3,4,5,10,11],lot:12,low:[10,11],low_:11,lowest:11,ltd:9,lxml:8,made:[1,2,9],madrid:[2,10],mai:8,main:[2,9,10],make:9,mandatori:2,market:[5,9,10,11],market_cap:[5,10],master:8,match:[2,10],mayb:[3,4,5],mean:2,meant:2,media:9,medium:7,mention:1,messag:[2,10],meta:[3,4,5],min:[5,10],min_invest:[5,10],miss:[3,4,5,10,12],mode:2,model:[6,9],modul:6,moment:[3,10],month:[2,9],more:[3,9],most:2,multiactivo:10,multipl:12,name:[2,3,4,5,10,11,12],nearli:2,need:[1,2,3,4,5,7,8,9,10],next:12,nomenclatur:11,none:[2,3,4,5,10],nordea:[5,10],note:[3,4,5,12],now:[2,8,9],number:11,object:[2,5,10],offer:[2,9],ohlc:[10,11],onc:[2,9],one:[2,5,9,10],ones:[2,4,10],onli:[1,11],onlin:2,open:[7,10,11],open_:11,optim:8,option:[2,3,4,5,10],order:[1,2,3,4,5,8,9,10,11,12],other:[2,9],out:[9,12],outperform:2,output:[2,3,4,5,10],over:[2,12],overview:10,own:9,ownership:2,packag:[1,2,3,4,5,6,7,9,10,11],page:[6,9],panda:[2,3,4,5,8,9,10,11],param:[2,3,10],paramet:[2,3,4,5,10],particular:[4,10],pass:[9,12],past:9,pip:8,portal:9,portfolio:2,possibl:[5,9],post:7,practic:2,predominantli:2,present:[2,9],prev_clos:[5,10],previou:[5,10],previous:[3,4,9,10],privat:2,problem:7,proce:[2,9],process:[3,4,5,10],product:[9,11],profil:[6,9,10],program:1,project:7,properli:[3,9,10],proport:2,proportion:2,propos:2,protect:2,provid:[2,9,10],publicli:2,purchas:2,purpos:[1,3,4,10],pypi:8,python:[1,8,9],qualiti:[5,10],question:7,quot:9,rais:[2,3,4,5,10,12],random:12,rang:[2,10],rate:[5,10],read:[3,4,5,10],real:[9,10],recent:[6,9,10],refer:[6,9,11],regul:2,relat:[1,7],releas:[2,8],relev:[7,9],reliabl:9,remain:10,report:7,request:[3,4,5,8,10,12],requir:[1,3],research:1,resourc:[2,3,4,5,10],respect:[2,8,9,10,11],restrict:12,result:[3,4,5,10,11],retriev:[1,2,3,4,5,9,10,11,12],retrieve_equ:[3,10],retrieve_equity_countri:3,retrieve_etf:[4,10],retrieve_fund:[5,10],retrieve_fund_data:5,retrieve_info:3,risk:[5,10],risk_rat:[5,10],roa:[5,10],roe:[5,10],row:[5,10],run:2,runtimeerror:[3,10],sale:2,same:[10,12],sampl:6,saw:2,scalabl:9,scienc:7,scrape:[3,7,10],search:6,secur:[2,11],select:[10,12],self:[2,11],set:[2,3,10],setup:8,share:[2,11],shortcom:9,should:[2,10],show:10,signifi:2,sinc:[2,3,4,5,10,12],sold:2,solv:7,some:[2,3,4,5,8,9,10],sort:9,sourc:[1,6,7,10],spain:[2,3,5,9,10],spanish:[2,3,5,9,10],specif:3,specifi:[2,3,4,5,10,12],stabl:[5,10],start:6,statu:[3,4,5,10],step:9,stock:[6,9],stockhold:2,store:[2,3,4,5,10,11],str:[2,3,4,5,10,12],stream:9,strong:[4,10],structur:11,succeed:10,successfulli:[3,4,5,10],sum:8,symbol:[4,5,10],tab:7,tag:[3,4,5,10],take:2,taken:[3,10],technic:9,term:9,test:[3,4,5,9,12],test_mod:[3,4,5],thei:[2,3,4,10],them:[2,3,4,5,8,9,10],thi:[1,2,3,4,5,7,8,9,10,12],though:2,thu:9,time:[3,4,5,9,10,12],to_dat:[2,10],tool:9,top:9,total:[5,10],total_asset:[5,10],trade:11,transact:2,transpar:11,travi:[3,4,5],triag:7,ttm:[5,10],ttm_yield:[5,10],turnov:[5,10],txt:12,type:[2,3,4,5,10,12],unabl:[3,10,12],unavail:[3,5,10],unidecod:8,uniqu:3,unless:[4,10],until:[2,9,10],updat:6,upgrad:8,upload:[2,7],url:10,usabl:11,usag:[2,9,10],use:[2,8,9,10,12],used:[2,3,4,10,11],useful:[2,5,9,10],useless:[2,3,4,5],user:[2,3,4,5,9,10,11,12],user_ag:[0,6],user_agent_list:12,using:[2,9],valid:[3,4,5,10],valu:[2,3,4,5,10,11],valuabl:10,valueerror:[3,4,5,10],variabl:[3,4,5],veri:2,version:8,via:[2,3,7,8,10,12],vizcaya:10,volum:[10,11],volume_:11,wai:[1,2,8],want:[2,3,4,8,10],wast:[3,4,5],web:[3,7,9,10],websit:3,well:2,were:3,when:[2,3,4,5,8,9,10,12],where:[1,2,3,5,7,10,11],which:[2,3,4,5,9,10,12],whole:[2,12],without:12,work:[1,8],world:[2,4,9],written:2,www:[3,10],xxx:[3,4,5,10],xxxx:[3,4,5,10],xxxxx:10,xxxxxx:[4,5,10],xxxxxxx:[4,10],xxxxxxxx:10,xxxxxxxxx:[3,10],xxxxxxxxxxx:[5,10],xxxxxxxxxxxx:[4,10],year:[5,10],year_chang:[5,10],yield:[5,10],you:[2,7,8,9],your:9,yyyi:[2,10],zip:8},titles:["API Reference","Disclaimer","Stocks/Equities","investpy.equities
","investpy.etfs
","investpy.funds
","Welcome to investpy\u2019s documentation!","Additional Information","Installation","Introduction","investpy
","Model","investpy.user_agent
"],titleterms:{addit:7,api:0,compani:2,data:[2,9],disclaim:1,document:6,equiti:[2,3],etf:4,first:8,fund:5,get:[2,9],histor:2,indic:6,inform:7,instal:8,introduct:9,investpi:[3,4,5,6,10,12],list:2,model:11,packag:8,profil:2,recent:2,refer:0,sampl:2,sourc:9,start:[2,9],stock:2,tabl:6,updat:8,user_ag:12,welcom:6}})
\ No newline at end of file
+Search.setIndex({docnames:["api","disclaimer","equities","equities_api","etfs_api","funds_api","index","information","installation","introduction","main_api","model","user_agent"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:56},filenames:["api.rst","disclaimer.md","equities.rst","equities_api.rst","etfs_api.rst","funds_api.rst","index.rst","information.rst","installation.rst","introduction.rst","main_api.rst","model.rst","user_agent.rst"],objects:{"":{investpy:[10,0,0,"-"]},"investpy.equities":{equities_as_df:[3,1,1,""],equities_as_dict:[3,1,1,""],equities_as_list:[3,1,1,""],equity_countries_as_list:[3,1,1,""],retrieve_equities:[3,1,1,""],retrieve_equity_countries:[3,1,1,""],retrieve_equity_info:[3,1,1,""]},"investpy.etfs":{etf_countries_as_list:[4,1,1,""],etfs_as_df:[4,1,1,""],etfs_as_dict:[4,1,1,""],etfs_as_list:[4,1,1,""],retrieve_etf_info:[4,1,1,""],retrieve_etfs:[4,1,1,""]},"investpy.funds":{fund_countries_as_list:[5,1,1,""],funds_as_df:[5,1,1,""],funds_as_dict:[5,1,1,""],funds_as_list:[5,1,1,""],retrieve_fund_countries:[5,1,1,""],retrieve_fund_info:[5,1,1,""],retrieve_funds:[5,1,1,""]},"investpy.user_agent":{clear_file:[12,1,1,""],delete_file:[12,1,1,""],get_random:[12,1,1,""]},investpy:{equities:[3,0,0,"-"],etfs:[4,0,0,"-"],funds:[5,0,0,"-"],get_equities:[10,1,1,""],get_equities_dict:[10,1,1,""],get_equities_list:[10,1,1,""],get_equity_company_profile:[10,1,1,""],get_equity_countries:[10,1,1,""],get_etf_countries:[10,1,1,""],get_etf_historical_data:[10,1,1,""],get_etf_recent_data:[10,1,1,""],get_etfs:[10,1,1,""],get_etfs_dict:[10,1,1,""],get_etfs_list:[10,1,1,""],get_etfs_overview:[10,1,1,""],get_fund_countries:[10,1,1,""],get_fund_historical_data:[10,1,1,""],get_fund_information:[10,1,1,""],get_fund_recent_data:[10,1,1,""],get_funds:[10,1,1,""],get_funds_dict:[10,1,1,""],get_funds_list:[10,1,1,""],get_historical_data:[10,1,1,""],get_recent_data:[10,1,1,""],user_agent:[12,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"10k":12,"case":[2,3,4,5,10],"class":[5,10,11],"default":[2,10],"function":[2,3,4,5,9,10,12],"import":[2,9],"inversi\u00f3n":[5,10],"long":2,"new":[7,9,10],"public":[7,9],"return":[2,3,4,5,10,12],"true":[2,10],"try":[8,9],ACS:[3,10],And:11,For:[7,9],The:[2,3,4,5,9,10,11,12],These:2,__init__:11,abengoa:[3,10],about:9,accion:10,accord:[4,10],account:[3,5,10],activ:[4,10],add:4,addit:[2,3,4,5,6,10],addition:[2,3,4,5,7,9],administr:7,after:[2,3,8,10],again:[3,10],agent:12,all:[2,3,4,5,8,9,10],alloc:[5,10],allow:[2,3,4,9,10,12],along:[2,9],alreadi:[2,3,4,8,9,10],also:[2,3,4,5,7,9,10,11],altruist:1,alvarob96:8,anaconda:8,analys:2,analysi:9,ani:[1,3,4,5,7,9,10,12],anoth:8,anywai:2,api:[1,6,9],appendix:9,applic:1,archiv:8,argentaria:10,argument:[3,4,5,10],as_json:[2,3,4,5,9,10],asc:10,ascend:[2,9,10],asset:[2,5,10],asset_class:[5,10],asset_valu:5,atresmedia:[3,10],attach:5,australia:[4,10],australian:[4,10],austria:[4,10],automat:2,avail:[2,3,4,5,8,9,10],avoid:[3,4,5,12],banco:10,base:[2,9,11],basic:[3,4,5,7,10],bbva:[2,9,10],bear:[4,10],becaus:9,been:[1,2,11,12],befor:[2,3,10],belgium:[4,10],besid:2,betashar:[4,10],bilbao:10,blackrock:[5,10],block:9,bolsa:[2,10],bool:[3,4,5,10],both:[2,3,4,5,7,10],bought:2,brand:9,brazil:[4,10],broker:2,bug:7,call:[2,3,10,12],came:9,can:[2,3,4,5,7,8,9,10],cap:10,cash:[4,10],categor:11,categori:10,chang:[10,12],chart:9,check:[2,3,5,7,9,10],choos:9,clarifi:9,classifi:2,clear:12,clear_fil:12,close:[10,11],close_:11,cloud:8,code:[3,4,5,7,9,10,12],column:[3,4,5,10],com:[1,2,3,4,5,8,9,10,12],combin:10,come:2,common:11,commun:2,compani:[1,6,9,10],company_profil:10,complet:[3,4,5,10],concept:9,conclud:1,conda:8,conform:2,connect:[3,5],connectionerror:[3,4,5,10],consecut:12,conservador:10,conservadora:[5,10],consid:2,consol:2,contact:7,contain:[2,3,4,5,10],content:[3,6,10,12],contrari:2,contribut:7,corpor:2,correct:[5,10],correspond:[3,4,5,10,11],could:[3,5,9,10],countri:[2,3,4,5,9,10],country_cod:[4,10],cover:[1,9],coverag:[2,3,4,5,12],creat:[2,3,4,10,11],csv:[2,3,4,5,10,12],currenc:[3,4,10],current:[2,4,9,10],dai:[10,11],data:[1,3,4,5,6,7,10,11],datafram:[2,3,4,5,9,10,11],dataset:[2,10],date:[2,9,10,11],date_:11,debug:[2,9,10],decis:9,def:11,defin:[10,11],delet:12,delete_fil:12,depend:[1,8],desc:10,descend:[2,10],describ:2,descript:[2,5,10],detail:9,determin:[3,4,5,9,10],develop:[1,2,9],dict:[3,4,5,10],did:[3,10],differ:[10,12],directori:[3,5,10],disabl:2,disclaim:6,displai:[2,3,5,10],document:[7,9],doe:[1,2,3,4,5,9,10],due:[9,10,12],each:[3,5,10,11],earn:2,eas:[4,10],either:[2,3,4,8,10,11],email:7,empti:[3,4,5,10],enabl:2,english:[2,9,10],enhanc:7,entitl:2,equiti:[0,4,6,9,10,11],equities_as_df:3,equities_as_dict:3,equities_as_list:3,equities_df:[2,3],equities_dict:[3,10],equities_list:[2,3,10],equity_countri:[3,10],equity_countries_as_list:3,error:[2,5,10,12],establish:[3,5],etc:10,etf:[0,2,5,6,9,10],etf_countri:[4,10],etf_countries_as_list:4,etfs_as_df:4,etfs_as_dict:4,etfs_as_list:4,etfs_dict:[4,10],etfs_list:[4,10],etfs_overview:10,eur:[5,10],eurostoxx:10,everi:[2,3,4,5,10,11,12],exampl:[2,5,9,10],except:11,exchang:2,exist:[3,4,9,10],expand:9,expect:9,expens:10,explain:[2,9],extra:2,extract:[2,9,11],fail:[3,10],fals:[2,3,4,5,9,10],familiar:2,faster:7,featur:[2,8,9],feel:7,few:9,field:[3,4,5,10],file:[2,3,4,5,8,9,10,11,12],filenotfounderror:[3,4,10,12],fill:[3,4,5,10],filter:2,financi:[9,10,11],find:7,first:[2,3,6,9,10],fit:1,fix:7,focu:9,focus:2,folder:[3,4,5],follow:[2,3,8,10],format:[2,3,4,5,10],found:[2,3,4,5,10,12],foundat:2,fraudul:2,free:7,from:[2,3,4,5,8,9,10,11,12],from_dat:[2,10],full:[3,10],full_nam:[3,10],fund:[0,2,6,9,10],fund_countri:[5,10],fund_countries_as_list:5,fund_data:5,fund_inform:10,fund_nam:10,funds_as_df:5,funds_as_dict:5,funds_as_list:5,funds_df:[5,10],funds_dict:[5,10],funds_list:[5,10],further:7,furthermor:2,fusion:9,futur:2,gener:[2,5,10],get:[3,4,5,6,8,10,12],get_company_profil:9,get_equ:[2,10],get_equities_dict:10,get_equities_list:[2,9,10],get_equity_company_profil:[2,10],get_equity_countri:[2,10],get_etf:10,get_etf_countri:10,get_etf_historical_data:10,get_etf_recent_data:10,get_etfs_dict:10,get_etfs_list:10,get_etfs_overview:10,get_fund:10,get_fund_countri:10,get_fund_historical_data:10,get_fund_inform:10,get_fund_recent_data:10,get_funds_dict:10,get_funds_list:10,get_historical_data:[2,10],get_random:12,get_recent_data:[2,9,10],github:[7,8],global:[5,9,10],goal:9,goe:2,going:[5,9,10,12],govern:2,grow:7,had:8,happen:2,has:[1,2,11,12],have:[2,4,8,9,10],header:[10,12],hedg:[4,10],help:[4,10],hide:10,high:[4,9,10,11],high_:11,highest:11,histor:[3,4,6,9,10,11],historicaldataajax:3,hold:10,how:9,http:[3,4,5,8,10,12],hybrid:[4,10],idea:7,identifi:[3,5],improv:[2,3,4,5,7,9,12],incept:10,inception_d:10,includ:[2,3,4,10,11],index:[2,3,4,5,6,8,10],indexerror:[3,4,5,10],indic:11,info:[3,4],inform:[2,3,4,5,6,9,10],inner:[3,4,5,10,11],input:[2,3,4,10],insid:2,insight:10,instal:[2,6,9],instead:[5,10],intend:2,interest:[4,10],interfac:1,intern:2,internet:9,introduc:[3,4,5,9,10],introduct:6,invest:[1,2,3,4,5,9,10,11,12],investor:2,investpi:[0,2,7,8,9,11],ioerror:[3,4,5,10,12],isin:[3,5,10],isin_valu:5,issu:[2,7],issuer:[5,10],issuer_filt:[5,10],issuer_valu:5,its:[2,3,4,5,7,8,9,10,11],json:[2,3,4,5,10,11],just:[2,3,4,5,9,10,11],kaggl:2,kernel:2,know:[2,3,4,5,10],known:2,languag:[2,9,10],last:[2,8,10],later:[3,4,5],latest:8,let:[2,3,5,10],life:9,like:[1,3,4,5,10,11],limit:12,list:[3,4,5,6,8,9,10,12],load:[3,5,10],log:[2,10],look:[3,4,5,10,11],lot:12,low:[10,11],low_:11,lowest:11,ltd:9,lxml:8,made:[1,2,9],madrid:[2,10],mai:8,main:[2,9,10],make:9,mandatori:2,market:[9,10,11],market_cap:10,master:8,match:[2,10],mayb:[3,4,5],mean:2,meant:2,media:9,medium:7,mention:1,messag:[2,10],meta:[3,4,5],min:10,min_invest:10,miss:[3,4,5,10,12],mode:2,model:[6,9],modul:6,moment:[3,10],month:[2,9],more:[3,4,9],most:2,multiactivo:10,multipl:12,name:[2,3,4,5,10,11,12],nearli:2,need:[1,2,3,4,5,7,8,9,10],next:12,nomenclatur:11,none:[2,3,4,5,10],nordea:[5,10],note:[3,4,5,12],now:[2,8,9],number:11,object:[2,5,10],offer:[2,9],ohlc:[10,11],onc:[2,9],one:[2,5,9,10],ones:[2,4,10],onli:[1,11],onlin:2,open:[7,10,11],open_:11,optim:8,option:[2,3,4,5,10],order:[1,2,3,4,5,8,9,10,11,12],other:[2,9],out:[9,12],outperform:2,output:[2,3,4,5,10],over:[2,12],overview:10,own:9,ownership:2,packag:[1,2,3,4,5,6,7,9,10,11],page:[6,9],panda:[2,3,4,5,8,9,10,11],param:[2,3,5,10],paramet:[2,3,4,5,10],particular:[4,10],pass:[9,12],past:9,pip:8,portal:9,portfolio:2,possibl:[5,9],post:7,practic:2,predominantli:2,present:[2,9],prev_clos:10,previou:10,previous:[3,4,9,10],privat:2,problem:7,proce:[2,9],process:[3,4,5,10],product:[9,11],profil:[6,9,10],program:1,project:7,properli:[3,9,10],proport:2,proportion:2,propos:2,protect:2,provid:[2,9,10],publicli:2,purchas:2,purpos:[1,3,4,10],pypi:8,python:[1,8,9],qualiti:[5,10],question:7,quot:9,rais:[2,3,4,5,10,12],random:12,rang:[2,10],rate:10,read:[3,4,5,10],real:[9,10],recent:[6,9,10],refer:[6,9,11],regul:2,relat:[1,7],releas:[2,8],relev:[7,9],reliabl:9,remain:10,report:7,request:[3,4,5,8,10,12],requir:[1,3],research:1,resourc:[2,3,4,5,10],respect:[2,8,9,10,11],restrict:12,result:[3,4,5,10,11],retriev:[1,2,3,4,5,9,10,11,12],retrieve_equ:[3,10],retrieve_equity_countri:3,retrieve_equity_info:3,retrieve_etf:[4,10],retrieve_etf_info:4,retrieve_fund:[5,10],retrieve_fund_countri:5,retrieve_fund_info:5,risk:10,risk_rat:10,roa:10,roe:10,row:10,run:2,runtimeerror:[3,5,10],sale:2,same:[10,12],sampl:6,saw:2,scalabl:9,scienc:7,scrape:[3,5,7,10],search:6,secur:[2,11],select:[10,12],self:[2,11],set:[2,3,5,10],setup:8,share:[2,11],shortcom:9,should:[2,10],show:10,signifi:2,sinc:[2,3,4,5,10,12],sold:2,solv:7,some:[2,3,4,5,8,9,10],sort:9,sourc:[1,6,7,10],spain:[2,3,5,9,10],spanish:[2,3,5,9,10],specif:3,specifi:[2,3,4,5,10,12],stabl:[5,10],start:6,statu:[3,4,5,10],step:9,stock:[6,9],stockhold:2,store:[2,3,4,5,10,11],str:[2,3,4,5,10,12],stream:9,strong:[4,10],structur:11,succeed:10,successfulli:[3,4,5,10],sum:8,symbol:[3,4,5,10],tab:7,tag:[3,4,5,10],take:2,taken:[3,5,10],technic:9,term:9,test:[3,4,5,9,12],test_mod:[3,4,5],thei:[2,3,4,10],them:[2,3,4,5,8,9,10],thi:[1,2,3,4,5,7,8,9,10,12],though:2,thu:9,time:[3,4,5,9,10,12],to_dat:[2,10],tool:9,top:9,total:10,total_asset:10,trade:11,transact:2,transpar:11,travi:[3,4,5],triag:7,ttm:10,ttm_yield:10,turnov:10,txt:12,type:[2,3,4,5,10,12],unabl:[3,4,10,12],unavail:[3,5,10],unidecod:8,uniqu:3,unless:[4,10],until:[2,9,10],updat:6,upgrad:8,upload:[2,7],url:10,usabl:11,usag:[2,9,10],use:[2,8,9,10,12],used:[2,3,4,5,10,11],useful:[2,4,5,9,10],useless:[2,3,4,5],user:[2,3,4,5,9,10,11,12],user_ag:[0,6],user_agent_list:12,using:[2,9],valid:[3,4,5,10],valu:[2,3,4,5,10,11],valuabl:10,valueerror:[3,4,5,10],variabl:[3,4,5],veri:2,version:8,via:[2,3,5,7,8,10,12],vizcaya:10,volum:[10,11],volume_:11,wai:[1,2,8],want:[2,3,4,8,10],wast:[3,4,5],web:[3,5,7,9,10],websit:3,well:2,were:[3,5],when:[2,3,4,5,8,9,10,12],where:[1,2,3,5,7,10,11],which:[2,3,4,5,9,10,12],whole:[2,12],without:12,work:[1,8],world:[2,4,9],written:2,www:[3,5,10],xxx:[3,4,5,10],xxxx:[3,4,5,10],xxxxx:10,xxxxxx:[4,5,10],xxxxxxx:[4,10],xxxxxxxx:10,xxxxxxxxx:[3,10],xxxxxxxxxxx:[5,10],xxxxxxxxxxxx:[4,10],year:10,year_chang:10,yield:10,you:[2,7,8,9],your:9,yyyi:[2,10],zip:8},titles:["API Reference","Disclaimer","Stocks/Equities","investpy.equities
","investpy.etfs
","investpy.funds
","Welcome to investpy\u2019s documentation!","Additional Information","Installation","Introduction","investpy
","Model","investpy.user_agent
"],titleterms:{addit:7,api:0,compani:2,data:[2,9],disclaim:1,document:6,equiti:[2,3],etf:4,first:8,fund:5,get:[2,9],histor:2,indic:6,inform:7,instal:8,introduct:9,investpi:[3,4,5,6,10,12],list:2,model:11,packag:8,profil:2,recent:2,refer:0,sampl:2,sourc:9,start:[2,9],stock:2,tabl:6,updat:8,user_ag:12,welcom:6}})
\ No newline at end of file
diff --git a/docs/conf.py b/docs/conf.py
index bae9551d..7f11da1c 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -25,9 +25,9 @@
author = 'Alvaro Bartolome'
# The short X.Y version
-version = '0.9.1'
+version = '0.9.2'
# The full version, including alpha/beta/rc tags
-release = '0.9.1'
+release = '0.9.2'
# -- General configuration ---------------------------------------------------
diff --git a/docs/installation.rst b/docs/installation.rst
index 1db6e166..c1bc48bc 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -5,7 +5,7 @@ Installation
.. note::
- After installing the package you are now available to use it! As investpy's latest release is 0.9.1 the installation is
+ After installing the package you are now available to use it! As investpy's latest release is 0.9.2 the installation is
optimized for it. If you try installing another investpy release, some features may not work.
First Installation
@@ -48,7 +48,7 @@ If you already had `investpy `_ installed an
All the dependencies are already listed on the setup file of the package, but to sum them up, when installing
`investpy `_, it will install the following dependencies:
-* `pandas 0.24.2 `_
+* `pandas 0.25.1 `_
* `requests 2.22.0 `_
-* `lxml 4.3.3 `_
-* `unidecode 1.0.23 `_
+* `lxml 4.4.1 `_
+* `unidecode 1.1.1 `_
diff --git a/investpy/__init__.py b/investpy/__init__.py
index 001d0e8b..67bcb518 100644
--- a/investpy/__init__.py
+++ b/investpy/__init__.py
@@ -4,7 +4,7 @@
# See LICENSE for details.
__author__ = 'Alvaro Bartolome '
-__version__ = '0.9.1'
+__version__ = '0.9.2'
import datetime
import json
@@ -925,9 +925,9 @@ def get_fund_recent_data(fund, country, as_json=False, order='ascending', debug=
The return data is case we use default arguments will look like::
- date || open | high | low | close
- -----||---------------------------
- xxxx || xxxx | xxxx | xxx | xxxxx
+ date || open | high | low | close | currency
+ -----||--------------------------------------
+ xxxx || xxxx | xxxx | xxx | xxxxx | xxxxxxxx
but if we define `as_json=True`, then the output will be::
@@ -953,9 +953,15 @@ def get_fund_recent_data(fund, country, as_json=False, order='ascending', debug=
Examples:
>>> investpy.get_fund_recent_data(fund='bbva multiactivo conservador pp', country='spain', as_json=False, order='ascending', debug=False)
- date || open | high | low | close
- -----||---------------------------
- xxxx || xxxx | xxxx | xxx | xxxxx
+
+ Open High Low Close Currency
+ Date
+ 2019-08-13 1.110 1.110 1.110 1.110 EUR
+ 2019-08-16 1.109 1.109 1.109 1.109 EUR
+ 2019-08-19 1.114 1.114 1.114 1.114 EUR
+ 2019-08-20 1.112 1.112 1.112 1.112 EUR
+ 2019-08-21 1.115 1.115 1.115 1.115 EUR
+
"""
if not fund:
@@ -1121,9 +1127,9 @@ def get_fund_historical_data(fund, country, from_date, to_date, as_json=False, o
The returned data is case we use default arguments will look like::
- date || open | high | low | close
- -----||---------------------------
- xxxx || xxxx | xxxx | xxx | xxxxx
+ date || open | high | low | close | currency
+ -----||--------------------------------------
+ xxxx || xxxx | xxxx | xxx | xxxxx | xxxxxxxx
but if we define `as_json=True`, then the output will be::
@@ -1150,9 +1156,14 @@ def get_fund_historical_data(fund, country, from_date, to_date, as_json=False, o
Examples:
>>> investpy.get_fund_historical_data(fund='bbva multiactivo conservador pp', country='spain', from_date='01/01/2010', to_date='01/01/2019', as_json=False, order='ascending', debug=False)
- date || open | high | low | close
- -----||---------------------------
- xxxx || xxxx | xxxx | xxx | xxxxx
+
+ Open High Low Close Currency
+ Date
+ 2018-02-15 1.105 1.105 1.105 1.105 EUR
+ 2018-02-16 1.113 1.113 1.113 1.113 EUR
+ 2018-02-17 1.113 1.113 1.113 1.113 EUR
+ 2018-02-18 1.113 1.113 1.113 1.113 EUR
+ 2018-02-19 1.111 1.111 1.111 1.111 EUR
"""
@@ -1260,6 +1271,8 @@ def get_fund_historical_data(fund, country, from_date, to_date, as_json=False, o
symbol = funds.loc[(funds['name'].str.lower() == fund).idxmax(), 'symbol']
id_ = funds.loc[(funds['name'].str.lower() == fund).idxmax(), 'id']
+ fund_currency = funds.loc[(funds['name'].str.lower() == fund).idxmax(), 'currency']
+
logger.info(str(fund) + ' found on Investing.com')
final = list()
@@ -1323,13 +1336,14 @@ def get_fund_historical_data(fund, country, from_date, to_date, as_json=False, o
data_flag = True
if data_flag is True:
- stock_date = datetime.datetime.strptime(info[0].replace('.', '-'), '%d-%m-%Y')
- stock_close = float(info[1].replace('.', '').replace(',', '.'))
- stock_open = float(info[2].replace('.', '').replace(',', '.'))
- stock_high = float(info[3].replace('.', '').replace(',', '.'))
- stock_low = float(info[4].replace('.', '').replace(',', '.'))
+ fund_date = datetime.datetime.strptime(info[0].replace('.', '-'), '%d-%m-%Y')
+ fund_close = float(info[1].replace('.', '').replace(',', '.'))
+ fund_open = float(info[2].replace('.', '').replace(',', '.'))
+ fund_high = float(info[3].replace('.', '').replace(',', '.'))
+ fund_low = float(info[4].replace('.', '').replace(',', '.'))
- result.insert(len(result), Data(stock_date, stock_open, stock_high, stock_low, stock_close, None, None))
+ result.insert(len(result), Data(fund_date, fund_open, fund_high, fund_low,
+ fund_close, None, fund_currency))
if data_flag is True:
if order in ['ascending', 'asc']:
@@ -1459,6 +1473,7 @@ def get_fund_information(fund, country, as_json=False):
root_ = fromstring(req.text)
path_ = root_.xpath("//div[contains(@class, 'overviewDataTable')]/div")
+
result = pd.DataFrame(columns=['Fund Name', 'Rating', '1-Year Change', 'Previous Close', 'Risk Rating',
'TTM Yield', 'ROE', 'Issuer', 'Turnover', 'ROA', 'Inception Date',
'Total Assets', 'Expenses', 'Min Investment', 'Market Cap', 'Category'])
diff --git a/setup.py b/setup.py
index 2ebe6994..842b3e79 100644
--- a/setup.py
+++ b/setup.py
@@ -14,10 +14,10 @@ def readme():
setup(
name='investpy',
- version='0.9.1',
+ version='0.9.2',
packages=find_packages(),
url='https://investpy.readthedocs.io/',
- download_url='https://github.com/alvarob96/investpy/archive/0.9.1.tar.gz',
+ download_url='https://github.com/alvarob96/investpy/archive/0.9.2.tar.gz',
license='MIT License',
author='Alvaro Bartolome',
author_email='alvarob96@usal.es',
@@ -31,7 +31,7 @@ def readme():
'requests>=2.22.0'],
data_files=[
('equities', ['investpy/resources/equities/equities.csv', 'investpy/resources/equities/equity_countries.csv']),
- ('funds', ['investpy/resources/funds/funds.csv']),
+ ('funds', ['investpy/resources/funds/funds.csv', 'investpy/resources/funds/fund_countries.csv']),
('etfs', ['investpy/resources/etfs/etfs.csv', 'investpy/resources/etfs/etf_countries.csv']),
('user_agents', ['investpy/resources/user_agent_list.txt'])
],