Wednesday, January 19, 2011

DVO system enhancement

I have done some enhancement to DVO systems - i have added an extra condition
Buy = Ref(DVO,-1) < 20 AND DVO < 50 AND Ref(DVO,-1)< DVO AND MAFilter2 AND MAFilter ;

Saturday, January 8, 2011

Next assignment

I will be posting 2 more strategy

1. MR swing based on a research paper by David Abram and scot walker.

As of now i am trying to code the Bull mode signal in amibroker. I have Bear mode signal as it is just following DVO in that situation.

For Bull mode it has 2 criterio -

1. It looks for entries in value chart where

Friday, January 7, 2011

TAA based model some final thoughts

After lot of research here is what i have found to work best, I am working on 3 different ROC's to get the best asset for next monday trade.

Main filter are weekly vix and MA filter

this is the weekly filter

RestorePriceArrays();
SetForeign("^VIX");
//Vix_value=12;
Vix_value=Optimize("Vix_value",14,3,14,1);
TimeFrameSet(inWeekly);
RSI14_vix = RSI(Vix_value);
TimeFrameRestore();
RSI14_vix = TimeFrameExpand( RSI14_vix , inWeekly );
RSIVix_value=Optimize("RSIVix_value",58,40,90,2);
MAFilter =RSI14_vix < RSIVix_value ; RestorePriceArrays(); MA filter which keeps draw down low are MAFilter2 = Foreign("SPY","C") > MA(Foreign("SPY","L"),200) OR Foreign("SPY","C") > MA(Foreign("SPY","C"),200);


As per this strategy SPY is the trade for next month.

here are past trades -


