Your first AI quant backtest with FiClaw: from an idea to reviewable evidence

Prepare a strategy specification, check data timing and generated Python, and keep a reviewable record of your first FiClaw historical backtest.

FiClaw content team · Published · Updated

阅读中文版

Quick answer

Start a first FiClaw backtest with explicit rules: define the universe, signal, rebalance schedule and trading costs. Confirm the strategy specification before generating Python and running a historical backtest. The first goal is to check that the implementation matches the idea, before searching for better parameters.

For quant researchers trying FiClaw and small teams turning a strategy idea into an experiment they can review.

Example specification prompt, for workflow illustration

Turn this idea into a strategy specification and list missing assumptions before generating code: use a CSI 300 candidate universe, rebalance monthly, rank stocks by their trailing 60-trading-day return, and hold the top 20 at equal weights. Clarify historical universe membership, signal availability, execution timing, suspensions, price limits, fees and slippage. Identify missing data rather than substituting current index members for historical constituents.

Prepare rules that a reviewer can check

State the research question, candidate universe, entry and exit rules, number of holdings, rebalance frequency, date range and benchmark. A goal such as low risk and high return needs measurable constraints before it becomes a strategy specification.

FiClaw connects to A-share history through QuantAPI. Available dates depend on the instrument and data coverage. Check availability before relying on historical index constituents, point-in-time financial disclosures or delisted securities.

Confirm the specification and inspect the code

Treat the spec as the agreement between the idea and its implementation. Ask the AI to list assumptions and unresolved conditions. Check that a signal uses information available at the time and that execution does not precede signal availability.

Keep the prompt, specification and code version. Review universe selection, signal calculation, rebalancing and costs against the spec. If a run fails, distinguish API or data failures from strategy logic errors, then preserve the corrected version.

Review implementation evidence before tuning

Inspect the data range, trades, holdings and costs before reading annualized return, drawdown, Sharpe and turnover. A run with no trades, very few observations or missing costs needs an explanation before it is compared with another run.

FiClaw assists diagnosis and parameter comparison. Change a small number of assumptions at a time, record why, and retain a validation period that was not used for tuning. Historical backtesting supports research; deployment and fund-related actions still require authorized review.

Evidence to keep from the first experiment

Evidence to keep from the first experiment
StageRecordReview question
InputOriginal prompt and strategy specAre the rules complete and assumptions confirmed?
GenerationCode version and configurationDoes the code implement the spec?
BacktestDates, trades, costs and metricsAre timing, execution constraints and costs consistent?
ReviewExceptions, changes and next stepsCan the run be reproduced and independently checked?

Frequently asked questions

Can I start without writing Python?

You can begin with a natural-language strategy description and use FiClaw to assist code generation. The generated implementation still needs review. Ask someone with quant or engineering experience to inspect it if you cannot do so yourself.

How long does the first backtest take?

Runtime depends on the universe, history window, strategy complexity, model latency and service conditions. Aim for a complete, reviewable experiment rather than treating a fixed number of minutes as a guarantee.

Where do I find supported installers?

Use the official FiClaw download page for the current public platform and version list, then follow the quick-start guide for installation and login.

Related resources

Start with a clearly specified research question