This skill is designed to automatically fetch the user's multidimensional investment data on Longbridge Securities (Longbridge) and generate Markdown and HTML reports that integrate professional candlestick charts and in-depth quantitative analysis.
Core Process
- Fetch Data:
- Run script
scripts/fetch_weekly_data.py。 - Required Data:
portfolio.json: Holdings and assets.orders.json: This week's transaction records.market_temp.json: Market sentiment.benchmarks/: Fetch QQQ.US and VOO.US candlestick data as benchmarks.kline/: Fetch the past 200 days of daily candlestick data for held tickers, used to calculate moving averages.metrics/: Fetchcalc-index(PE/PB/turnover rate) andcapital --flow(capital flow).
- Run script
-
Quantitative Analysis:
- Technical Aspect: Calculate MA(5, 20, 120, 200) and EMA indicators.
- Performance Aspect: Calculate the portfolio's excess return (Alpha) vs QQQ/VOO.
- Capital Aspect: Summarize this week's large-order/net inflow trends.
- Risk Aspect: Assess individual stocks' deviation from moving averages.
-
Generate Results:
- Generate a structured
weekly_report_<DATE>.md。 - Use
assets/report_template.htmlto render and generate HTML, which must integrate Lightweight Charts to display dynamic candlestick charts and moving averages.
- Generate a structured
Report Structure Requirements
1. Assets and Benchmark Comparison
- Total assets, weekly profit and loss, risk level.
- Portfolio return vs QQQ vs VOO comparison curve or table.
2. Core Holdings Technical Analysis (with charts)
- Each core holding must be equipped with a Lightweight Charts candlestick chart.
- The chart includes: candlesticks, MA(5, 20, 120, 200), and this week's buy/sell point markers.
- Financial indicators: PE, PB, this week's net capital inflow.
3. In-Depth AI Strategy Reflection
- Analysis of excess performance based on benchmark comparison.
- Assessment of support/resistance levels based on technical indicators.
- Next week's operational recommendations and hedging strategies.
Constraints
- Always prioritize using local scripts and maintain JSON data persistence.
- Charts must support interactivity, with a visual pursuit of the ultimate Premium feel.
- Fabricating data is strictly prohibited; if the API is missing, it must be noted.