rice-oldPriceEvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rGU01L1U2NUJ.?*yj.u-uxurxxu^\rdefshowHistory(self#figNum):\rpylab.figure(figNum)\rpylab.plot(self.history)\rpylab.title(*ClosingPrice,Test'+str(figNum)>\rpylab.xlabel(*Day1)\rpylab.ylabel(*Price')\rdefunitTestStock():\rdefrunSim(stkszfig,mo):\rmean=0.0\rforsinstks:\rfordinrange(numDays):\rs.makeMove(bias,mo)\rs,showHistory(fig)\rmean+=s.getPrice()\rmean=mean/float(numStks)\rpylab.axhline(mean)\rnumStks=20\rnumDays=200\rstksl=[]\rstks2=[]\rbias=0.0\rmo=0\rbias=0.0\rmo=0\rforiinrange(numStks):\rvolatilityrandom.uniform(0,0.2)\rdl=lambda:random.uniform(-volatility,volatility)\rd2=lambda:random.gauss(0,0,volatility/2.0)\rstksl.append(Stock(100.0rdl))\rstks2.append(Stock(100.0zd2))\rrunSim(stksl,1,mo)\rrunSim(stk.32,2,mo)