검색하기귀찮아서만든블로그

[Python] FinanceData 활용기 (2) 본문

개발

[Python] FinanceData 활용기 (2)

hellworld 2022. 9. 28. 20:26
차트를 그리기위한 matplotlib 패키지 설치
import FinanceDataReader as Finance

# 삼성 주식 9월
dfSamsung = Finance.DataReader('005930','20220901','20220928')
print('[SAMSUNG]-------------------------------------------')
print(dfSamsung)
print('\n\n')

# 애플 데이터 9월
print('[APPLE]-------------------------------------------')
dfApple = Finance.DataReader('AAPL','20220901','20220928')
print(dfApple)
코드 실행 결과

2022년 9월 삼성 주식 차트 팝업 코드

import FinanceDataReader as Finance
import matplotlib.pyplot as plt

# 삼성 주식 9월
dfSamsung = Finance.DataReader('005930','20220901','20220928')
print('[SAMSUNG]-------------------------------------------')
print(dfSamsung)
print('\n\n')

plt.plot(dfSamsung.index, dfSamsung['High'])
plt.show()
삼성 9월 주식 정보 조회 실행 결과
삼성 9월 주식 차트

 

pip install finance-datareader 참고: https://seong6496.tistory.com/169 [파이프마임:티스토리]

'개발' 카테고리의 다른 글

[ML] MNIST 모델 학습  (0) 2022.11.28
[Python] FinanceData 활용기 (3)  (0) 2022.09.29
[Python] FinanceData 활용기 (1)  (0) 2022.09.28
[python] coroutine 비동기 처리  (0) 2022.06.06
[python] DLL 동적 라이브러리 함수 사용하기  (0) 2022.06.01