Financial plotting
There are situations where more raw values per time point are needed to understand a trend for prediction. The candlestick plot is a commonly used visualization in technical analysis in finance to show a price trend, most often seen in the stock market. To draw a candlestick plot, we can use the candlestick_ohlc API in the mpl_finance package.
mpl_finance can be downloaded from GitHub. After cloning the repository in the Python site-packages directory, call python3 setup.py install in the terminal to install it.
candlestick_ohlc() takes the input of a Pandas DataFrame with five columns: date in floating-point numbers, open, high, low, and close.
In our tutorial, we use the cryptocurrency market values as an example. Let's ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access