INNER CODE UNIT · Python

portfolio_list

renee-jia/trading-bot · ai_portfolio.py:43

def portfolio_list():
    raw = os.environ.get("AI_PORTFOLIO", "").strip()
    names = [x.strip().upper() for x in raw.split(",") if x.strip()] if raw else list(DEFAULT_PORTFOLIO)
    out = []
    for n in names:
        if n not in out:
            out.append(n)
    return out


def watchlist_names(core=None):
    """Second-tier candidates, minus anything already in the core list."""
    raw = os.environ.get("AI_PORTFOLIO_WATCH", "").strip()
    names = [x.strip().upper() for x in raw.split(",") if x.strip()] if raw else list(DEFAULT_WATCHLIST)
    core = set(core if core is not None else portfolio_list())
    out = []
    for n in names:
        if n not in out and n not in core:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…