Evaluating LLM Engineering Capability Through a Trade Review System: A Practical Test Case

    Large language models often impress with fluent explanations, but can they deliver verifiable engineering work? This article uses a personal trade review system as a representative test scenario, covering file parsing, market data access, database design, time-series computation, and behavioral analysis. Instead of asking "how capable is the model," it breaks evaluation into four answerable questions and provides a stage-based, acceptance-checkable workflow for judging LLM performance in real engineering tasks.

    1. Evaluate LLMs by Turning Questions into Verifiable Tasks

    When faced with a new large language model, what developers care about most is usually not whether it can produce polished explanations, but whether it can help complete real work: reading files, calling data APIs, writing code, handling exceptions, and ultimately delivering results that can be verified.

    Personal trade review is a representative testing scenario. It simultaneously involves semi-structured files, external data dependencies, database modeling, time-series processing, and statistical analysis. A mistake in any single step can make a final report look plausible while actually being built on incorrect data.

    So rather than vaguely asking “how good is the model,” break the evaluation into four questions:

    • Can it fully understand the input data instead of only reading fragments?
    • Can it implement functionality within given constraints instead of expanding the scope on its own?
    • Can it identify data gaps and business limitations instead of fabricating missing pieces?
    • Can it produce repeatable, traceable, and verifiable results?

    This article designs an LLM-assisted trade review system around these questions. The discussion covers general engineering practices only; it does not target any specific model or tool, and no investment returns are used as proof of model capability.

    2. Clarify the Goal: Trade Review Is Not Strategy Backtesting

    Before development begins, two easily confused concepts must be separated.

    Historical trade review reconstructs trades that actually occurred, based on real execution records, and analyzes returns, costs, position changes, and trading behavior. It answers the question: “What actually happened in the past?”

    Strategy backtesting requires defining explicit buy and sell rules and applying those rules to historical market data. It answers: “If these rules had been followed consistently, what might the results have been?”

    Feeding real brokerage statements into historical market data does not automatically constitute backtesting. It is first and foremost trade reconstruction and behavioral analysis. Only after defining entry conditions, exit conditions, position sizing rules, and fill assumptions can strategy simulation begin.

    A three-layer structure is recommended:

    1. Fact layer: stores raw executions, cash flows, and market data.
    2. Computation layer: rebuilds positions and calculates returns, costs, and risk metrics.
    3. Interpretation layer: summarizes trading behavior and proposes hypotheses for further validation.

    An LLM is suitable for assisting development and interpretation, but it should not replace the fact layer, nor silently alter already-confirmed calculation conventions.

    3. Process Trade Records First, Not Conclusions

    1. Preserve Original Files and Build a Data Provenance Chain

    Spreadsheets exported from trading software may contain multiple worksheets, merged cells, note rows, blank rows, and formatted amounts and dates.

    A robust approach is to keep the original files and record the following for each import:

    • File identifier and content hash;
    • Import time and parser version;
    • Number of raw records;
    • Number of successfully parsed and rejected records;
    • Source row numbers for each normalized record.

    This way, when a report figure looks abnormal, it can be traced back to specific inputs instead of relying on the model’s “memory” of the file.

    2. Text Conversion Aids Understanding but Cannot Replace Structured Parsing

    Converting spreadsheets into lightweight markup text helps the model understand column names, view samples, and recognize business meaning. But conversion can lose data types, formulas, worksheet relationships, and parts of long tables.

    A dual-channel design is therefore recommended:

    • Structured parsing results are used for storage and computation;
    • Text summaries are used for requirement discussions and human review.

    Consistency checks must be run between the two, such as record counts, total transaction amounts, date ranges, and number of securities. Never assume data integrity is guaranteed just because the model says it has “finished reading.”

    3. Establish Unified Fields and Business Classifications

    Trade records should be normalized to at least:

    • Account identifier;
    • Security code and market identifier;
    • Execution date or time;
    • Transaction type;
    • Quantity and execution price;
    • Transaction amount;
    • Fees and charges;
    • Original row number.

    Security names are suitable for display only and should not serve as the sole join key. Names can change, and similar names can appear across markets.

    Transaction types must also be clearly distinguished. Buys, sells, cash deposits, dividends, and security transfers should not all be treated as ordinary trades. Otherwise, the system may mistake a cash deposit for profit, or treat a position change from a security transfer as a zero-cost purchase.

    If trade records only start after the beginning of the year, opening positions, opening cash, and holding cost must be confirmed. Without them, account-level returns may be impossible to reconstruct accurately, and this limitation should be clearly stated in the report.

    4. Split Tasks So the Model Works Within Boundaries

    Asking the model in one shot to “build the system, fetch the data, backtest, and draw conclusions” easily leads to scope creep: the model may pick an inappropriate data granularity, or write the report first and backfill the calculations later.

    A more reliable approach is phase-based delivery, with acceptance criteria set for each step.

    Phase 1: Parse and Confirm the Security List

    Ask the model to only parse trade files and extract a security list, outputting:

    • A list of unique securities;
    • Record counts per security;
    • Date ranges;
    • Unrecognized fields and abnormal rows;
    • Security mappings requiring human confirmation.

    At this stage, do not call market data APIs or infer trading performance.

    Phase 2: Validate the Data API

    Test the API first with a small number of securities and a short date range, confirming authentication, access rights, field semantics, data coverage, and response format, before scaling up to bulk retrieval.

    Phase 3: Implement Storage and Quality Checks

    Deliver the database schema, incremental update logic, exception records, and a data quality report. Only after acceptance should computational features be added.

    Phase 4: Complete Review and Interpretation

    First generate deterministic statistical results, then have the model produce narrative explanations based on those results. Every key claim in the report should be traceable to a specific metric or trade record.

    This stepwise approach not only helps control the development process but also makes it clearer whether a problem stems from model understanding, code implementation, or the external data service.

    5. Market Data: Validate Availability Before Pursuing Coverage

    1. Never Assume All Data Is Accessible

    Historical daily bars, intraday minute bars, and tick-by-tick trades are data of different granularities, with potentially different coverage, access permissions, and rate limits.

    If you only need to analyze holding periods, daily equity, and performance by phase, daily bars are usually a sufficient starting point. If you need to judge intraday movement around executions, minute data is more valuable, but still cannot fully reconstruct order books or the real matching process.

    The system should maintain a checklist of API capabilities:

    Check Item What to Confirm
    Authentication Are credentials valid? Are permissions sufficient?
    Historical range Can it cover the target analysis period?
    Granularity Daily, minute, or other levels supported?
    Field semantics Are prices adjusted? How are timestamps represented?
    Missing data Can empty results be a normal business case?
    Operational limits Are there rate, concurrency, or payload limits?

    API calls generated by the model must be based on actual documentation and test results. When permissions are insufficient or historical data is unavailable, the model should report the limitation, not fabricate substitute data.

    2. Unify Semantics Across Multiple Data Sources, Not Just Column Names

    Using multiple market data sources improves coverage but introduces differences in convention. Common discrepancies include volume units, turnover units, price adjustment methods, security coding, and minute-bar timestamp meanings.

    Each batch of data should retain its source and convention metadata. When prices conflict for the same security at the same moment, record the difference and resolve it by pre-defined rules rather than simply averaging.

    3. Make Fetching a Resumable Batch Process

    Tasks can be partitioned by “security, date range, and granularity,” with states such as pending, running, succeeded, failed, and pending review.

    Progress reporting should include completed task counts, current security, records ingested, failure reasons, and retry status—not just “processing.”

    For long silences, diagnose using request timeouts, task states, and run logs. A single stall could come from the model service, the network, an external API, or a local process; it cannot be directly attributed to insufficient model capability.

    6. Database Design: Traceable, Extensible, and Idempotent

    A minimal database for personal trade review might include the following logical tables:

    Table Purpose
    Raw trades Stores imported records and source metadata
    Normalized trades Stores validated business events
    Securities Stores identifiers, markets, and name changes
    Market data Stores prices and volumes at various granularities
    Task log Stores fetch progress, errors, and retry info
    Analysis results Stores metrics, parameters, and computation versions

    Three issues deserve particular attention.

    First, amounts and fees should use appropriate fixed-point precision to avoid floating-point accumulation errors; display rounding should never affect internal computation.

    Second, repeated runs must not insert duplicate data. Market data can be constrained by a unique index over security, time, granularity, source, and price convention. Trade records should rely on reliable business transaction IDs where available; without them, design import deduplication rules involving source file and row number, so genuine trades with identical price and quantity are not accidentally removed.

    Third, raw data and revised data must be kept separate. When field mappings or cleaning rules change, record the version rather than silently overwriting historical results.

    7. Review Computation: Rebuild the Ledger First, Then Analyze Behavior

    1. Validate Trade Reconstruction with Cash and Position States

    Process business events one by one, updating cash, position quantities, and cost, then compute daily equity using market prices:

    Account equity = cash balance + sum of market values of all holdings

    But changes in equity do not fully equal investment returns. Cash deposits and withdrawals change the size of the account and must be handled separately.

    For closed trades, returns net of fees can be computed. For open positions, unrealized gains and losses should be shown separately. The method of cost allocation must also be stated in the report and applied consistently.

    It is advisable to first build a small test case covering partial sells, multiple buys, fees, dividends, and cash withdrawals, manually compute expected values, and only then run the program. If the basic ledger is wrong, richer downstream statistics are meaningless.

    2. Every Metric Needs a Clear Definition

    Common metrics include cumulative return, maximum drawdown, win rate, average gain, average loss, holding duration, and trading costs.

    Metrics cannot be separated from their statistical unit. For example, “win rate” can be counted per execution record, per complete holding cycle, or per trading day—different definitions can yield entirely different results.

    Maximum drawdown should also specify whether the equity series is adjusted for external cash flows. An unadjusted cash withdrawal can be misread as an investment loss.

    A report should show sample size, statistical period, and calculation conventions together. With few trades, results should not be described as stable patterns.

    3. Use Testable Statements in Behavioral Analysis

    You can examine changes in trading frequency after losses, differences in holding time between winning and losing positions, concentration in a single security, and how fees erode returns.

    But observing a behavioral difference does not prove its cause. For instance, holding losing positions longer may relate to exit rules, or may be influenced by market conditions or sample composition.

    A good report distinguishes between:

    • Confirmed facts;
    • Reasonable interpretations based on facts;
    • Hypotheses awaiting validation;
    • Questions the current data cannot answer.

    The model should not label the user with exaggerated characterizations, let alone conclude from a short trade history that a person is bound to fail.

    8. If Backtesting Follows, Real-World Trading Constraints Must Be Handled

    Moving from review to strategy backtesting requires explicit rules and avoiding lookahead bias. For example, using a signal that can only be confirmed after the daily close while assuming a fill at that same day’s closing price produces unattainable results.

    Depending on the market being simulated, you should also account for the trading calendar, trading halts, daily price limits, minimum order increments, short-sale restrictions, and executable volumes. Specific handling must be confirmed against the security type and applicable rules.

    Adjusted prices suit some return analyses, but realistic execution simulation also requires consistency with actual prices, dividends, and share changes. Commissions and slippage should not be ignored, and unstated fixed assumptions must not be packaged as real trading results.

    Data used to formulate rules should be separated, as much as possible, from data used to validate them. Repeatedly tweaking rules until historical performance improves invites overfitting and proves nothing about the future.

    9. How to Objectively Assess the Model’s Engineering Performance

    Treat model evaluation as an inspectable checklist of deliverables rather than a single subjective score:

    • Understanding quality: Did it distinguish review from backtesting? Did it detect missing inputs?
    • Implementation quality: Does the code run? Are edge cases tested?
    • Data quality: Do counts and amounts reconcile? Is the source traceable?
    • Recovery capability: Can it resume after interruption? Is re-execution idempotent?
    • Interaction quality: Did it stay within the phase scope? Did it proactively clarify ambiguities?
    • Explanation quality: Do conclusions cite metrics? Is uncertainty stated?
    • Security boundaries: Does it avoid leaking credentials and unnecessary account information?

    To compare models, use identical inputs, task descriptions, permissions, and acceptance criteria, and record human intervention volume, failure types, and re-execution results. Evaluate performance on simple and complex tasks separately; a single successful demo should not represent overall capability.

    10. Make Security and Human Confirmation the Default Workflow

    Trade data may contain identity, account, and asset information. Before submitting anything to a model, remove non-essential personal fields and replace sensitive account numbers with internal identifiers.

    Data API credentials should be injected through controlled configuration, never written into prompts, documents, code repositories, or logs. The model’s execution environment should follow the principle of least privilege; operations such as overwriting data, bulk file deletion, or changing calculation conventions should require human confirmation gates.

    Ultimately, the value of a trade review system is not having the model deliver a forceful verdict, but establishing an auditable chain of evidence: how raw records were parsed, how market data was obtained, how metrics were computed, and how conclusions were formed.

    Evaluating LLMs this way shifts the focus from “was the answer impressive” to “was the delivery reliable.” The model assists with implementation and explanation, the program handles deterministic computation, the data provides evidence, and the human confirms goals and boundaries. Only with these four roles clearly separated can a sustainably usable engineering system emerge.