How to Evaluate the Coding and Data Analysis Capabilities of New-Generation LLMs

    As new-generation large models keep shipping, the discussion has shifted from "how many parameters" to "can they actually complete complex tasks." This article argues that judging a model by benchmark scores or a few nice-looking code snippets is not enough. Using the example of building a stock data backtesting and analysis system from personal trade history, it lays out a general, reproducible evaluation approach: assess requirement understanding, task decomposition, tool use, engineering quality, data reliability, process observability, and result interpretation. It covers preparing verifiable input data, staged prompting, robust data models, progress feedback, exception handling, distinguishing model stalls from execution blocks, the limits of backtest results, a four-tier evaluation framework, and practical security precautions.

    As new-generation large models arrive one after another, the focus of the conversation has gradually moved away from “how large is the parameter count” toward “can it genuinely complete complex tasks.” For developers, whether a model is worth using cannot be judged by benchmark scores alone, nor by a few good-looking code snippets. It should be placed inside a real workflow to see whether it can understand the business goal, break down the task, call external data, keep executing, and take responsibility for the results.

    Below, using “building a stock data backtesting and analysis system from personal historical trade records” as an example, we discuss how to evaluate the real capabilities of a new model. This does not draw conclusions about any specific product; instead, it offers a general, reproducible evaluation methodology.

    1. First, be clear: you are evaluating task completion, not chat ability

    Many models perform well on simple Q&A, code completion, and copywriting, but a complex project usually involves multiple stages:

    1. Reading a file provided by the user;
    2. Identifying security names or codes from the trade records;
    3. Fetching the corresponding historical market data;
    4. Designing a local data storage structure;
    5. Writing data cleaning and backtesting programs;
    6. Outputting statistical metrics and an analysis report;
    7. Explaining abnormal results.

    This kind of task is not a single-turn Q&A but a small engineering project. A model’s real capability should be assessed across at least the following dimensions:

    • Requirement understanding: Can it identify the goal, constraints, inputs, and outputs?
    • Task decomposition: Can it break a big problem into verifiable small steps?
    • Tool use: Can it correctly call local files, data interfaces, and the program runtime?
    • Engineering implementation: Is the code maintainable, fault-tolerant, and extensible?
    • Data reliability: Does it miss, misread, or confuse fields?
    • Process observability: Can it report progress, errors, and intermediate results during execution?
    • Result interpretation: Can it distinguish facts, inferences, and uncertainties?

    If you only ask the model to write a few dozen lines of sample code, these differences are hard to see. An effective evaluation should stay as close to real work as possible.

    2. Step one: prepare structured and verifiable input data

    Files exported by trading software are usually tabular and may contain fields such as trade time, security code, security name, buy/sell direction, trade price, trade quantity, trade amount, commissions, and other fees.

    Handing the raw table directly to the model and asking it to “analyze everything” carries several risks:

    • The model may only focus on the first few rows;
    • Null values, merged cells, or multi-level headers may cause field misidentification;
    • Date and time formats may be converted incorrectly;
    • Buy and sell records may be confused;
    • Different names or codes for the same security may not be unified;
    • The analysis conclusions the model generates may not cover all the data.

    A safer approach is to standardize the data first. You can convert the table into a clearly structured text format, or have a program read it first and output a data dictionary, the total record count, the field list, and a few samples before handing it to the model.

    Before entering the analysis stage, it is recommended to first ask the model to complete the following checks:

    1. Please do not perform investment analysis yet. Just complete a data audit:
    2. 1. List all fields in the file;
    3. 2. Count the total number of records;
    4. 3. Identify the date range;
    5. 4. Count the unique values of security codes and security names;
    6. 5. Check for missing values, duplicate records, and abnormal values;
    7. 6. Output your understanding of the meaning of each field;
    8. 7. Wait for confirmation before proceeding to the next step.

    This step is very important. It separates “whether the model correctly understands the data” from “whether the model can complete the analysis,” making it easier to locate problems.

    3. Step two: use staged prompting to avoid generating the whole system at once

    The most common problem with complex tasks is that the user describes all requirements at once and the model then generates a large amount of code. On the surface this is efficient, but in practice it often leads to:

    • Overly complex code structure;
    • Unreliable data interface calls;
    • Poorly designed database fields;
    • Missing exception handling;
    • The model changing the original requirements on its own;
    • Difficulty in pinpointing which step went wrong after a failure.

    A better approach is “staged development”:

    Stage 1: Extract the list of instruments

    Have the model extract only the security codes, security names, and occurrence counts from the trade records, and output a list to be confirmed. At this point, do not let it fetch market data or start generating backtest logic.

    Stage 2: Design the data model

    After confirming the instrument list, have the model design the database. A basic data structure could include:

    • security: basic security information;
    • daily_quote: daily market data;
    • intraday_quote: intraday market data;
    • trade_record: raw trade records;
    • backtest_result: backtest results;
    • task_log: task execution logs.

    Table design needs to consider unique constraints, indexes, data sources, update times, and composite primary keys. For example, daily market data should typically use “security code + trade date” as the unique identifier to avoid duplicate writes.

    Stage 3: Implement data fetching

    First implement fetching for a single security over a single time range, and verify field mapping, date formats, and the database write results. Once confirmed correct, extend to multiple securities.

    Stage 4: Add resume-from-breakpoint and retry

    Data fetching is usually not completed in one pass; it may encounter network errors, interface rate limiting, empty responses, or partially missing fields. So the program should have:

    • Recognition of completed tasks;
    • Recording of failed tasks;
    • Retry by time range;
    • A single security’s failure not affecting other securities;
    • A summary report at the end of the task.

    Stage 5: Implement the backtest logic

    Only after the market data and trade records have been verified should you enter the backtest stage. Otherwise, even if the backtest results look reasonable, they may be built on incorrect data.

    4. How to evaluate a model’s performance during coding

    In real use, whether a model is “smart” is reflected not only in whether it can generate code, but also in whether it can proactively spot engineering problems.

    1. Can it correctly handle external interfaces

    The model should first read the interface documentation and confirm:

    • Required and optional parameters;
    • Date formats;
    • The meaning of returned fields;
    • Per-request limits;
    • Permission scope;
    • Error codes and the meaning of empty results.

    It must not fabricate interface names, field names, or parameters based on assumption. For financial data, field semantics are especially important. For example, “closing price,” “adjusted closing price,” “trade amount,” and “trade volume” are not concepts that can be swapped freely.

    2. Can it design an extensible database

    Temporarily writing all results into one big table may run in the short term, but it becomes hard to later add intraday data, adjustment methods, or multiple data sources. A better implementation should:

    • Separate raw data from processed data;
    • Make data sources and collection times traceable;
    • Build indexes on key fields;
    • Write duplicate data idempotently;
    • Support adding new metrics later.

    3. Can it provide progress feedback

    When a task involves dozens of securities and a long historical range, the user must know where the program has gotten to. It is recommended to output:

    1. Total tasks: 120
    2. Completed: 37
    3. In progress: Security A, date range...
    4. Succeeded: 35
    5. Failed: 2
    6. Estimated remaining: ...

    If the model only generates a program that runs for a long time with no output, the user experience is poor even if it eventually runs. More seriously, once the program hangs, the user cannot tell whether it is a network issue, an interface limit, or an infinite loop in the code.

    4. Can it handle exceptions rather than hide them

    A mature program should not simply “catch the exception and continue.” It should record the error context, including the security code, requested range, error type, and retry count.

    For example:

    1. try:
    2. data = fetch_quote(symbol, start_date, end_date)
    3. save_to_database(data)
    4. except TimeoutError as exc:
    5. record_failure(symbol, start_date, end_date, "timeout", str(exc))
    6. schedule_retry(symbol, start_date, end_date)

    If the model only provides a “skip on failure” approach, you may end up with a database missing a large amount of data while the user mistakenly believes the task is complete.

    5. How to judge when a model appears to “freeze”

    In a real development environment, a model may produce no output for a long time. This does not necessarily mean the model lacks capability; the causes may include:

    • The current task takes a long time to generate or execute;
    • A tool call does not return in time;
    • A local process is waiting for input;
    • A network request is blocked;
    • The runtime lacks resources;
    • An overly long context slows down processing;
    • A step in the call chain has no timeout set.

    So during evaluation, you should distinguish “the model’s reasoning has stalled” from “the program’s execution is blocked.”

    The following measures are recommended:

    1. Set a timeout for every external request;
    2. Break large tasks into multiple smaller ones;
    3. Add logs for each stage;
    4. Save intermediate artifacts;
    5. Allow tasks to pause and resume;
    6. Record model output and program output separately;
    7. Set manual intervention points for prolonged non-response.

    If it recovers after pausing and re-running, the system may have context, tool-call, or environment-stability issues, and the problem cannot simply be attributed to the model itself.

    6. Backtest results do not directly equal investment conclusions

    A model can help organize trade records, calculate returns, tally win rates, and analyze trading behavior, but it should not be treated as a tool that automatically produces reliable investment advice.

    A complete backtest system should at least pay attention to:

    • Whether there is future data leakage;
    • Whether the buy and sell time points are genuinely achievable;
    • Whether commissions, slippage, and price-limit constraints are included;
    • Whether dividends, splits, and adjustments are handled consistently;
    • How suspended trading, missing quotes, and abnormal prices are handled;
    • Whether the sample size is sufficient;
    • Whether the strategy is only effective in a specific market phase;
    • Whether the training range and validation range are separated.

    For example, if data only available after the close is used to simulate a trade executed at that day’s close, time travel can occur. If the model does not proactively flag these issues, then even if the calculations are accurate, it does not mean the backtest is trustworthy.

    7. A more reasonable comprehensive evaluation framework

    Model evaluation can be divided into four tiers:

    Basic tier: Can it read the data

    The model must accurately identify fields, record counts, date ranges, and the instrument list.

    Practical tier: Can it complete a local function

    The model must implement one part—data fetching, cleaning, database writing, or statistical analysis—and pass manual verification.

    Engineering tier: Can it build a stable pipeline

    It must have a modular structure, logging, retries, resume-from-breakpoint, configuration management, and test cases.

    Reliable tier: Can it explain the boundaries of results

    The model must not only give results but also state the data sources, assumptions, potential errors, and scenarios where it does not apply.

    From this perspective, even if a model generates code very fast, it is not suited to directly take on complex projects if it often misses data, assumes interfaces on its own, or lacks exception handling. Conversely, a model that proactively confirms requirements, verifies step by step, preserves intermediate results, and clearly expresses uncertainty is often better suited to real development.

    8. Security precautions in practice

    When using a model to process local trade data, also pay attention to the following:

    • Do not write access credentials directly into prompts or source code;
    • Use environment variables or a separate configuration file to store sensitive information;
    • Manually confirm file-operation commands generated by the model;
    • Restrict the model’s access to unnecessary directories;
    • Add backup and rollback mechanisms for database writes;
    • Do not use unverified backtest results directly for real trading;
    • Retain data versions and code versions for output reports.

    Conclusion

    To evaluate new-generation large models, you should not only ask “can it write code,” but observe whether it can reliably complete the full chain from requirement understanding to result delivery in a real task.

    Taking trade-data backtesting as an example, the most valuable capability is not generating a huge program in one shot, but being able to break a complex goal into verifiable steps, correctly understand the data, cautiously call external resources, design a reasonable data structure, provide clear execution progress, and stay honest about the reliability boundaries of the results.

    If you treat the model as a technical assistant that needs collaboration, rather than a magic tool that “delivers an entire system from a single sentence,” and adopt an approach of small steps, manual confirmation, log tracing, and result review, you can truly realize its value.