Tuesday, March 20, 2012

A Quick Detour

The first part of trade automation that I am going to discuss is trade identification. As this involves both identification and a quick risk/reward analysis, before we get too far, I wanted to introduce a quick and dirty way to get a feel for targets and stops.

One very quick way to do this is to have pre-determined trading levels. For example, intra-day, we can use daily and weekly pivots. On longer-term timeframes, we can identify support and resistance levels on charts.

Using python, I quickly whipped up some support/resistance level using the most basic of algorithms. I defined support or resistance as that point where d(Price)/dt = 0, using close-only values to keep things simple. Other additions such as volume weighting, price binning, and intra-day movement can be added quickly to give better levels.

The results:

In the next post, I will use this simple chart to discuss risk/reward and trade identification for an automated trading system.

Thursday, March 1, 2012

On Automation: The First Steps

If you follow me on Stocktwits or twitter, you most likely know that I run a number of systems that generate my trades. These have produced excellent results over the past two years, and I am finally taking the inevitable step of automating them. As my work may help someone, I will blog about the process as I go through it.

I should start by saying that trading systems, especially automated ones,  are far from "silver bullets." All they do generate an "edge," similar to the edge casinos have built into their games. This is described by Mark Douglas in Trading in the Zone, and he delves into the concept far better than I have the ability to.


One of Douglas' little gems is that the nature of the edge is immaterial, so long as the edge is statistically valid. My personal experience watching traders of all types over the years has borne this out. Consequently, I will not discuss the specifics of my trading systems. Frankly, that is probably a good thing: the system is the least interesting part.

I will focus, instead, on the process of automation. As an overview, I will roughly consider the following categories over the next few posts:
  • Trade identification: Indicators, trend, other inputs such as market events
  • Trade execution: Entry, Target, Stop, Timeout, other details of how the rubber meets the road
  • Risk management: Asset allocation per trade, increasing/decreasing allocation, etc.
  • Implementation: Platform selection back-testing statistics, and other mundane matters
Due to my personal preferences, I have focused on trading options using these automated systems. However, I believe futures represent a preferable cost-structure (possibly at the cost of truly terrifying leverage), and so I will also discuss trading /ES and /TF.

I plan on keeping this as a higher-level discussion, and not devolve into a step-by-step how-to. As always, of course, I remain available to answer questions via twitter.