Single factor look-forward ranking / simulation

For my final year project (over a decade ago), I tried to create a neural network based system to predict if the next day will be up by over 1%, down by over 1% or stay within +/-1%. I tried combinations of daily returns from the past 1 to 30 days for the stock and index (SP500) to predict the return. It was not successful as auto-correlations and index correlations did not show strong predictive power.

Though unsuccessful, this got me thinking about simple single factor models that could be optimized, say for the last 6 months to identify factors that are on a roll to produce out-sized returns over the next week or month. Has anyone tried this approach or has thoughts / published literature suggesting why this may / may not work. Also any tricks on how this could be tested with P123 would be highly appreciated.

Cheers,
Mukesh

Mukesh,

I think that the Ranking System performance will do that just fine. Create a single factor or single function ranking system and run the performance using 1 week or 4 week rebalance. Use whatever test period you want and what ever universe you want. Compare the top bucket annual return to the S&P 500 return. The larger the difference for various factors or functions, the higher the alpha. This is the approach that Dan (danparquette) used 10 years ago to create his ExcellentOnly-Optimized ranking system. That approach has been used by many members over the years to create new and effective ranking systems with great results.

I have been using that approach over 5 time periods. 01/1999 > 02/2000, 02/2000 > 02/2003, 02/2003 > 11/2007, 11/2007 > 02/2009, and 02/2009 > today. It is VERY interesting which factors perform very well during bull markets, but crater badly during bear market. And which perform so-so in bull markets, buy also perform ok in bear markets. Very eye opening. One of my best systems switches between the 2 different sets of factors & functions as the market changes.

I would prefer that we could have the performance compare to the selected universe instead of the S&P 500, but for now that is a limitation.

Mukesh,
I have thought about working on a system that would try to use trend following rules based on individual factors or on related groups of factors like value, RS, growth, etc. I have no doubt that factors do trend as Denny mentioned. But a system like this would take a lot of work to run on a regular basis unless all the steps were automated. Maybe it can be added to the wishlist for factor analysis tools on P123.

I attached an Excel file that I created when I was thinking about this. It has one tab for a single factor ranking system and two for a really simple multifactor value system. The idea was to use the charts (far right on the sheet) to see if the factors return for the top bucket vs the index was random or if trends could be established. And if there was a trend, could you use a trend following system? For example, maybe you could use that factor(s) when the 10 period ma was above the 50 period ma and drop that factor when the 10 period is < 50 period. You could add calculations to the sheet to backtest any trend following rules you might want to try out.

The results are somewhat erratic for the ranking systems I made up for this when you use 20 buckets. The 3rd tab has only 10 buckets and gives smoother results.


Ranking sytem trend charts.xlsx (202 KB)

Hi Mukesh,

I was thinking of neural networks as well. For me it would make a lot of sense to use ANN for forward prediction of stock prices in ports with high turnover. There are several ports with a 10- 20 day holding period, and a properly trained ANN system might help to increase the number of overall winners by using a buy filter. I don’t know how you would come up with a general formula for this out of an ANN, but if you have some useful literature to share, I would definitely dig into it.

Denny - Thank you for sharing yout thoughts and pointing to Dan’s work. This is how I have been tagging the 6 market phases using 200 and 50 day MA position and slope:

SMA(50,0,#Bench) > SMA(200,0,#Bench) and benchclose(0) > SMA(50,0,#Bench) and SMA(50,0,#Bench) > SMA(50,10,#Bench) and SMA(200,0,#Bench) > SMA(200,10,#Bench) //Bulish
benchclose(0) < SMA(50,0,#Bench) and SMA(50,0,#Bench) > SMA(200,0,#Bench) //Warning
SMA(50,0,#Bench) < SMA(50,10,#Bench) and SMA(50,0,#Bench) > SMA(200,0,#Bench) and SMA(200,0,#Bench) > SMA(200,10,#Bench) //Distribution
SMA(50,0,#Bench) < SMA(200,0,#Bench) and SMA(50,0,#Bench) < SMA(50,10,#Bench) and SMA(200,0,#Bench) < SMA(200,10,#Bench) //Bearish
benchclose(0) < SMA(200,0,#Bench) and benchclose(0) > SMA(50,0,#Bench) and SMA(50,0,#Bench) >= SMA(50,10,#Bench) and SMA(200,0,#Bench) < SMA(200,10,#Bench) //Recovery
benchclose(0) > SMA(200,0,#Bench) and benchclose(0) > SMA(50,0,#Bench) and SMA(50,0,#Bench) > SMA(50,10,#Bench) and SMA(200,0,#Bench) >= SMA(200,10,#Bench) //Accumulation

I am planning to evaluate which factors work best in each of these phases. Any thoughts on how P123 can be used to efficiently do this would be appreciated.

Dan - I like how you have organized the evaluation using moving average. It would be worthwhile to run the factors and identify when alpha moving average turns for a factor. It would be interesting to use MA crossover or MACD of % alpha to switch between factors. The approach of downloading the data in Excel is certainly one way I could use to test the average alpha for each factor across the above 6 phases.

Sevensisters - It has been a long time since I dealt with NN. Over time I have moved away from sophisticated approaches using low number of variables (not a lot of data was available in free form to use in MATLAB or SAS) to simple approaches using a lot of variables (most platforms with historical fundamental data did not allow sophisticated transformations). For some reason, I have been able to find good models that earn high returns using the latter. Maybe with data science and democratization of data becoming a trend, best of both worlds is now within reach for individual investors. I will try to dust up my old project and post it here if I find it.