I've been investing in stocks, bonds, and options for around a decade. There is no guaranteed algorithm, although through the years I've seen a lot of people saying they had one (some were scammers, some were just hopeful).
The only guaranteed return you'll get is in fixed rate elements (bonds). If someone tells you that you will have a guaranteed return, and you are investing in variable rate instruments (stocks, currencies, options, etc.), it's a SCAM.
I've seen plenty of them, and I've seen a lot of people losing money with them. This is the stock market, don't be naive because you'll pay for it.