Just when I thought things had settled down, two more major changes are now underway.
First, recent download problems of the price data have resulted in my being guided toward a better download solution, but one which will require me to once again rewrite a good portion of my download code. Hopefully this will be the last time I need to do so unless I have to later on switch to another vendor. The good thing is it will result in much faster price updates.
The bad thing is it has also underscored a critical mistake on my part. In an effort to cut down on math and processing, I thought it was a good idea to download adjusted prices, that is, prices that already take stock splits into account. However it’s recently been brought to my attention that in doing so, should any stock later on do a split, ALL my data for that stock will have been rendered incorrect, and thus useless, if I don’t retroactively update everything under that stock (including my code’s analyses).
Needless to say, I’m less than chuffed at this.
So I’ve stopped downloading and analyzing data for now while I rewrite my download and analysis code, yet again. I’ll have to go back to my previous method of handling stock splits on the fly, which unfortunately means I’ll have to re-download all my data. One thing I’ll do to save some time is to only re-download prices for stocks that haven’t split in the last two years (since I’m only working with 2 years’ worth of data). It just sucks that I’ll have to write a whole script just for that.
While I’m updating my analysis code I’ll also be working in a neat little tip I’ve come across on Instagram, the “rule of 72”, which is a quick an easy way to estimate how long it will take something to double in value. Simply take it’s yearly average gain (in percent), and divide 72 by it; that’s how many years it will take to double in value. So if you have a stock that has an average yearly gain of 10%, it will take roughly 7.2 years to double in value. While my program is intended for swing trading, I think taking a stock’s yearly gain into account would be a good parameter to include, especially if I look for stocks with an average of, say, 6% of more, which would generally mean a stock would see a 0.5% gain in a month. Might be interesting to see just how many stocks have such a yearly gain, might adjust the threshold depending on how many I find.Tags: ideas, insights, programming, progress, project, troubleshooting