TauricResearch/TradingAgents · error · ValueError
Indicator {indicator} is not supported. Please choose from:
Error message
Indicator {indicator} is not supported. Please choose from: {list(supported_indicators.keys())} What it means
Raised by the Alpha Vantage indicator utility in tradingagents/dataflows/alpha_vantage_indicator.py when the requested indicator name is not in its supported_indicators dict (close, ema, sma, rsi, macd, macds, macdh, boll, boll_ub, boll_lb, atr, vwma, ...). It is a ValueError that lists the accepted keys, so callers know exactly what is available.
Source
Thrown at tradingagents/dataflows/alpha_vantage_indicator.py:63
}
indicator_descriptions = {
"close_50_sma": "50 SMA: A medium-term trend indicator. Usage: Identify trend direction and serve as dynamic support/resistance. Tips: It lags price; combine with faster indicators for timely signals.",
"close_200_sma": "200 SMA: A long-term trend benchmark. Usage: Confirm overall market trend and identify golden/death cross setups. Tips: It reacts slowly; best for strategic trend confirmation rather than frequent trading entries.",
"close_10_ema": "10 EMA: A responsive short-term average. Usage: Capture quick shifts in momentum and potential entry points. Tips: Prone to noise in choppy markets; use alongside longer averages for filtering false signals.",
"macd": "MACD: Computes momentum via differences of EMAs. Usage: Look for crossovers and divergence as signals of trend changes. Tips: Confirm with other indicators in low-volatility or sideways markets.",
"macds": "MACD Signal: An EMA smoothing of the MACD line. Usage: Use crossovers with the MACD line to trigger trades. Tips: Should be part of a broader strategy to avoid false positives.",
"macdh": "MACD Histogram: Shows the gap between the MACD line and its signal. Usage: Visualize momentum strength and spot divergence early. Tips: Can be volatile; complement with additional filters in fast-moving markets.",
"rsi": "RSI: Measures momentum to flag overbought/oversold conditions. Usage: Apply 70/30 thresholds and watch for divergence to signal reversals. Tips: In strong trends, RSI may remain extreme; always cross-check with trend analysis.",
"boll": "Bollinger Middle: A 20 SMA serving as the basis for Bollinger Bands. Usage: Acts as a dynamic benchmark for price movement. Tips: Combine with the upper and lower bands to effectively spot breakouts or reversals.",
"boll_ub": "Bollinger Upper Band: Typically 2 standard deviations above the middle line. Usage: Signals potential overbought conditions and breakout zones. Tips: Confirm signals with other tools; prices may ride the band in strong trends.",
"boll_lb": "Bollinger Lower Band: Typically 2 standard deviations below the middle line. Usage: Indicates potential oversold conditions. Tips: Use additional analysis to avoid false reversal signals.",
"atr": "ATR: Averages true range to measure volatility. Usage: Set stop-loss levels and adjust position sizes based on current market volatility. Tips: It's a reactive measure, so use it as part of a broader risk management strategy.",
"vwma": "VWMA: A moving average weighted by volume. Usage: Confirm trends by integrating price action with volume data. Tips: Watch for skewed results from volume spikes; use in combination with other volume analyses."
}
if indicator not in supported_indicators:
raise ValueError(
f"Indicator {indicator} is not supported. Please choose from: {list(supported_indicators.keys())}"
)
curr_date_dt = datetime.strptime(curr_date, "%Y-%m-%d")
before = curr_date_dt - relativedelta(days=look_back_days)
# Get the full data for the period instead of making individual calls
_, required_series_type = supported_indicators[indicator]
# Use the provided series_type or fall back to the required one
if required_series_type:
series_type = required_series_type
try:
# Get indicator data for the period
if indicator == "close_50_sma":
data = _make_api_request("SMA", {
"symbol": symbol,View on GitHub (pinned to a33fd4c0f1)
Solutions
- Use one of the exact keys from the error message (e.g. 'boll_ub' not 'bollinger_upper'; lowercase, no spaces)
- Print the supported list first: the message itself contains list(supported_indicators.keys()) — code against that
- If you need indicators like 'obv'/'stoch', switch the tool_vendors entry for that method to the stockstats implementation, which supports the wider stockstats set
- Sanitize LLM/tool input by mapping synonyms to canonical keys before calling
Example fix
# before
get_stock_data_indicators_adjusted("AAPL", "2025-06-10", 10, "bollinger_upper")
# -> ValueError: Indicator bollinger_upper is not supported. Please choose from: ['close', 'ema', ..., 'boll_ub', ...]
# after
get_stock_data_indicators_adjusted("AAPL", "2025-06-10", 10, "boll_ub") Defensive patterns
Strategy: validation
Validate before calling
# Accept exactly what the vendor supports
SUPPORTED = {"close", "ema", "sma", "rsi", "macd", "macds", "macdh", "boll", "boll_ub", "boll_lb", "atr", "vwma"}
SYNONYMS = {"bollinger_upper": "boll_ub", "bollinger_lower": "boll_lb", "bollinger": "boll", "signal": "macds", "histogram": "macdh"}
def canonical_indicator(name: str) -> str:
n = name.strip().lower()
return SYNONYMS.get(n, n) if SYNONYMS.get(n, n) in SUPPORTED else None Type guard
def is_supported_indicator(name: str) -> bool:
return isinstance(name, str) and name.strip().lower() in SUPPORTED Try / catch
try:
get_stock_data_indicators_adjusted(sym, date, days, indicator)
except ValueError as e:
if "not supported" in str(e):
indicator = "boll_ub" # or re-prompt the LLM with the supported list
else:
raise Prevention
- Enumerate valid indicator keys in the tool description given to LLMs
- Map synonyms to canonical keys in one normalization function at ingress
- If you need a wider indicator set, route that tool to the stockstats vendor instead
When it happens
Trigger: Calling get_stock_data_indicators_adjusted (or the equivalent vendor method) with names like 'bollinger', 'moving_average', 'RSI ' (case/space variants), 'obv', 'stoch' — anything not a literal key of supported_indicators.
Common situations: LLM analysts passing natural-language indicator names; code ported from another library (TA-lib/pandas-ta) whose names differ; typos and casing mismatches; expecting an indicator that simply is not implemented for the Alpha Vantage vendor (try the stockstats vendor for a wider set).
Related errors
- Unsupported date format: {date_input}
- Date must be string or datetime object, got {type(date_input
- '{indicator}' is not a known macro alias or a valid FRED ser
- Method '{method}' not found in any category
- Indicator {indicator} is not supported. Please choose from:
AI-assisted analysis of TauricResearch/TradingAgents@a33fd4c0f1 (2026-08-14).
Data as JSON: /api/errors/7054201fd35a3025.
Report an issue: GitHub.