コード例 #1
0
def total_revenue(data_dic, input_dic, cal=False, semi=False):
    # including currency and interest on reserve
    if semi:
        result = revenue.semi_revenue(data_dic, input_dic).sum(axis='columns')
    else:
        result = revenue.annual_revenue(data_dic,input_dic,cal).sum(axis='columns')
    result.name = 'Total Revenue'
    return result
コード例 #2
0
def pat_projection(data_dic, input_dic):
    a = revenue.semi_revenue(data_dic, input_dic)
    b = costs.semi_costs(input_dic)
    r_result = a.sum(axis='columns')
    c_result = b.drop('capital_expenditure',axis='columns').sum(axis='columns')
    final = (r_result + c_result)
    tax_dic = input_dic['tax rate'].fillna(method='ffill').fillna(method='bfill').to_dict()['Tax']
    test = final.to_frame().reset_index()
    tax_rate = 1 - test['calendar_year'].map(tax_dic).fillna(method='ffill')
    tax_rate.index=final.index
    return final * tax_rate
コード例 #3
0
def summary_revenue_dist(data_dic, input_dic, is_semi=False):
    if is_semi:
        _revenue = revenue.semi_revenue(data_dic, input_dic)
    else:
        _revenue = revenue.annual_revenue(data_dic, input_dic)
    revenue_shares = _revenue['management_fee']+_revenue['stockbroking_commission']
    revenue_shares.name = 'Shares'
    revenue_funds = _revenue['platform_fee']
    revenue_funds.name = 'Funds'
    revenue_hlf_amc = _revenue['hlf_amc']
    revenue_hlf_amc.name = 'HLF AMC'
    revenue_cash = _revenue['interest_on_cash']
    revenue_cash.name = 'Cash'
    revenue_cash_service = _revenue['cash_service']
    revenue_cash_service.name = 'Cash Service'
    revenue_other = _revenue.drop(['management_fee','stockbroking_commission','platform_fee','hlf_amc','interest_on_cash','cash_service','currency_revenue','interest_on_reserve'], axis='columns').sum(axis='columns')
    revenue_other.name = 'Other'
    return pandas.concat([revenue_shares,revenue_funds,revenue_hlf_amc,revenue_cash,revenue_cash_service,revenue_other],axis='columns')
コード例 #4
0
ファイル: consolidated.py プロジェクト: NNicolaou/HL_live
def revenue_analysis(dic_data, input_dic):

    # without currency revenue and interest on reserve
    _revenue = revenue.semi_revenue(dic_data, input_dic)

    df = pandas.DataFrame(index=_revenue.index, columns=revenue_cols)
    df.loc[:, 'Cash Service'] = _revenue['cash_service']
    df.loc[:, 'Platform fees'] = _revenue['platform_fee']
    df.loc[:, 'Net renewal income'] = _revenue['renewal_income']
    df.loc[:, 'Management fees'] = _revenue['management_fee']
    df.loc[:, 'On-going adviser charges'] = _revenue['pms_advice']
    df.loc[:, 'HL Fund AMC'] = _revenue['hlf_amc']
    df.loc[:, 'Stockbroking income'] = _revenue[
        'stockbroking_commission'] + _revenue['stockbroking_income']
    df.loc[:, 'Interest receivable'] = _revenue['interest_on_cash']
    df.loc[:, 'Adviser charges'] = _revenue['advice_fee']
    df.loc[:, 'Funds Library'] = _revenue['funds_library']
    df.loc[:,
           'Other income'] = _revenue['paper_income'] + _revenue['other_income']
    df.loc[:, 'Total net revenue'] = df.sum(axis='columns')

    return df