From fa03b48f4780c4236b8721c021ee4c38acbdf3ff Mon Sep 17 00:00:00 2001 From: Ayuriel Date: Mon, 10 Mar 2025 17:57:04 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20quantcommon=20=EA=B0=80=EA=B2=A9=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quantcommon.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/quantcommon.py b/quantcommon.py index 4398ad4..a2cea81 100644 --- a/quantcommon.py +++ b/quantcommon.py @@ -53,4 +53,18 @@ class QuantCommon: finally: engine.dispose() - return value_list \ No newline at end of file + return value_list + + def get_price_list(self): + engine = self.create_engine() + + try: + price_list = pd.read_sql(""" + select 날짜, 종가, 종목코드 + from kor_price + where 날짜 >= (select (select max(날짜) from kor_price) - interval 1 year); + """, con=engine) + finally: + engine.dispose() + + return price_list \ No newline at end of file