Well, I’ve finally gotten my program back on track, it seems. The house’s breaker box is now in order and thanks to exposure to someone with Covid-19, I’m now self-quarantining until I get my test results back, giving me extra time to work on the program since I’m not able to go to my day job until such time. Fantastic way to start off 2021.
I’ll keep this brief and short; the data problem with my source hasn’t quite been sorted out. Rather, I’m going to have to work within their limitations, which is not entirely their fault. One issue I was having with their daily price endpoint was that it wouldn’t give me all the stocks at once. This is due to the fact that they’re not all available at the same time, they get added in as the price becomes available and/or is verified (somehow). Meaning I’ll have to call the endpoint at least two or three times throughout the night, to collect the entire market’s EOD data.
Beyond that, I’ve squashed a couple tiny bugs that have surfaced, as well as added a new chunk of code that appears to be yielding much better results; now, I can’t say that’s the case across the board. It’s becoming evident to me that this system of analysis bears zero-sum results, that is, while results improve for some stocks, they get worse for others. I try to minimize that wherever I can, but I’ve resigned myself to knowing that will be the case and am thinking that may end up being what’s best, as it will weed out stocks that don’t play nice.
The new code I added adjusts my buying and selling score thresholds on the fly, based on performance. A stock that continually does poorly will make it tougher and tougher to buy later on, while a stock that has a success rate of 90% or better will make it easier (willing to take more risk). While not greatly improving monetary results, it is yield better per-trade results; for example, with Apple I was averaging a 66-75% success rate, I believe with around a 4-6% gain per trade (average). That was with 7-8 trades over the past 2 years. Now, even though it only finds 2 good trades in the past 2 years, those two trades average around 12% increase; so it’s more selective, but far more successful. Overall, the final portfolio value is only 1-2% higher than before, but hey, gains are gains.
I’ve spent the last 2-3 days re-running my script to save up to the last 10 days worth of results and am doing some ad-hoc paper trading based on those results. I should be caught up tomorrow so I can set up my cron jobs and hopefully start having the program run on its own, barring any more unforeseen problems.Tags: progress