Wednesday, 15 November 2017

This is Why I Trade Using Algos Now!

I've written in the past about how the markets have evolved to an algo impacted environment.

The fact that over 60% and perhaps 80% of the volumes of active markets are generated by algos says to me that there are a majority of volume is generated by people who think that nowadays, trading using an algo is more profitable than any other means of trading.

I've been using algos since the early days of SystemWriter,TradeStation and other software back in the 1980s. I embraced algos more as the markets became automated and orders could be input through a computer.

However, it is only recently that the technology has moved ahead to make algo trading a more viable way of trading than discretionary trading.

The chart above is a good day trading one of my DAX algos. I say "one of" because it is important to trade a PORTFOLIO OF ALGOS rather than a single algo. The strength in algo trading is the smoothing of an up-sloping equity curve due to the number of algos in the portfolio.

There is no way I would have made the trades in the above chart had I been trading manually. I don't even have to know what the logic behind the trades were. What I did have to do was to put the algo through a series of about 7 ROBUSTNESS tests before I went live. This doesn't mean that the algo makes money every day because it doesn't. There are plenty of losing days but due to the robustness testing I am confident that a llong losing period is improbable but see my disclaimer.

More posts on the "how to algo" coming.

Thursday, 9 November 2017

Discretionary or Algo: The Choice!

One of my blog readers said:

As a discretionary executor of a systematic pattern (heuristic execution of a high probability pattern)in several markets, I look at these posts with both curiousness and gratefulness.

Curious because, i do not share your inclination towards algos as you do. And grateful because you present things in a lovely, simple and undramatic fashion.

Since 2008, while I have expected discretionary trading to die...something to the contrary has happened - not just to me but 3 other folks that I know of. Our trading, has remained as straightforward as pre - 2008, while remaining completely discretionary.

While patterns have surely changed, it doesn't seem to be less profitable....just different.

What you say is quite interesting to read though, once again thank you for your efforts in making these posts public. They are very illuminating and thoughtful.

I tend to agree. The markets are very different but can still be traded profitably if you know how.

BUT, and there is a big "but", you need to be in front of your workstation for hours to catch the trade(s) that suddenly appear. Markets trade more in swings separated by quieter periods so if you are not there and focused you can miss the trade of the day. Also, covering more than one market at a time is more difficult.

However, there is a better reason for trading algo: capital utilization. If someone has trading capital of, say, $50,000 and is trading as a discretionary trader, they may trade, say, the ES and risk $1,500 a trade. The number of contracts would be related to the risk.

As an algo trader with $50,000, I don't have to sit there, I can trade 23 hours a day but more importantly, I can trade 6 markets each risking $1,500 per trade as the metrics of the portfolio I am trading show me that due to that diversification, my risk allows that. Out of the 6 or 7 markets I will probably only have 2 trades open at the same time. In fact, I can design my algos with that in mind.

Yesterday, my flobot traded the DAX like this:

As you can see, this is quite active trading using 18 minute bars with relatively tight stops.

Wednesday, 8 November 2017

How I Create Algos that Make Me Money!

The question to ask is: " Do algos make money"? Nothing else matters. Either algos make money or they are just another computer game!

This post will show the steps I take to create a profitable algo. Subsequent posts will go on to talk about taking a number of algos and making them into a portfolio as I have indicated in a previous post.

My starting point is to download data for use in one of the applications that can mine the data and create automated trading algorithms without me needing to be a programmer. These programs can take the granular data and create bar sizes through which it sorts to find the optimum bar sizes.

Next, I take my algo creation program and configure it to find the results I want. It's like reverse engineering an algo. I specify the profitability, draw down, percentage profitability, profit factor and a host of other metrics. The Program then mines the data and come up with a few thousand algos from which to choose.

The chart above shows the results of one such equity curve from a data mining effort. The chart breaks the result into 3 sections. 60% of the data was used to train the algo - to find what is profitable. The second section is the result of testing that algo against data that was NOT used in training it. Finally, the third part of the chart shows what would have happened if I had then run that algo in the market.

I pick the equity curves that look the best. The one below is one of the best I've ever created.

The big issue with data mining is curve fitting. Curve fitting is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points

Looking at the metrics that the data mining application puts out allows me to avoid a lot of the curve fitting. I then also run a Monte Carlo Analysis that changes many of the metrics that a selected algo has output so that I can see whether it is too curve fitted and whether it is likely to be robust. The Monte Carlo analysis provides a report as below.

This alone could be enough. However, I also have a program that can do a FURTHER walk forward analysis. The picture below shows a set of results I like of that WFA.

The bottom lines of the chart above show the ongoing re optimization schedule.

As you can see, changing inputs and then looking at the results on unseen data afterwards shows that the algo was pretty robust and profitable. Of course there is an important disclaimer that you should read at the bottom of the blog page. However, my aspiration is that in live trading I achieve between 25% and 50% of the results shown.

Monday, 6 November 2017

Trading with Algos: Where to Start

The title of this blog post reflects the issue that most traders have if they have yet not started using algos to trade. I say "yet" because I believe the switch to algos from discretionary will become almost inevitable for most traders.

