| # # Attrasoft PredictorPro for Windows
About New Image Classification Image Retrieval Image Examples Image Database Sound Search Image Search Engine Products Services Order Shareware/Demos Future Products Links Search This Site | 6. Other Examples 6.1 Lottery 6.2 A simple Dynamic System 6.3 A simple Markov Chain 6.4 Attrasoft Dow 5 6.4.1 Attrasoft Dow 5: Game Rules 6.4.2 Game data 6.4.3 Results 6. Other Examples Attrasoft PredictorPro is a universal PredictorPro, which can be applied to any prediction problem. The PredictorPro reads a sequence of numbers and predicts the distribution for the next row of numbers in line. 6.1 Lottery Lottery numbers are random numbers and therefore they are unpredictable. The problem most people have is they do not know what to pick. The PredictorPro can help. Let use 3-digit lottery as an example. Let the 3 digits be (x, y, z). You can build 7 files for Predicting x; Predicting y; Predicting z; Predicting xy; Predicting xz; Predicting yz; Predicting xyz. Use the directory input, a single operation will predict all 7 files. Find the output with the highest weight, say (x1, y1, z1), then (x1, y1, z1) will be the PredictorPro’s pick. To increase the chance, pick up 3 numbers for x: x1-1, x1, x1+1; pick up 3 numbers for y: y1-1, y1, y1+1; and pick up 3 numbers for z: z1-1, z1, z1+1. Have fun! Clicking “Example/Cask 3, Batch” command will generate the lottery example. You must be in the home directory to run this example. If you are not in the home directory, close and restart the PredictorPro. The parameters are: Trend = 4, Precision = 10, Command = 10 = "Integer\+ Linear". Click "Batch\Run" to get the results. This batch file uses the “Integer/+ Linear” command. The results are: File Results Confidence X 1 660 Y 8 516 Z 0, 4 64 XY 3 0 360 XZ 1 0 256 YZ No results XYZ No results Use the “Integer/- Linear” command, and you will get File Results Confidence X 1 1280 Y 2,7 16 Z 4 528 XY 3 2 28 XZ No results YZ No results XYZ No results Assume the minimum confidence number is 100, then the Predictor picks 184. The winning number on that day is 645. 6.2 A simple Dynamic System Let a system be defined by a triplet (x, y, z) which obeys: x (n+1) = ( x (n) + y(n) + z(n) ) Mod 7; y (n+1) = x ( n ); z (n+1 ) = y ( n) Mod 5; This is a finite dynamic system. The domains are: x in { 0, 1, 2, 3, 4, 5, 6 }; y in { 0, 1, 2, 3, 4, 5, 6 }; z in { 0, 1, 2, 3, 4 }. The possible states are 000, 001, . . ., 100, 101, . . . , 775. Assume initially that (x, y, z) is in state (1 0 0), then it will generate the following sequence by a computer simulation: 1 0 0 1 1 0 2 1 1 4 2 1 0 4 2 6 0 4 3 6 0 2 3 1 6 2 3 4 6 2 5 4 1 3 5 4 5 3 0 1 5 3 2 1 0 3 2 1 6 3 2 4 6 3 6 4 1 4 6 4 0 4 1 5 0 4 2 5 0 0 2 0 2 0 2 4 2 0 6 4 2 5 6 4 1 5 1 0 1 0 1 0 1 2 1 0 3 2 1 6 3 2 4 6 3 6 4 1 4 6 4 0 4 1 5 0 4 2 5 0 0 2 0 2 0 2 4 2 0 6 4 2 5 6 4 1 5 1 0 1 0 1 0 1 2 1 0 3 2 1 6 3 2 4 6 3 6 4 1 4 6 4 0 4 1 5 0 4 2 5 0 0 2 0 2 0 2 4 2 0 6 4 2 5 6 4 1 5 1 0 1 0 1 0 1 2 1 0 3 2 1 6 3 2 4 6 3 6 4 1 The next row is 4 6 4. Step 1. Data and Input File; The data set is {x, y, z}. The input Data file is math1a.txt, which contains the above. The file is in the software. Step 2. Link the data; To generate data from software, click: “File/Open” to open "math1a.txt". Step 3: Running Click: "10-Average/+ Integer Linear", this click produces the output data file, which will be opened at this point. It looks like this: 4 6 4 384000 0 4 1 384000 5 0 4 384000 2 5 0 384000 0 2 0 384000 2 0 2 384000 4 2 0 384000 6 4 2 384000 5 6 4 384000 1 5 1 384000 In the output data file, the first line is 4 6 4, 38400. 464 is the next row predicted, and 38,400 is the confidence number of 464. The larger the confidence number is, the more reliable the prediction is. This is the correct answer. The command predicts next 10 rows. In this case, they are all correct. 6.3 A simple Markov Chain Let a system be defined by ( x, y, z , s, t), which obeys the following rule: x (n+1) = ( x (n) + y(n) + z(n) ) Mod 7; y (n+1) = x ( n ); z (n+1 ) = y ( n) Mod 5; 60% z (n+1 ) = ( y ( n)+ 1 ) Mod 5; 40% s (n+1 ) = ( s(n) + 1 ) Mod 5; 60% s (n+1 ) = ( s(n) + 2 ) Mod 5; 40% t (n+1 ) = s ( n) Mod 3. This is a Markov chain. Each state can go to one of 4 different states with the probability: 36%, 24%, 24%, and 16%. The possible domains are: x in { 0, 1, 2, 3, 4, 5, 6 }; y in { 0, 1, 2, 3, 4, 5, 6 }; z in { 0, 1, 2, 3, 4 }; s in { 0, 1, 2, 3, 4 }; t in { 0, 1, 2 }. The possible states are 00000, 00001, . . ., 10000, 10001, . . . , 77553. A computer simulates this Markov chain 20,000 times and the following data is generated: 1 0 0 0 0 1 1 0 1 0 2 1 2 3 1 5 2 1 0 0 1 5 3 2 0 2 1 0 4 2 3 2 2 1 1 0 3 3 2 1 6 0 4 4 2 3 6 0 1 1 2 3 1 2 1 6 2 3 3 2 4 6 2 0 0 5 4 1 1 0 3 5 4 2 1 5 3 0 3 2 1 5 4 0 0 3 1 0 2 0 4 3 2 4 2 2 4 3 0 1 2 2 0 1 0 4 2 2 2 1 1 4 2 3 2 0 1 4 4 0 5 0 1 0 1 6 5 0 1 0 4 6 0 3 1 … The next configuration generated by the computer is (6 6 1 0 1). Of course, any one out of 4 possibilities are correct. The data set is {x, y, z, s, t}, i.e. five variables. You can complete this problem in a similar way as the last example: The data file is "math2a.txt"; click “File/Open” to open and link to the file; To run, click "Integer/ +Linear". The result is a distribution: Possibility Confidence*Probability 1 3 0 2 0 443 6 3 2 1 1 139 3 4 0 0 1 405 0 3 4 1 0 500 6 6 1 0 1 4000 6 6 1 1 0 42000 2 5 4 0 1 101 5 1 3 1 1 367 4 2 2 0 1 44 3 0 3 1 1 481 6 5 1 0 1 253 2 4 0 0 1 24000 2 4 1 0 1 12000 0 2 4 1 0 481 4 5 2 0 1 750 2 4 1 1 0 2500 6 2 4 2 0 310 5 6 1 0 1 424 5 3 1 2 0 120 6 6 2 2 0 5000 1 1 0 0 1 101 6 2 0 1 0 44 4 1 3 2 0 291 0 6 1 2 0 215 --------------------------------------------------- Weighted Average 4 5 1 1 0 Highest Probability 6 6 1 1 0 42000 Error of each number 0.33 0.33 0.22 0.22 0.11 The most likely possibility is ( 6, 6, 1, 1, 0). This is very close to the computer-simulated result, ( 6, 6, 1, 0, 1). Ignoring everything below 1000, the probability of the above configuration is roughly: 42000/(4000+42000+24000+12000+2500+5000) = 47%. The confidence of this prediction is 42,000. 6.4 Attrasoft Dow 5 Attrasoft Dow 5 is very similar to the Dogs of the Dow. The Dogs of the Dow is a stock picking system that has been reported on periodically in the popular press. Attrasoft Dow 5 uses Attrasoft Predictor to pick up 5 "top" stocks among the 30 Dow stocks. Basically, you hold the Attrasoft Dow 5 for a 6-months period. At the end of the period, you pick up the new Attrasoft Dow 5. To predict a stock trend with the Attrasoft Predictor, you will need a "Model" and data. A model is a set of relevant variables. The data is the historical values of the chosen variables. The Attrasoft Dow 5 uses the simplest model: to predict a stock, there is only one variable in the model, the 5-month moving average of the stock. Attrasoft Predictor 2.6, with a Single-Stock-Model, outperforms Dow Jones 30 by a factor of 2 from Feb. 1997 to Jan 30, 2001: 112.4 % vs. 58.15 %. 6.4.1 Attrasoft Dow 5: Game Rules Assumption: 1. You start with $100,000 paper money, which must be equally invested in 5 stocks, from the Dow Jones 30 stocks <http://attrasoft.com/stock/data/Excel/> ; 2. You update your Attrasoft Dow 5 once every 6 months. 6.4.2 Game data The data is obtained from Microsoft Network: http://investor.msn.com/quotes/quotes.asp?beenthere=1&Page=Research&Item=QuoteDetail, see the last chapter. 6.4.3 Results 1. Results From 1/97 to 7/97, UP 23.4 %, http://attrasoft.com/stock/data/a2_97_6a.txt rank stock Feb-97 Jul-97 grow rate Dj 30 6877.7 8222.6 19.5545 SP 500 790.82 954.31 20.67348 1 mrk 92.125 103.875 12.75441 2 AXP 65.625 83.75 27.61905 3 utx 75.25 84.563 12.37608 4 uk 47.25 55.375 17.19577 5 ibm 71.875 105.75 47.13043 avg 23.41515 2. Results From 8/97 to 1/98, Down 2.45%, http://attrasoft.com/stock/data/a8_97_6a.txt rank stock Aug-97 Jan-98 grow rate Dj 30 7622.4 7906.5 1.037272 SP 500 899.47 980.28 1.089842 1 xon 61.188 59.313 0.969357 2 axp 77.75 83.688 1.076373 3 utx 78.063 81.25 1.040826 4 ibm 105.75 98.75 0.933806 5 cat 56 48 0.857143 avg 0.975501 3. Results From 2/98 to 7/98, Up 1.94%, http://attrasoft.com/stock/data/a2_98_6a.txt rank stock Feb-98 Jul-98 grow rate Dj 30 8545.72 8883.29 1.039502 SP 500 980.28 1120.67 1.143214 1 Ald 42.563 43.5 1.022014 2 AA 73.375 69.313 0.944641 3 Uk 46.438 48 1.033636 4 Ibm 104.438 132.5 1.268695 5 Hwp 67 55.5 0.828358 Avg 1.019469 4. Results From 8/98 to 1/99, Up 44.17%, http://attrasoft.com/stock/data/a8_98_6a.txt rank Stock Aug-98 Jan-99 grow rate Dj 30 7539.07 9358.83 24.13773 SP 500 957.28 1279.64 33.67458 1 Ko 65.125 65.313 0.288676 2 Axp 78 102.875 31.89103 3 Utx 72.563 119.438 64.59904 4 Ibm 112.625 183.25 62.7081 5 Hwp 48.563 78.375 61.3883 Avg 44.17503 5. Results From 2/99 to 7/99, up 31.92 %, http://attrasoft.com/stock/data/jan1999a.txt rank Stock 2-1-99 7-30-99 grow rate Dj 30 9345.7 10655.15 14.01 SP 500 1273 1328.72 4.3 1 Axp 100.75 137.288 36.626 2 Ald 39.125 64.688 65.336 3 Cat 43.688 58.625 34.19 4 chv 73.688 91.25 23.83 5 wmt 42.25 42.25 0 avg 31.92 6. Results From 8/99 to 1/2000, Up 9.17%, http://attrasoft.com/stock/data/a8_99_6a.txt rank stock 8-2-99 1-31-00 grow rate Dj 30 10645.96 10940.53 2.77% SP 500 1328.05 1394.46 5% 1 msft 84.914 97.875 1.152 2 cat 58.563 42.4375 0.725 3 axp 130.063 164.75 1.267 4 pg 90.125 100.875 1.119 5 c 44.125 57 1.229 avg up 9.1% 7. Results From 2/2000 to 7/2000, down 7.1%, http://attrasoft.com/stock/data/a2_00_6a.txt rank stock 2-1-99 7-31-00 grow rate Dj 30 11041.05 10521.98 down 4.7% SP 500 1409.28 1430.83 up 1.5 % 1 axp 56.33 56.6875 1.006 2 c 58.25 70.5 1.210 3 hd 62.00 51.75 0.835 4 aa 36.06 30.25 0.839 5 dd 59.875 45.31 0.757 avg down 7.1% 8. Results From 8/2000 to 1/2001, down 5.0%, http://attrasoft.com/stock/data/a8_00_6a.txt rank stock 7-1-00 1-31-01 grow rate Dj 30 10606.95 10877.36 + 2.5% SP 500 1438.11 1366.01 down 5 % 1 Msft 68.688 61.06 0.89 2 Axp 56.938 47.17 0.83 3 Ibm 110.5 112.0 1.01 4 Utx 59.25 74.98 1.27 5 T 31.813 23.99 0.75 Avg down 5 % Evaluation: Feb 1997 - Jan 31, 2000 Predicted Growth = 1.234151478 * 0.975501* 1.019468885* 1.441750282 * 1.3192* 1.091*0.929 *0.95 = 2.124 Up 112.4% in 4 years. Dow Jones 30: Feb 1, 1997: 6877.7; Jan 31, 2001: 10877.36 Up : 58.15% in 4 years. Attrasoft Predictor, with a Single-Stock-Model, outperforms Dow Jones 30 by a factor of 2 from Feb. 1997 to Jan 30, 2001: 112.4 % vs. 58.15 %. The “Attrasoft Dow 5” prediction for the period August 2000 to January 2001 is in the software. To generate this example: Make sure you are in the home directory; Click “Example\Attrasoft DJ 30, Batch”; Click “Batch\Run”. This batch file uses the “10 Average/+ Real Exponential command”. Some stocks do not have a prediction. You can get a prediction by using “10 Average/- Real Exponential command”. Online Order/Online Fax order: Attrasoft PredictorPro for Windows Version 2.8 ($494.99 + $5 US Shipping and Handling) Mail Order: 499.99 (S&H included) PredictorPro Attrasoft, Attn.: Gina P. O. Box 13051 Savannah, GA. 31406, USA Send questions or comments to: webmaster@attrasoft.com or contact us at: Attrasoft, P. O. Box 13051, Savannah, GA. 31406, USA Copyright © 2001 Attrasoft, Inc. All rights reserved.