As I mentioned previously, I’m not an expert coder or programmer. I’m almost entirely self-taught, what I haven’t learned on my own I’ve learned via more experienced friends that I bug all the time. I use what I like to call “brute force” programming, that is, while I may be able to get my code to do some complex things, it’s by no means an elegant solution. IF/ELSE and FOR loops are my friends. Kind of “hit and miss” coding, a lot of “let’s see what this does”.
By the same token, my methodology on programming my stock market script is very much a lot of trial and error. More complex systems like those used by commercial stock market programs or high-frequency traders I’m sure use complex formulas and algorithms to make their decisions, whereas I’m merely looking for a more literal and particular set of conditions to be met, to determine what action to take. Perhaps technically we’re both trying to find the same thing, but I’m sure my way is more black & white than the experts’.
To that end, after updating my code to switch from conditional decision making to a score-based system, I’ve seen much better results for the most part; however the results all around are more extreme, while some stocks that were already doing well are doing better, other stocks that were doing poor are doing much worse. I started tweaking some things and the results were just all over the place, it didn’t seem to do better in any particular direction. So I’ve had to kind of deconstruct a good chunk of the main script and essentially start over on the decision-making portion.
But this time I’m being a bit more methodical. Rather than simply seeing stocks “mostly doing somewhat better” with each iteration of my program, I’m now keeping track of the results. It’s by no means scientific or thorough, but it gives me a starting point to work with. As you can see in the graphic, I’ve started with the most rudimentary metric, which direction the prices are going, and then build up from there. I’m quite pleased with the results so far. The stocks I’ve selected for now are based off this list I found online (“5 Most Consistent Stocks“), tomorrow I’ll be running through the 30 Dow Jones stocks to see if everything holds up, and I’ll continue to use that as my metric to see how well my code does against the DJIA.