Having made such a bold statement, let me show why I believe it to be true.
  1. The markets are trading more in fits and bursts. The rhythms have changed. There are more periods of inactivity and this makes it harder to maintain focus. Easy to miss the trade of the day.
  2. Active periods can now be at anytime within the 24 hour clock. A trader doesn't and can't spend 24 hours at his workstation so as not to miss the trade of the day.
  3. A very high percentage of daily volumes of most active markets are generated by algos. Not only are other traders' algos your competition by they create the noise that makes it harder for a discretionary trader to trade.
  4. Different markets are active on different days. A trader needs to be watching a number of markets at the same time to catch the trades to make a living.
       ..........and the list goes on.

Getting back to the title of this blog post, where does one start?

If you are a coder, you can "think up" a trading system and code it. You need two skills for that: trader and coder. Not easy but doable over time. Lots of false starts and lots of time needed. Your choice here is whether to start from scratch or use a platform such as NinjaTrader, MultiCharts or the likes.

If you're not a coder then you have different options.
  • Are you an experienced trader that already has a system and can get it coded by someone for one of the platforms? This can be quite a difficult and expensive option. Firstly, defining the strategy for someone else is not that easy. Secondly, you are spending money on something that probably won't be profitable (I say this from experience). One good option here is to buy programs from Sharkindicators that alows a non coder to create a trading system. This is a viable solution if you have a trading system that you want to automate.
  • You have no idea of what a robust (going forward) strategy should be even though you can trade as a discretionary trader. The algo has rules not discretion. In this case you can either buy an algo that is commercially available or you can use one of the several applications available can create and test trading systems without you needing to know how to code. I'll post soon on this topic as its a big one.

Saturday, 28 October 2017

Blog is 8 Years Old

This blog is now 8 years old.

Looking back, nothing has changed and everything has changed.

The "nothing has changed" is that the markets are still a challenge for most people to trade profitably.

The "everything has changed" is a lot.

Firstly, we have had the pits disappear. Then we had the electronic traders take over and we began trader to trader rather than trader to local and then local to trader. The next evolution was algo traders including HFTs.

We now find that the markets are probably 80% to 90% traded by algorithms in some way or another as far as volume is concerned.

I'll say it again: 80% to 90% of volume is generated in some way by algorithms.

The question we need to ask ourselves is who is making the money out of trading. Is it most of the algorithms or is it to relatively few discretionary or partly rule based manual traders?

Lets look at another phenomenon. The markets are now more "barbell like" than ever before. I rely a lot on the more recent work of Peter Steidlmayer of Market Profile fame for these conclusions. Let me explain.
The areas of accumulation and of distribution are the higher volume areas. While this has always been the case, the "distance" between these higher volume nodes has reduced considerably. This is due to the fact that volume data is available "live" as it happens and the algos can read that volume. This enables the algos to react to smaller and smaller profits and losses.

Another thing worth mentioning is that volatility changes happen differently to the way they did before, both intra day and inter day.

Another idiosyncrasy is that there are periods when the algos "rest" - the market becomes quieter with lower volumes. Then, suddenly, activity comes back and there is a sudden move.This likely because the algos have decided that there are open positions that they can take advantage of with their particular strategy.  

Subsequent posts will talk about how I fit into the way the markets are now.

Wednesday, 25 October 2017

A Murder of Crows

A Murder of Crows is what a flock of crows is called. I trade a portfolio of algorithms and have been looking for a name to describe such a portfolio. In fact, I have more than just one portfolio of algorithms.

Why do I trade portfolios of algorithms you ask. Well. look at the pic below:

This is Market System Analyzer from Adatrade. The graph shows a combination of the day by day P&L of one of the portfolios. The portfolio is comprised of 18 different markets. By trading the 18 different algos as a portfolio I smooth out the equity curve and better utilize my capital.

Not all algos are in a position at the same time. By a more calculated use of capital my annual return is much, much higher. Maximize profits and minimize drawdowns.

The above porfolio is constructed on daily data. I have others based on intra day data.

Portfolios can be constructed on as few as 3 markets although I must say, "the more markets the better".

Saturday, 14 October 2017

The Times They Are aChanging, Still!

Bob Dylan said it in the 1960s. 

And the times are still changing as people are using technology more and more and in more innovative ways. It has been estimated that algo driven activity is responsible for 80% or more of current volumes.

From the feedback I'm getting from past and present students, markets now are more difficult to trade than ever. Traders need to adapt to markets day by day as they evolve.

And this has not been happening enough.

Having repeated that markets are driven by order flow ad nauseum since 2009 when this blog started, I am amazed every day that order flow is still the most misunderstood activity in the market place. This is perhaps because context is being ignore.

Different order flow activity means different things in different contexts.

I have been asked to create a new course focusing on trading the markets in this new and continually changing environment. I've started working on this but have not decided whether to just present it in this blog or to deliver it in a series of workshops online.

There are two NinjaTrader8 charts below. The first one is a bar chart that shows what is happening with the order flow and second one is a Market Profile and Volume Profile chart. This is all that is needed to trade successfully if you have a valid trading plan.

I have drawn attention to the arrows that have been programmed to give me order flow information. One can see the swing up, the stall and the push back down. This is repeated continually on different scales and periodicities as the auction process is played out.