investpy.technical

investpy.technical.moving_averages(name, country, product_type, interval='daily')

This function retrieves the moving averages values calculated by Investing.com for every financial product available (stocks, funds, etfs, indices, currency crosses, bonds, certificates and commodities) for different time intervals. So on, the user must provide the product_type name and the name of the product (unless product_type is ‘stock’ which name value will be the stock’s symbol) and the country if required (mandatory unless product_type is either ‘currency_cross’ or ‘commodity’, where it must be None). Additionally, the interval can be specified which defines the update frequency of the calculations of the moving averages (both simple and exponential). Note that the specified interval is not the moving average’s interval, since all the available time frames used on the calculation of the moving averages are retrieved.

Parameters
  • name (str) – name of the product to retrieve the moving averages table from (if product_type is stock, its value must be the stock’s symbol not the name).

  • country (str) – country name of the introduced product if applicable (if product_type is either currency_cross or commodity this parameter should be None, unless it can be specified just for commodity product_type).

  • product_type (str) – identifier of the introduced product, available ones are: stock, fund, etf, index, currency_cross, bond, certificate and commodity.

  • interval (str) – time interval of the resulting calculations, available values are: 5mins, 15mins, 30mins, 1hour, 5hours, daily, weekly and monthly.

Returns

The resulting pandas.DataFrame contains the table with the results of the calculation of the moving averages made by Investing.com for the introduced financial product. So on, if the retrieval process succeed its result will look like:

 period | sma_value | sma_signal | ema_value | ema_signal
--------|-----------|------------|-----------|------------
 xxxxxx | xxxxxxxxx | xxxxxxxxxx | xxxxxxxxx | xxxxxxxxxx

Return type

pandas.DataFrame - moving_averages

Raises
  • ValueError – raised if any of the introduced parameters is not valid or errored.

  • ConnectionError – raised if the connection to Investing.com errored or could not be established.

Examples

>>> data = investpy.moving_averages(name='bbva', country='spain', product_type='stock', interval='daily')
>>> data.head()
  period  sma_value sma_signal  ema_value ema_signal
0      5      4.615        buy      4.650        buy
1     10      4.675       sell      4.693       sell
2     20      4.817       sell      4.763       sell
3     50      4.859       sell      4.825       sell
4    100      4.809       sell      4.830       sell
5    200      4.822       sell      4.867       sell
investpy.technical.pivot_points(name, country, product_type, interval='daily')

This function retrieves the pivot points values calculated by Investing.com for every financial product available (stocks, funds, etfs, indices, currency crosses, bonds, certificates and commodities) for different time intervals. Pivot points are calculated on different levels: three support levels (S) and three resistance ones (R). So on, the user must provide the product_type name and the name of the product (unless product_type is ‘stock’ which name value will be the stock’s symbol) and the country if required (mandatory unless product_type is either ‘currency_cross’ or ‘commodity’, where it must be None). Additionally, the interval can be specified which defines the update frequency of the calculations of the technical indicators (mainly momentum indicators).

Parameters
  • name (str) – name of the product to retrieve the technical indicators table from (if product_type is stock, its value must be the stock’s symbol not the name).

  • country (str) – country name of the introduced product if applicable (if product_type is either currency_cross or commodity this parameter should be None, unless it can be specified just for commodity product_type).

  • product_type (str) – identifier of the introduced product, available ones are: stock, fund, etf, index, currency_cross, bond, certificate and commodity.

  • interval (str) – time interval of the resulting calculations, available values are: 5mins, 15mins, 30mins, 1hour, 5hours, daily, weekly and monthly.

Returns

The resulting pandas.DataFrame contains the table with the results of the calculation of the pivot points made by Investing.com for the introduced financial product. So on, if the retrieval process succeed its result will look like:

 name | s3 | s2 | s1 | pivot_points | r1 | r2 | r3
------|----|----|----|--------------|----|----|----
 xxxx | xx | xx | xx | xxxxxxxxxxxx | xx | xx | xx

Return type

pandas.DataFrame - pivot_points

Raises
  • ValueError – raised if any of the introduced parameters is not valid or errored.

  • ConnectionError – raised if the connection to Investing.com errored or could not be established.

Examples

>>> data = investpy.pivot_points(name='bbva', country='spain', product_type='stock', interval='daily')
>>> data.head()
        name     s3     s2     s1  pivot_points     r1     r2     r3
0    Classic  4.537  4.573  4.620         4.656  4.703  4.739  4.786
1  Fibonacci  4.573  4.605  4.624         4.656  4.688  4.707  4.739
2  Camarilla  4.645  4.653  4.660         4.656  4.676  4.683  4.691
3   Woodie's  4.543  4.576  4.626         4.659  4.709  4.742  4.792
4   DeMark's    NaN    NaN  4.639         4.665  4.721    NaN    NaN
investpy.technical.technical_indicators(name, country, product_type, interval='daily')

This function retrieves the technical indicators values calculated by Investing.com for every financial product available (stocks, funds, etfs, indices, currency crosses, bonds, certificates and commodities) for different time intervals. So on, the user must provide the product_type name and the name of the product (unless product_type is ‘stock’ which name value will be the stock’s symbol) and the country if required (mandatory unless product_type is either ‘currency_cross’ or ‘commodity’, where it must be None). Additionally, the interval can be specified which defines the update frequency of the calculations of the technical indicators (mainly momentum indicators).

Parameters
  • name (str) – name of the product to retrieve the technical indicators table from (if product_type is stock, its value must be the stock’s symbol not the name).

  • country (str) – country name of the introduced product if applicable (if product_type is either currency_cross or commodity this parameter should be None, unless it can be specified just for commodity product_type).

  • product_type (str) – identifier of the introduced product, available ones are: stock, fund, etf, index, currency_cross, bond, certificate and commodity.

  • interval (str) – time interval of the resulting calculations, available values are: 5mins, 15mins, 30mins, 1hour, 5hours, daily, weekly and monthly.

Returns

The resulting pandas.DataFrame contains the table with the results of the calculation of the technical indicators made by Investing.com for the introduced financial product. So on, if the retrieval process succeed its result will look like:

 technical_indicator | value | signal
---------------------|-------|--------
 xxxxxxxxxxxxxxxxxxx | xxxxx | xxxxxx

Return type

pandas.DataFrame - technical_indicators

Raises
  • ValueError – raised if any of the introduced parameters is not valid or errored.

  • ConnectionError – raised if the connection to Investing.com errored or could not be established.

Examples

>>> data = investpy.technical_indicators(name='bbva', country='spain', product_type='stock', interval='daily')
>>> data.head()
    technical_indicator    value           signal
0               RSI(14)  39.1500             sell
1            STOCH(9,6)  33.2340             sell
2          STOCHRSI(14)  67.7390              buy
3           MACD(12,26)  -0.0740             sell
4               ADX(14)  55.1150             sell
5           Williams %R -66.6670             sell
6               CCI(14) -77.1409             sell
7               ATR(14)   0.0939  less_volatility
8        Highs/Lows(14)  -0.0199             sell
9   Ultimate Oscillator  43.0010             sell
10                  ROC  -6.6240             sell
11  Bull/Bear Power(13)  -0.1590             sell