Exemplo n.º 1
0
 def __init__(self, workbook):
     self.base_model = cell_value(workbook, 3, 9)
     self.best_research = cell_value(workbook, 4, 9)
     self.bull_analyst = cell_value(workbook, 5, 9)
     self.bear_analyst = cell_value(workbook, 6, 9)
     self.best_expert_call = cell_value(workbook, 7, 9)
     self.av_theme = cell_value(workbook, 8, 9)
     self.sub_theme = cell_value(workbook, 9, 9)
     self.aisa_angle = cell_value(workbook, 10, 9)
    def __init__(self, worksheet, colx):
        row_rev = 20
        row_ebit = 24
        super(DeltaVsConsensusV2, self).__init__()

        self.gross_rev = None
        self.net_rev = None
        self.net_nii = None

        metric = cell_value(worksheet, 19, 1)
        if metric == DeltaVsConsensusV2.REV_CHOICES[0]:
            self.gross_rev = get_object(worksheet, row_rev, colx)
        elif metric == DeltaVsConsensusV2.REV_CHOICES[1]:
            self.net_rev = get_object(worksheet, row_rev, colx)
        elif metric == DeltaVsConsensusV2.REV_CHOICES[2]:
            self.net_nii = get_object(worksheet, row_rev, colx)

        self.adj_ebitda = get_object(worksheet, 24, colx)
        self.ebitdar = None
        self.ebita = None
        self.ebit = None
        self.ppop = None

        metric = cell_value(worksheet, 23, 1)
        if metric == DeltaVsConsensusV2.EB_CHOICES[0]:
            self.adj_ebitda = get_object(worksheet, row_ebit, colx)
        elif metric == DeltaVsConsensusV2.EB_CHOICES[1]:
            self.ebitdar = get_object(worksheet, row_ebit, colx)
        elif metric == DeltaVsConsensusV2.EB_CHOICES[2]:
            self.ebita = get_object(worksheet, row_ebit, colx)
        elif metric == DeltaVsConsensusV2.EB_CHOICES[2]:
            self.ebit = get_object(worksheet, row_ebit, colx)
        elif metric == DeltaVsConsensusV2.EB_CHOICES[2]:
            self.ppop = get_object(worksheet, row_ebit, colx)

        self.adj_eps = get_object(worksheet, 28, colx)
        self.gap_eps = get_object(worksheet, 32, colx)

        self.fcf = None
        self.bps = None

        metric = cell_value(worksheet, 34, 1)
        if metric == DeltaVsConsensusV2.FCF_CHOICES[0]:
            self.fcf = get_object(worksheet, 35, colx)
        elif metric == DeltaVsConsensusV2.FCF_CHOICES[1]:
            self.bps = get_object(worksheet, 35, colx)
Exemplo n.º 3
0
def get_object(worksheet, rowx, colx):
    kpi = dict()
    keys = ['frequency', 'source', 'weight', 'tracking_metric']
    for idx, key in enumerate(keys):
        cell_val = cell_value(worksheet, rowx, colx + idx)
        if key == 'tracking_metric' and not cell_value:
            return None
        if cell_val:
            kpi[key] = cell_val
    return kpi
 def __init__(self, worksheet):
     super(BearScenario, self).__init__()
     self.pt_1year = cell_value(worksheet, 42, 2)
     self.pt_3year = cell_value(worksheet, 42, 3)
     self.return_1year = cell_value(worksheet, 42, 4)
     self.return_3year = cell_value(worksheet, 42, 5)
     self.prob_1year = cell_value(worksheet, 45, 2)
     self.prob_3year = cell_value(worksheet, 45, 3)
 def __init__(self, worksheet):
     super(BullScenario, self).__init__()
     self.pt_1year = cell_value(worksheet, 40, 2)
     self.pt_3year = cell_value(worksheet, 40, 3)
     self.return_1year = cell_value(worksheet, 40, 4)
     self.return_3year = cell_value(worksheet, 40, 5)
     self.prob_1year = cell_value(worksheet, 43, 2)
     self.prob_3year = cell_value(worksheet, 43, 3)
 def __init__(self, worksheet):
     super(TargetPrice, self).__init__()
     self.base = BaseScenario(worksheet).__dict__
     self.bear = BearScenario(worksheet).__dict__
     self.bull = BullScenario(worksheet).__dict__
     self.__validate_and_shuffle()
     self.expected_value_1year = cell_value(worksheet, 46, 4)
     self.expected_value_3year = cell_value(worksheet, 46, 5)
     self.borrow_cost_1year = cell_value(worksheet, 47, 4)
     self.borrow_cost_3year = cell_value(worksheet, 47, 5)
     self.net_ret_1year = cell_value(worksheet, 48, 4)
     self.net_ret_3year = cell_value(worksheet, 48, 5)
