Mathematical and Statistical Methods for Actuarial Sciences and Finance

(Nora) #1
A pattern recognition algorithm 257

Ta b le 1 .Pattern recognition algorithm results

Samples fGS 1 fGS 2 fGS 3 fGS 4 fGS 5
10 0.4500 0.4440 0.0920 0.0150 0
100 0.3295 0.4859 0.1633 0.0206 0.0006
200 0.3386 0.4722 0.1671 0.0214 0.0007
300 0.3242 0.4770 0.1778 0.0206 0.0005
400 0.3206 0.4833 0.1774 0.0183 0.0003
500 0.3228 0.4813 0.1768 0.0188 0.0003

Therefore, we can infer that from 100 to 500 samples results remain stable.^3 It is most
likely that with a number of samples greater than 500, the distribution will be wider.
We also report the results related to the algorithm’s application to the real word. To
do this, we consider the Euro-Dollar exchange rates of the year 2007. In particular, we
choose three semester pairs that could be defined as “similar" by the human eye. We
consider the second semester of 2003 the training semester and the second semester
of 2007 the trading semester for Euro-Dollar exchange rates. These semesters are
shown in Figure 1.
All the figures contain two graphs: the first one shows the half-yearly trend of
Euro-Dollar exchange rate, whereas the second one has a double-scale graph. The
use of double scale is necessary to study the relationship between exchange rate and
profit by the application of technical filter. The trading rule described in this practical
example is a long-short strategy. Moreover, the technical filter used is the DMAC
rule, which is based on the moving average definition and on Take Profit (TP) and
Stop Loss (SL) parameters.
The double-scale graphs have time on thex-axis, the shape of the Euro-Dollar
exchange rate on the lefty-axis and profit on the righty-axis. We underline that the
y-axis values are pure numbers, that is without units of measurement.
The results of Table 2 show that there is a loss of about 13 % with a GS coefficient
of 0.61844. From Figure 1 we can note that there are substantial shape differences at
the beginning and at the end of semesters and that the profit has a decreasing trend
for more than half a semester.
Figure 2 shows the second semester of 2004 (training semester) and the second
semester of 2007 (trading semester). As can be seen in Table 2, we obtain a profit
of about 26 % with a global similarity index of 0.66299. Observing Figure 2, we can
see that the profit is essentially growing, except at the beginning and at the end of the
trading semester.
We choose as the third pair the first semester of 2006 and the second semester of
2007 (Fig. 3). In this case, we have a loss of 14 % and a GS of 0.61634. We deduce that
the loss is probably due to the substantial shape differences in the various semester
sub-periods (see Fig. 3), as happened in the case of Figure 1. From Figure 3 we


(^3) To perform calculations our algorithm needs about three hours of computer time for each
sample. However, in the future we will consider sample numbers greater than 500.

Free download pdf