home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / MATH / VISSIM.ZIP / STOCKMKT.VSM < prev    next >
Text File  |  1993-11-24  |  6KB  |  246 lines

  1. ; VisSim Block Diagram Format (VBDF)
  2. ; Copyright (C) 1989-1993 Visual Solutions
  3. PV=1.200
  4. PS=0
  5. PE=290
  6. PP=1
  7. PI=170
  8. PX=1
  9. PN=1e-006
  10. Pn=-9,6,14,"MS Sans Serif"
  11. Pc=52
  12. PD=800x600
  13. Pf=0x0
  14. Pr="stub"
  15. Ps=784,0,0,546,0,0
  16. Pd=17
  17. PM=1,1,1,1
  18. N.1="/"@144x56<M>
  19. N.2="const"(2000)@84x70<M>
  20. N.3="/"@150x91<M>
  21. N.4="const"(700000)@84x105<M>
  22. N.5="/"@150x133<M>
  23. N.6="const"(200)@102x147<M>
  24. N.7="/"@144x273<M>
  25. N.8="const"(300)@96x287<M>
  26. N.9="/"@144x315<M>
  27. N.10="const"(600)@96x329<M>
  28. N.11="/"@144x350<M>
  29. N.12="const"(600)@96x364<M>
  30. N.13="/"@150x392<M>
  31. N.14="const"(600)@102x406<M>
  32. N.15="Compound"@114x357#8,8<C>
  33. n="Scaling"
  34. Ms=1560,0,0,1065,0,0
  35. N.16="neuralNet"@240x343#9,1
  36. n="stockmkt.net"
  37. UP=8,1,0,1,14,0.7,0.7,0.5,0,0,1,0,1
  38. N.17="/"@150x14<M>
  39. N.18="const"(4000)@84x28<M>
  40. N.19="const"(4000)@294x119<M>
  41. N.20="*"@372x105<M>
  42. N.21="Compound"@318x245#3,2<C>
  43. n="Sc"
  44. Ms=558,0,0,434,0,0
  45. N.22="comment"@366x392@330x140
  46. C="    BACKGROUND INFORMATION
  47.  
  48.  STOCKMKT.VSM demonstrates the use of  
  49.  VisSim/Neural-Net in forecasting the future value
  50.  of the U.S. Dow Jones Industrial Average (DJIA).
  51.  
  52.  The neural-net is trained on data for 200 working
  53.  days since 4 Jan 1982.  The neural-net file
  54.  STOCKMKT.NET contains the trained weights for
  55.  the Backpropagation with Momentum algorithm.  
  56.  
  57.  The test data are the 90 days following the training data."
  58. N.23="date"@552x42
  59. N.24="wireLabel"@492x14
  60. n="VisSim/Neural-Net learning the US DJIA"
  61. N.25="comment"@0x14@336x161
  62. C="
  63.   TO  SEE HOW WELL THE NEURAL NET LEARNED THE
  64.   market dynamics, just select GO from the SIMULATE MENU,
  65.   and then MAXIMIZE the plot.
  66.  
  67.   TO TRAIN THE NEURAL NETWORK on your own,
  68.   see instructions below in this comment block.
  69.  
  70.   The neural net has been trained on 200 days of trading
  71.   activity since 4 Jan 1982.  From that training, the neural net
  72.   shows  great ability to predict market activity for the next
  73.   90 days, which is roughly 4 months of trading!
  74.  
  75.   If you want to train the neural network, then follow these
  76.   instructions:
  77.  
  78.     1. Under Change Parameters in the Simulate
  79.         Menu, select Auto Restart.   
  80.  
  81.         Also, change Range End to 200. 
  82.  
  83.     2. Click the \"button\" block \"ON\" with the right
  84.           mouse button.
  85.  
  86.     3.  Click right mouse on the STOCKMKT.NET block,
  87.          and get the dialogue box.  Select LEARN
  88.          and SAVE at SIM END.  Deselect READ at 
  89.          Sim Start.  
  90.  
  91.          To avoid overwriting the neural network file
  92.          that has been pretrained, we recommend that
  93.            you specify a new network filename, such
  94.          as STOCK.NET.        
  95.  
  96.     4.  Click right mouse on the Plot block.  Change
  97.            the Y upper value to .0001, and the Y lower
  98.          value to 0.0000
  99.  
  100.     Now you're all set for the neural network to learn.
  101.     So go to the simulate menu and select GO!"
  102. N.26="wireLabel"@564x245<M>
  103. n="Scaling inputs into range [0,1]"
  104. N.27="plot"@306x14@234x154<M>
  105. px="Time (sec)"
  106. pax=0
  107. pc=512
  108. pm=10
  109. N.28="plot"@294x273@234x154<M>
  110. px="Time (sec)"
  111. pax=0
  112. pc=512
  113. pm=10
  114. N.29="unitDelay"(0)@420x259<M>
  115. N.30="const"(1)@366x245<M>
  116. N.31="Compound"@192x357#1,1<C>
  117. n="td"
  118. Ms=420,0,0,259,0,0
  119. N.32="wirePositioner"@120x322
  120. N.33="wireLabel"@540x266<M>
  121. n="Scaling the output into the DJIA range"
  122. N.34="wireLabel"@342x182<M>
  123. n="Time delay that presents previous"
  124. N.35="wireLabel"@342x196<M>
  125. n="day's DJIA value to neural net"
  126. N.36="button"(0)@180x245
  127. N.37="merge"@498x77<M>
  128. N.38="wireLabel"@90x210
  129. n="To teach the network, click this ON"
  130. N.39="wireLabel"@90x224
  131. n="and follow the directions listed above"
  132. N.40="merge"@276x413<M>
  133. N.41="const"(0)@222x427<M>
  134. N.42="wireLabel"@540x259<M>
  135. n="which is required by VIsSim/Neural-Net"
  136. N.43="import"@24x357#0,8
  137. n="stockmkt.dat"
  138. di=1
  139. N.44="plot"@384x91@372x280
  140. pt="VisSim/Neural-Net Predicting DJIA"
  141. px="Time (days)"
  142. py="Dow Jones Ind Avg"
  143. pax=0
  144. pf=H
  145. pf=F
  146. pb=1200,700
  147. pbx=290,0
  148. pbY=0,0
  149. pbX=0,0
  150. pc=4096
  151. pm=10
  152. pb.0=2000,0
  153. pL.0="Neural-Net Forecast"
  154. pb.1=2000,0
  155. pL.1="Actual DJIA"
  156. pb.2=0,0
  157. pb.3=0,0
  158. N.45="wirePositioner"@366x182<M>
  159. N.46="wirePositioner"@252x224<M>
  160. N.47="wirePositioner"@342x196<M>
  161. N.48="wirePositioner"@294x210<M>
  162. N.49="wirePositioner"@270x469<M>
  163. N.50="wirePositioner"@246x490<M>
  164. N.51="wirePositioner"@330x434<M>
  165. N.52="wirePositioner"@306x455<M>
  166. I.1.i1=15.i2
  167. I.1.i2=2.o1
  168. I.3.i1=15.i3
  169. I.3.i2=4.o1
  170. I.5.i1=15.i4
  171. I.5.i2=6.o1
  172. I.7.i1=15.i5
  173. I.7.i2=8.o1
  174. I.9.i1=15.i6
  175. I.9.i2=10.o1
  176. I.11.i1=15.i7
  177. I.11.i2=12.o1
  178. I.13.i1=15.i8
  179. I.13.i2=14.o1
  180. G.15=1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,26,27,28,42,45,46,47,48,49,50,51,52,
  181. I.15.o1=45.o1
  182. I.15.o2=47.o1
  183. I.15.o3=48.o1
  184. I.15.o4=46.o1
  185. I.15.o5=51.o1
  186. I.15.o6=52.o1
  187. I.15.o7=49.o1
  188. I.15.o8=50.o1
  189. I.15.i1=43.o1
  190. I.15.i2=43.o2
  191. I.15.i3=43.o3
  192. I.15.i4=43.o4
  193. I.15.i5=43.o5
  194. I.15.i6=43.o6
  195. I.15.i7=43.o7
  196. I.15.i8=43.o8
  197. I.16.i1=15.o1
  198. I.16.i2=31.o1
  199. I.16.i3=15.o2
  200. I.16.i4=15.o3
  201. I.16.i5=15.o4
  202. I.16.i6=15.o5
  203. I.16.i7=15.o6
  204. I.16.i8=15.o7
  205. I.16.i9=15.o8
  206. I.17.i1=15.i1
  207. I.17.i2=18.o1
  208. I.20.i1=21.i2
  209. I.20.i2=19.o1
  210. G.21=19,20,33,37,40,41,
  211. I.21.o1=37.o1
  212. I.21.o2=40.o1
  213. I.21.i1=36.o1
  214. I.21.i2=16.o1
  215. I.21.i3=32.o1
  216. I.27.i1=17.o1
  217. I.27.i2=1.o1
  218. I.27.i3=3.o1
  219. I.27.i4=5.o1
  220. I.28.i1=7.o1
  221. I.28.i2=9.o1
  222. I.28.i3=11.o1
  223. I.28.i4=13.o1
  224. I.29.i1=30.o1
  225. I.29.i2=31.i1
  226. G.31=29,30,34,35,
  227. I.31.o1=29.o1
  228. I.31.i1=15.o1
  229. I.32.i1=43.o1
  230. I.37.i1=21.i1
  231. I.37.i2=21.i2
  232. I.37.i3=20.o1
  233. I.40.i1=21.i1
  234. I.40.i2=41.o1
  235. I.40.i3=21.i3
  236. I.44.i1=21.o1
  237. I.44.i2=21.o2
  238. I.45.i1=17.o1
  239. I.46.i1=5.o1
  240. I.47.i1=1.o1
  241. I.48.i1=3.o1
  242. I.49.i1=11.o1
  243. I.50.i1=13.o1
  244. I.51.i1=7.o1
  245. I.52.i1=9.o1
  246.