20 lines
434 B
Python
20 lines
434 B
Python
|
|
import pandas as pd
|
||
|
|
import numpy as np
|
||
|
|
import quantcommon
|
||
|
|
|
||
|
|
# DB 연결
|
||
|
|
engine = quantcommon.QuantCommon().create_engine()
|
||
|
|
|
||
|
|
ticker_list = pd.read_sql("""
|
||
|
|
select * from kor_ticker
|
||
|
|
where 기준일 = (select max(기준일) from kor_ticker)
|
||
|
|
and 종목구분 = '보통주';
|
||
|
|
""", con=engine)
|
||
|
|
|
||
|
|
value_list = pd.read_sql("""
|
||
|
|
select * from kor_value
|
||
|
|
where 기준일 = (select max(기준일) from kor_value);
|
||
|
|
""", con=engine)
|
||
|
|
|
||
|
|
engine.dispose()
|