Ticker Trade Date Price Ex. date Ex. Price % chg Profit % Profit Shares Position value Cum. Profit # bars Profit/bar MAE MFE Scale In/Out
gsg Open Long 12/20/2010 33.35 1/7/2011 33.35 0.00% 0.00 0.00% 11241.3 374897.01 274897.00 15 0.00 -0.84% 4.17% 0/0
eem Long 11/15/2010 46.03 12/20/2010 45.83 -0.43% -1636.03 -0.43% 8180.17 376533.03 274897.00 25 -65.44 -4.05% 2.64% 0/0
gld Long 10/25/2010 130.85 11/15/2010 132.42 1.20% 4416.48 1.20% 2813.04 368086.72 276533.04 16 276.03 -1.57% 6.34% 0/0
eem Long 9/27/2010 43.7 10/25/2010 46.17 5.65% 19907.47 5.65% 8059.7 352209.10 272116.56 21 947.97 -0.68% 6.79% 0/0
vnq Long 9/7/2010 52.08 9/27/2010 52.13 0.10% 337.82 0.10% 6756.36 351871.26 252209.09 15 22.52 -1.82% 4.37% 0/0
vnq Long 7/26/2010 50.73 8/16/2010 49.3 -2.82% -10206.41 -2.82% 7137.35 362077.67 251871.27 16 -637.90 -3.29% 3.17% 0/0
gld Long 6/21/2010 120.39 6/28/2010 121.09 0.58% 2093.11 0.58% 2990.15 359984.59 262077.68 6 348.85 -0.51% 2.28% 0/0
vnq Long 2/22/2010 43.24 5/10/2010 51.41 18.89% 57148.54 18.89% 6994.92 302460.56 259984.57 55 1039.06 -1.47% 23.43% 0/0
eem Long 2/16/2010 39.12 2/22/2010 39.12 0.00% 0.00 0.00% 7509.56 293773.87 202836.04 5 0.00 -0.69% 1.10% 0/0
gsg Long 2/8/2010 28.82 2/16/2010 30.41 5.52% 15833.91 5.52% 9958.44 287002.11 202836.04 6 2638.99 0.00% 5.52% 0/0
vnq Long 12/7/2009 41.73 2/8/2010 40.12 -3.86% -11517.28 -3.86% 7153.59 298519.40 187002.12 43 -267.84 -4.57% 8.91% 0/0
gld Long 11/2/2009 103.95 12/7/2009 113.11 8.81% 23848.97 8.81% 2603.6 270644.10 198519.41 25 953.96 -0.22% 15.00% 0/0
eem Long 6/1/2009 33.81 11/2/2009 37.52 10.97% 27159.58 10.97% 7320.64 247510.87 174670.44 109 249.17 -12.34% 22.22% 0/0
eem Long 5/11/2009 30.11 5/18/2009 30.99 2.92% 7028.38 2.92% 7986.8 240482.49 147510.86 6 1171.40 -3.47% 2.92% 0/0
gsg Long 5/19/2008 67.88 5/27/2008 68.55 0.99% 2350.45 0.99% 3508.13 238132.03 140482.48 6 391.74 0.00% 4.68% 0/0
gsg Long 5/5/2008 64.79 5/12/2008 66.96 3.35% 7717.24 3.35% 3556.33 230414.79 138132.03 6 1286.21 0.00% 5.00% 0/0
gld Long 12/24/2007 80.14 1/7/2008 84.77 5.78% 12212.19 5.78% 2637.62 211378.95 130414.79 9 1356.91 0.00% 7.24% 0/0
vnq Long 12/17/2007 52.64 12/24/2007 56.6 7.52% 15266.47 7.52% 3855.17 202936.13 118202.61 6 2544.41 -1.40% 7.52% 0/0
eem Long 12/3/2007 48.48 12/17/2007 45.46 -6.23% -13481.46 -6.23% 4464.06 216417.61 102936.13 11 -1225.59 -6.23% 5.95% 0/0
eem Long 9/24/2007 46.5 11/12/2007 45.96 -1.16% -2542.77 -1.16% 4708.82 218960.35 116417.59 36 -70.63 -1.44% 14.09% 0/0
vnq Long 8/27/2007 57.93 9/4/2007 60.26 4.02% 8466.27 4.02% 3633.59 210494.09 118960.36 6 1411.05 -3.06% 4.02% 0/0
eem Long 7/9/2007 44.23 7/23/2007 45.62 3.14% 6413.56 3.14% 4614.07 204080.52 110494.09 11 583.05 -2.24% 3.14% 0/0
eem Long 4/2/2007 37.16 7/2/2007 42.54 14.48% 25669.53 14.48% 4771.29 177301.05 104080.52 64 401.09 0.00% 14.48% 0/0
vnq Long 3/26/2007 67.17 4/2/2007 67.51 0.51% 898.53 0.51% 2642.73 177512.46 78411.00 6 149.75 -2.60% 0.51% 0/0
vnq Long 3/12/2007 67.83 3/19/2007 67.07 -1.12% -2011.47 -1.12% 2646.67 179523.94 77512.47 6 -335.25 -3.95% 0.01% 0/0
vnq Long 8/21/2006 56.99 3/5/2007 64.14 12.55% 19612.72 12.55% 2743.04 156325.76 79523.94 134 146.36 -0.67% 28.96% 0/0
gld Long 7/31/2006 63.16 8/21/2006 62.44 -1.14% -1843.95 -1.14% 2561.04 161755.17 59911.21 16 -115.25 -4.53% 3.26% 0/0
gld Long 7/3/2006 62.18 7/17/2006 63.95 2.85% 4477.04 2.85% 2529.4 157278.12 61755.16 10 447.70 -1.19% 6.82% 0/0
gld Long 5/30/2006 65.11 6/12/2006 60.03 -7.80% -13309.56 -7.80% 2619.99 170587.68 57278.12 10 -1330.96 -8.29% 0.74% 0/0
eem Long 4/10/2006 31.54 5/15/2006 31.79 0.79% 1341.52 0.79% 5366.08 169246.16 70587.68 25 53.66 -0.96% 10.17% 0/0
vnq Long 3/27/2006 53.95 4/10/2006 52.33 -3.00% -5206.10 -3.00% 3213.64 173376.10 69246.16 11 -473.28 -3.00% 3.32% 0/0
eem Long 10/31/2005 24.56 3/27/2006 30.8 25.41% 35343.58 25.41% 5664.03 139108.69 74452.27 101 349.94 0.00% 28.95% 0/0
eem Long 4/25/2005 20.94 10/24/2005 24.47 16.86% 20067.58 16.86% 5684.87 119041.11 39108.69 128 156.78 -3.67% 26.75% 0/0
eem Long 11/1/2004 18.18 4/18/2005 20.35 11.94% 12693.82 11.94% 5849.69 106347.29 19041.11 116 109.43 0.00% 26.01% 0/0
eem Long 8/23/2004 16.28 10/25/2004 17.7 8.72% 8531.82 8.72% 6008.32 97815.47 6347.29 45 189.60 -0.43% 12.16% 0/0
eem Long 8/2/2004 15.76 8/9/2004 15.71 -0.32% -311.32 -0.32% 6226.32 98126.79 -2184.53 6 -51.89 -1.26% 1.75% 0/0
eem Long 7/12/2004 16.08 7/26/2004 15.53 -3.42% -3464.79 -3.42% 6299.61 101297.75 -1873.21 11 -314.98 -3.42% 1.21% 0/0
efa Long 1/5/2004 40.84 7/12/2004 41.49 1.59% 1591.58 1.59% 2448.58 100000.00 1591.58 130 12.24 -7.15% 3.90% 0/0



