Trading logic – this is where a small mistake may cost a fortune
Trading logic is obviously the core of the entire trading app. It is the very component that analyzes the market data in search of any pre-defined price-time patterns (sometimes other data such as volume and open interest is included, but this data is typically not available for the spot market) and generates orders. Almost all of the rest of the book will be dedicated to trading logic and various approaches to developing trading algorithms but we can’t really move on without considering one very typical mistake that already costs many traders millions, if not billions, of dollars. I mean the peek ahead issue.
The phenomenon of peeking ahead is specific to only the development phase of the project when the trading algorithm is optimized or trained using past market data, which is called historical data. As you remember from the previous section, historical data is something pre-recorded either by yourself...