Skewed returns and stock price of 0 cents
Author: eralbanese
Creation Date: 8/29/2020 7:55 PM
profile picture

eralbanese

#1
I am having a hard time with yahoo data. When I select sp500 or russell 1000 as my test index it always returns stocks with 0 cents and 1 cent with huge returns (50000%) skewing the numbers. Is this something known with yahoo? Is there a better data source to utilize?
profile picture

Eugene

#2
Something is misconfigured on your end.

* What symbol(s)?
* How is Symbol Info Manager configured?

To clarify, could you attach a screenshot by striking the "Print Screen" key and then pasting into Paint or other imaging application? Save as PNG and attach.
profile picture

eralbanese

#3
Eugene,

I am not using symbol info manager, just selecting the yahoo list on the left in the data set tab. I will link a screenshot shortly.

Additionally, I am putting in to purchase stocks greater than $3.00 but it is still selecting stocks smaller than that.

Code inside loop is:

CODE:
Please log in to see this code.


Thanks,
Eric
profile picture

eralbanese

#4
Here is an example
profile picture

Eugene

#5
Thanks for the screenshot. Indeed we can discard an issue with incorrect Symbol Info Mgr settings.

Look, Yahoo's UBX data only goes back to 03 May 2018. There can't be trades in 2011, 2014 etc. My first thought was that the symbol had a history of reverse splits that led to this but it didn't appear to have split even once.

So, this doesn't seem to me a problem of Yahoo data - rather a synchronization issue in your script. Please provide the complete code to demonstrate the anomaly.
profile picture

eralbanese

#6
Eugene,

Even if I just do a rule based (buy when up 1% sell when down 1%) simple code going back 25 years I get these same issues. It finds multiple stocks that either did not exist or the data doesn't go back far enough. Is there a simple piece of code or a parameter I am missing?

Thanks,
Eric
profile picture

Eugene

#7
Eric, in that case this can be a problem with the data (just not exactly of UBX). If you run a data validity check on this huge DataSet using the Data Tool, I'm sure it would discover a lot if issues in other stocks that would lead to a synchronization problem in WL.

If you're subscribed to Norgate Data then try it. Otherwise try a different, smaller DataSet. Does the problem persist on Nasdaq 100 or S&P 100 if you load 25 years of data?

P.S. The condition in post #3 should not be applied to historical backtests the way you're using it. Please refer to these topics for the whys and wherefores and a correct syntax:

Split and Dividend Adjusted Prices? (Custom cumulative dividend series)
Stock price greater than and smaller than
profile picture

eralbanese

#8
Thanks Eugene, where do I find the data validate tool?
profile picture

Eugene

#9
In the Extensions section ("Data tool"). But if you try to run it on Yahoo's DataSet of 3000 symbols the amount of errors will be overwhelming.
profile picture

eralbanese

#10
Thanks Eugene, I will try norgate but they only offer 2 years of data (trial). Should I try and use the wealth data? Is there a limit on how far I should look back? I want to try and test at least 15 years or so.
profile picture

Eugene

#11
Please follow suggestions on trying it on a different, smaller DataSet. Does the problem persist on Nasdaq 100 or S&P 100 if you load 25 years of data? Experiment with Yahoo data to reproduce the issue on a smaller DataSet and we'll try to determine what's gone wrong and how to fix it.
profile picture

eralbanese

#12
SP100 and Nas100 look good when I go back 25 years, except for the survivorship bias issue. Rus 1000 still has the issues.
profile picture

Eugene

#13
You might want to break the big DataSet into several to get to the bottom of it. That would be easier to analyze the Data Tool's output also.
profile picture

eralbanese

#14
Thanks Eugene, will do. I can’t seem to find that validate key. I added in the extension. Is it in the data manager?
profile picture

Eugene

#15
Yes, you're right. Please find it explained in the online manual: Data Tool
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).