The Cross-Overs

Three cross-overs are followed: Price Change Tipping Point, MACD and RSI.

Price Tipping Point. A total of the slope differential of the current closing price to the prices of previous closes. A buy signal occurs when the total goes over zero and a sell goes below.

Moving Average Convergence Divergence (MACD) I use an optimal value.

Relative Strength Index (RSI) Like the MACD - RSI crossover uses an optimal value.

Monday, December 16, 2013

While I Prepare for the 2014 Tests

I keep rerunning the build process to test some ideas but nothing has changed in relation to the model building process.

Come Jan. 1 2014 I will have set up a test database and report buy/sell indications when they occur.  Much like what I do in my other blog Aggregating for Expectations.

As of 2013/12/16 these are the results of the top 20 returns based on an initial investment of 10,000.
ETF Symbol M.A.
Period
Buy Pt. Sell Pt. Back Test Results
BIB 5 0.392 0.772 34143.56
CURE 15 0.316 0.796 32088.06
SOXL 6 0.704 0.367 29382.4
URTY 15 0.689 0.364 26563.09
RETL 25 0.698 0.426 25277.11
GASL 14 0.801 0.21 25183.5
TNA 26 0.417 0.203 25170.94
TQQQ 13 0.439 0.679 23518.75
FAS 14 0.798 0.465 23379.83
UMDD 29 0.722 0.209 22754.14
MIDU 4 0.98 0.421 22071.23
SPXL 14 0.811 0.394 21533.09
ERX 25 0.708 0.446 19721.42
INDL 24 0.5 0.042 19428.57
DZK 14 0.405 0.609 18839.21
UDOW 15 0.761 0.613 18445.4
TECL 14 0.626 0.473 18040.16
NUGT 29 0.907 0.573 17608.58
EDC 10 0.761 0.079 16262.89
DRN 15 0.71 0.074 15936.18

Saturday, November 23, 2013

What About Inverse Leverage ETFs

Inverse ETFs are useless when used with this methodology.  And here's why...

Using the results from the 10.23.2013 run of leveraged ETFS  and comparing them to their related inverse ETFs we get the following results:


GASL 40228.39 GASZ 10407.88
BIB 34557.53 BIS n.a.
RETL 30679.32 RETS n.a.
CURE 27799.36 SICK n.a.
UMDD 25679.05 MZZ 9595.94
SOXL 25264.49 SOXS 14302.28
TECL 19920.96 TECS 11128.26
RUSL 17537.36 RUSS 12364.84
INDL 17306.31 INDS n.a.
EDC 15446.73 EDZ 13253.47

The n.a. indicates that the inverse ETF has been closed or no results were produced that were better than a buy and hold strategy.

Thursday, November 21, 2013

How It Works ...

Moving Average Tipping Point

Abstract:  Compare the current  moving average value with previous (not current) moving averages to find a point when a good buy or sell signal is generated.

Introduction:  Can a method be built to better pick bottoms and tops of stock prices for effective buy and sell conditions using the current moving average value of a stock market product when compared not to its current relationship to its moving average but to its relationship of recent moving averages.  

Moving averages (m.a.) have been used to provide signals to buy and sell a stock.  There are hundreds of articles and web posting related to m.a. signals. Primarily the methods require a cross-over event with the price of a stock to its moving average or a cross-over of a slower m.a. to a faster m.a. Doing a internet search on "buy and sell signals" with "moving average" produces hundreds of thousands of search results.

For the past year I have deployed another method - comparing the current price to several previous m.a. points to produce the buy and sell signals.  Just today (2013/11/25) I have discovered that using the current m.a. value and not the price produces overall better returns (in backtests).

Materials and Methods:

1.  Daily numbers are extracted using Yahoo's financial data. This is easy to do with Java by following the discussion in the following links,  current data and historical data.

2. Moving averages are calculated using Java and the Java classes and methods from TA-LIB.

Running tests with all of the m.a.s available from the TA-LIB package the Kaufman Adaptive Moving Average (KAMA) produced the best results.
Kaufman Adaptive Moving Average (KAMA)
Kaufman Adaptive Moving Average (KAMA)
Kaufman Adaptive Moving Average (KAMA)
Kaufman Adaptive Moving Average (KAMA)


