Geometric Patterns Predict Stock Returns

August 15, 2017

View full report here


Computational Algorithms

The geometric strategy identifies trend reversals in stock prices by recognizing significant price points than make sure a specific shape. These patterns trigger signals on both the long and short side, outperforming a randomly selected portfolio during our testing period from 2014-2016.



We input historical closing prices for the top 25 market capitalization companies in the Nasdaq exchange from 2006-2017. Each data point is converter to a return, creating a stationary variable proper for prediction. In this research we focus only on the framework for a daily trading strategy, using end of day closing prices.


Stock volatility external market forces makes future prices harder to predict. We apply a smoothing technique to more easily track the trend of our data. Empirical mode decomposition, kernel regression and exponential smoothing are methods we test, finding kernel regression to work best. Figure 1. shows original Apple closing price compared to a smoothed time series.



The new price series takes a version of mean and calculates long-term averages with lower volatility. We tune the bandwidth parameter to determine the width of the kernel used, in our case, how many days to use for smoothing. Figure 2. displays the effect different parameters have on an original time series.


The larger the parameter, the smoother the data, but you are avoiding the risk of missing information. One option is to set a fixed bandwidth, such at 0.2. A more optimal technique is to use cross validation, which iterates between multiple options for bandwidth and calculate the mean squared error for different parameters. This gives a more optimal solution, but costs us processing time to calculate on a daily basis. To save processing time, we test in-sample and out-of-sample results and identify how robust the result is. We find that 2.0/2,800 is the optimal solution, because 2.0 was our initial bandwidth and 2,800 data points were in our sample size. Finally we have our fitted curve.


Extrema Signals

We identify maximum points in the function by looking at three consecutive points to see if they meet the criteria: E1<E2>E3. If the smoothed stock data identifies a local maximum, or the inverse (local minimum) then we move to the original data and find the position of the same extrema point. Figure 3. shows a time series with the smoothed extremas and their points on raw data.