Hello everybody,
I want to share with you my first algo with an attempt of implementing machine learning. This algo isn't optimised, so its results aren't reliable. However, my intention is to improve it with your help.
Basically this algo is called "Predictron 1.0" because it uses the Perceptron class of machine learning (if you want to know more on Perceptron, just click on the following link: Perceptron on Wikipedia). Perceptron is used for classifying a trade in the two classes long and short: if Perceptron gives 1 as result, the trade will be classified as long; on the opposite, if it gives -1, the trade will be short. For achieving this result, Perceptron uses the results of 3 different strategies, each one of these gives a buy/sell signal alone; then the Perceptron "mixes" these 3 results for giving the final signal. Obviously, the final results of the Perceptron will be more reliable if the 3 inputs signals are as more efficient as possible.
My initial goal was to make this algo working. And now it does.
The next step is to find 3 strategies (or more, if necessary) that are more efficient than the ones that I'm already using, remembering that the new strategies have to produce only 2 kind of signals: buy or sell.
Another feature to improve is the "make_pipeline" function. In few words, we have to answer to the following question: given 3 strategies, which are the best stock we should use? Until now, as my 3 strategies aren't so efficient, I wrote a draft of the "make_pipeline" function. So, this is another feature to improve.
After these improvements, also the "my_assign_weights" function should be improved, in my opinion. Now it assigns equal weights to all the stocks, without considering any parameter.
I hope this algo will be useful for all the ones who read my post.