When you use vectorization - you apply operations to an entire array (or a large section of it) at a time, as opposed to 1 element at a time. Vectorization approach allows much faster calculations (compared to event-driven) using specifically-optimized libraries and tools (such as R, Matlab, etc..).
However, in order to use vectorization - you need a complete set of data / time series, which is obviously not available during real/live trading, where you get new data ticks one at a time. Therefore, for real/live trading you can only use event-driven approach (where an event is arrival of a new data tick or data bar..). Therefore, if you use vectorized code for backtesting - you cannot use the same code in real-live trading, while if you have event-driven code - you can. |