Example 2

Forecast 30 Days into the Future

Topic: Intel Stock Value

Before the prediction, we have to set up the data set, which is a collection of variables.

In this example, the data set is

{ 5-month moving average of Intel ,

5-month moving average of Microsoft,

5-month moving average of Nasqag

},

3 variables.

Let us get some free data and make a prediction.

Data Collection

Preprocessing Using Microsoft Excel

Predictor Input File

Run Attrasoft Predictor 2.4

How good is the result based on the three-variable model?

Online Order

Return

Intel Data Collected from Internet (Free)

Online Order
 
Requirements:

Assume we are trying to collect data about the Intel Corp. (intc) for the last five years, here is the
procedure:
 
Set up:
   

 
Download Data ...

     1. Repeat the above step 1 through step 3;

     2. Click "I see the Chart"; (now you should see Intel stock chart);

     3.  On this page, find "Period", click it and then click .......  "5 Year" (for example);

     4. Click "Export Data", now your Microsoft Excel will be opened, and the data is the spreadsheet file "intc.csv".
 

Now, you have obtained the Intel stock data for the last five years, and it looks like this:

 

Intel Corp

Date, High, Low, Close, Volume

05/01/97,169.75,140,151.5,298074100

04/01/97,153.5,128.25,153.125,309040100

03/03/97,150.25,125.75,139.125,272704800

02/03/97,165,137,141.875,269789900

01/02/97,164,127.625,162.25,278853200

12/02/96,141.5,123.375,130.938,225886100

11/01/96,127.25,108,126.875,209014600

10/01/96,114.25,94.25,109.875,222955000

09/03/96,99.5,78.5,95.4375,161126500

08/01/96,83.25,74.875,79.8125,154940600

07/01/96,75.8906,64.125,75.125,245613400

06/03/96,77.75,70.25,73.4375,139077400

05/01/96,75.625,66.5,75.5,159078200

04/01/96,70.375,56.375,67.75,206610000

03/01/96,60.25,51.5,56.875,173333000

02/01/96,61.625,54.8594,58.8125,141994500

01/02/96,59.375,49.8125,55.2344,299064800

12/01/95,64,55.1875,56.75,155304700

11/01/95,73.1406,59.875,60.875,204477400

10/02/95,71.375,57.75,69.875,218171100

09/01/95,66.625,57.25,60.125,180597100

08/01/95,67.25,57.125,61.375,246627200

07/03/95,78.375,62.5,65,279173000

06/01/95,66.375,54.75,63.3125,248637000

05/01/95,59.5,51.4375,56.125,340296600

04/03/95,52.0625,42.25,51.1875,257814200

03/01/95,45,39.1875,42.4375,244022200

02/01/95,40.375,34.5625,39.875,194169800

01/03/95,35.875,31.5,34.6875,249118200

12/01/94,32.875,28.75,31.9375,265849600

11/01/94,33.6328,29.875,31.5625,207700000

10/03/94,31.5,28.6875,31.0625,209944400

09/01/94,34.125,30,30.75,162702800

08/01/94,33.75,28.3125,32.875,194420400

07/01/94,31.5,28.0625,29.625,160842600

06/01/94,32.5,28.625,29.25,147758800

05/02/94,31.375,28.25,31.25,159360400

04/04/94,35.5,28,30.5,232118600

03/01/94,36.75,32.5,33.75,207829600

02/01/94,34.625,30.25,34.375,173625000

01/03/94,34.625,30.375,32.625,246762200

12/01/93,32.375,28.125,31,186476400

11/01/93,32.25,28.125,30.75,195267400

10/01/93,36.9375,30.75,31.625,252602200

09/01/93,37.125,30.125,35.375,160292400

08/02/93,33.625,26.125,32.125,186582000

07/01/93,28.5,24.625,26.125,154032800

06/01/93,30.25,26.4375,27.5,178928000

05/03/93,28.375,23.8125,27.7188,211143600

04/01/93,30.25,21.375,23.7813,473520400

03/01/93,30.3125,27.8125,28.75,253312000

02/01/93,30,26.0625,29.125,300654400

01/04/93,29.5,21.5625,26.6875,372534400

