Пример #1
0
 def ANALYZE_click(self):
     tickers_dict_eps = dict()
     tickers_dict_debt = dict()
     entered_tickers = self.textTicker.get()
     entered_years = self.buttonYears_var.get()
     print('\n---- CLICK EVENT ANALYZE ---- Selected ticker is/are: ' +
           entered_tickers)
     ticker_list = entered_tickers.split(',')
     for ticker in ticker_list:
         print('---- Collecting data for ' + str(ticker))
         a = Analyses(ticker=entered_tickers,
                      period=entered_years,
                      api_key=self.apikey,
                      statistic='')
         #a.title_data = ['Earning Per Share','netIncomeRatio']
         (date, eps,
          netIncomeRatio) = a.Get_document_for(ticker,
                                               'epsdiluted',
                                               'netIncomeRatio',
                                               document='income_statement')
         (date_2, bookValuePerShare,
          roe) = a.Get_document_for(ticker,
                                    'bookValuePerShare',
                                    'roe',
                                    document='metrics')
         (date_2, dividendYield,
          roe) = a.Get_document_for(ticker,
                                    'dividendYield',
                                    'roe',
                                    document='metrics')
         tickers_dict_eps[ticker] = {
             'x': date,
             'y1': eps,
             'y2': dividendYield
         }
         tickers_dict_debt[ticker] = {
             'x': date_2,
             'y1': bookValuePerShare,
             'y2': roe
         }
     a.title_data = [
         'Earning Per Share Diluted =\n (NetIncome - PreferredDividends)/SharesOutstanding',
         'dividendYield %',
         'bookValuePerShare =\n (TotalEquity-PreferredEquity)/SharesOutstanding',
         'ROE =\n NetIncome/SharholdersEquity'
     ]
     print(
         '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::'
     )
     click_data = ['EPS', 'netIncomeRatio', 'BVPS', 'ROE']
     plot = a.Multiple_plots(ticker_list, tickers_dict_eps,
                             tickers_dict_debt, 'Analyze')
Пример #2
0
 def CashFlow_click(self):
     tickers_dict_eps = dict()
     tickers_dict_debt = dict()
     entered_tickers = self.textTicker.get()
     entered_years = self.buttonYears_var.get()
     print('\n---- CLICK EVENT CashFlow ---- Selected ticker is/are: ' +
           entered_tickers)
     ticker_list = entered_tickers.split(',')
     print('-- You selected ' + str(len(ticker_list)) + ' tickers \n')
     for ticker in ticker_list:
         print('---- Collecting data for ' + str(ticker))
         CashFlow = Analyses(ticker=entered_tickers,
                             period=entered_years,
                             api_key=self.apikey,
                             statistic=' ')
         (date, netCashProvidedByOperating,
          netCashUsedForInvesting) = CashFlow.Get_document_for(
              ticker,
              'netCashProvidedByOperatingActivities',
              'netCashUsedForInvestingActivites',
              document='cash_flow')
         (date_2, netCashUsedProvidedByFinancing,
          netChangeInCash) = CashFlow.Get_document_for(
              ticker,
              'netCashUsedProvidedByFinancingActivities',
              'netChangeInCash',
              document='cash_flow')
         tickers_dict_eps[ticker] = {
             'x': date,
             'y1': netCashProvidedByOperating,
             'y2': netCashUsedForInvesting
         }
         tickers_dict_debt[ticker] = {
             'x': date_2,
             'y1': netCashUsedProvidedByFinancing,
             'y2': netChangeInCash
         }
         #print(tickers_dict_eps
     CashFlow.title_data = [
         'netCashProvidedByOperatingActivities',
         'netCashUsedProvidedByForInvestingActivities',
         'netCashUsedProvidedByFinancingActivities', 'netChangeInCash'
     ]
     plot = CashFlow.Multiple_plots(ticker_list, tickers_dict_eps,
                                    tickers_dict_debt, 'CashFlow')
