O'Reilly logo

Learning pandas - Second Edition 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

Historical Stock Price Analysis

In this final chapter, we will use pandas to perform various financial analyses of stock data obtained from Google Finance. This will also cover several topics in financial analysis. The emphasis will be on using pandas to derive practical time-series stock data and not on details of the financial theory. However, we will cover many useful topics and learn how easy it is to apply pandas to this domain and to others.

Specifically, in this chapter, we will progress through the following tasks:

  • Fetching and organizing stock data from Google Finance
  • Plotting time-series prices
  • Plotting volume-series data
  • Calculating simple daily percentage change
  • Calculating simple daily cumulative returns
  • Resampling data from ...

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