12/01/92,22.875,17.75,21.75,240476400

11/02/92,18.0625,16.625,17.875,130800400

10/01/92,17.2813,15.1875,16.875,194588800

09/01/92,16.75,14.4375,16.4375,150574000

08/03/92,15.3125,13.5625,14.5,98660800

07/01/92,15.0625,13.6875,14.9375,145772800

06/02/92,14.4375,11.9375,14.25,168246800

Similarly, we can get data for Microsoft and Nasdaq.

Online Order

Back to top

Preprocessing Using Microsoft Excel

Online Order

 Now, using Microsoft Excel, within a few clicks (no typing, please), we will

(1) sort the data (latest data last);

(2) remove high, low, volume-column;

(3) compute 5-month moving average.

The results are:
Intel Microsoft Nasdag Intel Microsoft Nasdaq
Date Close Close Close Avg Avg Avg
6/2/92 
14.25 
17.5 
563.6 
7/1/92 
14.9375 
18.1875 
580.83 
8/3/92 
14.5 
18.625 
563.12 
9/1/92 
16.4375 
20.125 
583.27 
10/1/92 
16.875 
22.1875 
605.17 
15.4 
19.325 
579.198 
11/2/92 
17.875 
23.2813 
652.73 
16.125 
20.48126 
597.024 
12/1/92 
21.75 
21.3438 
676.95 
17.4875 
21.11252 
616.248 
1/4/93 
26.6875 
21.625 
696.34 
19.925 
21.71252 
642.892 
2/1/93 
29.125 
20.8438 
670.77 
22.4625 
21.85628 
660.392 
3/1/93 
28.75 
23.125 
690.13 
24.8375 
22.04378 
677.384 
4/1/93 
23.7813 
21.375 
661.42 
26.01876 
21.66252 
679.122 
5/3/93 
27.7188 
23.1563 
700.53 
27.21252 
22.02502 
683.838 
6/1/93 
27.5 
22 
703.95 
27.37502 
22.10002 
685.36 
7/1/93 
26.125 
18.5 
704.7 
26.77502 
21.63126 
692.146 
8/2/93 
32.125 
18.7813 
742.84 
27.45002 
20.76252 
702.688 
9/1/93 
35.375 
20.625 
762.78 
29.76876 
20.61252 
722.96 
10/1/93 
31.625 
20.0313 
779.26 
30.55 
19.98752 
738.706 
11/1/93 
30.75 
20 
754.39 
31.2 
19.58752 
748.794 
12/1/93 
31 
20.1563 
776.8 
32.175 
19.91878 
763.214 
1/3/94 
32.625 
21.2813 
800.47 
32.275 
20.41878 
774.74 
2/1/94 
34.375 
20.625 
792.5 
32.075 
20.41878 
780.684 
3/1/94 
33.75 
21.1875 
743.46 
32.5 
20.65002 
773.524 
4/4/94 
30.5 
23.125 
733.84 
32.45 
21.27502 
769.414 
5/2/94 
31.25 
26.875 
735.19 
32.5 
22.61876 
761.092 
6/1/94 
29.25 
25.8125 
705.96 
31.825 
23.525 
742.19 
7/1/94 
29.625 
25.75 
722.16 
30.875 
24.55 
728.122 
8/1/94 
32.875 
29.0625 
765.62 
30.7 
26.125 
732.554 
9/1/94 
30.75 
28.0625 
764.29 
30.75 
27.1125 
738.644 
10/3/94 
31.0625 
31.5 
777.49 
30.7125 
28.0375 
747.104 
11/1/94 
31.5625 
31.4375 
750.32 
31.175 
29.1625 
755.976 
12/1/94 
31.9375 
30.5625 
751.96 
31.6375 
30.125 
761.936 
1/3/95 
34.6875 
29.6875 
755.2 
32 
30.25 
759.852 
2/1/95 
39.875 
31.5 
793.73 
33.825 
30.9375 
765.74 
3/1/95 
42.4375 
35.5625 
817.21 
36.1 
31.75 
773.684 
4/3/95 
51.1875 
40.875 
843.98 
40.025 
33.6375 
792.416 
5/1/95 
56.125 
42.3438 
864.58 
44.8625 
35.99376 
814.94 
6/1/95 
63.3125 
45.1875 
933.45 
50.5875 
39.09376 
850.59 
7/3/95 
65 
45.25 
1001.21 
55.6125 
41.84376 
892.086 
8/1/95 
61.375 
46.25 
1020.11 
59.4 
43.98126 
932.666 
9/1/95 
60.125 
45.25 
1043.54 
61.1875 
44.85626 
972.578 
10/2/95 
69.875 
50 
1036.06 
63.9375 
46.3875 
1006.874 
11/1/95 
60.875 
43.5625 
1059.2 
63.45 
46.0625 
1032.024 
12/1/95 
56.75 
43.875 
1052.13 
61.8 
45.7875 
1042.208 
1/2/96 
55.2344 
46.25 
1059.79 
60.57188 
45.7875 
1050.144 
2/1/96 
58.8125 
49.3438 
1100.05 
60.30938 
46.60626 
1061.446 
3/1/96 
56.875 
51.5625 
1101.4 
57.70938 
46.91876 
1074.514 
4/1/96 
67.75 
56.625 
1190.52 
59.08438 
49.53126 
1100.778 
5/1/96 
75.5 
59.375 
1243.43 
62.83438 
52.63126 
1139.038 
6/3/96 
73.4375 
60.0625 
1185.02 
66.475 
55.39376 
1164.084 
7/1/96 
75.125 
58.9375 
1080.59 
69.7375 
57.3125 
1160.192 
8/1/96 
79.8125 
61.25 
1141.5 
74.325 
59.25 
1168.212 
9/3/96 
95.4375 
65.9375 
1226.92 
79.8625 
61.1125 
1175.492 
10/1/96 
109.875 
68.625 
1221.51 
86.7375 
62.9625 
1171.108 
11/1/96 
126.875 
78.4375 
1292.61 
97.425 
66.6375 
1192.626 
12/2/96 
130.938 
82.625 
1291.03 
108.5876 
71.375 
1234.714 
1/2/97 
162.25 
102 
1379.85 
125.0751 
79.525 
1282.384 
2/3/97 
141.875 
97.5 
1309 
134.3626 
85.8375 
1298.8 
3/3/97 
139.125 
91.6875 
1221.7 
140.2126 
90.45 
1298.838 
4/1/97 
153.125 
121.5 
1260.76 
145.4626 
99.0625 
1292.468 
5/1/97 
151.5 
124 
1400.32 
149.575 
107.3375 
1314.326 
  Online Order

