Velocity System
Velocity System
velocity. Increasing
$4,400.00
$8,150.00
42
25
$1,140.00
$326.00
1.48
6
46
$0.00
($3,750.00)
59.52%
17
3
27
1
$4,320.00
$6,560.00
28
17
$1,140.00
$385.88
1.89
5
56
($780.00)
2.93
$0.00
($2,240.00)
60.71%
11
2
37
1
$80.00
$1,590.00
14
8
$380.00
$198.75
.79
3
24
57.14%
6
36
$0.00
($1,510.00)
3
9
1
$2,760.00
$3,470.00
17
11
$970.00
$315.45
2.67
3
46
$2,670.00
$3,010.00
11
8
$970.00
$376.25
3.32
4
56
($340.00)
8.85
Percent profitable
Number losing trades
$0.00
($710.00)
64.71%
6
2
30
1
Total # of trades
Number winning trades
Largest winning trade
Average winning trade
Ratio avg. win/avg. loss
Max. consec. winners
Avg. # bars in winners
$90.00
$460.00
6
3
$280.00
$153.33
1.24
2
19
$0.00
($340.00)
72.73%
3
1
49
1
$0.00
($370.00)
50.00%
3
2
12
1
37
Least-squares line
Calculation
A regression line is calculated using the least-squares
method, which refers to finding the minimum squared
(x*x, or x2) differences between price points and a
straight line. For example, if two closing prices are 2 and
3 points away (the distance being calculated vertically)
from a straight line, the squared differences between the
points and the line are 4 and 9, respectively.
Why are the squared differences used, instead of just
the differences? Figure 1 shows that some differences
are negative (for points below the line) and others are
positive (for points above the line). This makes it necessary to square all the differences, creating all positive
values and making it possible to calculate a formula for
the straight line.
The best-fit line is the line for which the sum of the
squared differences between each price and the straight
line are minimized.
The formula for a straight line (y) is:
y = b + m*x
where
x = the time of the price (the x-axis value)
b = the initial value of the line when x is equal to
zero (the intercept value i.e., the point at which the
line intercepts the vertical axis);
m = the slope of the line, which is the rate at which the
line rises or falls. In other words, b is how much y changes
for a one-unit change in x (e.g., .75 points per day).
38
x=1
x=1
x=1
Price
18
16
14
Straight line
12
Differences
10
8
Price
21.25
20.50
21.00
22.50
23.25
24.20
23.25
24.66
23.00
24.00
Slope (m)
0.60
0.43
22.28
-0.07
24.02
Line B
Line C
23.95
23.89
23.82
23.76
23.69
A
Y=24.02-0.07*X
Y=22.28+0.43*X
Y=19.90+0.60*X
2
22.71
23.14
23.57
24.00
24.44
Price
10
39
26.20
26.00
25.80
25.60
Exit
Sell
Sell
25.40
Buy
25.20
Sell
25.00
24.80
Buy
Buy
Exit
Exit
24.60
24.40
Buy
Buy
24.20
0.060
Velocity
0.040
0.020
0.000
-0.020
11/11
11:30 13:05
11/12
11:05 12:40
11/13
10:40 12:15
-0.040
26.80
26.60
Sell
Exit
26.40
26.20
Buy
26.00
Exit Sell
Buy
Sell 25.80
25.60
Buy
25.40
Buy
25.20
0.060
Velocity
0.040
0.020
0.000
-0.020
11/14 11:50 13:25
11/15
11:25 13:00
11/18
11:00 12:35
Start
date
27.00
10/9/02
Exit
-0.040
Exit
26.80
26.60
Buy
Exit
26.40
Buy
26.20
26.00
Sell
25.80
Exit
25.60
Buy
Buy
Short
25.40
Velocity
0.060
0.040
0.020
11/21
11:20 12:55
11/22
10:55 12:30
0.000
-0.020
-0.040
End
date
Len
11/8/02
16
vup
vdn
0.001 0.023
out-of-sample data.
However, there was a more trending
price action in the out-of-sample period,
and much of the superior performance
can likely be attributed to that.
Specifically, Table 2 shows the system
did much better on long trades than
short trades, the result of a long uptrend
in the out-of-sample period.
The average trade (on 1,000 shares of
QQQ) resulted in a $105 profit in the test
section and $162 in the out-of-sample
section. The profit factor in the out-ofsample section was twice as high as the
comparable figure in the test section.
Also, during every up day from Nov. 11
to Nov. 22, the system remained in one
long trade all day, showing the system
was able to avoid getting knocked out
of the market and having to re-enter,
resulting in whipsaw losses. Also, the
system produced no big winners or big
losers, which means the system did not
rely on a few exceptional trades that are
not representative of the systems basic
characteristics.
Figures 1a-1c (opposite page) are
five-minute price charts of QQQ from
Nov. 11 to Nov. 22 (the out-of-sample
period). The Least-Squares Velocity
indicator is plotted along with price.
(The buy and sell signals can be viewed
as part of the trade-by-trade summary
of the out-of-sample trades in the Web
Extra for this article at www.activetradermag.com from June 10 to June 30.)
These charts show the system produced
steady returns, which is all anyone can
ask of a trading system.
System comparison
One reason for choosing these particular test periods was to compare the LSV
out-of-sample results with the out-ofsample results of the Next Bar Forecast
system (NBF) and the Maximum
Likelihood Range system (MLR).
Tables 3 (right) and 4 (p. 45) show the
performance summary of the MLR system and the NBF system, respectively,
on the out-of-sample data segment from
Nov. 11 to Nov. 22, 2002.
continued on p. 45
$2,680.00
$3,570.00
11
7
$0.00
($890.00)
63.64%
4
4
71
3
52
1
$2,760.00
$3,570.00
10
7
$0.00
($810.00)
70.00%
3
4
71
($830.00)
4.41
Max. # contracts held
2
66
1
($80.00)
$0.00
1
0
$0.00
$0.00
(0.00)
0
0
$0.00
($80.00)
0.00%
1
($80.00)
($80.00)
($80.00)
1
8
41
Advanced Strategies
continued from p. 41
The LSV system produced an out-ofsample net profit of $2,760, while the
MLR produced a net profit of $2,680.
However, the LSVs slightly higher net
profits were produced with about 50
percent more trades. The LSV system
had a per-trade net profit of $162 compared to the MLR systems $243.
If $50 for slippage and commission
were subtracted from each system for
each trade, the total net profits of each
system would still be approximately the
same. However, in looking at the out-ofsample drawdowns and largest losing
trades, the LSV system has a clear
advantage. In both cases, the MLR figures are almost twice those of the LSV.
In comparison with the NBF system,
the LSV system produced a net profit of
$470 less than the NBF ($2,760 vs.
$3,230). The NBFs higher profits were
produced with more trades. The LSV
system had an average profit-per-trade
of $162; the average profit-per-trade for
the MLR system was $134. Again, subtracting $50 for slippage and commission per trade would make these figures
much closer.
Looking at the out-of-sample drawdowns and largest losing trades of each
system, the NBF has a clear advantage.
Its results in those categories are half of
what the LSV system produced. In addition, the NBF system was able to generate short trade profits while LSV system
was only minimally effective in this
regard and the MLR lost money on the
short side.
Overall, the NBF system performed
much better on the out-of-sample data
than the Maximum Likelihood Range system or the Least-Square Velocity system.
At least 20 more tests on different sets
of sample and out-of-sample data would
be necessary to confirm the viability of
the results shown here. Both test periods
were dominated by uptrending conditions; down markets have different intraday characteristics that could significantly affect system performance.
For information on the author see p. 10.
$3,230.00
$4,160.00
24
14
$970.00
$297.14
3.20
7
39
$0.00
($930.00)
58.33%
10
3
17
1
$2,860.00
$3,400.00
15
9
$970.00
$377.78
4.20
5
51
($380.00)
6.30
$0.00
($540.00)
60.00%
6
3
24
1
($370.00)
$760.00
9
5
$240.00
$152.00
1.56
2
18
$0.00
($390.00)
55.56%
4
1
6
45