Yup, it can take weeks to months to iron out flaws and fine tune an algo.Holy crap is this right! I started an online "learn to code in a few months" course hoping to learn some crude python skills to write some simple algos with like 5-10 "if" and similar conditions with different combos of those conditions to backtest and mostly fool around with it. Good gravy Batman was that miserable, debugging and trying to figure why the simplest stuff to me was so hard and awkward to try to tell a computer to do etc. etc. etc.
Never seems to end, always a new idea comes along to either improve or change the formula or fix an error.
It's a maths nerd's paradise.