Algorithmic Trading Using Python
How to backtest Trading Strategies using Python feat. Moving Averages.
Leverage historical data for backtesting the MA crossover trading strategy.
Published in
7 min readFeb 15, 2021
- Imagine a computer program continuously monitoring markets and executing profitable trades on your behalf without any manual intervention. Sounds exciting but way riskier, doesn’t it?
- The idea sounds risky because of the uncertainty associated with automated decision-making.
- The goal of this blog post is to demystify algorithmic trading by piggybacking on historical data to help us make an informed decision.
- Algorithmic Trading is the use of predefined conditions for entering and exiting trades when the markets are in session. These predefined conditions are also known as trading strategies.
- A strategy can be defined using an IFTTT (If This Then That) rule or by leveraging fancy ML algorithms predicting the price action for a given ticker.
- The internet is flooded with trading strategies that promise handsome returns.
- However, I personally, am a cautious trader and a big believer of the quote “In God we trust, All Others Must Bring Data”, by W Edwards Deming.
- One way to enter a trade with higher confidence is to leverage the concept of backtesting.
- Backtesting, in general, is a method for…