Skip to main content

Uma biblioteca para análise de investimentos

Project description

InvestPy

InvestPy é uma biblioteca Python para análise de investimentos. Ela permite obter dados de ações, calcular indicadores financeiros e visualizar gráficos de desempenho.

Funcionalidades

  • Obter dados históricos de ações usando a API do Alpha Vantage.
  • Calcular retorno diário das ações.
  • Visualizar gráficos de preços de fechamento das ações.

Requisitos

  • Python 3.7
  • pandas
  • matplotlib
  • requests
  • pytest

Configuração

Obtenha uma chave de API do Alpha Vantage e substitua 'your_api_key' pela sua chave de API nos exemplos abaixo.

Uso

Depois de importar a biblioteca com o comando pip install investimentpy==1.0.0 e já estiver com a sua KEY da Alpha Vantage, você pode criar um código como no exemplo a seguir:

import iinvestpy

api_key = 'SUA_KEY'

# Obter dados de ação
df = investpy.obter_dados_acao('AAPL', api_key)

# Calcular retorno diário
df = investpy.calcular_retorno_diario(df)

# Plotar dados da ação
investpy.plotar_dados_acao(df)

Resultado: resultado calculo retorno diario

Contribuindo

  1. Faça um fork do repositório
  2. Crie uma nova branch (git checkout -b feature/foobar)
  3. Commit suas mudanças (git commit -am 'Add some feature')
  4. Push para a branch (git push origin feature/foobar)
  5. Abra um Pull Request

Licença

Distribuído sob a licença MIT. Veja LICENSE para mais informações.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iinvestimentpy-1.0.2.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iinvestimentpy-1.0.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file iinvestimentpy-1.0.2.tar.gz.

File metadata

  • Download URL: iinvestimentpy-1.0.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for iinvestimentpy-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6563c49d9a2ae0be6381cf3b1285f6cbca72072f512126a399900131b725ddaf
MD5 39ef7d44b4ab3804a737deaacdc282ed
BLAKE2b-256 5155361dcfea5bfbe1c34892ff1e524044d20957055910278cc11afa34b6a727

See more details on using hashes here.

File details

Details for the file iinvestimentpy-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: iinvestimentpy-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for iinvestimentpy-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 14b5f6045ec149ada7fdb7a73ef438231cfb9100c63daeace56b13effcf6fc73
MD5 c53a1bc209cddafe6d88fa19918eb58c
BLAKE2b-256 7fc36296db206d9b0f08488cc6eb640f09d1739fbbda33778b5a9d8d800ea33e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page