From the course: Algorithmic Trading and Finance Models with Python, R, and Stata Essential Training

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Financial data and Python

Financial data and Python

- [Instructor] While we've pulled in a significant amount of data into Python from a variety of different sources, most of the time we're going to need to make some sort of modifications to that data, in order to get the output that we are looking for. We may have to add new columns, calculate changes, or logs of particular variables, merge different data sets together. We're going to need to do something in most cases, though. Let's take a look at how we begin that process. I'm in the 02_05_Begin file, which is just a Jupiter Notebook file that imported Panda's data reader and date time, and then created a data set called aapl. Now what I want to do from here, is to go through and add a new column to our data set. And the idea is that maybe we're interested not necessarily in either the open, or close price for Apple, but maybe we're interested in the change in price for a particular day, and to do that I'm going to define the change, as being based on the open price versus the close…

Contents