Transcript
Page 1: TMX Equity Data Application 2016

TMX Option Trading Simulation Equity Data Application 2016Custom equity data retrieval application built using Python 3.5 and Yahoo Finance’s API

Keaton Ambridge 2016

Page 2: TMX Equity Data Application 2016

OverviewIn anticipation of the upcoming 9th TMX Options Trading Simulation I began creation of an equity data retrieval platform for the 288 securities featured within this years contest

In past years Excel based dashboards allowed for full viewing of the equity data, this years simulation however drastically increased the number of securities. To accommodate this larger data set I turned to Python 3.5

The tool contains the following functionality:• Robust data retrieval capacity pulling many more data values than previous

dashboards• Efficient data retrieval – allowing for vastly expanded security sets• Color coded data for use in simulation strategies• Simple to use interface

The following slides contain screenshots of the application itself

Keaton Ambridge 2016

Page 3: TMX Equity Data Application 2016

Application DisplayData tab displaying:• 35 equities sorted based upon the company name• Equity data including:

• Previous close, open and current prices• Dollar changes from the previous close and days

open• Daily high and low for the security• Security data including:

• Price to earnings ratio• Price to sales ratio• Price to book value ratio

• Color coded daily changes• Color segmentation for the securities ratios using a four

color system• Colors are determined based upon values embedded

within the code

Keaton Ambridge 2016

Page 4: TMX Equity Data Application 2016

Code Snippet

for k in range(9): if k == 8: j = 8 else: j = 35 for i in range(j): stock = Share(tickers[k][i]) Label(tabs[k], text=tickers[k][i], font=("Calibri", 9), foreground='White', background='Black').grid(row=i + 2, column=1) op = stock.get_open() cur = stock.get_price() if op is not None: Label(tabs[k], text=op, font=("Calibri", 9), foreground='White', background='Black').grid(row=i + 2, column=3) if float(cur) - float(op) < 0: color = "Red" elif float(cur) - float(op) == 0: color = "White" else: color = "Green" Label(tabs[k], text=str(round(float(cur) - float(op), 2)), foreground=color, font=("Calibri", 9), background='Black').grid(row=i + 2, column=6) Label(tabs[k], text=stock.get_prev_close(), font=("Calibri", 9), foreground='White', background='Black').grid(row=i + 2, column=2) Label(tabs[k], text=cur, font=("Calibri", 9), foreground='White', background='Black').grid(row=i + 2, column=4)

Beginning of code block populating the display, data retrieval is performed using the Yahoo-finance 1.2.1 module and display is created utilizing the tkinter (ttk) module within PythonDue to the limitations of exporting python applications I cannot attach the application in this presentation

Keaton Ambridge 2016

Page 5: TMX Equity Data Application 2016

DisclaimerThe author of this presentation has no affiliation with TMX Group or any of its subsidiaries, this presentation was created to showcase an independent application created for use by the author during the TMX Options Trading Simulation.

The simulation information can be found at this link:https://www.m-x.ca/uni_simulation_options_en.php Image used for title slide was found online and is distributed freely, the author of this presentation does not own the original image. The Python language and the Python logo are trademarks or registered trademarks of the Python Software Corporation. The author of this presentation is not affiliated with the Python Software Corporation or any of its subsidiaries.

Yahoo-finance 1.2.1, tkinter and ttk are distributed freely online, the author of this presentation used the modules under their free distribution licenses.

Yahoo finance provides its API for use by any developer without payment. The author of this presentation has no affiliation with Yahoo or any of its subsidiaries.

Keaton Ambridge 2016