Tuesday 21 November 2017

The Math of Algo Trading

Changing focus from discretionary trading to algo trading requires a lot of work in order to maintain and increase earnings. However, I have a lot of help from the algos to do this.

A discretionary trader may have a daily profit target of, say, $1,000 trading the ES. This may be 6 trades a day of about $45 average trade per contract. In order to duplicate or exceed this $1,000 he would need to make a number of calculations. Below is the stats to an ES algo I am creating to day trade the ES using 3 minute data. It covers a 2 year period, closing trades at the end of the RTH session, slippage and commish of $28 R/T included.



The important things to look at is the average earnings per day, number of trades, how long a trade lasts and how often the algo is in a trade and drawdown. Algos will not usually trade as often as I expect so I need quite a few of them.

The traders risk tolerance per trade then also needs to be defined.

Lets say that the available capital of our hypothetical trader is $50,000.

From all this information the trader would put together a portfolio of at least 3 algos but hopefully 6 algos or more. Looking at the frequency that each algo trades, the goal will be to maximize the use of that $50,000 so that margin is always being used. With the portfolio trader functionality available in many of the trading platforms, the number of open positions can be controlled. Even if more signals are given, the portfolio trading capabilities can stop new signals if the stipulated margin or risk has been reached until positions have been closed by the algo in its normal course of business.

In this way, we can have algos working almost 24 x 5 using the same capital while limiting risk and smoothing the equity curve due to the diversification of using a portfolio of algos.

5 comments:

  1. Hi Tom. Is your portfolio of Algo's based around the 12 pictures you taught in the DVD's, or have you found some new patterns? thanks as always for your time in replying.

    ReplyDelete
    Replies
    1. Only some. I need many more algos than those setups could provide robustly so I use StrategyQuant to create them. SQ both creates algos by reverse engineering to my required outcomes as well as testing them for robustness which is probably more than 50% of the work. But beware, its not just pressing a button and cash comes out. There's a lot of know how in setting SQ up to produce the algos and then a process to test for robustness. I'll be posting on this.

      Delete
  2. JENRIQUE42:

    ME PARECE UN TEMA MUY INTERESANTE

    ReplyDelete
  3. Thanks for sharing this.

    A few questions:
    How many years in back data do you recommend?
    Do you leave your algos running during big economic releases? (i.e FOMC.)
    Do you still build algos for certain time periods (like the morning session)?

    ReplyDelete
    Replies
    1. Its not that simple. Creating the profile of what you want the results to be partly depends on how much data to use and periodicity. Yes, I trade through everything except Brexit and U.S. election type things as the test data traded through them. Yes, I do build algos for just mornings in, say, DAX.

      Delete