O'Reilly logo

Mastering pandas for Finance by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Visualizing financial time-series data

One of the best ways to determine patterns and relationships in financial data is to create visualizations of the information. We will examine a number of common financial visualizations and how to create them before diving into the various analyses.

Plotting closing prices

The closing price of a stock can be easily plotted with matplotlib for either a single stock or multiple stocks on the same graph. We have already pulled down all the historical data for our stocks, so to visualize the closing prices, we will need to extract those values and pass and plot them with .plot().

Most of the examples will focus on the adjusted closing price instead of the close price as this takes into account splits and dividends ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required