Пример #3
0
 def Profitability_click(self):
     tickers_dict_eps = dict()
     tickers_dict_debt = dict()
     entered_tickers = self.textTicker.get()
     entered_years = self.buttonYears_var.get()
     print(
         '\n---- CLICK EVENT Profitability ---- Selected ticker is/are: ' +
         entered_tickers)
     ticker_list = entered_tickers.split(',')
     #print('-- You selected '+str(len(ticker_list))+' tickers \n')
     for ticker in ticker_list:
         print('---- Collecting data for ' + str(ticker))
         IncomeStatement = Analyses(ticker=entered_tickers,
                                    period=entered_years,
                                    api_key=self.apikey,
                                    statistic='%')
         (date, grossProfitRatio,
          operatingIncome) = IncomeStatement.Get_document_for(
              ticker,
              'grossProfitRatio',
              'operatingIncomeRatio',
              document='income_statement')
         (date_2, returnOnTangibleAssets,
          roic) = IncomeStatement.Get_document_for(ticker,
                                                   'returnOnTangibleAssets',
                                                   'roic',
                                                   document='metrics')
         tickers_dict_eps[ticker] = {
             'x': date,
             'y1': grossProfitRatio,
             'y2': operatingIncome
         }
         tickers_dict_debt[ticker] = {
             'x': date_2,
             'y1': returnOnTangibleAssets,
             'y2': roic
         }
     IncomeStatement.title_data = [
         'grossProfitRatio', 'operatingIncomeRatio',
         'returnOnTangibleAssets', 'roic '
     ]
     plot = IncomeStatement.Multiple_plots(ticker_list, tickers_dict_eps,
                                           tickers_dict_debt,
                                           'Profitability')
Пример #4
0
 def DebtFigures_click(self):
     tickers_dict_eps = dict()
     tickers_dict_debt = dict()
     entered_tickers = self.textTicker.get()
     entered_years = self.buttonYears_var.get()
     print('\n---- CLICK EVENT DebtFigures ---- Selected ticker is/are: ' +
           entered_tickers)
     ticker_list = entered_tickers.split(',')
     #print('-- You selected '+str(len(ticker_list))+' tickers \n')
     for ticker in ticker_list:
         print('---- Collecting data for ' + str(ticker))
         DebtFigures = Analyses(ticker=entered_tickers,
                                period=entered_years,
                                api_key=self.apikey,
                                statistic='  ')
         (date, Current_ratio,
          Debt_to_Assets) = DebtFigures.Get_document_for(ticker,
                                                         'currentRatio',
                                                         'debtToAssets',
                                                         document='metrics')
         (date_2, bookValuePerShare,
          debtToEquity) = DebtFigures.Get_document_for(ticker,
                                                       'netDebtToEBITDA',
                                                       'debtToEquity',
                                                       document='metrics')
         tickers_dict_eps[ticker] = {
             'x': date,
             'y1': Current_ratio,
             'y2': Debt_to_Assets
         }
         tickers_dict_debt[ticker] = {
             'x': date_2,
             'y1': bookValuePerShare,
             'y2': debtToEquity
         }
     DebtFigures.title_data = [
         'CurrentRatio =\n CurrentAssets/CurrentLiabilities',
         'DebtToAssets =\n STDebts+LTDebts/TotalAssets',
         'netDebtToEBITDA =\n TotalDebt - Cash&Equivalents / EBITDA',
         'debtToEquity =\n TotalLiabilities/ShareholdersEquity'
     ]
     plot = DebtFigures.Multiple_plots(ticker_list, tickers_dict_eps,
                                       tickers_dict_debt, 'DebtFigures')
