From e9a1d1cd41043bcf752ad6a0a06002636cd4dfa6 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Tue, 18 Feb 2025 01:04:59 +0100 Subject: [PATCH] bugfixing --- app/cron_price_analysis.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/cron_price_analysis.py b/app/cron_price_analysis.py index 31f9fd2..e192a1a 100755 --- a/app/cron_price_analysis.py +++ b/app/cron_price_analysis.py @@ -35,7 +35,7 @@ async def download_data(ticker, start_date, end_date): df = df.rename(columns={"Date": "ds", "Adj Close": "y"}) if len(df) > 252*2: #At least 2 years of history is necessary q_high= df["y"].quantile(0.99) - q_low = df["y"].quantile(0.05) + q_low = df["y"].quantile(0.01) df = df[(df["y"] > q_low)] df = df[(df["y"] < q_high)] #df['y'] = df['y'].rolling(window=10).mean() @@ -65,12 +65,12 @@ async def run(): total_symbols = stock_symbols print(f"Total tickers: {len(total_symbols)}") - start_date = datetime(2020, 1, 1).strftime("%Y-%m-%d") + start_date = datetime(2017, 1, 1).strftime("%Y-%m-%d") end_date = datetime.today().strftime("%Y-%m-%d") chunk_size = len(total_symbols) // 70 # Divide the list into N chunks chunks = [total_symbols[i:i + chunk_size] for i in range(0, len(total_symbols), chunk_size)] - #chunks = [['TSLA']] + #chunks = [['NVDA','GME','TSLA','AAPL']] for chunk in chunks: tasks = [] for ticker in tqdm(chunk):