Split adjustment for Fidelity data like in Yahoo
Author: kelvinyip
Creation Date: 10/7/2019 12:17 AM
profile picture

kelvinyip

#1
For VXX using fidelity's daily data, I see that there are a few stock reverse splits like 11/8/2013. I want my prices adjusted for splits during backtesting. I used to use yahoo data and the adj is done by data manager checkbox. What do I do (function call) to make the same adj in fidelity data ?
profile picture

Eugene

#2
profile picture

Cone

#3
Since it's unlikely that you'd really want to test with non-split data anyway (that would wreak havoc on most indicators), here's the way to go about it, as shown in the links above.

CODE:
Please log in to see this code.
profile picture

kelvinyip

#4
yeah it works. thanks
profile picture

Cone

#5
I made a mistake above that is now corrected:

CODE:
Please log in to see this code.
So the idea is to use the pre-split "C" series as a filter only. Your trading rules should still operate on the base series.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).