KSS-1227 commited on
Commit
61395c4
·
1 Parent(s): d8e9dca

Fix HF timeout - reduce fetch period for signal generation

Browse files
Files changed (2) hide show
  1. agents/research_agent.py +1 -1
  2. ml/rf_model.py +1 -1
agents/research_agent.py CHANGED
@@ -14,7 +14,7 @@ def research(symbol: str) -> dict:
14
  print(f"[Research Agent] Fetching data for {symbol}...")
15
 
16
  # Fetch price data with indicators
17
- df = fetch_prices(symbol, period="1y")
18
  if df.empty:
19
  return {"error": f"No price data for {symbol}"}
20
 
 
14
  print(f"[Research Agent] Fetching data for {symbol}...")
15
 
16
  # Fetch price data with indicators
17
+ df = fetch_prices(symbol, period="6mo")
18
  if df.empty:
19
  return {"error": f"No price data for {symbol}"}
20
 
ml/rf_model.py CHANGED
@@ -112,7 +112,7 @@ def predict_signal(symbol: str, model=None, scaler=None) -> dict:
112
  scaler = joblib.load(SCALER_PATH)
113
 
114
  # Fetch latest data
115
- df = fetch_prices(symbol, period="1y")
116
  if df.empty:
117
  return {"error": f"No data for {symbol}"}
118
 
 
112
  scaler = joblib.load(SCALER_PATH)
113
 
114
  # Fetch latest data
115
+ df = fetch_prices(symbol, period="6mo")
116
  if df.empty:
117
  return {"error": f"No data for {symbol}"}
118