Yes and my answer already indicated that the logic in the strategy can be changed at any time, which is the reason to not vectorize. If you write a single-case backtester, fine, but that's not the general case as you yourself point out, as soon as the smallest of things deviates from the standard single-case.
When you have written something that supports all cases without using a loop, let me know.
The point stands: a fully *vectorized* approach is good for (basic) research, not for backtesting, which is what comes after the research.
You can add that the so called *vectorization* which most people refer as to using `pandas` and or `numpy` doesn't support `append`. Because copying the entire dataframe to add an extra row is not `appending`. You therefore need a fixed size from the start. Because the structures provided by both libraries are meant for research on known data and not meant, for example, for step-by-step (or event based) approaches with unknown data lengths or even ring buffers.
Both `numpy` and `pandas` are extremely useful in any case when performing research.
Right. We might be talking of the same thing but to be sure, the only case you cannot do column-wise operations is when the position depends on the previously taken position. "Single case" means something else to me, you can have many cases of entry and exit points and not require looping. The typical method of backtesting tends to be "if indicator X is above Y and time is less than T and previous position is FALSE". If you meant that at a row in data which cannot be predetermined the conditions change, then yes, of course looping is the only path.