Пример #5
0
 def BalanceSheet_click(self):
     tickers_dict_eps = dict()
     tickers_dict_debt = dict()
     entered_tickers = self.textTicker.get()
     entered_years = self.buttonYears_var.get()
     print('\n---- CLICK EVENT BalanceSheet ---- Selected ticker is/are: ' +
           entered_tickers)
     ticker_list = entered_tickers.split(',')
     print('-- You selected ' + str(len(ticker_list)) + ' tickers \n')
     for ticker in ticker_list:
         print('---- Collecting data for ' + str(ticker))
         BalanceSheet = Analyses(ticker=entered_tickers,
                                 period=entered_years,
                                 api_key=self.apikey,
                                 statistic='log')
         (date, totalCurrentLiabilities,
          totalCurrentAssets) = BalanceSheet.Get_document_for(
              ticker, 'totalCurrentLiabilities', 'totalCurrentAssets',
              'balance_sheet')
         (date_2, shortTermDebt,
          longTermDebt) = BalanceSheet.Get_document_for(
              ticker,
              'shortTermDebt',
              'longTermDebt',
              document='balance_sheet')
         tickers_dict_eps[ticker] = {
             'x': date,
             'y1': totalCurrentLiabilities,
             'y2': totalCurrentAssets
         }
         tickers_dict_debt[ticker] = {
             'x': date_2,
             'y1': shortTermDebt,
             'y2': longTermDebt
         }
         #print(tickers_dict_eps
     BalanceSheet.title_data = [
         'totalCurrentLiabilities', 'totalCurrentAssets', 'shortTermDebt',
         'longTermDebt'
     ]
     plot = BalanceSheet.Multiple_plots(ticker_list, tickers_dict_eps,
                                        tickers_dict_debt, 'BalanceSheet')
Пример #6
0
 def Growth_click(self):
     tickers_dict_eps = dict()
     tickers_dict_debt = dict()
     entered_tickers = self.textTicker.get()
     entered_years = self.buttonYears_var.get()
     print('\n---- CLICK EVENT Growth_click ---- Selected ticker is/are: ' +
           entered_tickers)
     ticker_list = entered_tickers.split(',')
     print('-- You selected ' + str(len(ticker_list)) + ' tickers \n')
     for ticker in ticker_list:
         print('---- Collecting data for ' + str(ticker))
         Growth = Analyses(ticker=entered_tickers,
                           period=entered_years,
                           api_key=self.apikey,
                           statistic='%')
         (date, revenueGrowth,
          operatingIncomeGrowth) = Growth.Get_document_for(
              ticker, 'revenueGrowth', 'operatingIncomeGrowth',
              'financial-growth')
         (date_2, netIncomeGrowth,
          epsdilutedGrowth) = Growth.Get_document_for(
              ticker,
              'netIncomeGrowth',
              'epsdilutedGrowth',
              document='financial-growth')
         tickers_dict_eps[ticker] = {
             'x': date,
             'y1': revenueGrowth,
             'y2': operatingIncomeGrowth
         }
         tickers_dict_debt[ticker] = {
             'x': date_2,
             'y1': netIncomeGrowth,
             'y2': epsdilutedGrowth
         }
         #print(tickers_dict_eps
     Growth.title_data = [
         'revenueGrowth', 'operatingIncomeGrowth', 'netIncomeGrowth',
         'epsdilutedGrowth'
     ]
     plot = Growth.Multiple_plots(ticker_list, tickers_dict_eps,
                                  tickers_dict_debt, 'Growth')
Пример #7
0
 def IncomeStatement_click(self):
     tickers_dict_eps = dict()
     tickers_dict_debt = dict()
     entered_tickers = self.textTicker.get()
     entered_years = self.buttonYears_var.get()
     print(
         '\n---- CLICK EVENT IncomeStatement ---- Selected ticker is/are: '
         + entered_tickers)
     ticker_list = entered_tickers.split(',')
     print('-- You selected ' + str(len(ticker_list)) + ' tickers \n')
     for ticker in ticker_list:
         print('---- Collecting data for ' + str(ticker))
         IncomeStatement = Analyses(ticker=entered_tickers,
                                    period=entered_years,
                                    api_key=self.apikey,
                                    statistic='log')
         (date, Revenue, NetIncome) = IncomeStatement.Get_document_for(
             ticker, 'revenue', 'netIncome', document='income_statement')
         (date_2, operatingIncome,
          ebitda) = IncomeStatement.Get_document_for(
              ticker,
              'operatingIncome',
              'ebitda',
              document='income_statement')
         tickers_dict_eps[ticker] = {
             'x': date,
             'y1': Revenue,
             'y2': NetIncome
         }
         tickers_dict_debt[ticker] = {
             'x': date_2,
             'y1': operatingIncome,
             'y2': ebitda
         }
     IncomeStatement.title_data = [
         'Revenue', 'NetIncome', 'OperatingIncome', 'Ebitda '
     ]
     plot = IncomeStatement.Multiple_plots(ticker_list, tickers_dict_eps,
                                           tickers_dict_debt,
                                           'IncomeStatement')