As I mentioned in my earlier post, there were several places where I could have taken one of a number of directions, but I chose just one and moved on. In this post I’m going to go over some of the other experiments I’ve performed since then.
Recall that I used a weighting factor, where the most recent date received a maximum weight (15), and the weight for each date prior to that was decremented by one per day. This choice of weights was arbitrary, so in this post I’m going to discuss the effect of choosing these weights differently.
The alternative weight schemes I’m going to cover are:
- Multiplying each weight by a constant for earlier dates
- Choosing a date other than the most recent one to have the maximum weight
- Use a constant weight for the most recent N dates, then multiply the weight by a factor for earlier dates
- Use a constant weight for the most recent N dates, and don’t use any earlier dates
I actually tested quite a few more, but so far these have the best results so I’ll only go over them.
This was the result of the original experiment that we’re trying to beat:
For the first experiment, the best result came from multiplying the weighting factor by 0.85 each day. So the most recent date was weighted 15, one day prior was 12.75, two days prior was 10.8375, etc. Here’s a graph of the results:
We’ll compare this directly to the earlier results later, but if you’re thinking it’s not much different, you’re right. There’s a slightly higher peak, but for the most part the results are very similar.
Moving on to the second experiment, choosing a date other than the most recent, it turns out that slightly better results are obtained by giving the largest weight to two days ago, rather than the most recent date:
For the third experiment, we’ll use the same maximum weight for the most recent three days, then apply a multiplication factor of 0.7 for each day prior to that:
Finally, for the fourth experiment, we’ll weight the four most recent days equally, and assign a zero weight to all days prior to that:
And now for the denouement, we’ll look at all five of them together:
The most surprising thing to me about the above graph is how consistent it is. I spent a lot of time tweaking each of these and kept just the one that did the best. And they each have pretty much the same distribution.
I’ll probably spend time looking for other ways to tweak this to see if I can find significantly better results, but it’s possible this is all the stock prediction information content there is in the combination of trading volume multiplied by percentage change.