Sunday, January 2, 2011

Final DVO parameters/Filters

For now i have finalized on using this parameters with 5 day exit rules.

Buy = DVO < 20 AND MAFilter2 AND MAFilter ; Sell = DVO > 70 ;
Short = DVO > 80 AND MAFilter4 AND C < Percentile(C,200,40); Cover = DVO < 50 ; Here are the tickers i am using for the system eem efa gld gsg ief SPY vnq









Next on my agenda is to analyze TAA system and finalize it.

DVO system only on DIA,EEM,SPY,IWM and QQQQ

If you want to trade only the above assets, results are still good.

I get and 30 % car and 65% winning trade and max system draw down is 13.28%.

Here are some of the graphs-

DVO system test results





I have created a oscillator based on DVO indicator from David Vardi's website. Here are som of the details of the system.

Its trading a universe of the system which include major asset classes.

Main feature of this systems are -

1. it has a 5 day exit rule
2. only trades long if MAFilter2 = ROC(Foreign("SPY","C"),200) > 0 ;
3. only trades short if MAFilter4 = ROC(Foreign("SPY","C"),200) < 0 ; Keeping the system as simple as possible here is the basic criterio Buy = DVO < 20 AND MAFilter2 Sell = DVO > 70 ;
Short = DVO > 80 AND MAFilter4;// C 50;// AND AggregateM < .2 ;//AND Totalpercent == 1 ;
//AND MA( Close , 70 ) < C;
Cover = DVO < 50 ;//

as you can see i have tried lot of different way to filter the entry criterio but KISS rule overrides everything.

results - CAR =67%, system draw down = 20 % and 70% winner trades. I will puts some equity graphs.

here are some of the trades in last 1 year

