A Review of Zorro for Systematic Trading

Posted on Apr 16, 2020 by Kris Longmore
3 comments
1,048 Views

One of the keys to running a successful systematic trading business is a relentless focus on high return-on-investment activities.

High ROI activities include:

  • Implementing new trading strategies within a proven framework. An example might be to implement a portfolio of pairs trades in the equity market.
  • Scaling existing strategies to new instruments or markets. For example, porting the pair trading setup to a different international equity market.
  • Well planned iterative research, set up in such a way that you can test and invalidate ideas quickly. This is the kind of research we show in our Bootcamps.

Low ROI activities include:

  • Large scale data mining exercises or any research that requires significant effort be expended before the idea can be invalidated.
  • Looking for unique alpha ideas when you could be implementing simple trades within a proven framework.
  • Building your own backtesting platform1
  • Building your own execution platform2

Of course, there’s room for fun and creativity in every business.

But, if you’re serious about trading, you want to prioritise the activities that are most effective and give yourself the maximum chance of return on your capital, time and expenses.

You want to Run it Like a Business.

Reviewing the Zorro Platform

Zorro is a tool that can level-up the productivity of a systematic trading operation.

Zorro is more than an automated trading platform. It is:

  • Professional grade backtesting software
  • An execution engine that supports multiple brokers and asset classes out of the box, as well as essentially any trading strategy you can dream up
  • A suite of analytical tools from the fields of statistics, machine learning, signal processing, optimisation and more
  • A collection of systematic trading utilities – tools for getting data from multiple sources, controlling other programs, building custom user-interfaces for individual strategies or portfolios, post-trade reporting/reconciliation/analysis

The breadth of Zorro’s feature list is astounding, and it continues to grow as the software is actively developed and supported.

How Zorro facilitates high ROI activities

If you’re starting out with systematic trading and looking for options for your technology stack, Zorro is one of the fastest and most efficient paths to sensible, serious automated trading for independent traders.

It allows you to focus on the things that lead to results – strategy development and analysis – without spending a lot of time and effort on low ROI activities. It helps you devote more time to the few vital tasks that affect your bottom line:

Zorro’s features

Zorro’s scripting language is very easy to pick up – complete beginners can be quite productive within days, coders with another language under their belts within hours.

It comes bundled with hundreds of pre-coded functions, including:

  • Mean-variance optimisation
  • Statistical functions (moments, covariance, correlation, regression etc)
  • Machine learning algorithms
  • The suite of technical analysis tools
  • Tools for producing random data, and shuffling, detrending and bootstrapping price curves
  • Trade-related functions for opening, closing and managing positions, even on a tick-by-tick basis

There are literally too many tools to list and they cover an incredible breadth of functionality – from algorithms that detect so-called support and resistance levels through to a function that even downloads and parses the Commitment of Traders report!

Zorro supports various approaches to parameter optimisation out of the box:

  • Walk-forward
  • Brute-force (that is, trying every possible combination)
  • Independent optimisation (optimises each parameter separately rather than trying every combination)
  • Genetic optimisation
  • Ability to optimise towards either single peaks or plateus of performance
  • Ability to optimise for any goal you can write in a function (for instance, maximising sharpe ratio)
  • Train on oversampled price data (shifts bar boundaries to generate new price curves derived from the original)

With Zorro you can also work with data from numerous sources directly within the software:

  • A broker
  • Any website via included HTTP functions
  • An FTP site via included FTP functions
  • Various web services directly via API (Qandl, Alpha Vantage, IEX, Stooq, Google, NxCore, Bittrex, CryptoCompare)
  • Local files – csv, text or binary

Zorro’s backtests are fast – really fast. A benchmark simple technical strategy backtested over ten years of one-minute price data took around 3 seconds with Zorro, while the same strategy on TradeStation took around 70 seconds, on MultiCharts around 155 seconds, and on MetaTrader’s backtester, around 110 seconds.