def get_object(worksheet, rowx, colx):
    dvc = dict()
    dvc['aim'] = cell_value(worksheet, rowx, colx)
    dvc['consensus'] = cell_value(worksheet, rowx + 1, colx)
    dvc['guidance'] = cell_value(worksheet, rowx + 2, colx)
    return dvc
Exemplo n.º 8
0
 def __init__(self, data):
     if isinstance(data, dict):
         for k, v in data.items():
             setattr(self, k, v)
     else:
         self.company = cell_value(data, 2, 2)
         self.stock_code = cell_value(data, 3, 2)
         self.fiscal_year_end = cell_value(data, 4, 2)
         self.adto_20days = cell_value(data, 7, 2)
         self.free_float_mshs = cell_value(data, 8, 2)
         self.free_float_pfdo = cell_value(data, 8, 3)
         self.wacc_country = cell_value(data, 9, 2)
         self.wacc_company = cell_value(data, 9, 3)
         self.direction = cell_value(data, 10, 2)
         self.current_size = cell_value(data, 10, 3)
         self.scenario = cell_value(data, 11, 2)
         self.analyst_primary = cell_value(data, 12, 2)
         self.analyst_secondary = cell_value(data, 12, 3)
         self.size_reco_primary = cell_value(data, 13, 2)
         self.size_reco_secondary = cell_value(data, 13, 3)
         self.last_updated = cell_value(data, 14, 2)
         self.next_earnings = cell_value(data, 15, 2)
         self.forecast_period = cell_value(data, 16, 2)
         self.likely_outcome = cell_value(data, 21, 11)
         self.delta_consensus_list = get_consensus_list(data)
         self.short_metrics = ShortMetrics(data).__dict__
         self.irr_decomp = IRRDecomp(data).__dict__
         self.tam = Tam(data).__dict__
         self.analyst_fill_cells = AnalystFillCells(data).__dict__
         self.target_price = TargetPrice(data).__dict__
         self.data_tracking = DataTracking(data).__dict__
         self.current_valuation = CurrentValuation(data).__dict__
         self.financial_info = FinancialInfo(data).__dict__
         self.leverage_and_returns = LeverageAndReturns(data).__dict__
         self.yoy_growth_revenue = self.calculate_growth('gross_revenue')
         self.cagr_4years_revenue = self.calculate_cagr_4yrs(
             'gross_revenue')
         self.yoy_growth_eps = self.calculate_growth('adj_eps')
         self.cagr_4years_eps = self.calculate_cagr_4yrs('adj_eps')
         self.base_plus_bear = self.calculate_base_plus_bear()
 def __init__(self, worksheet):
     super(BaseScenario, self).__init__()
     self.pt_1year = cell_value(worksheet, 41, 2)
     self.pt_3year = cell_value(worksheet, 41, 3)
     self.return_1year = abs(cell_value(worksheet, 41, 4)) if cell_value(worksheet, 41, 4) else None
     self.return_3year = abs(cell_value(worksheet, 41, 5)) if cell_value(worksheet, 41, 5) else None
     self.prob_1year = cell_value(worksheet, 44, 2)
     self.prob_3year = cell_value(worksheet, 44, 3)
     self.base_case = {
         "1year": {
             "market_cap" : cell_value(worksheet, 40, 7),
             "net_cash_per_mcap": cell_value(worksheet, 41, 7),
             "enterprise_value": cell_value(worksheet, 42, 7),
             "price_earnings_growth": cell_value(worksheet, 43, 7),
             "price_to_fcf": cell_value(worksheet, 44, 7),
             "adj_fcf_mult": cell_value(worksheet, 45, 7)
         },
         "3year": {
             "market_cap" : cell_value(worksheet, 40, 8),
             "net_cash_per_mcap" : cell_value(worksheet, 41, 8),
             "enterprise_value" : cell_value(worksheet, 42, 8),
             "price_earnings_growth" : cell_value(worksheet, 43, 8),
             "price_to_fcf" : cell_value(worksheet, 44, 8),
             "adj_fcf_mult" : cell_value(worksheet, 45, 8)
         }
     }
 def __init__(self, worksheet):
     self.borrow_cost = cell_value(worksheet, 11, 6)
     self.si_mshares = cell_value(worksheet, 11, 6)
     self.sir_bberg = cell_value(worksheet, 11, 6)
     self.sir_calc = cell_value(worksheet, 11, 6)
     self.si_as_of_ff = cell_value(worksheet, 11, 6)
Exemplo n.º 11
0
 def __init__(self, workbook):
     self.irr_target = cell_value(workbook, 13, 9)
     self.eps_growth = cell_value(workbook, 14, 9)
     self.irr_yield = cell_value(workbook, 15, 9)
     self.multiple_expansion = cell_value(workbook, 16, 9)