Ticker Trade Date Price Ex. date Ex. Price % chg Profit % Profit Shares Position value Cum. Profit # bars Profit/bar MAE MFE Scale In/Out
vnq Long (n-bar) 1/4/2010 43.41 1/11/2010 43.69 0.65% 645.01 0.65% 2303.62 100000 645.01 6 107.5 -1.39% 1.95% 0/0
gld Long 1/12/2010 110.49 1/14/2010 112.03 1.39% 1402.78 1.39% 910.897 100645.01 2047.79 3 467.59 -0.83% 2.32% 0/0
eem Long 1/15/2010 41.62 1/19/2010 42.47 2.04% 2084.11 2.04% 2451.89 102047.8 4131.9 2 1042.05 -0.29% 2.04% 0/0
eem Long 1/21/2010 40.2 1/26/2010 38.77 -3.56% -3704.19 -3.56% 2590.35 104131.9 427.71 4 -926.05 -3.56% 2.89% 0/0
eem Long 1/29/2010 37.98 2/2/2010 39.32 3.53% 3543.26 3.53% 2644.23 100427.71 3970.97 3 1181.09 -0.52% 3.53% 0/0
eem Long 2/4/2010 37.33 2/11/2010 38.63 3.48% 3620.74 3.48% 2785.19 103970.97 7591.71 6 603.46 -3.84% 3.48% 0/0
gld Long 2/22/2010 109.07 2/25/2010 108.31 -0.70% -749.7 -0.70% 986.446 107591.71 6842.01 4 -187.42 -2.17% 0.83% 0/0
gld Long (n-bar) 3/5/2010 110.81 3/12/2010 107.95 -2.58% -2757.59 -2.58% 964.191 106842.01 4084.43 6 -459.6 -3.03% 0.85% 0/0
eem Long 3/19/2010 40.87 3/23/2010 41.31 1.08% 1120.56 1.08% 2546.72 104084.42 5204.98 3 373.52 -1.26% 1.65% 0/0
eem Long 3/25/2010 40.58 4/1/2010 42.88 5.67% 5962.83 5.67% 2592.53 105204.98 11167.81 6 993.8 -0.36% 5.67% 0/0
eem Long 4/9/2010 43.44 4/14/2010 43.64 0.46% 511.82 0.46% 2559.11 111167.81 11679.63 4 127.96 -1.99% 6.58% 0/0
ief Long 4/14/2010 87.41 4/16/2010 88.09 0.78% 856.06 0.78% 1258.92 110041.8 12535.69 3 285.35 -0.19% 0.78% 0/0
eem Long 4/16/2010 42.13 4/20/2010 42.46 0.78% 876.25 0.78% 2655.32 111868.47 13411.95 3 292.08 -1.91% 2.03% 0/0
ief Long 4/23/2010 87.74 4/27/2010 88.62 1.00% 1137.48 1.00% 1292.59 113411.95 14549.43 3 379.16 -0.10% 1.00% 0/0
eem Long 4/27/2010 41.2 4/29/2010 42.23 2.50% 2837.24 2.50% 2754.6 113489.51 17386.67 3 945.75 -0.57% 2.79% 0/0
efa Long (n-bar) 6/21/2010 50.13 6/28/2010 48.04 -4.17% -4894.04 -4.17% 2341.65 117386.67 12492.63 6 -815.67 -4.81% 1.76% 0/0
efa Long 6/29/2010 46.39 7/7/2010 49.07 5.78% 6498.82 5.78% 2424.93 112492.62 18991.45 6 1083.14 -0.80% 5.78% 0/0
ief Long (n-bar) 7/7/2010 93.98 7/14/2010 93.66 -0.34% -392.86 -0.34% 1227.69 115378.29 18598.59 6 -65.48 -0.85% 0.40% 0/0
eem Long 7/16/2010 38.35 7/20/2010 39.77 3.70% 4391.4 3.70% 3092.53 118598.59 22989.98 3 1463.8 -0.18% 3.70% 0/0
ief Long (n-bar) 7/20/2010 94.54 7/27/2010 93.96 -0.61% -737.27 -0.61% 1271.16 120175.78 22252.71 6 -122.88 -0.63% 0.73% 0/0
efa Long 7/29/2010 51.58 8/2/2010 53.16 3.06% 3744.85 3.06% 2370.16 122252.7 25997.55 3 1248.28 -1.27% 3.06% 0/0
gld Long 8/4/2010 116.72 8/10/2010 117.73 0.87% 1090.28 0.87% 1079.49 125997.56 27087.84 5 218.06 -0.32% 1.46% 0/0
eem Long 8/11/2010 40.08 8/16/2010 40.74 1.65% 2092.76 1.65% 3170.85 127087.83 29180.6 4 523.19 -1.04% 1.65% 0/0
gsg Long 8/16/2010 28.37 8/18/2010 28.69 1.13% 1443.5 1.13% 4510.95 127975.67 30624.1 3 481.17 0.00% 2.01% 0/0
ief Long 8/18/2010 97.23 8/24/2010 98.25 1.05% 1370.32 1.05% 1343.45 130624.11 31994.43 5 274.06 -0.06% 1.05% 0/0
gld Short 8/24/2010 120.36 8/26/2010 120.96 0.50% -652.84 -0.50% 1088.07 130959.97 31341.59 3 -217.61 -0.85% 1.37% 0/0
eem Short 8/27/2010 40.18 8/30/2010 39.51 -1.67% 2190.12 1.67% 3268.83 131341.58 33531.7 2 1095.06 -0.02% 2.27% 0/0
ief Short 8/31/2010 98.3 9/2/2010 97.19 -1.13% 1507.84 1.13% 1358.41 133531.7 35039.54 3 502.61 -0.08% 1.13% 0/0
efa Short 9/2/2010 51.53 9/7/2010 51.28 -0.49% 652.45 0.49% 2609.79 134482.59 35691.98 3 217.48 -1.22% 0.90% 0/0
ief Short 9/7/2010 97.4 9/9/2010 96.36 -1.07% 1428.8 1.07% 1373.85 133812.93 37120.79 3 476.27 -0.03% 1.07% 0/0
gld Long 9/9/2010 121.56 9/14/2010 124.02 2.02% 2753.49 2.02% 1119.31 136062.93 39874.28 4 688.37 -0.15% 2.02% 0/0
ief Long 9/15/2010 96.69 9/20/2010 96.87 0.19% 260.39 0.19% 1446.63 139874.28 40134.68 4 65.1 -0.55% 0.45% 0/0
gsg Long 9/21/2010 28.89 9/24/2010 29.46 1.97% 2764.86 1.97% 4850.63 140134.68 42899.53 4 691.21 -0.62% 1.97% 0/0
SPY Long 9/30/2010 113.53 10/6/2010 115.42 1.66% 2378.93 1.66% 1258.69 142899.54 45278.47 5 475.79 -0.83% 1.92% 0/0
gld Long 10/7/2010 130.37 10/11/2010 132.29 1.47% 2139.56 1.47% 1114.36 145278.47 47418.03 3 713.19 -0.66% 1.76% 0/0
gsg Long (n-bar) 10/15/2010 30.89 10/22/2010 30.83 -0.19% -286.34 -0.19% 4772.35 147418.03 47131.69 6 -47.72 -2.40% 1.39% 0/0
eem Long 10/25/2010 46.17 10/27/2010 45.34 -1.80% -2644.99 -1.80% 3186.74 147131.69 44486.69 3 -881.66 -1.80% 0.77% 0/0
ief Long 11/1/2010 98.13 11/3/2010 98.78 0.66% 957.06 0.66% 1472.4 144486.69 45443.75 3 319.02 -0.07% 0.67% 0/0
ief Long 11/5/2010 99.16 11/11/2010 98.61 -0.55% -806.72 -0.55% 1466.76 145443.76 44637.04 5 -161.34 -1.35% 0.45% 0/0
eem Long 11/12/2010 46.05 11/19/2010 46.15 0.22% 314.09 0.22% 3140.87 144637.03 44951.12 6 52.35 -2.99% 1.55% 0/0
ief Long (n-bar) 11/24/2010 96.61 12/2/2010 95.89 -0.75% -1080.27 -0.75% 1500.37 144951.12 43870.86 6 -180.04 -0.77% 1.22% 0/0
ief Long 12/3/2010 95.9 12/9/2010 94.29 -1.68% -2415.35 -1.68% 1500.22 143870.85 41455.51 5 -483.07 -2.58% 0.67% 0/0
ief Long 12/10/2010 93.49 12/16/2010 92.97 -0.56% -786.79 -0.56% 1513.05 141455.5 40668.72 5 -157.36 -1.49% 0.64% 0/0
ief Open Long 12/28/2010 92.5 12/28/2010 92.5 0.00% 0 0.00% 1520.74 140668.72 40668.72 2 0 0.00% 0.94% 0/0