Python Plot yfinance Historical Candle Chart With mplfinance

November 2, 2020
import yfinance as yf
import mplfinance as mpf
import pprint

yticker = yf.Ticker("MSFT")
df = yticker.history(period="1y") # max, 1y, 3mo, etc

mpf.plot(df, type='candle', style='charles', volume=True)

mplfinance candle chart

NOTE: There are controls to zoom in on particular section of the chart

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.