Guided Project: Analyzing Stock Prices
Posted on Wed 08 July 2015 in Projects
Stock Price Data¶
In [45]:
import concurrent.futures
import os
def read_file(filename):
with open(filename, 'r') as f:
data = f.read().strip()
key = filename.replace(".csv", "").replace("prices/", "")
data = data.split("\n")
data = [d.split(",") for d in data]
return key, data
results = []
pool = concurrent.futures.ProcessPoolExecutor(max_workers=2)
filenames = ["prices/{}".format(f) for f in os.listdir("prices")]
prices = pool.map(read_file, filenames)
prices = list(prices)
prices = dict(prices)
I chose to use a hash table, then a list, then another list. This is because it closely mirrors the existing structure of the data. It allows stock symbols to be easily looked up, and enables me to index values efficiently.
Computing Aggregates¶
In [46]:
from dateutil.parser import parse
prices_columns = {}
for k,v in prices.items():
price = v
headers = price[0]
price_columns = {}
for i, header in enumerate(headers):
values = [p[i] for p in price[1:]]
if i > 0:
values = [float(v) for v in values]
else:
values = [parse(v) for v in values]
price_columns[header] = values
prices_columns[k] = price_columns
In [47]:
from statistics import mean
average_closing = {}
for k,v in prices_columns.items():
average_closing[k] = mean(v["close"])
In [48]:
closing_tuples = [(k,v) for k,v in average_closing.items()]
sorted(closing_tuples, key=lambda x:x[1])
Out[48]:
[('blfs', 0.8122763011583011), ('apdn', 0.8241009938223938), ('bmra', 0.901011583011583), ('bcli', 0.9969415324324323), ('cyrx', 1.1615408884169884), ('clrb', 1.2045711436293436), ('cpst', 1.206953667953668), ('csbr', 1.2282443845854418), ('egt', 1.3293513513513513), ('aemd', 1.398042471042471), ('dfbg', 1.4005010393822395), ('alqa', 1.405298283011583), ('cpah', 1.4116189448441248), ('astc', 1.4152123552123552), ('chci', 1.4581224154440156), ('ctic', 1.494366311969112), ('eltk', 1.5323436293436294), ('dzsi', 1.5382316602316601), ('cool', 1.5475988922779924), ('cgnt', 1.5946138996138997), ('creg', 1.6028996138996139), ('casi', 1.617906349034749), ('admp', 1.7122164397683397), ('bnso', 1.7172548262548262), ('aezs', 1.7391445949806952), ('dynt', 1.822119691119691), ('apps', 1.8256061776061776), ('dysl', 1.8631660231660232), ('apri', 1.8681738996138995), ('crds', 1.8903166015444017), ('dlhc', 1.8903745173745172), ('cur', 1.907691699604743), ('ardm', 1.928069498069498), ('cpsh', 1.9615839865149602), ('cprx', 1.9762007722007722), ('cidm', 1.9935057915057917), ('cytr', 1.9986748837837838), ('atrs', 2.035023166023166), ('dram', 2.0592628378378377), ('artx', 2.0992316602316605), ('aris', 2.1661389961389963), ('cfbk', 2.174841698841699), ('crtn', 2.1850579150579152), ('bosc', 2.188019305019305), ('ffhl', 2.192687258687259), ('emms', 2.2464208494208493), ('abio', 2.2518008), ('clbs', 2.2820694980694984), ('bldp', 2.3273861003861005), ('drrx', 2.3527799227799227), ('camt', 2.402606177606178), ('basi', 2.4194633204633202), ('cbak', 2.4378957528957526), ('cthr', 2.4644787644787645), ('cris', 2.4645714285714284), ('fll', 2.4715752895752896), ('capr', 2.473247462919594), ('cemi', 2.4821776061776064), ('casm', 2.4918), ('abeo', 2.593220077220077), ('cdor', 2.6057721938223937), ('aehr', 2.6085559845559847), ('clwt', 2.6171322247104247), ('biol', 2.6383436347490345), ('cntf', 2.659563711969112), ('cycc', 2.667563561003861), ('aey', 2.6871505791505794), ('atec', 2.702578042857143), ('cyrn', 2.7131410714285717), ('dxtr', 2.7493397683397682), ('aame', 2.7796795366795366), ('asrv', 2.801169884169884), ('axas', 2.8366293436293435), ('dcth', 2.891166023166023), ('agen', 2.999889955984556), ('clsn', 3.00828185019305), ('drad', 3.053988416988417), ('casc', 3.062540716602317), ('arci', 3.1327799227799225), ('adxs', 3.166938612355212), ('apwc', 3.2336409266409265), ('edap', 3.2358030888030886), ('cui', 3.2413753598455597), ('cort', 3.2995482625482624), ('cytx', 3.3293219922779924), ('acls', 3.343806946718147), ('avir', 3.4036661768339767), ('ahpi', 3.4043899613899615), ('byfc', 3.4977644787644784), ('dswl', 3.529177606177606), ('extr', 3.5375019305019304), ('egan', 3.5465791505791504), ('cnit', 3.604745173745174), ('falc', 3.6092123552123554), ('cbli', 3.61026641042471), ('eng', 3.644196910810811), ('daio', 3.651555984555985), ('cmls', 3.678938223938224), ('dtrm', 3.7235559845559845), ('cbmx', 3.7302140003861), ('axgn', 3.82023166023166), ('axti', 3.8255212355212356), ('asur', 3.873123663706564), ('arql', 3.8744247104247105), ('cpss', 3.9003629343629345), ('evlv', 3.972590733590734), ('amrn', 3.992459461003861), ('cdti', 4.001780249420849), ('esxb', 4.032393822393822), ('else', 4.060752895752896), ('awre', 4.083567567567568), ('arwr', 4.130016216216216), ('cyan', 4.164428571428572), ('cers', 4.2464787644787645), ('fhco', 4.288459459459459), ('bsqr', 4.305370656370656), ('attu', 4.317359073359073), ('audc', 4.375227799227799), ('cnty', 4.444320463320464), ('emkr', 4.458320463320463), ('ctib', 4.690494208494208), ('cytk', 4.7425641938223935), ('bdsi', 4.8207065644787646), ('cgen', 4.882621621621621), ('arna', 4.915745173745174), ('cyccp', 4.965254826254826), ('ccur', 4.987629343629343), ('exfo', 4.995563706563707), ('arry', 5.182899613899614), ('edgw', 5.274084942084942), ('bwen', 5.326498072200772), ('bbgi', 5.338297297297298), ('eght', 5.531308880694981), ('eqfn', 5.558436266023166), ('acfc', 5.596733538610039), ('crme', 5.622293436293436), ('crws', 5.629305019305019), ('evol', 5.701853281853282), ('arcw', 5.706739867181467), ('avnw', 5.723947867953668), ('denn', 5.761945945945946), ('flws', 5.78195752895753), ('bios', 5.790710422779923), ('cwbc', 5.892640926640927), ('achn', 5.9411776069498075), ('educ', 5.948108107722008), ('cown', 5.948822393822394), ('alsk', 5.9955675694980695), ('atax', 5.999752895752896), ('amd', 6.005552123166024), ('dvax', 6.033752898455599), ('cspi', 6.0528571428571425), ('boch', 6.063119691119691), ('bcrx', 6.095837838223938), ('dwsn', 6.19491095945946), ('atlc', 6.211756745173745), ('abtl', 6.233108108494209), ('crnt', 6.269598454826254), ('dxyn', 6.331316601930502), ('cart', 6.340498070270271), ('bebe', 6.4181969498069495), ('exel', 6.616277998455599), ('bybk', 6.642911204633204), ('atsg', 6.652401541698842), ('cwst', 6.658471042471042), ('clro', 6.852370656370656), ('carv', 6.87222652972973), ('bldr', 6.9454671849420855), ('elon', 6.949154477992279), ('amkr', 6.955822393436294), ('cacb', 7.012756795366795), ('bgcp', 7.162189189189189), ('bde', 7.226011583011583), ('club', 7.270509651737451), ('bkmu', 7.306324324324325), ('czwi', 7.406482625482626), ('arlz', 7.441718146718147), ('artw', 7.46590346911197), ('caas', 7.633440158301158), ('cfcb', 7.65700699961375), ('brcd', 7.668254826254826), ('dvcr', 7.688459461389961), ('cuba', 7.751552123552123), ('aray', 7.887376223391812), ('dwch', 8.038034755212355), ('egle', 8.046072912741312), ('clfd', 8.055154443629345), ('amswa', 8.076181467181467), ('brew', 8.094903474517373), ('chnr', 8.12607720965251), ('esca', 8.187945943243243), ('cban', 8.232640922779924), ('cbio', 8.433602686100386), ('evbs', 8.45465635868726), ('cvgi', 8.536474901930502), ('cald', 8.608965250965252), ('cvv', 8.624386101930503), ('axdx', 8.656428568339768), ('feim', 8.712000000000002), ('flex', 8.817428571814672), ('bvsn', 8.850015447876448), ('asys', 8.914054046332046), ('bsf', 8.928162200386101), ('brid', 8.972416988030888), ('elgx', 8.976440163706563), ('depo', 8.988274123938224), ('cldx', 9.006351276061777), ('cece', 9.062675674517374), ('allt', 9.180019302702703), ('dspg', 9.215841698069498), ('civb', 9.309308876833978), ('exas', 9.390011581081081), ('entg', 9.497733591505792), ('camp', 9.500046333590733), ('ctg', 9.576830107335908), ('cvcy', 9.671478766409265), ('dsgx', 9.768467180694982), ('czfc', 9.846169883783784), ('botj', 9.858123591891891), ('cplp', 9.927482215019763), ('ainv', 9.949749044015444), ('cybe', 9.964861003861005), ('amot', 9.96724324015444), ('ccrn', 10.054741314671816), ('cobz', 10.071579151737453), ('bont', 10.085776056370657), ('call', 10.101200768339769), ('avdl', 10.10303474015444), ('aiq', 10.171544398841698), ('brkl', 10.241702702702701), ('csq', 10.269231660231661), ('alot', 10.286698842084942), ('agys', 10.3036139015444), ('amrb', 10.411073202702703), ('cvti', 10.437138995752894), ('dgii', 10.495293435521235), ('brks', 10.524733592277991), ('fcco', 10.537714290347491), ('aobc', 10.59406178030888), ('fccy', 10.679512464864866), ('cdzi', 10.901432437837839), ('bfin', 10.907671818146717), ('buse', 10.920324543629343), ('centa', 10.959813017140632), ('asfi', 11.159220083783783), ('cmct', 11.270061818532819), ('acta', 11.320559837065638), ('amri', 11.358054055598455), ('elos', 11.39328957027027), ('cent', 11.431996134749035), ('esio', 11.514586870656371), ('bcbp', 11.546521235135137), ('csbk', 11.708667741312741), ('cutr', 11.777822398841698), ('atrc', 11.84171041969112), ('aaxn', 11.863907341698841), ('csfl', 11.947644780694981), ('essa', 12.126070440047487), ('dakt', 12.215868713513514), ('ancx', 12.260374515444015), ('eei', 12.263416957915057), ('dave', 12.284664105405405), ('cvbf', 12.391718153667954), ('airt', 12.430108102316604), ('chy', 12.456038608880307), ('chi', 12.602803088416989), ('acet', 12.655212363320464), ('cohu', 12.740305017374517), ('emitf', 12.964027813127412), ('amsc', 13.049243415057914), ('cresy', 13.09593044787645), ('bgfv', 13.156471046718146), ('bcor', 13.260498064864864), ('cnob', 13.295115791505792), ('eric', 13.297131263706563), ('drys', 13.49853955019305), ('cwco', 13.618177600000001), ('ceco', 13.657787633204634), ('bksc', 13.711621528571428), ('cgo', 13.7736332), ('acad', 13.823586874903475), ('cfnb', 13.825111963706565), ('bset', 13.877702711583012), ('csii', 13.978281854440155), ('bncn', 13.986131252895753), ('cy', 14.158153035907336), ('fbms', 14.224830092664092), ('cdns', 14.24691891119691), ('cfnl', 14.268891889189188), ('cnxn', 14.347270266795366), ('clct', 14.4366796011583), ('dcom', 14.727355209652512), ('ango', 14.802289587258688), ('arcc', 14.933262535135134), ('etfc', 14.956660266795367), ('dgica', 14.986583006177607), ('fbss', 15.228308892277994), ('akrx', 15.387104233590733), ('cvly', 15.412107433976834), ('cray', 15.423347486486486), ('chfn', 15.70860224015444), ('ezpw', 15.789984552895755), ('brkr', 15.86540154247104), ('ccne', 15.950173729729729), ('actg', 15.997490346718147), ('cunb', 15.998223935135135), ('ffbc', 16.002316604633204), ('csiq', 16.0704556007722), ('fbnc', 16.11827027027027), ('bsrr', 16.140177604633205), ('ccbg', 16.26640926872587), ('ffic', 16.59364864787645), ('crox', 16.676393825482627), ('dnbf', 16.71552883088803), ('arrs', 17.104613885328185), ('amat', 17.116648652509653), ('ceva', 17.12422007104247), ('ebtc', 17.201536692277994), ('anip', 17.234360110038608), ('finl', 17.241752891505794), ('bpop', 17.295227834362933), ('eml', 17.330768325482623), ('acnb', 17.3435289003861), ('fmbi', 17.350911196138995), ('asna', 17.81176063204633), ('abcb', 17.990475994208495), ('acxm', 18.263061783783783), ('dgicb', 18.359567528185327), ('cenx', 18.39556755173745), ('efsc', 18.541934354826257), ('cznc', 18.655586874131274), ('cbfv', 18.728787650193052), ('cnsl', 18.772135127027028), ('dest', 18.788065616216215), ('ehth', 18.973142869111967), ('esbk', 19.142613947490347), ('chke', 19.15281466100386), ('ffkt', 19.47292279305019), ('exac', 19.531007741698843), ('fizz', 19.844949835907336), ('aegn', 19.89972970926641), ('atvi', 19.92204634131274), ('fisi', 19.93808495096525), ('aeis', 20.00321233899614), ('cmco', 20.1090116), ('fcap', 20.15421233976834), ('farm', 20.193166013513515), ('cizn', 20.43169879150579), ('arkr', 20.460409264092664), ('crus', 20.50549421969112), ('ctrn', 20.54685713976834), ('boom', 20.59703861119691), ('anik', 20.77447492046332), ('epay', 20.79650191235521), ('artna', 20.97944401119691), ('aimc', 20.999660249420852), ('belfa', 21.040139010810808), ('conn', 21.148482605791504), ('baby', 21.253150588803088), ('bpopn', 21.34707336023166), ('cffn', 21.4160772), ('belfb', 21.680702705791507), ('caty', 21.829671827027028), ('aal', 22.07495366679537), ('atlo', 22.101030884555986), ('amnb', 22.113752890347488), ('emcf', 22.219915054826256), ('dmrc', 22.26364027351097), ('dmlp', 22.28328186100386), ('adru', 22.371667961776062), ('avhi', 22.40623167915058), ('adrd', 22.517482620463323), ('flxs', 22.836366786486487), ('diod', 22.849976832046334), ('fbiz', 22.958876448262547), ('aplp', 23.031826284169885), ('bwina', 23.124262511969114), ('fdef', 23.23314284092664), ('ccoi', 23.236517377606177), ('clmt', 23.327073368339768), ('amtd', 23.490517397683398), ('csgs', 23.515061787258688), ('aubn', 23.598679533976835), ('colb', 23.599138993050193), ('aaon', 23.617386061776063), ('csco', 23.628822402702703), ('bwinb', 23.673023192664093), ('bmtc', 23.783575303088803), ('egbn', 23.78503891003861), ('adtn', 23.847494206177608), ('achc', 24.04779533822394), ('cetv', 24.057965252509653), ('bdge', 24.12035132432432), ('car', 24.829617774131272), ('azpn', 24.926833974517375), ('dgas', 24.959196903088802), ('ecpg', 24.97440927104247), ('asrvp', 25.09542473243243), ('bstc', 25.102737436293435), ('emci', 25.21568724942085), ('becn', 25.59151352046332), ('arow', 25.715315076833978), ('ca', 25.74628186023166), ('efii', 25.840223945945947), ('bbox', 25.997579137451737), ('apog', 26.00773359150579), ('banfp', 26.415837825482622), ('chmg', 26.421312745173747), ('exls', 26.46239382084942), ('avav', 26.558296459060923), ('arcb', 26.582247134362934), ('banr', 26.604234801930502), ('afsi', 26.69982658918919), ('ewbc', 26.819362960231658), ('crai', 27.154254832432432), ('chfc', 27.265100385714284), ('adra', 27.35145173976834), ('acor', 27.47286873938224), ('flic', 27.732250961776064), ('alks', 28.143567575675675), ('ecol', 28.210664105405407), ('aciw', 28.27269496023166), ('dxcm', 28.520806964092667), ('chscp', 29.073046355984555), ('afam', 29.434312770656373), ('cvgw', 29.56466022934363), ('cnbka', 30.143177581081083), ('amsf', 30.34488032162162), ('bbsi', 30.425525077220076), ('ctws', 30.461830105405404), ('crmt', 30.543277994594593), ('flir', 30.795725856370655), ('cmtl', 30.963007716216218), ('bofi', 31.210980661776063), ('evep', 31.358648642471042), ('arii', 31.491413133590733), ('amed', 31.845227816216216), ('bjri', 31.854320508108106), ('atro', 31.862567476833977), ('cnmd', 31.917447902316603), ('cigi', 32.206258406177604), ('cash', 32.26195366332046), ('cffi', 32.433154460617764), ('amag', 32.49387646872587), ('ebix', 32.532169762934366), ('cgnx', 32.55762165714285), ('ctbi', 32.61787694054054), ('abmd', 33.22242086100386), ('blkb', 33.75537838185328), ('cake', 34.3126757027027), ('amwd', 34.320258717374514), ('abax', 34.57868337992278), ('crzo', 34.66379924324325), ('alco', 34.68778766100386), ('dorm', 34.767818543243244), ('faro', 34.87222776949807), ('eeft', 35.11525484749035), ('ebay', 35.18885618648648), ('cac', 35.50384555559845), ('cmcsa', 35.904505792277995), ('cree', 36.52946716216216), ('algn', 36.75162934864865), ('cprt', 37.017694950579155), ('csx', 37.15074516833977), ('aste', 37.29283010849421), ('ea', 37.33655212046332), ('endp', 37.34726641737452), ('crvl', 37.4438649034749), ('bobe', 37.68301545907336), ('dox', 37.75929727606178), ('ahgp', 38.20530885868726), ('calm', 38.32738610810811), ('dxpe', 38.61513902084942), ('fele', 38.77260231583011), ('cvlt', 39.00099612741313), ('adre', 39.14505407104247), ('alny', 39.17148648803089), ('disca', 39.234679803474904), ('dish', 39.2437143050193), ('bmrc', 39.3548107945946), ('chco', 39.56640153011583), ('discb', 39.65275737837838), ('ccmp', 39.67996139150579), ('esnd', 40.798293426640925), ('agii', 40.817575337065634), ('bcpc', 41.03619678301158), ('ande', 41.82902698030888), ('cass', 42.141633734749036), ('ffin', 42.178899534749036), ('adi', 42.24018144826255), ('adsk', 42.24759463281853), ('cinf', 42.25041697451738), ('cbsh', 42.690903429343635), ('akam', 42.81851348687258), ('expd', 42.86821235366795), ('bbry', 43.67659082355212), ('core', 44.28576448223938), ('aaww', 44.33160229034749), ('fast', 44.40756368957529), ('cpsi', 44.44345173899614), ('ctrp', 45.163220061389964), ('expo', 46.09936678262548), ('airm', 46.918258888030884), ('arlp', 46.942791493436296), ('abco', 47.64705796756757), ('atni', 47.67885716216216), ('banf', 49.64349804169884), ('bbby', 50.183324364864866), ('ctas', 50.47888414247104), ('bmrn', 50.52171040733591), ('cmpr', 51.058057920077225), ('chkp', 51.12600387451738), ('adbe', 51.199436284169884), ('cvco', 53.36543631042471), ('cohr', 53.71215058262549), ('colm', 53.72719691235521), ('expe', 53.78315830308881), ('cpla', 54.80040545714285), ('dwaq', 55.77838609343629), ('bokf', 56.16893048532818), ('dltr', 57.418077247490345), ('ctsh', 57.91491119652509), ('ctxs', 58.02012394942085), ('casy', 58.495737440926646), ('eslt', 58.57627412471042), ('asml', 59.040315206563704), ('adp', 61.03234735559845), ('chrw', 61.98583785675676), ('anss', 62.32520078146718), ('acgl', 63.325907376833975), ('alog', 64.74335521467181), ('cern', 65.04237453166023), ('esrx', 67.4280848891892), ('fisv', 67.52742853513513), ('chdn', 72.21778764864865), ('cbrl', 76.63736287992278), ('cswc', 77.7559074069498), ('coke', 80.56527417181468), ('algt', 83.70168345444016), ('celg', 85.09483015984556), ('ffiv', 86.29457917374518), ('bwld', 89.39383399150579), ('amgn', 92.2331003965251), ('cacc', 95.49895756602317), ('cost', 96.17006946409266), ('alxn', 97.1099267011583), ('anat', 97.93825093397683), ('csgp', 103.10355984362934), ('dhil', 104.54806553783784), ('djco', 110.25166789845561), ('bbh', 113.28309655096525), ('esgr', 114.26885330617759), ('biib', 164.53822006138998), ('eqix', 165.3847721150579), ('bidu', 193.53191124478764), ('fcnca', 200.25248278146717), ('atri', 228.38977615984555), ('cme', 230.2946601100386), ('aapl', 257.17654040231656), ('amzn', 275.13407757104244)]
It appears the AMZN
and AAPL
have the highest average closing prices, while BLFS
, and APDN
have the lowest average closing prices.
Finding The Most Traded Stock Each Day¶
In [49]:
trades = {}
for k, v in prices_columns.items():
for i,date in enumerate(v["date"]):
if date not in trades:
trades[date] = []
trades[date].append([k,v["volume"][i]])
In [50]:
most_traded = []
for k, v in trades.items():
ordered = sorted(v, key=lambda x: x[1])
symbol = ordered[-1][0]
most_traded.append([k, symbol])
most_traded = sorted(most_traded, key=lambda x: x[0])
most_traded
Out[50]:
[[datetime.datetime(2007, 1, 3, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 4, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 5, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 8, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 9, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 10, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 11, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 12, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 16, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 17, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 18, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 19, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 22, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 23, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 24, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 25, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 26, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 29, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 30, 0, 0), 'aapl'], [datetime.datetime(2007, 1, 31, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 1, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 2, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 5, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 6, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 7, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 8, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 9, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 12, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 13, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 14, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 15, 0, 0), 'bidu'], [datetime.datetime(2007, 2, 16, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 20, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 21, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 22, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 23, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 26, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 27, 0, 0), 'aapl'], [datetime.datetime(2007, 2, 28, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 1, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 2, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 5, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 6, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 7, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 8, 0, 0), 'cy'], [datetime.datetime(2007, 3, 9, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 12, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 13, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 14, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 15, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 16, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 19, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 20, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 21, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 22, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 23, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 26, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 27, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 28, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 29, 0, 0), 'aapl'], [datetime.datetime(2007, 3, 30, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 2, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 3, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 4, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 5, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 9, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 10, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 11, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 12, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 13, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 16, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 17, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 18, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 19, 0, 0), 'ebay'], [datetime.datetime(2007, 4, 20, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 23, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 24, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 25, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 26, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 27, 0, 0), 'aapl'], [datetime.datetime(2007, 4, 30, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 1, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 2, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 3, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 4, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 7, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 8, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 9, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 10, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 11, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 14, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 15, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 16, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 17, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 18, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 21, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 22, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 23, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 24, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 25, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 29, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 30, 0, 0), 'aapl'], [datetime.datetime(2007, 5, 31, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 1, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 4, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 5, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 6, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 7, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 8, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 11, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 12, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 13, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 14, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 15, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 18, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 19, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 20, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 21, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 22, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 25, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 26, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 27, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 28, 0, 0), 'aapl'], [datetime.datetime(2007, 6, 29, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 2, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 3, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 5, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 6, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 9, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 10, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 11, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 12, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 13, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 16, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 17, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 18, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 19, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 20, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 23, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 24, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 25, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 26, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 27, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 30, 0, 0), 'aapl'], [datetime.datetime(2007, 7, 31, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 1, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 2, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 3, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 6, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 7, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 8, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 9, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 10, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 13, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 14, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 15, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 16, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 17, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 20, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 21, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 22, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 23, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 24, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 27, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 28, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 29, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 30, 0, 0), 'aapl'], [datetime.datetime(2007, 8, 31, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 4, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 5, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 6, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 7, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 10, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 11, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 12, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 13, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 14, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 17, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 18, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 19, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 20, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 21, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 24, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 25, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 26, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 27, 0, 0), 'aapl'], [datetime.datetime(2007, 9, 28, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 1, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 2, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 3, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 4, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 5, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 8, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 9, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 10, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 11, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 12, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 15, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 16, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 17, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 18, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 19, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 22, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 23, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 24, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 25, 0, 0), 'cmcsa'], [datetime.datetime(2007, 10, 26, 0, 0), 'cmcsa'], [datetime.datetime(2007, 10, 29, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 30, 0, 0), 'aapl'], [datetime.datetime(2007, 10, 31, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 1, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 2, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 5, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 6, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 7, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 8, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 9, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 12, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 13, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 14, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 15, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 16, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 19, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 20, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 21, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 23, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 26, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 27, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 28, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 29, 0, 0), 'aapl'], [datetime.datetime(2007, 11, 30, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 3, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 4, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 5, 0, 0), 'cmcsa'], [datetime.datetime(2007, 12, 6, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 7, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 10, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 11, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 12, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 13, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 14, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 17, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 18, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 19, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 20, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 21, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 24, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 26, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 27, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 28, 0, 0), 'aapl'], [datetime.datetime(2007, 12, 31, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 2, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 3, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 4, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 7, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 8, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 9, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 10, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 11, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 14, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 15, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 16, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 17, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 18, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 22, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 23, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 24, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 25, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 28, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 29, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 30, 0, 0), 'aapl'], [datetime.datetime(2008, 1, 31, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 1, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 4, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 5, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 6, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 7, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 8, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 11, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 12, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 13, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 14, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 15, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 19, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 20, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 21, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 22, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 25, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 26, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 27, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 28, 0, 0), 'aapl'], [datetime.datetime(2008, 2, 29, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 3, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 4, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 5, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 6, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 7, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 10, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 11, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 12, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 13, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 14, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 17, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 18, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 19, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 20, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 24, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 25, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 26, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 27, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 28, 0, 0), 'aapl'], [datetime.datetime(2008, 3, 31, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 1, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 2, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 3, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 4, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 7, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 8, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 9, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 10, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 11, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 14, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 15, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 16, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 17, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 18, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 21, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 22, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 23, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 24, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 25, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 28, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 29, 0, 0), 'aapl'], [datetime.datetime(2008, 4, 30, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 1, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 2, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 5, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 6, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 7, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 8, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 9, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 12, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 13, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 14, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 15, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 16, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 19, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 20, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 21, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 22, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 23, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 27, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 28, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 29, 0, 0), 'aapl'], [datetime.datetime(2008, 5, 30, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 2, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 3, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 4, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 5, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 6, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 9, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 10, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 11, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 12, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 13, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 16, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 17, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 18, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 19, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 20, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 23, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 24, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 25, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 26, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 27, 0, 0), 'aapl'], [datetime.datetime(2008, 6, 30, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 1, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 2, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 3, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 7, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 8, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 9, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 10, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 11, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 14, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 15, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 16, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 17, 0, 0), 'ebay'], [datetime.datetime(2008, 7, 18, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 21, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 22, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 23, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 24, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 25, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 28, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 29, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 30, 0, 0), 'aapl'], [datetime.datetime(2008, 7, 31, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 1, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 4, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 5, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 6, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 7, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 8, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 11, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 12, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 13, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 14, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 15, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 18, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 19, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 20, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 21, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 22, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 25, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 26, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 27, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 28, 0, 0), 'aapl'], [datetime.datetime(2008, 8, 29, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 2, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 3, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 4, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 5, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 8, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 9, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 10, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 11, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 12, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 15, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 16, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 17, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 18, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 19, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 22, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 23, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 24, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 25, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 26, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 29, 0, 0), 'aapl'], [datetime.datetime(2008, 9, 30, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 1, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 2, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 3, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 6, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 7, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 8, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 9, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 10, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 13, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 14, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 15, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 16, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 17, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 20, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 21, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 22, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 23, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 24, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 27, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 28, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 29, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 30, 0, 0), 'aapl'], [datetime.datetime(2008, 10, 31, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 3, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 4, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 5, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 6, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 7, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 10, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 11, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 12, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 13, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 14, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 17, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 18, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 19, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 20, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 21, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 24, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 25, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 26, 0, 0), 'aapl'], [datetime.datetime(2008, 11, 28, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 1, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 2, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 3, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 4, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 5, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 8, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 9, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 10, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 11, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 12, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 15, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 16, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 17, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 18, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 19, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 22, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 23, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 24, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 26, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 29, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 30, 0, 0), 'aapl'], [datetime.datetime(2008, 12, 31, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 2, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 5, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 6, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 7, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 8, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 9, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 12, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 13, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 14, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 15, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 16, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 20, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 21, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 22, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 23, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 26, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 27, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 28, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 29, 0, 0), 'aapl'], [datetime.datetime(2009, 1, 30, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 2, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 3, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 4, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 5, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 6, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 9, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 10, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 11, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 12, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 13, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 17, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 18, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 19, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 20, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 23, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 24, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 25, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 26, 0, 0), 'aapl'], [datetime.datetime(2009, 2, 27, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 2, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 3, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 4, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 5, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 6, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 9, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 10, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 11, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 12, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 13, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 16, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 17, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 18, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 19, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 20, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 23, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 24, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 25, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 26, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 27, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 30, 0, 0), 'aapl'], [datetime.datetime(2009, 3, 31, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 1, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 2, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 3, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 6, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 7, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 8, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 9, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 13, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 14, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 15, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 16, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 17, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 20, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 21, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 22, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 23, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 24, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 27, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 28, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 29, 0, 0), 'aapl'], [datetime.datetime(2009, 4, 30, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 1, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 4, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 5, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 6, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 7, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 8, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 11, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 12, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 13, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 14, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 15, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 18, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 19, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 20, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 21, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 22, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 26, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 27, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 28, 0, 0), 'aapl'], [datetime.datetime(2009, 5, 29, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 1, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 2, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 3, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 4, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 5, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 8, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 9, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 10, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 11, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 12, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 15, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 16, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 17, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 18, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 19, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 22, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 23, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 24, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 25, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 26, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 29, 0, 0), 'aapl'], [datetime.datetime(2009, 6, 30, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 1, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 2, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 6, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 7, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 8, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 9, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 10, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 13, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 14, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 15, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 16, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 17, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 20, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 21, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 22, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 23, 0, 0), 'ebay'], [datetime.datetime(2009, 7, 24, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 27, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 28, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 29, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 30, 0, 0), 'aapl'], [datetime.datetime(2009, 7, 31, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 3, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 4, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 5, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 6, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 7, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 10, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 11, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 12, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 13, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 14, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 17, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 18, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 19, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 20, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 21, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 24, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 25, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 26, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 27, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 28, 0, 0), 'aapl'], [datetime.datetime(2009, 8, 31, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 1, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 2, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 3, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 4, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 8, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 9, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 10, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 11, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 14, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 15, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 16, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 17, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 18, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 21, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 22, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 23, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 24, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 25, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 28, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 29, 0, 0), 'aapl'], [datetime.datetime(2009, 9, 30, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 1, 0, 0), 'cmcsa'], [datetime.datetime(2009, 10, 2, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 5, 0, 0), 'brcd'], [datetime.datetime(2009, 10, 6, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 7, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 8, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 9, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 12, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 13, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 14, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 15, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 16, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 19, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 20, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 21, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 22, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 23, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 26, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 27, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 28, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 29, 0, 0), 'aapl'], [datetime.datetime(2009, 10, 30, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 2, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 3, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 4, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 5, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 6, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 9, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 10, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 11, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 12, 0, 0), 'amd'], [datetime.datetime(2009, 11, 13, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 16, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 17, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 18, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 19, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 20, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 23, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 24, 0, 0), 'brcd'], [datetime.datetime(2009, 11, 25, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 27, 0, 0), 'aapl'], [datetime.datetime(2009, 11, 30, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 1, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 2, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 3, 0, 0), 'cmcsa'], [datetime.datetime(2009, 12, 4, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 7, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 8, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 9, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 10, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 11, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 14, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 15, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 16, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 17, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 18, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 21, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 22, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 23, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 24, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 28, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 29, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 30, 0, 0), 'aapl'], [datetime.datetime(2009, 12, 31, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 4, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 5, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 6, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 7, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 8, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 11, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 12, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 13, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 14, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 15, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 19, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 20, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 21, 0, 0), 'ebay'], [datetime.datetime(2010, 1, 22, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 25, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 26, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 27, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 28, 0, 0), 'aapl'], [datetime.datetime(2010, 1, 29, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 1, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 2, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 3, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 4, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 5, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 8, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 9, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 10, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 11, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 12, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 16, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 17, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 18, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 19, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 22, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 23, 0, 0), 'brcd'], [datetime.datetime(2010, 2, 24, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 25, 0, 0), 'aapl'], [datetime.datetime(2010, 2, 26, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 1, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 2, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 3, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 4, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 5, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 8, 0, 0), 'csco'], [datetime.datetime(2010, 3, 9, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 10, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 11, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 12, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 15, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 16, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 17, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 18, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 19, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 22, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 23, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 24, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 25, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 26, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 29, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 30, 0, 0), 'aapl'], [datetime.datetime(2010, 3, 31, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 1, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 5, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 6, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 7, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 8, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 9, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 12, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 13, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 14, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 15, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 16, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 19, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 20, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 21, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 22, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 23, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 26, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 27, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 28, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 29, 0, 0), 'aapl'], [datetime.datetime(2010, 4, 30, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 3, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 4, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 5, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 6, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 7, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 10, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 11, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 12, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 13, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 14, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 17, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 18, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 19, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 20, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 21, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 24, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 25, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 26, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 27, 0, 0), 'aapl'], [datetime.datetime(2010, 5, 28, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 1, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 2, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 3, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 4, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 7, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 8, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 9, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 10, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 11, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 14, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 15, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 16, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 17, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 18, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 21, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 22, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 23, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 24, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 25, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 28, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 29, 0, 0), 'aapl'], [datetime.datetime(2010, 6, 30, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 1, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 2, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 6, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 7, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 8, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 9, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 12, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 13, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 14, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 15, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 16, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 19, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 20, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 21, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 22, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 23, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 26, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 27, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 28, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 29, 0, 0), 'aapl'], [datetime.datetime(2010, 7, 30, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 2, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 3, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 4, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 5, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 6, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 9, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 10, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 11, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 12, 0, 0), 'csco'], [datetime.datetime(2010, 8, 13, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 16, 0, 0), 'csco'], [datetime.datetime(2010, 8, 17, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 18, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 19, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 20, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 23, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 24, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 25, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 26, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 27, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 30, 0, 0), 'aapl'], [datetime.datetime(2010, 8, 31, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 1, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 2, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 3, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 7, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 8, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 9, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 10, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 13, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 14, 0, 0), 'csco'], [datetime.datetime(2010, 9, 15, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 16, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 17, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 20, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 21, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 22, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 23, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 24, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 27, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 28, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 29, 0, 0), 'aapl'], [datetime.datetime(2010, 9, 30, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 1, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 4, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 5, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 6, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 7, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 8, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 11, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 12, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 13, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 14, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 15, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 18, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 19, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 20, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 21, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 22, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 25, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 26, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 27, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 28, 0, 0), 'aapl'], [datetime.datetime(2010, 10, 29, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 1, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 2, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 3, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 4, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 5, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 8, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 9, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 10, 0, 0), 'csco'], [datetime.datetime(2010, 11, 11, 0, 0), 'csco'], [datetime.datetime(2010, 11, 12, 0, 0), 'csco'], [datetime.datetime(2010, 11, 15, 0, 0), 'csco'], [datetime.datetime(2010, 11, 16, 0, 0), 'csco'], [datetime.datetime(2010, 11, 17, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 18, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 19, 0, 0), 'csco'], [datetime.datetime(2010, 11, 22, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 23, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 24, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 26, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 29, 0, 0), 'aapl'], [datetime.datetime(2010, 11, 30, 0, 0), 'aapl'], [datetime.datetime(2010, 12, 1, 0, 0), 'aapl'], [datetime.datetime(2010, 12, 2, 0, 0), 'aapl'], [datetime.datetime(2010, 12, 3, 0, 0), 'csco'], [datetime.datetime(2010, 12, 6, 0, 0), 'aapl'], [datetime.datetime(2010, 12, 7, 0, 0), 'aapl'], [datetime.datetime(2010, 12, 8, 0, 0), 'aapl'], [datetime.datetime(2010, 12, 9, 0, 0), 'csco'], [datetime.datetime(2010, 12, 10, 0, 0), 'aapl'], [datetime.datetime(2010, 12, 13, 0, 0), 'aapl'], [datetime.datetime(2010, 12, 14, 0, 0), 'aapl'], [datetime.datetime(2010, 12, 15, 0, 0), 'aapl'], [datetime.datetime(2010, 12, 16, 0, 0), 'aapl'], [datetime.datetime(2010, 12, 17, 0, 0), 'csco'], [datetime.datetime(2010, 12, 20, 0, 0), 'aapl'], ...]
Searching For High Volume Days¶
In [51]:
daily_volumes = {}
most_traded = []
for k, v in trades.items():
volume = sum([item[1] for item in v])
daily_volumes[k] = volume
In [52]:
volume_tuples = [[k,v] for k,v in daily_volumes.items()]
volume_tuples = sorted(volume_tuples, key=lambda x: x[1])
volume_tuples[-10:]
Out[52]:
[[datetime.datetime(2008, 1, 24, 0, 0), 1533363200.0], [datetime.datetime(2008, 1, 16, 0, 0), 1536176400.0], [datetime.datetime(2007, 11, 8, 0, 0), 1553880500.0], [datetime.datetime(2008, 9, 29, 0, 0), 1555072400.0], [datetime.datetime(2008, 2, 7, 0, 0), 1559032100.0], [datetime.datetime(2008, 1, 22, 0, 0), 1578877700.0], [datetime.datetime(2008, 10, 8, 0, 0), 1599183500.0], [datetime.datetime(2007, 7, 26, 0, 0), 1611272800.0], [datetime.datetime(2008, 10, 10, 0, 0), 1770266900.0], [datetime.datetime(2008, 1, 23, 0, 0), 1964583900.0]]
In [53]:
import math
high_volume_days = [v[0] for v in volume_tuples[-10:]]
def binary_search(array, search):
m = 0
i = 0
z = len(array) - 1
while i<= z:
m = math.floor(i + ((z - i) / 2))
if array[m] == search:
return m
elif array[m] < search:
i = m + 1
elif array[m] > search:
z = m - 1
high_volume_transactions = {}
for k,v in prices_columns.items():
for day in high_volume_days:
ind = binary_search(v["date"], day)
if ind is None:
continue
if k not in high_volume_transactions:
high_volume_transactions[k] = []
high_volume_transactions[k].append(prices[k][ind])
Finding Profitable Stocks¶
In [54]:
profits = []
for k,v in prices_columns.items():
percentage = (v["close"][-1] - v["close"][0]) / v["close"][0]
profits.append([k,percentage * 100])
profits = sorted(profits, key=lambda x: x[1])
profits[-10:]
Out[54]:
[['achc', 1330.0000666666667], ['bcli', 1339.2137535980346], ['cui', 1525.1625162516252], ['apdn', 1549.6700659868025], ['anip', 1707.3554472785033], ['amzn', 2230.7234281466817], ['blfs', 2437.4365640858978], ['arcw', 3898.60048982856], ['adxs', 4005.0000000000005], ['admp', 7483.8389225948395]]
The most profitable stock to buy in 2007
would have been ADMP
, which appreciated from around 7
cents to its current price of 4.43
.