»Pandas for Fun and Profit: Using Pandas for Successful Investing.«
2019-06-04, 14:00–14:25, Hall 3

Pandas is easy and fun to use, so much so that even a Python newbie can use it. I tell the story of how, as a new Python developer, I quickly learned enough Pandas to be able test some hypotheses about financial markets.

During this talk, I tell the story of how, as a new Python developer, I quickly learned enough Pandas to be able test some hypotheses about financial markets. I will demonstrate how I formulated the hypothesis, developed a test plan, gathered data, and tested the hypothesis. Along the way, attendees will see common Pandas techniques for cleaning, converting and reshaping the data, generating new derived data, finding patterns / correlations, and visualizing data. After attending this talk, you may choose to use Pandas to test your own hypotheses for fun (and maybe profit).

The audience for this talk is any level Python developer with little to no experience with Pandas. Through this talk, attendees will learn what Pandas can do, and how it simplifies data analysis. Attendees will also learn how to apply a number of basic Pandas techniques for cleaning data, slicing data, setting and using indices, calculating new columns, merging data sets, generating statistics, and visualizing results.

Outline:

  • Introduction
  • The Hypothesis
    • Stock ownership and Earnings
    • The Price/Earnings ratio and what it means to analysts
    • Hypothesis: Low P/E represents a “bargain” -- How can we test this?
  • Pandas Basics
    • Series, Data Frame
    • Indexing, loc, iloc, slice
    • Utilities: read_csv, describe, apply, select, sort, transpose, merge, handling missing data
  • Testing Our Hypothesis: Preparing the Data
    • Introduction to the data
    • Cleaning the header; setting the indices
    • Converting Price, P/E, and Dividends
    • Converting Dates
    • Calculating the average and standard deviation of P/E values
    • Merging Dividend Data with the Price and P/E data
  • Testing Our Hypothesis: Calculations and Results
    • Calculating Total Return (for various periods) and generating new columns
    • P/E and Total Return Relationship
  • Conclusions
    • Pandas is fun and easy – even for a newbie.
    • Any data can be analyzed; the art is in gaining an understanding of the data and being creative in your approach to getting valuable information out of the data.