Plugin-Based Local AI Assistant for Stock Value Analysis

    A local AI assistant with a plugin Skill can turn value investing into a repeatable checklist: fetch data, cross-check sources, score industry, company, and price, then produce a structured report while leaving the buy-or-sell call to the human.

    1. The problem: individual research lacks a checklist, not data

    For individual investors, the real gap is not missing information but a stable checklist. When reading financials, it is easy to fixate on revenue growth and miss cash-flow quality. When headlines hit, short-term sentiment is often mistaken for a long-term thesis. Each analysis then starts from scratch, conclusions are hard to reproduce, and names cannot be compared side by side.

    An engineering approach is to freeze the method as an executable workflow: a locally running AI assistant loads a plugin analysis Skill, then follows fixed steps to fetch data, validate it, score it, and write it up. The model does retrieval and synthesis; the person keeps the final decision.

    2. Architecture: local assistant plus plugin Skill

    A local AI assistant with plugins is essentially model inference plus tool calls plus a local filesystem. A Skill is a declarative config: triggers, steps, allowed tools, and output format. At runtime the assistant parses the checklist, loads what it needs, and executes step by step.

    1. {
    2. "name": "value_investing_review",
    3. "trigger": ["analyze whether a stock is worth investing in", "three-good-principles review"],
    4. "inputs": ["stock_code", "market"],
    5. "tools": ["web_search", "news_fetch", "file_read", "report_write"],
    6. "constraints": {
    7. "min_independent_sources": 3,
    8. "news_window_days": 30,
    9. "output_scale": 100
    10. },
    11. "disclaimer": "This report is for information compilation only and does not constitute investment advice"
    12. }

    A checklist makes the process auditable, permissions tight, and outputs comparable. A tool whitelist keeps the model from touching sensitive local directories. Intermediate artifacts are written to disk so you can trace them later.

    3. Turning the “three goods” into scores

    To ship the method, qualitative judgment has to become measurable fields.

    • Good industry (~30%): growth, concentration, cyclicality, policy and regulatory sensitivity, bargaining power. Higher scores go to industries with durable demand expansion and a stable structure.
    • Good company (~40%): ROE and its consistency, gross-margin stability, operating cash flow vs. net income, leverage, receivables turnover, management and governance record.
    • Good price (~30%): PE/PB historical percentiles, discount vs. peers, dividend yield, free-cash-flow yield, and how valuation lines up with growth.
    1. def score(metrics, weights):
    2. total = 0
    3. for dim, w in weights.items():
    4. sub = metrics[dim] # each dimension already normalized to 0-100
    5. total += sub * w
    6. return round(total, 1)

    Normalization and percentiles matter more than raw levels. The same metric differs widely across industries; historical and peer percentiles reduce the bias of hard cross-industry comparisons.

    4. Multi-source checks: a single source is a defect

    The Skill requires every key field from at least three independent sources—for example periodic company reports, exchange disclosures, and independent financial data sites. Validation has three layers:

    1. Consistency: mark a conflict if values diverge beyond a threshold (e.g. revenue difference > 1%).
    2. Definition: same reporting period, currency, and consolidated vs. parent scope.
    3. Freshness: prefer the latest disclosure; older figures are trend context only.

    Conflicting fields are not averaged. The report lists them side by side and labels “data disagreement,” passing uncertainty to the reader instead of inventing a precise number.

    5. 30-day event scan and noise filter

    Valuation can move on events, so the flow searches the last 30 days of filings, litigation, regulatory actions, ownership changes, and industry policy. Filters drop unsourced rumor, merge duplicate reprints, and grade impact (company / industry / macro). Only company- and industry-level events enter score adjustments; macro noise stays background.

    6. Report shape and engineering extras

    The output is a 100-point structured report: total score, three-dimension radar, key-metric table, source list, event timeline, main risks, a conclusion band (clearly undervalued / fair / clearly overvalued), and a fixed disclaimer at the end.

    Engineering add-ons include same-day result cache per ticker to cut retrieval cost; fallback to an alternate source with a report note when one feed is down; structured logs and alerts (latency, failure rate, source hit rate); and periodic backtests of scores vs. later outcomes to recalibrate weights.

    7. Capability limits and compliance

    The workflow produces information synthesis and a scoring reference, not trade orders. The Skill does not connect to any trading API, does not forecast short-term prices, and does not promise returns. If cloud services are used, stick to generic categories (object storage for archived reports, logging for call traces, monitoring for job health) so the design stays portable.

    8. Takeaway

    A plugin Skill moves value investing from gut feel to a reproducible process: the checklist constrains attention, multi-source checks constrain hallucination, and percentiles plus a 100-point scale constrain arbitrary judgment. The real payoff is efficiency and discipline—less time hunting filings and news, evidence on one table. Buy or not is still a human call.