Exemplo n.º 1
0
		for PEAKDURATION in peakdurations:		
			global PEAKDURATION
			for PEAKINCREMENT in peakincrements:
				global PEAKINCREMENT
				for INSURANCEDURATION in insurancedurations:
					global INSURANCEDURATION
					if year<2015: #or PEAKINCREMENT > 1.2 and PEAKDURATION==18:
						print "Progress... ",year,PEAKDURATION,PEAKINCREMENT,INSURANCEDURATION
						for INSURANCEINCREMENT in insuranceincrements:
							global INSURANCEINCREMENT
							for SPLITFILTER in splitfilter:
								global SPLITFILTER
								for exchange in ["NASDAQ","NYSE","OTCBB","AMEX"]:#"NASDAQ","NYSE","OTCBB","AMEX"	
									T=Transaction()
									T.INSURANCEINCREMENT=INSURANCEINCREMENT
									T.stoplimits=stoplimits
									T.earninglimits=earninglimits
									T.constructTransactionContainer()

									for i in xrange(66,67):#65,91
										allstocks=getListAllStocks(i,exchange)					
										for idx,stock in enumerate(allstocks):
											#print stock[1]
											if stock[1]=="BKESY": #debug condition
												symbol=stock[1]
												dates,highs,lows,prices,volume=getStock(symbol,exchange,year)
												#for a,b,c,d,e in zip(dates,highs,lows,prices,volume):
													#print a,b,c,d,e
												if size(dates)!=0:
													#else: Stock not found, Might be new(exceptions:XTLB)
													T.dates=dates