Skip to content

Repository to share libraries and codes that aid in the Stock graphical analysis

Notifications You must be signed in to change notification settings

JTVeiga/Tools-for-plotting-Stock-exchange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Tools-for-plotting-Stock-exchange

Repository to share libraries and codes that aid in the Stock graphical analysis

How to build “candle” charts of stock exchange assets.

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

Get Started

  1. 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):

  2. Second, you must install the following libraries in your python environment:

Libraries used:

  • yfinance
  • mplfinance
  1. 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;
  1. 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..

  1. 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!

Author

Jackson T. Veiga

Give a like if this project helped you!

License

Copyright © 2021 Jackson T. Veiga.
This project is Livre licensed.

About

Repository to share libraries and codes that aid in the Stock graphical analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published