Algorithmic Trading: Backtest, Optimize & Automate in P