손익계산서와 재무상태표의 비율

Python으로 재무제표 분석하기

Rohan Chatterjee

Risk modeler

총자산회전율

  • 매출 대비 자산 비율
  • 자산을 얼마나 효율적으로 매출로 전환하는지 측정합니다

공식:

$$\dfrac{\text{Total Revenue}}{\text{Total Assets}}$$

Python으로 재무제표 분석하기

pandas로 총자산회전율 계산하기

merged_dat = pd.merge(income_statement, balance_sheet, on = ["Year", "company"])
  • 이제 merged_dat로 비율을 계산해 DataFrame에 새 열로 추가할 수 있습니다
merged_dat["asset_turnover"] = merged_dat["Total Revenue"] / merged_dat["Total Assets"]
Python으로 재무제표 분석하기

비율 계산을 위한 사용자 정의 함수

  • 아래와 같은 열 생성은 반복적일 수 있습니다
balance_sheet["current_ratio"] = balance_sheet["Total Current Assets"] / balance_sheet["Total Current Liabilities"]

balance_sheet["debt_to_equity"] = balance_sheet["Total Liab"] / balance_sheet["Total Stockholder Equity"]
  • 매번 같은 코드를 입력하지 않도록, 사용자 정의 함수로 묶을 수 있습니다
Python으로 재무제표 분석하기

비율 계산을 위한 사용자 정의 함수

def compute_ratio(df, numerator, denominator, ratio_name):
      df[ratio_name] = df[numerator]/df[denominator]
      return df

DataFrame balance_sheet에서 compute_ratio로 유동비율과 부채비율(자본 대비)을 계산합니다:

balance_sheet = compute_ratio(balance_sheet, "Total Current Assets",
                        "Total Current Liabilities", "current_ratio")
balance_sheet = compute_ratio(balance_sheet, "Total Liab",
                        "Total Stockholder Equity", "debt_to_equity")
Python으로 재무제표 분석하기

비율 계산을 위한 사용자 정의 함수

  • 분자, 분모, 비율 이름을 별도 리스트로 정의합니다:
    list_of_numerators = ["Total Current Assets", "Total Liab"]            
    list_of_denominators = ["Total Current Liabilities", 
                          "Total Stockholder Equity"]
    list_of_ratio_names = ["current_ratio", "debt_to_equity"]
    
  • 리스트를 순회하며 compute_ratio 함수를 호출합니다:

    for numerator, denominator, ratio_name in zip(list_of_numerators,
                                                  list_of_denominators,
                                                  list_of_ratio_names):
    
        balance_sheet = compute_ratio(balance_sheet, 
                numerator,
                denominator, 
                ratio_name)
    
Python으로 재무제표 분석하기

Ayo berlatih!

Python으로 재무제표 분석하기

Preparing Video For Download...