INNER CODE UNIT · Python

lst

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

        def lst(key):
            return "、".join(s.get(key) or []) or "无"
        lines.append(
            f"**组合概况:** {s.get('in_run', 0)}/{s.get('total', 0)} 只在今日评分池,"
            f"平均评分 **{avg_score}**,平均 1 日 {avg_1d};"
            f"站上 200 日线:{lst('above_200')}。\n"
        )
        lines.append(
            f"**今日档位:** 建议买入 {lst('buy_now')} · 分批/小加 {lst('scale_in')} · "
            f"候补 {lst('watch')} · 今日不买 {lst('no_buy')};"
            f"有可写 put 的:{lst('puts')}。\n"
        )

    lines.append("### 行情与评分\n")
    rows = []
    for x in names:
        score = f"{x['score']:.1f}" if x["score"] is not None else "—"
        rec = REC_CN.get(x["recommendation"], x["recommendation"] or "—")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…