def add(self,ticker): company = publicCompany.publicCompany(ticker) self.compList.append(company) #PE multiples newList = []; newList.append(ticker) newList.append(float(company.PERatio)) self.PElist.append(newList) self.PElist.sort(key=lambda x: x[1]) #PEG multiples PEG = []; PEG.append(ticker) PEG.append(float(company.PEGRatio)) self.PEGlist.append(PEG) self.PEGlist.sort(key=lambda x: x[1]) #PriceBookValue PriceBook = [] PriceBook.append(ticker) PriceBook.append(float(company.PriceBook)) self.PriceBookList.append(PriceBook) self.PriceBookList.sort(key=lambda x: x[1])
def add(self, ticker): company = publicCompany.publicCompany(ticker) self.compList.append(company) #PE multiples newList = [] newList.append(ticker) newList.append(float(company.PERatio)) self.PElist.append(newList) self.PElist.sort(key=lambda x: x[1]) #PEG multiples PEG = [] PEG.append(ticker) PEG.append(float(company.PEGRatio)) self.PEGlist.append(PEG) self.PEGlist.sort(key=lambda x: x[1]) #PriceBookValue PriceBook = [] PriceBook.append(ticker) PriceBook.append(float(company.PriceBook)) self.PriceBookList.append(PriceBook) self.PriceBookList.sort(key=lambda x: x[1])
def __init__(self, ticker): self.originalCompany = publicCompany.publicCompany(ticker) self.compList = [] self.PElist = [] self.PEGlist = [] self.PriceBookList = []