Originally posted by opmtrader
I'm going to step out on a limb here and make a bold statement: This system is asinine. The fib numbers are meaningless. The signal is seemingly meaningless as it has been stated you could take the same signal as a short or long op and get the same result. The stop logic seems screwy to me as well. What this looks like to me is a random overlay on the market instead of an attempt to actually find the best speculative risks for expected returns. Personally I could likely never trade a system like this because it goes against my style, finding pockets of determinism in the choas that is the markets. This entire concept seems like a joke to me.
That being said the system makes money! (At least if you believe the results posted here).
To get beyond the recent results I coded up the system in Wealth Lab. I did this quickly so there may be problems in my code. Some disclaimers:
1) I am not sure the stochastics logic was coded correctly. Also it is based on the 1 min stochatics as I did not want to deal with a seperate data set for the 2 min.
2) The stops are set in percentages to stay relative to the market. A three point stop at the market peak is a lot different than a 3 pt stop today.
3) There are two breakeven stops. If the market moves two points in either direction and comes back to breakeven it will get stopped out.
4)Currently the reverse on loss will keep flipping but is usually stopped out by the breakeven stop. I'll have to add some position tracking to have it stop after one flip. The reverse on stop did not impact the results much anyhow.
Here is the script:
{Quah's Fib System}
var Bar, i, nPane, D, K: integer;
var FibTimes: array[0..11] of integer;
var TimeIsFib: boolean;
{Stop = 3.5 NQ pts relative to 900 NQ level}
InstallStopLoss(0.33889);
{Profit = 3 NQ pts relative to 900 NQ level}
InstallProfitTarget(0.3333);
{Install Break Even after 2 NQ pts profit relative to 900 NQ level}
InstallBreakEvenStop( 0.222 );
{Install Break Even after 2 NQ pts loss relative to 900 NQ level}
InstallReverseBreakEvenStop( 0.222 );
FibTimes[0] := 3; {833}
FibTimes[1] := 5; {835}
FibTimes[2] := 8; {838}
FibTimes[3] := 13; {843}
FibTimes[4] := 21; {851}
FibTimes[5] := 34; {904}
FibTimes[6] := 55; {925}
FibTimes[7] := 89; {959}
FibTimes[8] := 144; {1054}
FibTimes[9] := 223; {1223}
FibTimes[10]:= 377; {1447}
i := 0;
TimeIsFib := false;
{ Create Pane for Slow Stochastic }
nPane := CreatePane( 100, TRUE, FALSE );
{ Use Fast %D as %K for slow Stochastic }
K := SMASeries( StochKSeries( 17 ), 1 );
D := SMASeries( K, 17 );
{ Plot Slow Stochastic }
PlotSeries( K, nPane, 505, 0 );
PlotSeries( D, nPane, 000, 1 );
DrawText( 'Slow Stochastic %K', nPane, 4, 4, 505, 8 );
DrawText( 'Slow Stochastic %D', nPane, 4, 16, 000, 8 );
DrawHorzLine( 50, nPane, 777, 1 );
DrawHorzLine( 0, nPane, 777, 1 );
DrawHorzLine( 100, nPane, 777, 1 );
SetPaneMinMax( nPane, -10, 110 );
for Bar := 0 to BarCount - 1 do
begin
ApplyAutoStops(Bar);
for i := 0 to 10 do begin
if BarNum(Bar) = FibTimes - 1 then
SetBarColor( Bar + 1, #Green );
end;
if not LastPositionActive then
for i := 0 to 10 do begin
if BarNum(Bar) = FibTimes - 1 then
if GetSeriesValue( Bar, K ) > GetSeriesValue( Bar, D ) then
BuyAtMarket(Bar + 1, 'Buy on Fib Entry');
if BarNum(Bar) = FibTimes - 1 then
if GetSeriesValue( Bar, K ) < GetSeriesValue( Bar, D ) then
ShortAtMarket(Bar + 1, 'Short on Fib Entry');
end;
if LastPositionActive then
if PositionLong(LastPosition) then begin
ShortAtStop( Bar + 1, PositionEntryPrice( LastPosition )*(0.99611), 'Short Entry on Long Failure' );
end
else
if PositionShort(LastPosition) then begin
BuyAtStop( Bar + 1, PositionEntryPrice( LastPosition )*(1.0033889), 'Long Entry on Short Failure' );
end;
if LastPositionActive then
if PositionLong(LastPosition()) then
if GetHour( Bar ) = 16 then
SellAtMarket( Bar, LastPosition, 'Close on EOD' );
if PositionShort(LastPosition()) then
if GetHour( Bar ) = 16 then
CoverAtMarket( Bar, LastPosition, 'Close on EOD' );
end;
The results from late 1999 to mid 2000 can be seen in the attached gif. $10 a RT was taken for commisions. The results are abysmal. Other periods fared just as bad.
That being said I think that backtesting a system like this is at best an approximation. There are many different things it can't account for like different interpretations of the stochastics, missed trades, fills, etc.
As you can see in my post I've condradicted myself numerous times. Despite the results I'm trying to keep an open mind. I hesitate to send this because it is not entirely conclusive. I hope the code can help some of you with Wealth Lab who are interested in this system. Let me know what you guys find in your own studies. I'll be watching this thread for the outcome of all this.