How can I go about applying machine learning algorithms to stock markets?There is a saying "Picking pennies up in front of steam rollers". You're doing the equivalent of selling an out-of-the-money put. In this case, you'll make tiny profits for years, then get totally cleaned out when the market melts down every 10 years or so. There is also an equivalent strategy that buys out-of-the-money puts: they lose money for years, then make a killing when the market melts down. See Talab's The Black Swan.