INNER CODE UNIT · Python

_levels_cell

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

def _levels_cell(x):
    lv = x.get("buy_levels")
    if not lv:
        return "—"
    return f"{_money(lv['l1'])} / {_money(lv['l2'])} / {_money(lv['l3'])}"


def build_section(data):
    names = data.get("names") or []
    s = data.get("summary") or {}
    lines = [
        "## AI Portfolio — 核心 AI 名单\n",
        "固定名单(`AI_PORTFOLIO`)每天单独看:" + "、".join(x["ticker"] for x in names) + "。"
        "这一栏只汇总当天的评分、涨跌结构、买入档位、买点和 sell put 首选;"
        "买点与期权链细节在「AI 标的 Sell Put 方案」,逐股因素在 Detailed Analysis。\n",
    ]
    if names:
        avg_score = f"{s['avg_score']:.0f}" if s.get("avg_score") is not None else "—"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…