The Z systems are prefabricated portfolio strategies based on the workshops (not included in some Zorro versions for US clients). To avoid misunderstandings: they should not be the main reason of using Zorro - better learn strategy development and trade your own systems instead. Doing it yourself has many advantages. First, you can adapt your systems exactly to your capital and risk requirements. Second, you know precisely what they do and why, which lets you face drawdowns with greater confidence. Third, you can permanently work on and improve the algorithms. Fourth, you can not blame us for losses. And fifth, when you develop a good system and make it available to the community, you can get a free Zorro S license and earn more money.
Since strategy development is not trivial - otherwise there would be some more working systems around - we've included several ready-to-run strategies, based on the workshops in the tutorial. Keep in mind that all those systems are simple and use no money management and no complex filter, trailing, or exit algorithms. So any of them has probably room for improvement. But you can use them for already earning some trading income until you've learned to stand on your own feet. And they really work, other than the countless 'robots' or 'EAs' offered on countless websites.
The Z systems cover a range of trade methods, win rates, and budgets:
|Traded assets||EUR, CHF, GBP,
AUD, CAD, JPY, USD,
DJI, DAX, UK,
|EUR, CHF, GBP,
AUD, CAD, JPY, USD,
DJI, DAX, UK,
Silver, DJI, S&P500
|EUR, CHF, GBP,
AUD, CAD, JPY, USD,
DJI, DAX, UK,
|Trade method||Trend following||Mean reversion||Breakout||Price patterns||Portfolio rotation||Anticorrelation|
|Trade algorithm||Spectral filters||Spectral filters||Cluster detection||Machine learning||MV Optimization||Spectral filters|
|Bar period||4 hours||4 hours||1 day||1 hour||1 day||4 hours|
|Avg trade duration||7 days||3 days||2 weeks||5 hours||6 months||7 days|
|Re-train every||4 months||4 months||6 months||3 months||rebalance monthly||4 months|
|Worst drawdown||9 months||7 months||12 months||6 months||4 months||6 months|
|Required capital||~1000 $||~1800 $||~1000 $||~900 $||~1200 $||~2000 $|
|Monthly profit||~70 $||~200 $||~100 $||~80 $||~30 $||~300 $|
|Trades per year||~300||~400||~25||~1600||~55||~700|
The Z systems will not start right away. First you need to download historical data for testing them. So when you complain on the user forum that "the system gives a missing history error when I start it", we will know that you have not read the manual! For trading them, you might also need to rename or exclude assets that are not provided by your broker. Training the Z systems is normally neither required nor recommended, since we provide updated parameters with any Zorro update. Make sure to read this page from top to bottom, and read also the income chapter before using a Z system. All systems - maybe with exception of Z8 - can cause a total loss of the invested capital. And all of them have long drawdown periods as you can see in the table above. You're more likely to start in a drawdown period than not. Do not invest what you can't afford to lose.
By clicking [Test], the system is walk forward analyzed for experimenting with different slider and parameter settings and different broker accounts. For keeping the Zorro installation size small, not all needed historic price data files are included in the setup file. Load the additional data with the Download script or from the Zorro download page. The Z systems normally need historical price data from 2009, Z7 also needs currency data from 2002. Your test results can differ from the figures above. Broker accounts with higher lot amounts, margins, and commissions can produce very different results.
Not all brokers offer all assets traded by the Z systems. If a certain asset is not available, remove it from the strategy as described below. If it is available, but under a different symbol, edit the asset list and enter its symbol name. US citizens are normally not allowed to trade CFDs; in that case set the FXOnly flag (see below) for trading Forex only.
The performance figures and equity curves are from a walk-forward analysis on a simulated FXCM microlot account at 100:1 leverage, with all sliders at their default values. Early versions of the systems had been in live trading since 2012 (in case of Z1, since October 2011); the results so far had been consistent with the simulation. All systems except Z3 and Z8 have been trained with oversampling and are thus very robust against price curve noise. Note that all performance parameters are broker and leverage dependent; lower leverage leads to higher capital requirement, a reduced number of trades and lower annual returns.
The Z strategies are not available in script. They are compiled executables (*.x) only. This is not due to some secret trade algorithm - the algorithms are described in the workshops, so any Zorro user can write such strategies himself after finishing the tutorial. But if we published the script code, anyone could precisely predict when the strategies buy and when they sell. It would then be possible to prey on Z system users with fore-running methods. For the same reason, some of the strategies contain a random element that makes it hard to predict their trading behavior. This random element has only a small effect on the strategy performance, but it ensures that many people can trade the strategies without hampering each other. It is technically impossible to reverse engineer compiled Zorro strategies for determining their code.
Due to the profit limit, the free Zorro license allows to trade only one system - either one of the Z strategies or a system of your own - on a real money account. Z1, Z2, and Z8 are included in the free Zorro version. The other systems are included as demo versions; the versions for real money trading are included in Zorro S or separately available for a subscription fee on the download page.
The Z systems do not automatically reinvest profits. The trade size can be manually controlled with a slider and is unrelated to the account balance. OptimalF factors are used by some systems for distributing the capital among the components, but not for reinvesting. If you want to reinvest your profits, manually increase the Margin slider from time to time proportionally to the square root of the profit accumulated so far.
Z1 trades a portfolio of trend following algorithms with currencies, commodities, and indices. The algorithms are variants of the lowpass filter trend trading system from Workshop 4. They are self-adapting to the market within certain boundaries, and can detect unprofitable market periods. OptimalF factors are used for distributing the capital among the components. Trade exits are handled by TMFs. All trades have rather tight stop loss limits and no profit targets. Some of the algorithms control the trade duration by moving the stop loss; this can cause the stop to move in both directions.
The equity curve above is on the optimistic side due to selection bias from trading many different portfolio components. For reducing the expiration risk of single components, an equity curve trading mechanism is implemented in Z1 - you can deactivate it with the Phantom flag (see below). A table with the current algorithm states is displayed in the trade status page:
|EUR/USD||VO:LS -198||HU:LS +68|
|USD/CHF||VO:LS +726||LP: +549||HU:S +612||ES:LS +190||LS: +611|
|USD/CAD||HU:LS -108||ES:L -73||LS:L +821|
|USD/JPY||VO: +2400||HU: +1178|
|AUD/USD||VO:S -82||LP:LS -0||LS:S +582|
|SPX500||ES:L +318||LS:L +629|
|US30||LP: +256||ES:L +761|
|GER30||LP:LS +746||HU:LS +1186|
|XAU/USD||LP:L +420||ES:S +3457||LS: +2020|
|XAG/USD||VO:L +1797||LP:L +89||LS:S +156|
In the above matrix, active algorithms are displayed with their identifier (VO, LP, etc.) and L and/or S for the currently preferred trade direction, long, short, or both. Algorithms that are currently winning are displayed on a green rectangle. Algorithms that are currently losing and thus temporarily suspended (if equity curve trading was enabled, see below) are displayed on a red rectangle. The displayed numbers are the total win or loss per component, including phantom trades.
Due to their relatively long lookback period, Z1 and Z2 should only be traded with brokers that provide sufficient price history. If price data gaps are indicated in the message window at start, it is recommended to use the Preload flag (see below) or trade the system with a different broker. Otherwise the shortened price history can affect the performance in the first weeks.
Z2 is a portfolio of variants of the Workshop 5 system. While its own algorithms are more or less correlated, it is anticorrelated to Z1. The algorithms are self-adapting to the market. OptimalF factors are used for distributing the capital among the components. Trade exits are handled by TMFs. All trades have rather tight stop loss limits and no profit targets. Some of the algorithms control the trade duration by moving the stop loss; this can cause the stop to move in both directions.
As with Z1, the equity curve above is on the optimistic side due to selection bias. Z2 also contains an equity curve trading mechanism that can be deactivated with the Phantom flag (see below). A table with the current algorithm states is displayed in the trade status page:
|USD/CHF||CT:LS -130||HP:S +35|
|GBP/USD||BB:LS +634||CY:LS +466|
|USD/JPY||CT:L +884||CY:L +3464|
|NAS100||BB:L +797||CY:L +1768||HP: +5861|
|SPX500||CY:L -120||HP:L +51|
|US30||CT:L +1110||CY:LS +688|
|UK100||CY:LS +325||HP:L +526|
Like Z1, Z2 should only be traded with brokers that provide sufficient price history.
A pimped up version of the system described in Workshop 6. It exploits the anticorrelation of the Z1 and Z2 equity curves. By combining Z1 and Z2 to a compound system, profit is increased and drawdowns are reduced. The Z12 profit exceeds the sum of Z1 and Z2 profits, while the capital requirement is lower than the sum of both.
The above remarks about the Z1/Z2 drawdown, equity curve trading, and lookback period also apply to Z12.
Z3 is a medium-term commodity and index trading system - an improved version of the simple system from the Zorro video tutorial. It detects price clusters that precede a price breakout. Those breakouts happen frequently especially with metals and stock indices, and constitute an exploitable inefficiency. The results are uncorrelated to Z1 and Z2, so all systems can be traded simultaneously with Zorro S. Since Z3 is based on a single algorithm, the equity curve is unaffected by selection bias.
The Z3 performance depends on the asset volatility. In low volatility periods the equity is more or less flat. As with Z1 and Z2, the trade duration is controlled by moving the stop loss level. This can cause the stop to move in both directions and to tighten even when the trade is not in profit.
Z7 is a forex trading system based on a price pattern detection algorithm similar to Workshop 7 (a variant is described on the Financial Hacker blog). It is designed for low capital requirement (less than 1000 $) and short trades (5 hours). Trades are triggered by price patterns preceding weekend gaps and shortlived up- or downwards movements. Z7 uses different patterns for the US, European, and Pacific sessions. The results are unrelated to trends and cycles, and uncorrelated to the other systems.
All Z7 trades end after at least one market day, most after a few hours. The stop loss is relatively distant and is used for risk limitation only. A trailing mechanism locks profits when the trade goes well in high volatility situations.
Z8 is a low-risk, long-term trading system based on a modified mean/variance optimization (MVO) algorithm. It is an improved version of the MVO system described on Financial Hacker. Z8 opens a portfolio of ETFs, stocks, or other assets determined by an external asset list, and re-allocates the invested capital among the portfolio components once per month for achieving a straight positive balance curve with minimum variance. Since it trades with low leverage, the risk of capital loss is low in comparison to the other systems.
The balance curve above is from an out-ouf-sample test with the default assets. The assets can be set up in an asset list named AssetsZ8.csv. By default it contains a set of ETFs that were selected by their supposed long-term prospects. But we're programmers, not traders, so you can possibly find a better combination. Z8 can also trade stocks or any instruments with long-term positive return. For adding a new asset, just duplicate a line in AssetsZ8.csv and edit the asset name in the first column. For temporarily out-commenting a line, add a '#' in front of the asset name. Up to 300 assets can be entered in the list. For finding assets with low correlation, use the Heatmap.c script from Financial Hacker. Forex or CFDs are not suited for Z8 since they have no long-term positive return.
For the backtest, historical data is automatically downloaded from Yahoo, so no further price history files are necessary.
For trading, the broker API must support the GET_POSITION command, which is the case for the Interactive Brokers TWS API. Make sure that you've subscribed market data for all traded assets (normally the "US Value Bundle") and that you're permitted to trade them (check all relevant boxes on the "Trade Permissions" page). Since Z8 trades only once per month, it needs not to run permanently, and requires no VPS and no permanent broker connection. It also needs not be explicitely trained since this is automatically handled by the MVO process. Just start it in [Trade] mode once every month, at the first trading day after the opening time of the New York market (9:30 ET). Z8 will first download the current asset prices from Yahoo, then calculate the optimal portfolio. Set the Capital slider to the total margin you want to invest. After about a minute a message box will open, like this:
"Old" is the current position in the asset, and "new" is the new position. Clicking [Yes] will automatically sell or buy the difference of any position, and this way optimize the portfolio. Afterwards the trading session is closed. The procedure should be repeated once per month. The maximum portfolio capital can be set up in Z.ini (see below); it is limited to $7000 with the free Zorro version.
Every Z strategy can be configured at startup with parameters from an .ini file, and is controlled at runtime with the Margin, Risk, and Panic sliders. First set up the strategy to your country and other requirements: open Strategy\Z.ini with SED or any other text editor, and edit the following parameters:
NFA = 0
No US account.
|Set this to 1 for for NFA compliance; required for US accounts (except for MT4 accounts) and for some brokers, f.i. IB. A wrong NFA flag prevents the strategy to work, so test it before setting it!|
FXOnly = 0
Trade all assets.
|Set this to 1 for trading only currencies; often required for US accounts, as CFD trading is restricted in the US. This reduces the profits and increases the risk due to the correlation of major currencies, so run a new test after modifying this line.|
Phantom = 1
Equity curve trading.
|Set this to 0 for disabling equity curve trading. When active, trades of Z1, Z2, Z3, or Z12 components are temporarily suspended when the algorithm deteriorates, and resumed when it becomes profitable again. Equity curve trading can reduce the profit, but can also prevent losses by expiration of strategy components.|
Hedge = 5
Full virtual hedging.
|Set this to 2 for disabling virtual hedging, or to 4 when your broker does not support partially closing of trades, as is the case for some MT4 brokers.|
MMax = 100
|Set this to the desired maximum value of the Margin or Capital sliders for trading with higher volume (Zorro S only). The maximum of the Capital slider is MMax * 100.|
|Weekend = 2||
|Set this to 7 (see Weekend) for automatically logging off at weekends; set it to 3 for staying online, but not trailing and stopping trades during the weekend.|
Verbose = 2
|Set this to 1 for fewer messages, and to 14 or 30 for diagnostics mode (see Verbose).|
|BrokerPatch = 0||Broker API ok.||Set this to 3 for displaying the strategy balance, equity, and open trade profits on the Zorro panel (see SET_PATCH), rather than the account equity. Recommended for some versions of the FXCM API that didn't calculate equity correctly.|
|Preload = 0||Load all prices.||Set this to 1 for loading the lookback period prices not from the broker's price server, but from Zorro's historical data files (see PRELOAD). Recommended for some MT4 brokers that offer only a very short price history. The history files from the Zorro download page are required.|
|StopFactor = 1.5||Distant broker stop.||Set this to 0 for not sending any stop loss values to the broker (see StopFactor).|
|AssetList = ""||Default account.||Enter a different asset list (not for Z8) for simulating different accounts or for setting up different broker symbols. All traded assets must be contained in the list.|
|Exclude = ""||No excluded assets.||Enter a list of comma separated asset names (f.i. "EUR/USD,NAS100") for excluding those assets in Z3 and Z7. The asset prices are still loaded, but the asset is not traded.|
|Cancel = 0||Cancel no trade.||Set this to the trade ID when a position was closed externally and must not be managed anymore by Zorro. Zorro detects externally closed trades automatically, but not when a trade is closed by opening a counter-trade on an NFA account. The cancelled trade will be removed from the trade list at the end of the current bar. In the case of virtual hedging, cancel the phantom trade only; this will also automatically cancel the pool trade.|
The .ini file is read at start of the strategy; subsequent changes have no effect until the strategy is restarted. If you want to trade several of the strategies with different parameters, save Z.ini under the name of the strategy, f.i. Strategy\Z4.ini for Z4. The strategy will then read the parameters from its corresponding .ini file.
At runtime, the Z strategies are normally controlled with three sliders:
|Margin||0..100||50||Determines the average margin per trade, and thus the trade volume and the total investment of the system (see Margin and MARGINLIMIT). The value set up here is multiplied by OptimalF and internal weight factors, so individual trade margins can be higher or lower than the amount set upo by the slider. If a trade margin is below the minimum volume - usually $50 for mini lots, and $5 for micro lots - trades are entered less frequently. In [Test] mode you can set up this slider for achieving the desired annual return and required capital. For reinvesting your profits, you can increase the slider when the capital grows, but observe the square root rule according to the formula under Money Management.|
|Capital||0..7000||1000||Z8 only: Determines the total leveraged capital to be invested, i.e. the sum of the maintenance margin of the open positions. While the portfolio composition changes every month, the total invested margin remains constant and can be set up with this slider. Keep this value well below the cash on the account.|
|Risk||0..50||10||Risk limit per trade in multiples of the Margin slider setting (see Risk). At the default settings of 10 and 50, the risk limit is 10 * $50 = $500. The risk limit is the maximum amount that the worst trade can lose, excluding slippage. If the risk of a trade would exceed this limit, the trade size is accordingly reduced. This is not a hard limit; slippage can increase the loss, and a trade with minimum size (1 lot) is still entered even if its risk is above the limit.|
|Panic||0..100||0||Tighten the stop loss of all open trades in percent of the current price difference to the original stop loss. At 0, stop loss control is completely up to Zorro; at 100 the stop limits are placed just at the current asset prices. This causes trades to be sold as soon as their prices move slightly in adverse direction, and can be used for taking profits early. No new trades are opened as long as the position is above 90. This slider reduces the profit, so use it only in a panic situation, for instance when you hear in the news about a stock market crash. Put it back to 0 when you feel calm again.|
Note that the Margin and Risk sliders are not the same as the Margin and Risk variables. The Margin slider determines the average margin per trade only; the individual margin of a trade can be higher or lower, dependent on its capital allocation by the OptimalF factor of the component. The value of the Risk slider is multiplied with the value of the Margin slider for getting the risk limit per trade.
Before trading, make sure you've read the suggestions under Regular Income. Determine your capital requirement by testing the strategies with different settings of the Margin slider. Check the performance report and set aside enough capital for trading, either in your broker account or at least in your bank account.
After starting a strategy, the first trades will be entered after about 1-2 days. The frequency of trades depends on the market; in unprofitable periods with high efficiency there will be only a few trades, especially when Phantom is set in the Z.ini file. Most trades are hold for 2-3 days, but some can stay open for weeks when they are profitable.
Your account balance will most likely go down by several $100 in the first weeks after starting a strategy. This is not a real drawdown, but the result of two statistical effects. Unprofitable trades are closed early, while profitable trades stay open longer and thus contribute later to the balance. The equity fluctuations - the up and down 'ripples' in the equity curve - will most likely exceed your initial profit if you don't have an exceptionally lucky start. Both effects will cause periods of negative balance and equity in the first time of almost all strategies (for details see income). When the profit accumulates, negative balance periods get shorter and eventually disappear. However if you're not yet in the profit zone after several months and your trade returns still deviate largely from the predicted performance, something is wrong. The strategy might be expired and you should stop trading it.
Events - such as entering and exiting trades, or trailing the stop loss - are displayed in Zorro's message window. The strategies use trade management functions and money management, and adapt the stop limits permanently to the price development of the asset. Additionally to the standard messages (see Trading), Z1, Z2, and Z12 inform from time to time when the risk or possible profit of open trades change. They are displayed this way in Zorro's message window:
[AUD/USD:CY:S4400] Estimated risk: 150
[USD/JPY:CT:S4321] Estimated profit: 720
The estimated risk is the maximum loss, the estimated profit is the minimum win that Zorro currently predicts for the trade, in units of your account currency. When the risk goes down or the profit goes up, the position is moving in favourable direction. Note that it's only an estimate, so the real loss as well as the real win can be worse.
Stopping & Starting: At trading start, the systems download recent price data from the broker for filling the LookBack period. Therefore avoid starting the strategies during the weekend when recent prices are not available and broker servers can be offline. Otherwise gaps in the price data can cause reduced performance during the following week. Once a system is trading, stop it only in case of an emergency. Most systems do not enter trades immediately after being started, so frequent stopping and starting will cause a system not to trade. While a system is stopped, it can not react on the market, which bears the danger of a potential loss when a price shock happens during that time.
Testing & Re-Training: The strategies can be tested with historical price data (you can download the price data from the Zorro download page). The meaning of the performance parameters can be found under performance report. The most recent parameters are used for trading. The strategies must be re-trained regularly for keeping them profitable; in out-of-sample backtests they started to deteriorate about 4..12 months after the last training. New parameter sets will be released with Zorro updates, so dou don't need to train them yourself. But if you want, you can do that with Zorro S by clicking the [Train] button, even while live trading. The factors file (Z12.fac) of Z12 is not re-trained since it changes very slowly and needs the full simulation period. A new factors file is provided with any Zorro update.
Invest & Withdraw: All profitable strategies have long drawdowns that are listed in the table above (Worst Drawdown). Take care to remargin your account when you're in a drawdown and your equity gets dangerously low. On the other hand, if you don't have Zorro S, remove profits regularly from your account - the free Zorro version will stop trading when your balance exceeds 7000 $ or the equivalent in your account currency (see profit ceiling). Look under Money Management for reinvesting and withdrawing correctly.
Low Capital: You can trade strategies with low capital, such as a few hundred dollars, when you remove assets as described below. Additionally, move the Margin slider to the left and run repeated tests until the value displayed under Capital meets your needs. Note that a low margin and few assets will normally reduce the performance and increase the risk due to the reduced number of trades.
Remove Assets: For excluding all assets except currencies, set FXOnly (see above). For excluding a certain asset or component from Z1, Z2, or Z12, edit the Z12.fac factors file (Data\Z12.fac) and place minus signs in front of its OptimalF factors (for details see Money Management). The algorithms with the ES, HU, LP, LS, VO identifiers belong to Z1, BB, CT, CY, HP to Z2. An example for excluding the CT algorithm with the USD/CAD asset:
... USD/CAD:CT -.041 1.32 263/420 USD/CAD:CT:L -.029 1.25 177/227 USD/CAD:CT:S -.058 1.38 86/93 ...
Components with a negative or .000 OptimalF factor are automatically excluded. Be aware that excluding the least profitable assets or algorithms will generate a too optimistic test result due to selection bias.
Rename assets: Edit History\AssetsFix.csv and enter the asset name used by the broker in the last column of the spreadsheet, as described under asset list.
Multiple Zorros: You'll need Zorro S for trading all Z systems at the same time. Also make sure with your broker that your account is set up to allow multiple sessions. Some brokers set up accounts for single sessions only by default.
Tax: In most countries you have to pay tax for trading profits. Normally the broker keeps records of your trades that you can download from his website. Otherwise Zorro also records all trades in the trades.csv spreadsheet in the Data folder for your tax declaration. Interest (rollover) and profit/loss are recorded separately. Usually you have to submit this spreadsheet or the broker's records together with your tax declaration.
Updating: We'll publish updates to the Z strategies in regular intervals, so it's recommended to visit the user forum or the Zorro website from time to time. Subscribers and Zorro S users will also be informed by email about updates. Please look here for how to move from an old Z strategy to a new version.
Expiration: All strategies can eventually expire; for instance the Z5 system expired when the Swiss removed the CHF cap. If we suspect that a certain system will expire, we'll announce that on the forum and will also inform subscribers and Zorro S users by email. Normally we'll provide a successor after a system expired. As long as the markets are not perfectly effective, there will always be infinite possibilities for profitable trade algorithms.
► latest version online