Lesson 11 

Improving your forecast

The technology described in the previous lesson (see Lesson 10: One mouse click - and the forecast is ready) appeared to be an effective one. The advantage of its approach is that we can get a rather reasonable projection line avoiding the application of more advanced technologies (such as Neural Network). So, in this lesson, we will discuss how to improve this forecast. Our special concern will be considering the application of this method to intraday data.

Time/Bar Metrics and their application

We need to get a forecast before starting to improve it. We will do it for the intraday data as there are some issues to be discussed. Let us start.

Download the S&P 500 index with 15 min. bar (I have downloaded 2000 bars, it covers 4 months). 

Before doing anything, look at the price chart. This is how it looks in a real time:

You see the gaps there. It is not a mistake, the gaps are present due to non trading periods. This price chart reflects exactly what is happening in time though this presentation is not convenient for a real trader. Switch to "Bar" option; the same price chart will have no gaps. It looks now more convenient for the trader:  

Now, using the "Bar" metrics, we have a consistent data set for intraday. It means that we can apply all our methods to these data; only do not forget that it is in price bars instead of minutes and hours.

So we do now our routine. Run the "Spectrum" module. There is the option there, "Metric", that shows to us in what domain the analyzed cycles exist:

 

If we set there "Time", the analyzed cycles will be dealt with in our usual time. It means that the cycle with the period of 28 days repeats itself every 28 calendar days.

However for intraday data this kind of cycles does not reflect the reality. There are weekends and non-trading hours; sometimes the gap might be of 3 days during long weekends, and the trading time is "stopped" for all these three days. To take into account this fact, it is better to use "Price Bar" as a cycle metric:

 

 

Here the program calculates the cycles that exist in "bar time". Therefore, for daily data the period of a cycle is measured not in calendar days, but in trading days. For intraday data, the usage of this metric is highly recommended. The usage of the usual time here mixes all cycle patterns.

Also while you download the price history, pay attention to "trade days/hours" settings:

The program should "know" trade days and hours to display the projection line correctly:

Do not forget to define the forecast horizon:

When all this is done, we able to work with the Spectrum module using the intraday data. 

For our example (S&P 500 Index, 15 min.), I have chosen four strongest cycles:

 

 

Drag these cycles to the Main screen to receive this projection line:

 

Final Forecast

As you see, the Learning Border Cursor is set on the last day of September. We have data for two more weeks in October. We can see that our model provides a forecast for these weeks. I would say that this forecast is not bad, and the chosen cycles affect this market. We do not use the price history after LBC (i.e. October price history) to adjust our projection line, we try here to get a general impression of the forecasting based on our chosen cycles. This is an absolutely necessary procedure that gives us some confidence that what we do here makes sense, it is workable. If we would not like what we see, we can try other cycles or their different combination (three or five cycles instead of four that I have chosen for this example). Thus, we keep some part of the price history untouched to see how our technology works. In statistics this part of a data set is called "out of sample". We do not use this piece of the price history neither to calculate the spectrum nor to generate the projection line. 

If we decide that this forecast is good enough to work with, we do the final step: we recalculate our model using all available price history. It is very easy to do; just set LBC on the last price bar and recalculate the projection line. Follow these steps:

 

This is the projection line that I have got:

 

Dangerous point

I would like to point out one dangerous moment in the procedure of making a forecast. You may have some long term trend like this one:

 

Here we have a relatively long down trend, and the projection line goes up right after the last available price bar. This is a kind of "reaction"; practically any intraday model will show the upward movement here.

To see the whole picture and be sure that the forecasted instrument is actually going up, it is better to use the models that can work with bigger cycles (as an example, try Annual cycle).  Sometimes it is better to not use all available price history, keeping some portion of it untouched; otherwise the program is too concentrated on the most recent price history. 

 

Parameters to Vary