“investing” is speculating. Any bet on a future outcome is essentially gambling as no one knows the future. The trick is to attempt some kind of analysis that will increase the odds of any given bet being worth more in the future than when you made it. But just as important is preserving capital against loss. So these things need to be managed in concert.
If one studies the history of markets, it becomes obvious that timing is everything. Cycles and historic behavior can be very helpful at helping to increase one’s odds of making a successful bet. Knowing when to cut losses is critical as well. The books from Livermore, Barauch and O’Neil exemplify how very successful “investors” have achieved their goals in both the short and long run.