From idea to live trading, a framework.
Pablo Torre, Data Solutions Manager @FractalSoft Data Analysis
Friday, June 6, 2014
Hi guys, I wanted to share this framework that Im developing for the process of developing new trading strategies, starting from an idea or hypothesis.
It is work in progress and open to debate, criticism and contribution (the point of this post)
Due to limitations of space, I will post it in several parts.
Regards.
Introduction
==========================
This is a framework to go from any trading idea (or hypothesis) to a trading system, it is (by definition) work in progress and open to feedback and constructive criticism, since this is the only way to make it stronger.
This framework is built around the idea of building algo's based on a hypothesis about the market and how it behaves under a given set of conditions, I call this set of conditions an event.
The scope of this framework covers the process from the conception of the idea to the point where it is trading live.
The goal of each step in the framework is to prove the hypothesis wrong, or falsify it, once falsified we go back to the top adjust the hypothesis and start over. The idea behind this is that it is cheaper to discard a wrong idea earlier in the process.
The goal of this process of iterations is to make the hypothesis stronger based on the observations in the data.
The hypothesis is an attempt to describe a set of market conditions that provide a statistical edge, we will call this an event.
In order to describe the event, we speak of it in terms of the conditions leading to the event, or in terms of the conditions following the event.
1. Event defined in terms of its outcome.
In a very limited sense, the outcome of the event is known, but the conditions leading to the event are unknown. The outcome is known in the sense that we are able to use this description to label our historic data for instances of the event --using hindsight -- and to use these labels to train AI systems that will forecast the probability of the event given prior conditions that the AI will learn from the data.
But our knowledge of the event's outcome is limited to our ability to forecast it. This means that once we obtain a strong signal from the AI, we must treat the outcome of the event as unknown and study it as an event described in terms of its prior conditions, the prior condition being the AI's forecast.
2. Event defined in terms of its prior conditions.
When we describe the event in terms of its prior conditions, we are able to identify the event as it happens, and we must study the outcomes that may come from the event. The probability of the different possible outcomes and rules to follow in order to profit from the desired outcomes, while controlling the risk presented other probable outcomes.
We will follow these steps:
- We will first formulate the hypothesis on paper
- Train a system to forecast the event.
- Build the rules to handle the event's probable outcomes.