Back to top

Attrasoft Predictor Input File

Online Order

The input data file is:

*

Predict Intel stock 1 month ahead.

Model = { 5-month-moving-average of Intel, Microsoft and Nasdag }.

Data 6/92 - 5/97.

*

3

 

15.4 19.325 579.198

16.125 20.48126 597.024

17.4875 21.11252 616.248

19.925 21.71252 642.892

22.4625 21.85628 660.392

24.8375 22.04378 677.384

26.01876 21.66252 679.122

27.21252 22.02502 683.838

27.37502 22.10002 685.36

26.77502 21.63126 692.146

27.45002 20.76252 702.688

29.76876 20.61252 722.96

30.55 19.98752 738.706

31.2 19.58752 748.794

32.175 19.91878 763.214

32.275 20.41878 774.74

32.075 20.41878 780.684

32.5 20.65002 773.524

32.45 21.27502 769.414

32.5 22.61876 761.092

31.825 23.525 742.19

30.875 24.55 728.122

30.7 26.125 732.554

30.75 27.1125 738.644

30.7125 28.0375 747.104

31.175 29.1625 755.976

31.6375 30.125 761.936

32 30.25 759.852

33.825 30.9375 765.74

36.1 31.75 773.684

40.025 33.6375 792.416

44.8625 35.99376 814.94

50.5875 39.09376 850.59

55.6125 41.84376 892.086

59.4 43.98126 932.666

61.1875 44.85626 972.578

63.9375 46.3875 1006.874

63.45 46.0625 1032.024

61.8 45.7875 1042.208

60.57188 45.7875 1050.144

60.30938 46.60626 1061.446

