Integrating more pricing indicators

The candlestick plot in the current form is a bit bland. Traders would usually overlay stock indicators such as average true range (ATR), Bollinger band, commodity channel index (CCI), exponential moving average (EMA), moving average convergence divergence (MACD), relative strength index (RSI), and other various stats for technical analysis.

Stockstats (https://github.com/jealous/stockstats) is a great package for calculating the preceding indicators/stats and much more. It wraps around pandas DataFrames and generate that stats on the fly when they are accessed.

In this section, we can convert a pandas DataFrame to a stockstats DataFrame via stockstats.StockDataFrame.retype(). A plethora of stock indicators ...

Get Matplotlib for Python Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.