Building Your Own Trading Bot in F#
Automated Stock Trading among retail investors has seen a surge in recent times. The advantages of automation include eliminating emotions/bias, enabling fast executions, and allowing the possibility of backtesting ideas beforehand.
F# proves to be an excellent choice for building trading bots as it allows for the creation of functionally correct code. A bug in a bot can lead to significant financial losses. This presentation will provide instruction on building custom bots in F# using Interactive Brokers & Gemini.
The session will begin with the basic architecture of a reader thread ingesting real-time market feed via websocket into a thread-safe datastore, and a client thread that pulls data from the datastore to analyze and take action. The F# implementation of common strategies like Mean Revision strategy, momentum trading, Bollinger bands based trading strategies will be demonstrated.
The goal of the talk is to show how to create a trading bot in F# and demonstrate how easily various trading strategies can be translated into functionally correct code.