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.

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.

No comments:

Post a Comment