Skip to content

Latest commit

 

History

History
151 lines (90 loc) · 3.44 KB

README.md

File metadata and controls

151 lines (90 loc) · 3.44 KB

EY Dashboard

Dependencies:

  • numpy
  • pandas
  • beautifulSoup4 (bs4)
  • yahoo finance (yahoofinance)
  • selenium
  • python-dotenv
  • flask
  • flask-wtf
  • flask-sqlalchemy
  • flask-migrate
  • flask-login
  • flask-email
  • email_validator
  • pyjwt
  • pandas-datareader
  • yfinance
  • bokeh

also install chromedriver.exe from here

How preferences work

Every user has a dictionary called preferences. When a user generates a dashboard, the dashboard references back to the preferences associated with it's parent user in order to appropriately generate the dashboard

Documentation

class Company


    -----Parameters-----

	companyName: str  - The name of the company.


    -----Attributes--------

	companyName: str - what was inputted by the user
	displayName: str - full name of company scraped off YF
	YFURL: str - full URL to the YF page
	ticker: str - the ticker symbol
	
		Return ticker symbol from company name.
		
		-------Returns------

		string - the company ticker symbol


	-----Methods--------	

	def getHistoricalPricesDf(self, startDate, endDate[, locale=''])
	
		Return historical stock data of the company between two given dates.

	
	
		-------Returns------

		DataFrame - Historical stock data between two dates (inclusive).
			Columns: ['Open', 'High', 'Low', 'Close', 'Adj Close', 'Volume']
	
		-----Parameters-----

		ticker: str
			The stock ticker of the company.
			Usually obtained from getTickerSymbol(companyName)
	
		startDate: str
			The start date (inclusive) of the historical prices.
			FORMAT: YYYY-MM-DD
	
		endDate: str
			The end date (inclusive) of the historical prices.
			FORMAT: YYYY-MM-DD

		*locale=: str
			Set the locale (related to date formatting, etc.
			Options:
				'us' - United States domain (default)
				'au' - Australian domain
				'ca' - Canadian domain


	def getStockPrice(self[, afterHours=False])     *******************AFTER HOURS CURRENTLY NOT WORKING***************************

		Return stock price of the company at close

		-------Returns------

		float - the stock price

		-----Parameters-----

		*afterHours: boolean
			Signify if you want closing (Default) or after hours (True)


	def getStockPriceChange(self, afterHours=False)  *******************AFTER HOURS CURRENTLY NOT WORKING***************************

		Return stock price of the company

		-------Returns------

		str - the stock price change

		-----Parameters-----

		*afterHours: boolean
			Signify if you want closing (Default) or after hours (True)
			
	def getSector(self)

		Return sector of the company

		-------Returns------

		str - the sector of the company

class User

    -----Parameters-----

	firstName: str  - First name of the user.
	lastName: str - Last name of the user.

	-----Instance Attributes-----

	creationDate: str - date the user was created (YYYY-MM-DD)
	dashboards: list - list of all the dashboard objects generated by the user

Other methods outside of classes

def companyDialog(varName)

	opens a tkinter window that prompts the user for a company name

		-------Returns------

		None
	
		-----Parameters-----

		varName: str - the string representation of the name of the variable you want the function to store 			   the user input in. (Example: 'companyName')