11 Algorithmic trading
This chapter covers
- Quantitative analysis
- Testing strategies using backtesting
- Catalysts as game changers
- The difference between exchanges and brokers
- Executing orders with Python
- Order types and modalities
After mastering technical analysis with charts, this chapter introduces algorithms for trading strategies, transforming raw insights into actions. This step is the culmination of everything we've covered: collecting data, analyzing ratios and charts, assessing risks, and integrating ML and LLMs. We’ll bring it all together and outline scenarios for applying it.
Various scenarios affect trading strategies. Some algorithms perform better in bull markets than bear markets or vice versa. Catalysts are specific moments that signal more volatility in the market, which can be an opportunity or risk. We will review catalysts from a trading perspective.
In the third part of this chapter, we'll demonstrate how to place orders programmatically using Interactive Brokers and Alpaca. We'll explore different order types, parameters, and their implications, learning how to apply them effectively.