Chapter 10. Automating Trading Operations
People worry that computers will get too smart and take over the world, but the real problem is that they’re too stupid and they’ve already taken over the world.
Pedro Domingos
“Now what?” you might think. The trading platform that allows one to retrieve historical data and streaming data is available. It allows one to place buy and sell orders and to check the account status. A number of different methods have been introduced in this book to derive algorithmic trading strategies by predicting the direction of market price movements. You may ask, “How, after all, can this all be put together to work in automated fashion?” This cannot be answered in any generality. However, this chapter addresses a number of topics that are important in this context. The chapter assumes that a single automated, algorithmic trading strategy is to be deployed. This simplifies, for example, aspects like capital and risk management.
The chapter covers the following topics. “Capital Management” discusses the Kelly criterion. Depending on the strategy characteristics and the trading capital available, the Kelly criterion helps with sizing the trades. To gain confidence in an algorithmic trading strategy, the strategy needs to be backtested thoroughly with regard to both performance and risk characteristics. “ML-Based Trading Strategy” backtests an example strategy based on a classification algorithm from machine learning (ML), as introduced in “Trading Strategies” ...
Get Python for Algorithmic Trading now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.