Nvidia
1) 1/주가 수익 배율(PER) > 미국 AAA회사채 시장수익률
2) 배당 수익률 > 회사채 시장수익률×0.67
3) 주가 순자산 배율(PBR) < 0.65
4) 0 < 부채비율 <= 150%
5) 유동비율 >= 200%
import yfinance as yf
stock = yf.Ticker("NVDA")
stock_info = stock.info
per = stock_info['trailingPE']
bond_yield = 0.0131 # 2023년 5월 29일 미국 AAA회사채 시장수익률
if per is not None and 1/per > bond_yield:
print("\033[40m조건 1: 만족\033[0m")
else:
print("\033[40m조건 1: 불만족\033[0m")
div_yield = stock_info['dividendYield']
if div_yield is not None and div_yield > bond_yield*0.67:
print("\033[40m조건 2: 만족\033[0m")
else:
print("\033[40m조건 2: 불만족\033[0m")
pbr = stock_info['priceToBook']
if pbr is not None and pbr < 0.65:
print("\033[40m조건 3: 만족\033[0m")
else:
print("\033[40m조건 3: 불만족\033[0m")
debt_ratio = stock_info['debtToEquity']
if debt_ratio is not None and 0 < debt_ratio <= 1.5:
print("\033[40m조건 4: 만족\033[0m")
else:
print("\033[40m조건 4: 불만족\033[0m")
current_ratio = stock_info['currentRatio']
if current_ratio is not None and current_ratio >= 2:
print("\033[40m조건 5: 만족\033[0m")
else:
print("\033[40m조건 5: 불만족\033[0m")