The Internet is an amazing scientific tool. Communication of results is much faster, although, of course, with, potentially, dreck and misinformation. At the same time, pressures within the academy and Big Science seem to translate into a shocking amount of bogus research being touted. So maybe this free-for-all on the Web is where it’s at, if you are trying to get up to speed on new findings.

So this post today seeks to nail down some further and key points about **predicting the high and low of stocks over various periods** – conventionally, daily, weekly, and monthly periods, but also, as I have discovered, highs and lows over consecutive blocks of trading days ranging from 1 to 60 days, and probably more.

My recent posts focus on the SPY exchange traded fund, which tracks the S&P 500.

Yesterday, I formulated my general findings as follows:

*For every period from daily periods to 60 day periods I have investigated, the high and low prices are “relatively” predictable and the direction of change from period to period is predictable, in backcasting analysis, about 70-80 percent of the time, on average.*

In this post, let me show you the same basic relationship for a common stock – Ford Motor stock (F). I also consider data from the 1970’s, as well as recent data, to underline that modern program or high-speed computer-based algorithms have nothing to do with the underlying pattern.

I also show that the predictive model for the high in a period successfully captures turning points in the stock price in the 1970’s and more recently for 2008-2009.

**Approach**

Yahoo Finance, my free source of daily trading data, has history for Ford Motor stock dating back to June 1, 1972, charted as follows.

Now, the predictive models for the daily high and low stock price are formulated, as before, keying off the opening price in each trading day. One of the key relationships is the proximity of the daily opening price to the previous period high. The other key relationship is the proximity of the daily opening price to the previous period low. Ordinary least squares (OLS) regression models can be developed which do a good job of predicting the direction of change of the daily high and low, based on knowledge of the opening price for the day.

**Predicting the Direction of Change of the High**

As before, these models make correct predictions regarding the directions of change of the high and low about 70 percent of the time.

Here are 30 period moving averages for the 1970’s, showing the proportions of time the predictive model for the daily high is right about the direction of change.

So the underlying relationship definitely holds in this age in which computer modeling of trading was in its infancy.

Here is a similar chart for the first decade of this century.

So whether we are considering the 1970’s or the last ten years, these predictive models do well in forecasting the direction of change of the high in daily (and it turns out other) periods.

**Predicting Turning Points**

We can make the same type of comparison – between the 1970’s and more recent years – for the capability of the predictive models to forecast turning points in the stock high (or low).

To do this usually requires aggregating the stock data. In the charts below, I aggregate to 7 trading day periods – not quite the same as weekly periods, since weekly segmentation can be short a day and so forth.

So the high which the predictive model focuses on is the high for the coming seven trading days, given the current day opening price.

Here are two charts, one for dates in the 1970’s and the other for a period in the recession of 2008-2009. For each chart I estimate OLS regressions with data predating each forecast of the high, based on blocks of 7 trading days.

These predictions of the high crisply capture most of the important turning and inflection point features.

The application of similar predictive models for the 2008-2009 period is a little choppier, but does nail many of the important swings in the direction of change of the high of Ford Motor stock.

**Concluding Thoughts**

Well, this relationship between the opening prices and previous period highs and lows is highly predictive of the direction of change of the highs and lows in the current period – which can be a span of time from a day to 60 days in my findings.

These predictive models work for the S&P 500 and for individual stocks, like Ford Motor (and I might add Exxon and Microsoft).

They work in recent time periods and way back in the 1970’s.

And there’s more – for example, one could argue these patterns in the high and low prices are fractal, in the sense they represent “self similarity” at all (really many or a range of) time scales.

This is literally a new and fundamental regularity in stock prices.

Why does this work?

Well, the predictive models are closely related to very simple momentum trading strategies. But I think there is a lot of research to be done here. If you want further detail on any of this, please put your request in the Comments with the heading “Request for High/Low Model Information.”

Top picture from Strategic Monk.

Clive,

I have been following these posts of yours very closely, because I have been doing some work in the same area for last few years. Like you mentioned, I too have developed multiple iterations of my main stock forecasting script. Yet, I rarely achieve results as good as you’re showing in these posts. I would say that my results are good – normally around 98% accurate – but nailing the turns are not consistent enough to use them for live trading. I posted the URL of my project on Github in the website link. I use R, and I believe I have seen you use R in some of posts, so you should be able to understand the script. If you want to run the script, you will need to install my custom functions that are found on github (https://github.com/drewgriffith15/griffun).

For a brief overview of my current forecasting script, I have found that 35 historical periods work best with 15 forecast periods. I am using a function that I built that looks for the best matches looking through the entire stock history for N (number) of X variables based on a correlation of determination matrix (find.matches()). Recently, I added in VIX data into the regression calculation and that seems to slightly improve the model. Every time I run the script, I run a backtest against the last 15 periods to see how accurate it was. Then, the second half of the script runs a forecast for the next 15 days.

I tried to replicate your OLS using the single variable (-1+O/PH), but the results are not as good as yours. Maybe I am calculating the X variable wrong. I am using the rollapply function in the zoo package. Here’s the formula in R: 1 – Op(data$SPY)/rollapply(mlag(Hi(data$SPY),1), 40, max).

I look forward to hearing your feedback. Keep up the good work. I am very appreciative of your research, and I also look forward to your next post.

Thanks,

Drew

Drew, Thank you for your comment and for the R script. I am working on a scientific paper summarizing the method and results with related finance literature to the extent possible. I will ping you when that is available. In the meanwhile, I looked at rollapply in the R zoo package. You have to restructure the data into non-overlapping but consecutive blocks. I don’t think rollapply does that. Keep in touch.

Hello sir, I appreciate your work. Its a one of the most challenging work to forecast next day.