compute_rsi
Compute the Relative Strength Index (RSI) for a stock to identify overbought or oversold conditions, generating a buy or sell signal.
Instructions
Compute the Relative Strength Index (RSI) for a stock.
Returns the RSI value (0–100) and a signal:
overbought: RSI ≥ 70 (potential sell pressure)
oversold: RSI ≤ 30 (potential buy opportunity)
neutral: RSI between 30 and 70
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | RSI lookback period in days (default 14) | |
| symbol | Yes | Stock ticker symbol |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rsi | Yes | RSI value (0–100) | |
| period | Yes | ||
| signal | Yes | overbought ≥ 70 | oversold ≤ 30 | neutral otherwise | |
| symbol | Yes |