You are on page 1of 14

Phase 2: System development & system test (implementation)

The settings in the Metastock Tools "Enhanced System Tester" are


represented in the following on the basis of several screenshots for this
practical example.

General settings / Register “General”:

Figure 3.5: Metastock – General System Settings


Register “Buy Order”:

Figure 3.6: Metastock Buy Order

Important hereby the brackets and the ref function [ref(hr,1)] concerning
the trading rule HR [ref(black(),-1)] in the second row of the program
code as well as the setting of the "Strategic Delay" (= 1). Otherwise it
would not be possible with the Metastock EOD version to implement the
fact, that the open position is to be closed on the same day!
.
Register “Sell Order”:

Figure 3.7: Metastock Sell Order

Thereby the use of the special hidden internal Metastock function


Simulation.LongPositionCount is important, in order to determine an
open long position. Only if this position is detected, the sell order can
function.

The "Delay" which have to be adjusted is here 0 days.


Register „Sell Short Order“:

Figure 3.8: Metastock Sell Short Order

Important hereby the brackets and the ref function [ref(hr,1)] concerning
the trading rule HR [ref(white(),-1)] in the second row of the program
code as well as the setting of the "Strategic Delay" (= 1). Otherwise it
would not be possible with the Metastock EOD version to implement the
fact, that the open position is to be closed on the same day!
Register „Buy to Cover Order“:

Figure 3.9: Metastock Buy to Cover Order

Thereby the use of the special hidden internal Metastock function


Simulation.ShortPositionCount is important, in order to determine an
open short position. Only if this position is detected, the buy to cover
order can function.

The "Delay" which have to be adjusted is here 0 days.


Register „Stops“:

Figure 3.10: Metastock Stop Settings

In the example both for long and for short orders a stop loss of 10 points
is set in each case. Other stops, e.g. trailing stops are not used in our
example.
The register "Optimizations" is not used in the example, since here we
use no optional parameter settings.
System test and data selection for the trading simulation run (system
test) in Metastock:

Figure 3.11: Metastock System Test Data Selection

Here "DAX Index" data are used on daily basis from January 2000 until
December 2005. I.e. that this system in the “backtest” is tested over 6
years on the basis of historical data.
System test and selection of test options:

Figure 3.12: Metastock System Test Options

We select a "Points Only Test", because we will simulate a trading of a


“point-oriented” leverage product (to compare: leverage of the point-
oriented “DAX Future” is 25) with “DAX Index” data.
Clicking the “More..."-Button shows another windows dialogue with
fields for commissions, trading times, slippage etc.
Setting of commissions:

Figure 3.13: Metastock System Test Commissions

For each transaction (buy or sell) 0.24 points of the “DAX Index” product
are calculated. We use for our product the same values as for the real
“DAX Future” (since one point in the “DAX Future” has a present up-to-
date value of 25 €, 0.24 points mean thus as an example 6 € fee for a
half turn and/or 12 € fee for a round turn).
Setting of trading times and slippage:

Figure 3.14: Metastock System Test Trade Execeution

The settings for the trade price have to be done like above indicated for
buy and sell actions which can be simulated in the EOD version of
Metastock, in order to ensure the correctness of the simulation refe-
rencing the trading rules and parameters configured before.
I.e., actions (Buy or Sell Short) in each case at the open price, cash
sweep actions (Sell or Buy to Cover) in each case at the close price, the
delay is to be adjusted in this mask to "0".
Slippage is adjusted in the example for each transaction (buy or sell) to
2 points.
Finally the Metastock systematic test is started and supplies the following
result, which can be called up via register "Summary".

Register „Summary“ (extract):

Figure 3.15: Metastock System Test Summary

This simple system obtained 4,943 points with one contract and proved
thereby even as profitable. Nevertheless trading a “DAX Index” product
like the “DAX Future” 4,943 points correspond to a tax-free gross profit of
123,575 € in 6 years. The system was realistically traded and was
evaluated with consideration of real commissions and 2 points slippage
per transaction.
Although only 311 of the 1,526 trades were profitable (20%), ensured
the risk management (stop of 10 points and the avoidance of
“Overnight”-positions) ensure for this positive result. Max. Account
Drawdown in this test was only -156 points or -3,900 €.
Further evaluations, which are delivered by the software Metastock refer
to the individual orders, positions and the equity curve. This curve is
represented below:

Figure 3.16: Metastock System Test Equity Curve

As already said, this is only an example and you can see clearly, that this
system with his equity curve would have given little joy for users of such
a system starting from 2003 or 2004.
On the other side, at the end of 2002, or at the beginning of 2003 a
system designer probably have judged such a system still relatively
positive.
But with the whole knowledge at the end of year 2005 no professional
system developer would trade such a system at the real markets.
In order to show graphically that the trading concept was correctly
implemented and in accordance with each day the trading rules were
traded correctly, that is to open a position in the morning and close that
position with a stop (round symbol) or at the latest at the close price of
the same day with an exit (angular symbol), an extract from the time
series with the signals is represented here:

Figure 3.17: Metastock System Test, Price Bars and Signals


In a scenario of an idealized system development and system test
process a simulation phase (phase 3) would follow now, in order to
simulate expected profits and drawdowns under the influence from
random variables. However such a possibility most software packages
do not offer today, so developers and traders make sometimes the fatal
error to begin to trade directly the real markets (crucial phase 4) due to
the test result of only one historical data set of prices and sometimes due
to only one systematic test.
The deficits of this kind of system development and system test
process concerning mechanical trading systems is to be represented in
the next section.

You might also like