예제 #1
0
				if stock[1]>="A" and stock[1]<="Z": #debug condition
					dates=array([])
					highs=array([])
					lows=array([])
					prices=array([])
					volume=array([])
					close=array([])

					for year in range(2000,2014):#2000,2014
						symbol=stock[1]
						#print symbol,exchange,year
						d,h,l,p,v,c=ss.getStock(symbol,exchange,year)
						
						firstday=Date.toDaniDate(str(year)+"-01-01")
						
						das=filter(lambda date: Date.laterThan(Date.toDaniDate(date[0]),firstday),zip(d,h,l,p,v,c))
						
						try:
							d,h,l,p,v,c=zip(*das)
						except ValueError:
							dum=0
										
						dates=hstack((dates,d))
						highs=hstack((highs,h))
						lows=hstack((lows,l))
						prices=hstack((prices,p))
						volume=hstack((volume,v))
						close=hstack((close,c))
					
				
					volume=volume.astype(float)