Technical indicators tools
technical_indicators_tools
Functions:
| Name | Description |
|---|---|
get_indicators |
Retrieve technical indicators for a given ticker symbol. |
get_indicators
get_indicators(
symbol: str, indicator: str | list[str], curr_date: str, look_back_days: int = 30
) -> str
Retrieve technical indicators for a given ticker symbol.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Stock ticker, company symbol, or Taiwan stock code. Examples: AAPL, TSM, 2330.TW, 2330, 8069. |
required |
|
str | list[str]
|
One or more technical indicators. May be a single indicator name, a Python list of names, or a comma-separated string like "macd,rsi,close_50_sma". |
required |
|
str
|
The current trading date in YYYY-MM-DD format. |
required |
|
int
|
Number of days to look back. Defaults to 30. |
30
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
A formatted report for one indicator, or multiple sections when several indicators are requested. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no valid indicators are provided, an indicator is unsupported, or no market data is available for the symbol. |