노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.

yahoo finance 활용(1), 미국 저평가 주식 찾기 



아래 원문과 수정된 글에서 Yahoo Finance에서 제공하는 주식 정보를 통해서, 몇가지 저평가 기준을 적용하여, 결과를 얻는 프로그램으로, Python 프로그램 구조와 코딩 문법을 고려하여 재작성을 합니다.


Python코딩 문법은 80칼럼 넘는 부분, 함수간격 2줄, 파라미터 구분자, Indent등을 pep8online.com를 통해서 검사할 수 있습니다.


1. 입력 데이터 파일 만들기


리스트 다운로드는 http://www.nasdaq.com/screening/company-list.aspx


2. 조건식 설정(정의)

# share price is less than 1.5 x book value
PRICE_BOOK_LT = 2.0
# earnings per share is at least 2x bigger than dividend per share
EARN_DIV_GT = 1.5
# dividend yield is more than 3%
DIV_YIELD_RATIO = 3.0
# 5yr PEG is between 0 and 1.1 ( or < 2.0 )
PEG_GT = 0.0
PEG_LT = 2.0



3. 결과 파일 만들기



현재 기준으로 검색 결과는 아래와 같습니다.


아래 코드는 python 2 기준으로 작성되었으며, python 3에서 실행시는 print -> print()로 괄호를 추가 해야 합니다.



아래 형식에서 구분자를 ,를 사용하였으나, Company명에 ,를 사용하는 경우가 있으므로, 구분자의 대체가 필요 해 보입니다.

Symbol,Company,Price,Bookvalue,Dividend share,Dividend yield,EPS,PE ratio,PE growth ratio
AYR,Aircastle Limited,21.77,23.58,1.04,4.81,2.00,10.89,1.89
ABR,Arbor Realty Trust,8.31,9.79,0.72,8.80,1.11,7.46,0.93
CHS,Chico's FAS, Inc.,8.56,4.86,0.33,3.61,0.72,11.94,0.95
FNB,F.N.B. Corporation,14.09,13.22,0.48,3.35,0.73,19.25,1.22
FAF,First American Corporation (New,44.64,27.80,1.36,3.04,3.14,14.23,1.87
GME,Gamestop Corporation,21.15,22.40,1.52,7.27,3.36,6.30,0.83
HT,Hersha Hospitality Trust Class,18.17,20.14,1.12,6.20,2.91,6.25,0.33
IGT,International Game Technology O,18.27,17.80,0.80,4.42,1.23,14.82,1.17
IVZ,Invesco Ltd,36.11,18.83,1.16,3.30,2.20,16.43,1.02
KKR,KKR & Co. L.P. Common Units Rep,19.17,12.63,0.68,3.67,1.76,10.88,0.15
KSS,Kohl's Corporation,37.15,29.20,2.20,5.75,3.45,10.76,1.88
MFC,Manulife Financial Corporation,19.44,15.39,0.55,3.13,1.20,16.20,1.71
ORI,Old Republic International Corp,19.40,17.61,0.76,3.88,1.59,12.22,1.33
PK,Park Hotels & Resorts Inc.,27.00,28.03,1.72,6.41,11.45,2.36,0.51
PKX,POSCO,67.49,115.34,2.08,3.23,4.96,13.59,0.34
RWT,Redwood Trust, Inc.,17.21,15.13,1.12,6.58,1.76,9.78,1.45
SNY,Sanofi American Depositary Shar,49.0425,25.8810,1.6400,3.4300,4.1345,11.8618,1.5500
TGNA,TEGNA Inc,14.38,10.66,0.49,3.41,1.87,7.68,1.95
UMC,United Microelectronics Corpora,2.35,2.91,0.09,3.82,0.14,17.41,1.08
VLO,Valero Energy Corporation,68.03,44.33,2.80,4.11,4.57,14.88,0.77




수정문 : http://blog.naver.com/PostView.nhn?blogId=silvury&logNo=220933350426

원문 :  https://www.reddit.com/r/SecurityAnalysis/comments/4u969n/finding_undervalued_dividend_stocks_with_python/







또는 My Screeners 


Yahoo Finance내의 Screen 서비스를 이용해서, https://finance.yahoo.com/screener 내의 Undervalued Growth Stocks, Growth Technology Stocks, Day Gainers, Day Losers, Most Actives등에서 조건식을 변경하는 방법도 있다.


1. Undervalued Growth Stocks


- Trailling P/E (LTM) is (<0) (0-20) (20-50) (50-80) (>80)

- PEG Ration(5yr expected) is (<1) (1 to 2) ( 2 to 3 ) (>3)

- EPS Growth (LTM) is (<15%) (15% to 25%) (25% to 50%) (50% to 100%) (> 100%)

- Exchange is (NasdaqGS) (NYSE)


2. Growth Technology Stocks


- Quarterly Revenue Growth(yoy) is (<15%) (15% to 25%) (25% to 50%) (50% to 100%) (> 100%)

- EPS Growth (LTM) is (<15%) (15% to 25%) (25% to 50%) (50% to 100%) (> 100%)

- Sector is (Technology)

- Exchange is (NasdaqGS) (NYSE)


참고. developer yahho.com / yql / console


https://developer.yahoo.com/yql/console/#h=select+*+from+pm.finance+where+symbol%3D%22SKT%22

블로그 이미지

StartGuide

I want to share the basic to programming of each category and how to solve the error. This basic instruction can be extended further. And I have been worked in southeast Asia more than 3 years. And I want to have the chance to work another country.

,