Hi,
I was looking more closely at the details of the transactions of one of my algorithms, and I seem to find some discrepancies between the prices in the backtest and the prices obtained via the function get_prices() in the research environment. I take as an example the security 20208 (NASDAQ:FFIV). The algorithm whose backtest is attached just buys the stock at the open and sells it at the close, so that we can see what prices the backtest is using. In the attached notebook below, we see that the prices in the backtest transactions are around 60$, but the prices obtained from the get_prices() function are around 30$.
Comparing with the publicly available data, for instance Google Finance:
https://www.google.com/finance?chdnp=1&chdd=1&chds=1&chdv=1&chvs=maximized&chdeh=0&chfdeh=0&chdet=1481922000000&chddm=1464282&chls=IntervalBasedLine&q=NASDAQ:FFIV&ntsp=0&ei=9_VaWNHEGIqYsAHr3b_wAQ
we see that for the period of interest, at the beginning of 2006, the price of this stock was around 30$ (adjusted for splits), consistent with the data returned by the get_price function.
- So why is the backtest using a price of around 60?
- I can imagine that this is due to some adjustment for stock splitting, as there was indeed a 2 for 1 split in 2007:
https://www.splithistory.com/ffiv/ - But then is it intended that the backtest and research data are not consistent?
- How can I get price data consistent with the backtest data in the research environment?
Thanks and best regards,
Samuel Monnier