1.
Definition from Stockcharts:
http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:stochastic_oscillator
The Full Stochastic Oscillator takes three parameters. Just as in
the Fast and Slow versions, the first parameter
is the number of periods used to create the initial %K line and the last parameter is the number of periods used to create
the %D (full) signal line. What's new is the additional parameter, the one in
the middle. It is a "smoothing factor" for the initial %K line. The
%K (full) line that gets plotted is a n-period SMA of the initial %K line
(where n is equal to the middle parameter).
The Full Stochastic Oscillator is more advanced and more flexible
than it's Fast and Slow cousins. You can even use it to duplicate the other
versions. For example, a (14, 3) Fast Stochastic
is equivalent to a (14, 1, 3) Full Stochastic and
a (12, 2) Slow Stochastic is equal to a (12, 3, 2)
Full Stochastic.
- %K (fast) = %K formula presented
above using x periods
- %D (fast) = y-day SMA of %K (fast)
- %K (slow) = 3-day SMA of %K (fast)
- %D (slow) = y-day SMA of %K (slow)
- %K (full) = y-day SMA of %K (fast)
- %D (full) = z-day SMA of %K (full)
Where x is the first
parameter, y is the second parameter and (in the case of Full stochastics), z is the third parameter. In the case of
Fast and Slow Stochastics, x is typically 14 and y
is usually set to 3.
2.
Cross above or Cross below?
First we need to determine the optimal
direction of crossing, i.e., the Buy/Sell is triggered by the signal cross
above the threshold or cross below. It turns out that we should
Buy when StocFull cross below Blevel, and sell
when StocFull cross above Slevel
instead of the other way around:
Buy when StocFull
cross above Blevel, sell when StocFull cross below Slevel
N.B. 1. Consider long only; 2. No
commission; 3.
3.
Optimization procedure
We have the following variables to optimize
over:
1.
Three periods x, y, and z in
StocFull(x, y, z);
2.
Two buy and sell levels;
3.
Stop out points.
We begin with period optimization. Red
indicates high profit.
3.1 Period optimization
z=1
z=2
z=3
z=4
z=5
z=6
z=7
z=8
The best one seems to be [ 13, 9, 3].
3.2 Level optimization
We now optimize over buying and selling
levels.
The best
choices are 40 and 60.
3.3 Stop point optimization
It turns
out that stop out at 0.14 is the best.
4.
Final report
|
All
trades
|
Long
trades
|
Short
trades
|
Initial capital
|
100000.00
|
100000.00
|
100000.00
|
Ending capital
|
120022.79
|
120022.79
|
100000.00
|
Net Profit
|
20022.79
|
20022.79
|
0.00
|
Net Profit %
|
20.02
%
|
20.02
%
|
0.00
%
|
Exposure %
|
21.94
%
|
21.94
%
|
0.00
%
|
Net Risk Adjusted Return %
|
91.25
%
|
91.25
%
|
N/A
|
Annual Return %
|
15.69
%
|
15.69
%
|
0.00
%
|
Risk Adjusted Return %
|
71.52
%
|
71.52
%
|
N/A
|
|
All trades
|
2835
|
2835
(100.00 %)
|
0
(0.00 %)
|
Avg. Profit/Loss
|
7.06
|
7.06
|
N/A
|
Avg. Profit/Loss %
|
0.01
%
|
0.01
%
|
N/A
|
Avg. Bars Held
|
11.61
|
11.61
|
N/A
|
|
Winners
|
1385 (48.85 %)
|
1385
(48.85 %)
|
0
(0.00 %)
|
Total Profit
|
172448.25
|
172448.25
|
0.00
|
Avg. Profit
|
124.51
|
124.51
|
N/A
|
Avg. Profit %
|
0.12
%
|
0.12
%
|
N/A
|
Avg. Bars Held
|
13.41
|
13.41
|
N/A
|
Max. Consecutive
|
12
|
12
|
0
|
Largest win
|
1692.00
|
1692.00
|
0.00
|
# bars in largest win
|
8
|
8
|
0
|
|
Losers
|
1450 (51.15 %)
|
1450
(51.15 %)
|
0
(0.00 %)
|
Total Loss
|
-152425.46
|
-152425.46
|
0.00
|
Avg. Loss
|
-105.12
|
-105.12
|
N/A
|
Avg. Loss %
|
-0.10
%
|
-0.10
%
|
N/A
|
Avg. Bars Held
|
9.89
|
9.89
|
N/A
|
Max. Consecutive
|
11
|
11
|
0
|
Largest loss
|
-958.92
|
-958.92
|
0.00
|
# bars in largest loss
|
2
|
2
|
0
|
|
Max. trade drawdown
|
-958.92
|
-958.92
|
0.00
|
Max. trade % drawdown
|
-0.92
%
|
-0.92
%
|
0.00
%
|
Max. system drawdown
|
-3975.36
|
-3975.36
|
0.00
|
Max. system % drawdown
|
-3.27
%
|
-3.27
%
|
0.00
%
|
Recovery Factor
|
5.04
|
5.04
|
N/A
|
CAR/MaxDD
|
4.80
|
4.80
|
N/A
|
RAR/MaxDD
|
21.87
|
21.87
|
N/A
|
Profit Factor
|
1.13
|
1.13
|
N/A
|
Payoff Ratio
|
1.18
|
1.18
|
N/A
|
Standard Error
|
1889.31
|
1889.31
|
0.00
|
Risk-Reward Ratio
|
10.03
|
10.03
|
N/A
|
Ulcer Index
|
1.04
|
1.04
|
0.00
|
Ulcer Performance Index
|
9.93
|
9.93
|
N/A
|
Sharpe Ratio of trades
|
4.43
|
4.43
|
0.00
|
K-Ratio
|
0.01
|
0.01
|
N/A
|
[ 本帖最后由 Quantum 于 2008-8-1 02:04 编辑 ] |