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.6+
  • 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 investpy

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

investimentpy_vbrito-1.0.5.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

investimentpy_vbrito-1.0.5-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file investimentpy_vbrito-1.0.5.tar.gz.

File metadata

  • Download URL: investimentpy_vbrito-1.0.5.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for investimentpy_vbrito-1.0.5.tar.gz
Algorithm Hash digest
SHA256 cab261d87cbbfc520df7c0100d0d06dc0efb84f1400161ec6727fe09284a0b48
MD5 85dc17126e73712f33924c7dd8cce968
BLAKE2b-256 c7f63339c9332b0624147f2f2c7571a06f07812719c59ed3b76784a9baf1f76d

See more details on using hashes here.

File details

Details for the file investimentpy_vbrito-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for investimentpy_vbrito-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9e202df3a44af7438593ac00229b1f4dbcbc86e2ed503af788f36df2abe1ed67
MD5 652b6343966fdad984d3ae84bc6bb985
BLAKE2b-256 30e91560379a491042bf4e35486584d00759bd757ce4ff1f3c564fdbca24f29e

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