Hello,

Is using the adjusted close price for a stock or ETF equivalent to using the close price and factoring in dividend payments and splits? In other words can I simply use adjusted close prices when backtesting a security?

Regards,
Mark

4 responses

I am also confused from adjusted close price. Quantopian provides data OHCLV but not Adjusted Close
factoring dividend payments and splits. The similar is official web of nasdaq but for example yahoo finance provides with Adjusted Close which differs.
How is real impact on live trading and which of data type use? I don't know another source as yahoo.
Can somebody elaborate on this topic?

First off, all of Quantopian's data IS adjusted for splits and dividends. The key to understanding any differences is to understand the adjustment as of date.

Pipeline data is always adjusted as of the pipeline date. This is not the date the pipeline was run but the date in the pipeline level 0 index. The pipeline date. So, if a pipeline is run over multiple dates then the data is adjusted separately for each date. The idea is that the data presented by a pipeline is the data one would have seen on that date. To prevent lookahead bias, data is never surfaced which wasn't know at the time. This includes future spits or dividends.

In research notebooks, one can also use methods like get_pricing. Using these methods, the prices are adjusted as of the end date. This allows a user to specify the adjustment date and therefore how much 'forward looking' information to include in an analysis. If we are looking at prices from 2010 do we want to adjust them based upon future dividends that will happen in 2020? Probably not.

Most online sources aren't flexible at all when adjusting their data. They adjust their data as of the current date. If one looks at Yahoo's adjusted prices on April 13, 2020 then the prices will be adjusted as of April 13, 2020. The prices will reflect all corporate actions (eg splits and dividends) through that date. If one were to run a backtest on April 13, 2020 the Quantopian data would match the Yahoo data. They would both be adjusted as of the same date.

The data from different sources will match as long as the adjustment dates match. In performing backtests and analysis, one never wants to include future data which may introduce lookahead bias. Therefore, it's best not to use data from sources like Yahoo to analyze how trades would have happened in the past. Those include future split and dividend information. Quantopian's backtest engine and pipeline are much better suited for analyzing past trading and strategies since they contain the data as one would have seen on that date. For current, live trading decisions, one would typically use data adjusted as of the current date. This is what sources like Yahoo provide and, by choosing the current date in either a backtest or get_pricing, is also what Quantopian provides.

There are a number of posts on this topic you may want to look at including these. The first includes a notebook with examples:
https://www.quantopian.com/posts/wrong-stock-price
https://www.quantopian.com/posts/usequitypricing-and-get-pricing-data-difference

There is also a Quantopian video series which covers corporate actions and price adjustments. Part 3 below deals specifically with adjustments.

Parts 1 and 2 cover what corporate actions are.

Hope that helps.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

They adjust their data as of the current date. If one looks at Yahoo's adjusted prices on April 13, 2020 then the prices will be adjusted as of April 13, 2020

I was looking AAPL stock as example the time period 2020-1-1', end_date='2020-2-6. The prices of quantopian are closer to 'close price' than 'Adj Close' yahoo financials. They differs also from 'close price' in average 0.3 \$. So I suppose that the adjusted prices didn't match here. April 13 is nothing meaningful date because 'Close' and 'Adj Close' are same on yahoo financials.

The Yahoo Open, High, Low and Close prices are adjusted for splits but not dividends. The Yahoo Adjusted Close additionally adjusts for dividends. This is a quirk of Yahoo. Furthermore, this also impacts their charting. Yahoo 'close' charts do not include dividends and therefore make stock returns, on stocks which pay dividends, look worse than they are.

In this case however, the reason the Quantopian Close and Yahoo Adjusted Close prices don't exactly match is because of which 'close' prices are included. Quantopian only includes trades which occur during market hours and are 'last traded prices'. The 'close' price which Quantopian uses is the last regular trade which occurred while the markets were open. However, other sources, such as Yahoo, use End Of Day (EOD) prices. There are some special trades which happen at market open and close which technically occur not while the market was open. Not all exchanges support these, but one can typically place an order before the open to execute 'at open' or an order to execute 'at close'. These types of orders don't go through the typical fill rules and are sometimes referred to as an 'auction'. (see https://www.investopedia.com/articles/investing/091113/auction-method-how-nyse-stock-prices-are-set.asp ). These executions may be marked at the open or close time but will typically also have a separate flag indicating open or close pricing. These are special executions and not included in the Quantopian 'last traded' data but are included in the Yahoo data. That is why the close, and sometimes the open, prices may vary. This is alluded to in the FAQ under "Why is your close price different from other data sources?" (https://www.quantopian.com/faq)