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 investimentos==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 investimentos

api_key = 'SUA_KEY'

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

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

# Plotar dados da ação
investimentos.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

investimentos_package-1.0.0.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.

investimentos_package-1.0.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file investimentos_package-1.0.0.tar.gz.

File metadata

  • Download URL: investimentos_package-1.0.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for investimentos_package-1.0.0.tar.gz
Algorithm Hash digest
SHA256 34e2218e1b01a6294a83568193d347f50039f4d0e03844140948563953dbee21
MD5 0ed7fa91d4dcbb73093ad186e4d26735
BLAKE2b-256 ea1a5e2a38755beb73cdd6d03d022f3b186512f4483602422e0ad7f08f077b7b

See more details on using hashes here.

File details

Details for the file investimentos_package-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for investimentos_package-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9767830c720e26ed68ec020d62e70f9cb3efb38a6729d16e1a5a6c24fcbb36bc
MD5 553cc24530214abde5685f2c6df6eb7e
BLAKE2b-256 666db60702ba44a9e5cc0fedac2bf2e46e8fb059f56c5fd369af60fb26558168

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