Repository to share libraries and codes that aid in the Stock graphical analysis
Goal: This experiment demonstrates how to build "candle" charts of assets. For this, two finance libraries in phyton were used, tested in the "Jupyter-Notebook" environment, but if you prefer, you can replicate them in Colab.
[Reference]
01 - https://www.youtube.com/watch?v=FYqz26u-xiE https://stackoverflow.com/questions/60599812/how-can-i-customize-mplfinance-plot https://pypi.org/project/yfinance/
02 - https://www.youtube.com/watch?v=FYqz26u-xiE&authuser=0
-
First, at the terminal, you must clone the project (here we use the HTTP protocol, but if you prefer you can copy the project's SSH protocol link):
-
Second, you must install the following libraries in your python environment:
- yfinance
- mplfinance
- Third, in this step after installing the library, open your development tool in python and import the libraries:
import mplfinance as fplt;
import yfinance as yf;
- Fourth, here we import a paper history and save it in data variable, for example MGLU3:
dados = yf.download('MGLU3.SA', start = '2021-01-21', end = '2021-11-08')
In addition we can look at the data..
- Fifth, the generated data can be plotted using the mplfinance library.
fplt.plot(dados, type= 'candle',
style = 'charles',
title = 'Graficos de Candle da MGLU3, 2021',
ylabel = 'Preço (R$)')
You can check the result in the phi file provided. I hope you enjoyed!
Jackson T. Veiga
- CVLattes: http://lattes.cnpq.br/8939850014070884
- ORCID: https://orcid.org/0000-0003-3228-7352
- Github: @JTVeiga
- LinkedIn: @Jackson Tavares Veiga
Copyright © 2021 Jackson T. Veiga.
This project is Livre licensed.