Function: get_autolist(root_symbol)
Purpose:
Returns a list of instrument symbols (futures, spreads, options) based on a root symbol using wildcard syntax. Essential for programmatically retrieving contract tenors, calendar spreads, or option chains for use in other functions like get_timeseries().
Function Signature:
get_autolist(root_symbol: str) -> tupleParameters:
| Name | Type | Required | Default | Description |
| root_symbol | str | Yes | — | Wildcard root string defining the instrument type to list. |
Default Behavior & Internals:
- Returns a tuple of symbol strings; results vary based on the wildcard pattern used.
- Output can be reused directly in quote or historical data functions.
Wildcard Prefix Reference:
| Pattern | Description |
| *BRN-ICE | Monthly futures |
| **BRN-ICE | Front-back calendar spreads |
| **BRN:BRN-ICE | All calendar spreads |
| **UHU:BRN-ICE | Intercommodity spreads |
| *+BRN-ICE | Historical tenors |
| ***BRN-ICE | All options for the product |
| ***BRN-ICE Z24 | Options for Z24 expiration |
| ***BRN-ICE M22 ATM:10 | ATM options for M22 |
| ***BRN-ICE Z24 OTM:10 | OTM options for Z24 |
| ***BRN-ICE M22 ITM:10 | ITM options for M22 |
Exchange Suffix Guidelines:
- If the exchange suffix is missing, append ' fut' for futures (e.g., *sb fut) or ' stk' for stocks (e.g., *sb stk).
Notes:
- Wildcard inputs are case-insensitive, but month codes should be uppercase when specified (e.g., Z24).
- Useful for automated workflows: trading strategies, backtesting, or data exploration.