Back to Community
How to get closing price on a particular day for a company?

I'm trying to get the percent change in stock price for several companies over a year. I thought the easiest way to do this would be to just get the closing price on the start and end dates and run it through the pct_change function in Python. I have a pandas dataframe that has the start date (in year-month-day format) and tickers of the companies. What would be the best way to do this?

As a side note, is this basically what the Returns class in Zipline does? The documentation ( states it calculates percent change over a window_length using closing prices. I wanted to ask if it just calculates percent change between the start and end date or if it does something more complicated? Also, does the PercentChange class (same link) do the same thing as Returns, but just with the option of choosing something other than close prices (like high, low or opening prices instead)? Based on the code for these two functions, this seems to be the case, it looks like the maths is a simple percent change, but I just wanted to make sure they weren't taking into account any of the stock prices in the middle of the window_length in any way. Thanks!