Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
YAHOO and FETCH : comparing Q and Y for 12-mth rolling return

Hi,
This is a short script to add to the few posts that demonstrated how to use yahoo 'dividend and split adjusted' prices as data to be managed through Q to generate signals.

I have elected to take rate of return as the example, actually a 12-month rolling mean (I think it has value for an investor). It's also valuable for anyone calculating sharpe ratio for example.

I have plugged in 3 instruments for you to investigate: (1) with dividends only, (2) with split only and (3) without div and split ... and wrapped it with few lines to automate the creation of Yahoo url based on Q Symbol()

I'm looking forward to your conlcusions:

Nothing is perfect. For (2), BRK_B has only one split event ... and definitely see that it creates some issues around those dates, but the rest is fine. For (3), there are some punctual discrepancies which demonstrates the difference between Y and Q data. For (1) ... well it all depends on the period used for the rate of return but there is a big difference.

HTH