<jupyter_start><jupyter_text>01 - Python Finance**Capitulo 01**: Baixar as cotações de ações e do ÍNDICE BOVESPA do Yahoo Finance, para usar em análise de investimentos e trade utilizando Python através o Google Colab.> *O Google Colab é uma ferramenta para Data Science que roda nos servidores do Google.*  BibliotecasInstalando o YFinance<jupyter_code>!pip install yfinance --upgrade --no-cache-dir<jupyter_output>Collecting yfinance
  Downloading https://files.pythonhosted.org/packages/7a/e8/b9d7104d3a4bf39924799067592d9e59119fcfc900a425a12e80a3123ec8/yfinance-0.1.55.tar.gz
Requirement already satisfied, skipping upgrade: pandas>=0.24 in /usr/local/lib/python3.7/dist-packages (from yfinance) (1.1.5)
Requirement already satisfied, skipping upgrade: numpy>=1.15 in /usr/local/lib/python3.7/dist-packages (from yfinance) (1.19.5)
Requirement already satisfied, skipping upgrade: requests>=2.20 in /usr/local/lib/python3.7/dist-packages (from yfinance) (2.23.0)
Requirement already satisfied, skipping upgrade: multitasking>=0.0.7 in /usr/local/lib/python3.7/dist-packages (from yfinance) (0.0.9)
Collecting lxml>=4.5.1
[?25l  Downloading https://files.pythonhosted.org/packages/cf/4d/6537313bf58fe22b508f08cf3eb86b29b6f9edf68e00454224539421073b/lxml-4.6.3-cp37-cp37m-manylinux1_x86_64.whl (5.5MB)
[K     |████████████████████████████████| 5.5MB 6.9MB/s 
[?25hRequirement already satisfied, skipping upgrade:[...]<jupyter_text>Importando as Bibliotecas<jupyter_code>import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import pandas_datareader.data as web<jupyter_output><empty_output><jupyter_text>Importando o YFinance e sobrescrevendo os métodos do pandas_datareader<jupyter_code>import yfinance as yf
yf.pdr_override()<jupyter_output><empty_output><jupyter_text>Obtendo os dados do mercadoBaixando as cotações do Yahoo Finance para o Índice Bovespa<jupyter_code>ibov = web.get_data_yahoo('^BVSP')<jupyter_output>[*********************100%***********************]  1 of 1 completed<jupyter_text>Exibindo as cotações mais antigas<jupyter_code>ibov.head()<jupyter_output><empty_output><jupyter_text>Exibindo as cotações mais recentes<jupyter_code>ibov.tail()<jupyter_output><empty_output><jupyter_text>Plotando o gráfico com o preços de abertura do Índice Bovespa<jupyter_code>ibov["Open"].plot(figsize=(22,8));<jupyter_output><empty_output><jupyter_text>Plotando o gráfico com o preços de fechamento do Índice Bovespa<jupyter_code>ibov["Close"].plot(figsize=(22,8));<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13232963549920762, 'fraction_numerical': 0.06537242472266244, 'mean_word_length': 7.473154362416107, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 37, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '325149', 'license': 'MIT', 'n_tokens_mistral': 1072, 'n_tokens_neox': 972, 'n_words': 188, 'path': '01_Python_Finance.ipynb', 'repo_name': 'devscie/PythonFinance', 'size': '2524'}