대감집
[재무제표] 손익계산서 분석 본문
- 재무제표를 분석하기 위해서 yfinance에서 크롤링할 수 있는 데이터 기반으로 해석 진행
- Income Statement, Cash Flow Statement, Balance Sheet를 중점적으로 분석 진행
- Income Statement를 기반으로 기업 매출이 우수하면 우상향 하는 주가 상관관계를 예측할 수 있다
- 손익계산서(Income Statement)
- Total Revenue
- Gross Profit(Total Revenue - Cost of Revenue)
- Operating Income(Gross Profit - Operating Expense)
- Net Income(Pretax Income - Tax Provision)
손익계산서 | |
Metric | Description |
Total Revenue | 수익(매출액) |
Cost Of Revenue | 매출원가 |
Gross Profit | 매출총이익(매출액 - 매출원가) |
Operating Expense | 운영비용(판매 및 관리비용 + 연구 개발 비용) |
Selling General And Administration | 판매 및 관리비용(마케팅 비용 포함) |
Research And Development | 연구 개발 비용 |
Operating Income | 영업이익(매출총이익-운영 비용) |
Net Non Operating Interest Income Expense | 금융 손익(금융 수익 - 금융 비용) |
Interest Income Non Operating | 금융(이자) 수익 |
Interest Expense Non Operating | 금융(이자) 비용 |
Other Income Expense | 기타 손익 |
Pretax Income | 법인세차감전 순이익(영업이익+금융 손익+기타 손익) |
Tax Provision | 법인세비용 |
Net Income | 순이익(세전소득-법인세 비용) |
EPS/EBIT/EBITDA | |
Metric | Description |
Basic EPS | 기본 주당 순이익 |
Net Income Common Stockholders | 보통주 주주에게 귀속된 순이익 |
Basic Average Shares | 기본 평균 주식 수 |
Diluted EPS | 희석 후 주당 순이익 |
Diluted NI Availto Com Stockholders | 보통주 주주에게 귀속된 희석 순이익 |
Diluted Average Shares | 희석 후 평균 주식 수 |
EBIT(Earings Before Interest and Tax) | 이자, 세금을 제외한 순이익(영업이익-이자 손익-법인세 비용) |
Net Interest Income | 이자 손익(이자 수익-이자 비용) |
Interest Expense | 이자 수익 |
Interest Income | 이자 비용 |
Tax Provision | 법인세비용 |
EBITDA(Earnings Before Interest, Taxes, Depreciation and Amortization) | 이자, 세금, 감가상각비를 제외한 순이익(EBIT+감가상각비) |
Reconciled Depreciation | 조정된 감가상각비 |
기타자료 | |
Metric |
Description
|
Normalized EBITDA |
비정상적인 항목이 제거된 후 조정된 EBITDA
|
Normalized Income |
비정상적인 항목이 제거된 후의 순이익
|
Tax Effect Of Unusual Items |
비정상적 항목의 세금
|
Tax Rate For Calcs |
계산에 사용되는 세율입니다.
|
Net Income From Continuing Operation Net Minority Interest |
계속적인 운영에서 발생한 순이익(소수 지분을 제외)
|
Reconciled Cost Of Revenue |
조정된 매출원가
|
Net Income From Continuing And Discontinued Operation |
계속 및 중단된 운영에서 발생한 순이익
|
Total Expenses |
모든 비용을 합산한 총비용
|
Total Operating Income As Reported |
보고된 총 운영 수익
|
Net Income Including Noncontrolling Interests |
비지배 지분을 포함한 순이익
|
Net Income Continuous Operations |
지속적인 운영에서 발생한 순이익
|
Other Non Operating Income Expenses |
기타 비영업 손익
|
import yfinance as yf
import matplotlib.pyplot as plt
import pandas as pd
pd.set_option('display.max_rows', None) # 모든 행 표시
pd.set_option('display.max_columns', None) # 모든 열 표시
# Define the ticker symbol
ticker_symbol = 'AAPL'
# Fetch the company data
company = yf.Ticker(ticker_symbol)
# Get quarterly financials
quarterly_financials = company.quarterly_financials
quarterly_cashflow = company.quarterly_cashflow
quarterly_balance = company.quarterly_balance_sheet
total_revenue = quarterly_financials.loc["Total Revenue"]
gross_profit = quarterly_financials.loc["Gross Profit"]
operating_income = quarterly_financials.loc["Operating Income"]
net_income = quarterly_financials.loc["Net Income"]
ebitda = quarterly_financials.loc["EBITDA"]
ebit = quarterly_financials.loc["EBIT"]
basic_eps = quarterly_financials.loc["Basic EPS"]
diluted_eps = quarterly_financials.loc["Diluted EPS"]
# 데이터 시각화
plt.figure(figsize=(10, 6))
# 바 차트 그리기
bar_width = 0.15 # 바 너비 설정
x = range(len(total_revenue.index)) # x축 위치
# Total Revenue
plt.bar([p - bar_width*3 for p in x], total_revenue.values, width=bar_width, label='Total Revenue')
# Gross Profit
plt.bar([p - bar_width*2 for p in x], gross_profit.values, width=bar_width, label='Gross Profit')
# Operating Income
plt.bar([p - bar_width for p in x], operating_income.values, width=bar_width, label='Operating Income')
# Net Income
plt.bar(x, net_income.values, width=bar_width, label='Net Income')
# EBIT
plt.bar([p + bar_width*1 for p in x], ebit.values, width=bar_width, label='EBIT')
# EBITDA
plt.bar([p + bar_width*2 for p in x], ebitda.values, width=bar_width, label='EBITDA')
# EPS를 위한 새로운 y축 생성
plt.title('Quarterly Financials (' + ticker_symbol + ')')
plt.xlabel('Quarter End Date')
plt.ylabel('Values')
ax = plt.gca() # 현재 축 가져오기
ax2 = ax.twinx() # 두 번째 y축 생성
# EPS 추가 (선으로 표시)
ax2.plot(x, basic_eps.values, marker='o', label='Basic EPS')
ax2.plot(x, diluted_eps.values, marker='o', label='Diluted EPS')
# 차트 세부 설정
ax2.set_ylabel('EPS') # 오른쪽 y축 레이블 설정
plt.xticks(x, [f"{date.year} Q{((date.month - 1) // 3) + 1}" for date in total_revenue.index], rotation=45) # 날짜 레이블 설정
# 범례 추가
ax.legend(loc='upper left')
ax2.legend(loc='upper right')
plt.grid(axis='y')
# 차트 보여주기
plt.tight_layout()
plt.show()
'투자 분석' 카테고리의 다른 글
[Turnaround] 전략 (3) | 2024.10.28 |
---|---|
[Risk Hedging] 시장 별 관계성 분석 (2) | 2024.09.20 |
[시장 지표] 상관관계 분석 (3) | 2024.09.20 |
[돌파매매] 투자 전략 검증 (0) | 2024.09.20 |
[모멘텀] 투자 전략 검증 (0) | 2024.09.20 |