Zorro’s backtests are not only fast, they’re also very accurate. Simulation is suprisingly close to real trading, and the software is clear about the assumptions it makes, as well as the user’s ability to customise them.

It’s also easy to test simulation against reality – in fact, Zorro can simulate a strategy that’s been trading for a while to directly compare the simulated results to real performance.

Zorro also has some nice tools for debugging trading strategies. Debugging a trading strategy is the process of ensuring that your intended trade logic is actually borne out by the code that you write (as opposed to debugging code that doesn’t compile).

Using Zorro’s interactive charting window, you can replay your strategy on a bar-by-bar or trade-by-trade basis, reconciling it visually with your intended logic.

Here’s a short video that shows that feature in action

 

Zorro is also highly extensible (if its hundreds of out of the box tools weren’t enough for you). It can initialise and communicate with R and Python processes in order to leverage anything you write in those languages, or any package or library written for them, from within a Zorro script.

That makes Zorro very much not an all or nothing choice. Anything you like to do in Python or R, you can do in Zorro too.

Finally, there is little overhead to go from research to live trading. You can literally just click a different button on the Zorro interface to trade instead of simulate.

We typically add a bunch of implementation detail to our scripts – custom logging and reporting, sizing based on portfolio volatility targeting, automated data pulling from the broker to later check simulation vs reality, etc. But the ability to trade the same script that you used in your development process is a big win.

Out of the box, Zorro can trade via direct API connection with:

  • Interactive Brokers (through both TWS and Gateway)
  • IEX
  • Oanda
  • IG Markets
  • Dukascopy
  • AllyInvest
  • Sierra Chart
  • MT4/MT5 brokers (by directly controlling the MT4/MT5 platform)
  • Bittrex
  • Bitfinex
  • Binance
  • Coinigy

Zorro also supports multiple asset classes including equities, futures, options, foreign exchange and cryptocurrency.

Finally, Zorro can do a number of niche things that you just don’t see in typical trading software.

For instance, you can connect a single Zorro to up to 12 different brokers and attempt to arbitrage high-frequency discrepancies in their price feeds (this doesn’t happen often, but it can happen when brokers offer OTC products or make markets). You can even simulate such strategies using tick data obtained from the different brokers directly in Zorro.

Cost

Zorro is offered under an incredibly generous commercial model. There’s a free version which can do almost everything mentioned above (most notably, the free version won’t connect to all the listed brokers or data sources).

The free version of Zorro is limited to trading accounts capitalised up to $30,000 and has a profit limit of $7,000 in a year. If you make more than that, you’ll be prompted to upgrade to Zorro S (the commercial version) to continue using the software.

This strikes me as incredibly generous. The developers are essentially saying “Here, use our software as much as you like. You can start paying us if you make some actual money with it.”

Downsides

Of course, no trading platform is perfect, and each is limited in its own way. This is my take on Zorro’s limitations.

Firstly, Zorro is a backtesting and trading tool. And when you start thinking about a trading idea, there’s usually a lot of research you do before you get to the backtesing stage. For that higher level analysis – where we try to pick apart the core idea without resorting to trading rules – we need a different tool. My go-to tool for that sort of thing is R, but lots of people use Python or other things.

This is not a limitation of Zorro per se, but it does imply that Zorro alone isn’t going to represent your entire research and development stack. But it would be unreasonable to expect that of any tool.

Next, C-based languages are a bit old-school. On the one hand, people coming from high level interpreted languages (think Python, R) will find things like variable typing a quaint anachronism. And they might be horrified to work with pointers directly. But on the other hand, you could quite easily make the argument that you become a better programmer if you know a little C because it forces you to think about things that are abstracted from you in languages like Python and R.

In any event, Zorro’s C-based scripting language is about as simple as C gets, so I don’t think this is a big deal at all.

Probably the most important thing to think about when picking up Zorro is that Zorro makes it easy to do quite high-powered things at the outset.

