From 88e6f0eb91c0ef582c34e4c9dbc761b5d84af8bd Mon Sep 17 00:00:00 2001 From: Ayuriel Date: Mon, 10 Mar 2025 18:27:00 +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=8B=9C=20=EA=B8=B0=EA=B0=84(=EC=9B=94)?= =?UTF-8?q?=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quantcommon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quantcommon.py b/quantcommon.py index a2cea81..fbb8c14 100644 --- a/quantcommon.py +++ b/quantcommon.py @@ -55,14 +55,14 @@ class QuantCommon: return value_list - def get_price_list(self): + def get_price_list(self, interval_month): engine = self.create_engine() try: - price_list = pd.read_sql(""" + price_list = pd.read_sql(f""" select 날짜, 종가, 종목코드 from kor_price - where 날짜 >= (select (select max(날짜) from kor_price) - interval 1 year); + where 날짜 >= (select (select max(날짜) from kor_price) - interval {interval_month} month); """, con=engine) finally: engine.dispose()