57.70938 46.91876 1074.514

59.08438 49.53126 1100.778

62.83438 52.63126 1139.038

66.475 55.39376 1164.084

69.7375 57.3125 1160.192

74.325 59.25 1168.212

79.8625 61.1125 1175.492

86.7375 62.9625 1171.108

97.425 66.6375 1192.626

108.5876 71.375 1234.714

125.0751 79.525 1282.384

134.3626 85.8375 1298.8

140.2126 90.45 1298.838

145.4626 99.0625 1292.468

149.575 107.3375 1314.326

 

The question is: what is the next moving average on 6/2/97?

Online Order

Back to top

Run Attrasoft Predictor 2.4

Online Order

If you  then with one click, Attrasoft Prediction 2.4 will give the following 30 day forecasts, which will indicate the moving average on 6-2-97. The forecasts are listed as a distribution, i.e. a set of possibilities and their relative probabilities. Of those 30 days forecasts (Possibility, Relative Probability), the Relative Probability in the distribution should lead you to the most likely stock value which will occure on 6-2-97. (The Relative Probability of a possibility is also the Confidence of the prediction on that possibility). The largest Relative Probability is the Confidence of the prediction.

 Predictor Forecasts:

-----------------------------------------------------------------------

Possibility ...................Relative Probability(Confidence)
 

[ 146.334 , 149.542) [ 110.316 , 112.139) [ 1281.68 , 1292.33) 110

[ 149.542 , 152.749) [ 110.316 , 112.139) [ 1324.26 , 1334.9) 20

-----------------------------------------------------------------------
 

30 Day Prediction:

Weighted Average:
 If you want to get a single number, weighted average can be used. Online Order

Back to top

How good is the result?

Online Order

The real data of Intel stock value on 6-2-97 is $154.626,( Data obtained from here) from which the next moving average can be calculated:
2/3/97 
141.875 
134.3626 
3/3/97 
139.125 
140.2126 
4/1/97 
153.125 
145.4626 
5/1/97 
151.5 
149.575 
6/2/97 
154.626 
148.0502 
On 6-2-97, the 5-month Intel moving average is 148.0502. June 2, 1997 is the date of the next 5-month moving average you want the attrasoft Predictor to forecast. Attrasoft Predictor forecast for 6-2-97 were:

[ 146.334 , 149.542) is the most likely result, with 84.6% probability; or
148.45 as weighted average

The reality is :

The 5-month moving average of Intel on 6/2/97 is 148.0502.

It is a direct hit!

Compare predicted 148.45 with 148.05 ....
Now it is YOUR TURN ... to ... sharpen YOUR SKILL on this amazing tool!!! Practice and perfection can be yours!

More runs with different parameters:

20-precision levels:

Possibility Confidence*Probability

[ 146.188 , 147.719) [ 110.855 , 111.724) [ 1281.68 , 1286.76) 640

[ 144.658 , 146.188) [ 111.724 , 112.594) [ 1286.76 , 1291.84) 200

[ 149.25 , 150.781) [ 110.855 , 111.724) [ 1322.32 , 1327.4) 400

Weighted average:
[ 146.188 , 147.719), average = 147.1885,  relative weight = 640

[ 144.658 , 146.188), average = 145.423,   relative weight = 200

[ 149.25 , 150.781),   average = 150.016,    relative weight =  400

weighted average = (147.19 * 640 +145.42*200 + 150.2 * 400 )/1240
                            = 147.87

30-precision levels:

Possibility Confidence*Probability

[ 146.14 , 147.144) [ 111.586 , 112.157) [ 1281.68 , 1285.02) 512

[ 144.131 , 145.135) [ 111.586 , 112.157) [ 1288.35 , 1291.68) 152

[ 149.153 , 150.157) [ 111.016 , 111.586) [ 1325.01 , 1328.34) 320

Weighted Average:
[ 146.14 , 147.144),   Average = 146.642, relative weight =  512

[ 144.131 , 145.135),  Average = 144.633, relative weight = 152

[ 149.153 , 150.157),  Average = 149.655, relative weight = 320

relative weight = 147.31

Online Order

Back to top

Last Revised: 9/97