Generating profit by leveraging fluctuations
Generally, it's a combination of 2 and 3.
You can't predict that a stock will go up and down in cycles. Stock prices move randomly. Let's say you're looking at one stock, and it goes down so your algorithm buys some and waits for it to go back up. What happens if it never goes back up higher than it started as? Then you lost money.
Even worse: Even if it does go back to where it started with, you still lost money. Stocks have an overall upward trend, so you have to make more than a certain amount of money, or otherwise you would've been better off by just buying random stocks!
Why do stock prices move randomly? According to the &quot;Efficient Market Hypothesis&quot;, stocks move randomly because all non-random information is already being exploited by other people (point 3) until it stops being profitable to do so. Thousands of people might get a couple of cents each from the fluctuations.
When something has a regular fluctuation - like ice-cream prices perhaps - there's a reason. Maybe (hypothetically, if ice-cream prices fluctuated a lot) you could make money by buying ice-cream in winter and selling it in summer. You'd have to have a big refrigerated warehouse, and that would be a legitimate way to make money, it wouldn't just be a financial gain.