Hang on. That doesn’t sound like a limitation at all.

I guess it’s not a limitation. But it can quite easily bring you unstuck.

For instance, if you’re a beginner and you pick up Zorro, the first thing you do is fire up Zorro’s optimisation engine and mine a price curve for patterns that worked in the past. And with Zorro, that’s incredibly easy to do. It’s literally half an hour’s work.

The danger with that is that it’s not really a very useful thing to start with. In fact, it’s almost guaranteed to send you into a spiral of chasing down random effects without ever really getting to a good, robust strategy.

The place you really want to start is with an understanding of the core effect your’re trying to harness. And Zorro isn’t really the right tool for that job. Sure, once you’ve understood the effect, Zorro is absolutely a good choice to design and test trading rules with which to harness it.

Said differently, it’s easy to abuse the tools that Zorro provides.

Conclusions

As an independent trader, your time is precious. You need to be using it as effectively as possible to do the things that make a difference to your bottom line. Those things are nearly always centred on researching and testing trading ideas.

Don’t fall into the trap of doing low ROI activities, like developing your own simulation tools, when they already exist. Someone else has solved this, and let’s be honest, has solved it better than you or I could ever dream of solving it. So leverage that. And focus instead on the things that bring dollars through the door of your trading operation.

At every step, ask how you can achieve your goals as quickly as possible. Choose a technology stack that pushes you towards that goal.

Zorro is a great choice as a backtesting and trading engine because:

  • It uses a simple scripting language
  • It has a huge array of included functions, ready to use out of the box
  • It can access data from multiple sources with just a few lines of code
  • It has a range of parameter optimisation and walk-forward tools
  • Its backtests are accurate and can easily be compared with real performance for assumption checking
  • You can visually debug strategy logic
  • It leverages popular languages like Python and R and their collection of libraries
  • You can go from backtesting to trading with a button click
  • A variety of brokers and asset classes are supported
  • Backtests are lightning fast
  • It has a generous commercial model

But with Zorro it’s useful to consider that with great power comes great responsibility. Zorro’s powerful optimisation, machine learning, and other tools make it very easy to fall into an inappropriate reliance on them. This is more than unhelpful – it’s potentially a death sentence for a trading operation.

We see beginners fall into this trap all the time. And who can blame them? Of course you’re going to reach for that genetic optimiser if all it takes to use it is two lines of code. And let’s be honest…every experienced systematic trader has done this at some point or another.

The good news is that we can show you how to harness these powerful tools into a smart research and development workflow that scales as you grow. In our upcoming Zero to Robot Master Bootcamp, we’ll teach you not only how to operate the software, but also how to use it wisely as part of a broader research and development effort. We’ll include extensive code examples, we’ll talk them through with you in our weekly webinars, and most importantly, we’ll place them within the context of a sensible research approach that forms the basis of our own trading operation.

(3) Comments

Bob
April 16, 2020 at 11:37 pm

There’s another huge downside to Zorro: It kinda sucks to keep a Zorro instance up-to-date and running reliably. There’s very limited automation of Zorro itself, no way to easily monitor it and very little in the way of performance monitoring (I’m not aware of a robust way other than connecting to the underlying account and looking at performance there)

May 25, 2020 at 3:48 pm

This is a good point Bob. There’s definitely an overhead to managing and monitoring a Zorro instance…although that’s very much par for the course in any automated trading system.

There is minimal performance reporting in Zorro out of the box – it writes a bunch of stuff to an HTML file that you can view in a browser. But we tend to write our own custom logging functions so that we can see the things that we think are interesting. Again, par for the course.

One of our Robot Wealth Pro members put together a framework for managing Zorro output via firebase which you might find helpful: https://github.com/phl3x0r/zorro-fire-log

May 5, 2020 at 6:34 pm

Zorro is cheap and good. Looking forward to the Zero to Robot Master bootcamp.

Leave a Comment