Building a MA Crossing Strategy and Backtesting with Backtrader and VectorBT

While on the road of learning algorithmic trading, backtesting provides a safe and efficient way to examine the performance of strategies. In this article, I would like to share my experience of testing a trend following strategy through different approaches. A smooth mean average(SMA) crossover strategy is implemented on the historical data of BTC-BUSD asset. The trading logic is when the fast line of price crossing the slow line of price from below, a buy signal is on. Vice versa, the sell signal is on when fast one crossing slow one from above. 10 day’s average price(sma10) is used as fast line, and 20 day’s average price(sma20) is for slow line. ...

July 2, 2022 · 3 min · Jia-Hau Ching