3.  Leveraged ETFs are used because they tend to have a lot of volatility.  Volatility is good for short-term trading because it produces better results by way of compounding with each low buy and higher sell.

4. For each ETF a program is run to calculate moving averages for periods running from 3 to 29 days. 

Over the years, running multiple different m.a. scenarios I have found that trend trading works best for very short periods of time.  Most scenarios used  basic m.a. strategies of price cross-over. With volatile stock prices short term strategies were more profitable, I surmise this is due to compounding - getting in and out and in and out of one stock over a period of time. Of course this only works if you buy at the low and sell at the high and buy at the low and...

So my first assumption was that a 3 or 4 day period was most profitable.  This was not the case for better results occurred in a wide range of periods - 6 to 28 days.

5. Using the moving average data a method calculates the slope of each day's m.a. value with the previous days' moving average over the same period as the original moving average. So if the current period is x then a new table of data is computed
      DailyMATIPx = Average (Slope (M.A x - M.A.y)) where y = x-1 to x-period.

Why Slope?  It provides a weighted average.


6.  Then this new column of data is made relative by scaling the numbers between 0 and 1 using the formula
DailyMATIPx = ( DailyMATIPx - DailyMATIPlow ) / (DailyMATIPhigh - DailyMATIPlow).

7.  A buy signal is generated when the DailyMATIP falls below a predefined percentage and likewise a sell when DailyMATIP is above.  The backtest buy and sell prices use the  next day's closing price of the occurring event.

8. Backtests are run over DailyMATIP values from .02 through .98 stepping .0005 with backtest value for each buy and sell test. Using an initial investment of $10,000 the test with the highest results wins.

The backtest are run twice. The first is over the period of the last big bear market 10/01/2007 through 03/02/2009 or if data is not available for the period then the period used is 04/19/2011 through 09/26/2011. Then using the best result for each period a second back test is done using the last year's worth of data.  Note: that the second back test is using data as the US market indexes are hitting all-time highs so results of the ETFs are reflected by the current market conditions;  it'll be interesting to see the results in a down market similar to the period used in the first backtest.

9.  The following Leverage ETFs were used for testing: BIB, DRN, ERX, FAS, MIDU, RETL, SPXL, TECL, TNA, URTY, BRZU, CURE, DGLD, DSLV, DZK, EDC, GASL, INDL, JGBD, LBJ, NUGT, RUSL, SOXL, TMF, TQQQ, UDOW, UGLD, UMDD, UPRO and USLV

Using the current moving average to previous moving averages -

As of 2013/11/25 these are the results of the top 10 returns based on an initial investment of 10,000.

ETF Symbol M.A.
Period
Buy Pt. Sell Pt. Back Test Results
BIB 7 0.4015 0.834 33502.01
GASL 27 0.4765 0.1715 32828.64
CURE 14 0.3635 0.8305 31127.89
URTY 24 0.819 0.3315 30406.67
UMDD 29 0.42 0.1855 29315.86
TNA 24 0.8275 0.3335 29196.51
SOXL 6 0.7135 0.5615 27565.91
RETL 28 0.9365 0.738 26172.63
FAS 9 0.524 0.816 25981.64
TQQQ 28 0.7945 0.455 23881.94


Using the price to previous moving averages -

As of 2013/11/23  these are the results of the top 10 returns based on an initial investment of 10,000.


ETF Symbol M.A.
Period
Buy Pt. Sell Pt. Back Test Results
GASL 9 0.805 0.533 40228.39
BIB 19 0.4915 0.889 34557.53
RETL 4 0.3425 0.749 30679.32
CURE 28 0.3965 0.8165 27799.36
UMDD 25 0.6765 0.493 25679.05
SOXL 6 0.7895 0.515 25264.49
TECL 13 0.6725 0.5185 19920.96
RUSL 10 0.7695 0.309 17537.36
INDL 6 0.4235 0.02 17306.31
EDC 13 0.6915 0.02 15446.73

9.  The most important thing to remember is - Past Performance Is No Guarantee Of Future Results...



Results:  I will post the results through-out the 2014 financial year of the 10 most active 3x or 2x leverage ETFs.


For a review of inverse leveraged ETFs using this methodology see.