Skip to Content
Core WorkflowsExecution & Backtesting

Execution and backtesting

Backtesting runs a saved strategy against historical market data for a selected period. It helps you study how the rules behaved in the past; it does not predict future returns.

Start a backtest

After strategy code is available, select Run Backtest below the assistant message or New Backtest in the Backtest Panel. The Configure Backtest dialog has four steps.

1. Name

  • Strategy name is required.
  • Run name is optional and helps identify a particular backtest.

Lona saves the strategy before starting the run. If you changed its name or code, the change creates a new strategy version, while previous versions remain available.

2. Select data

Choose one of the data tabs:

  • LONA™ Data — platform market data sourced through Tiingo.
  • Custom Data — data you upload, using the supported OHLCV format and mapping.

Select one or more symbols. The current selector allows up to five symbols in one run. All selected symbols must support a common bar frequency and overlapping coverage.

Supported frequencies are EOD (1d), 5 minutes (5m), 15 minutes (15m), 1 hour (1h), and 4 hours (4h). Availability depends on the data set; stocks and ETFs currently provide global EOD data, while intraday coverage is available for supported forex and crypto data. The Free plan supports EOD global data only.

3. Strategy parameters, frequency, and period

The dialog shows the numeric and boolean parameters exposed by the generated strategy. Edit values directly in the fields, then keep the values you want to test.

Parameters can include indicator periods, thresholds, and position sizing such as order_size_pct. Initial cash, commission, leverage, and order timing are configured separately in Simulation.

Choose a Bar frequency, then choose From and To dates. Both frequency and date range are required.

The available period is the intersection of the selected symbols’ coverage at the selected frequency. The requested range must stay inside that overlap; Lona does not automatically invent a complete history when coverage is missing. If there is no common frequency or overlap, change the symbols, frequency, or dates.

4. Simulation

Configure the conditions used by the broker simulation:

  • Initial Cash — starting portfolio value; the default is 100,000.
  • Commission — trading cost applied by the simulation; the default is 0.
  • Leverage — available leverage; the default is 1.
  • Buy On Close — whether buy orders execute on the closing price.

Select Run Strategy to submit the backtest. The run is queued and appears in the Backtest Panel and Reports area.

Run status

The report uses these statuses:

  • PENDING — waiting in the execution queue.
  • EXECUTING — the backtest worker is running.
  • COMPLETED — results are available.
  • FAILED — execution stopped with an error; inspect the report message.

Large data ranges and higher-frequency data can take longer. Keep the panel open to follow the status, or return to it from Reports.

See Results & Analysis for the completed report.

Re-run a strategy

Open the strategy’s backtest configuration again, select the data, frequency, period, parameters, and simulation settings, then select Run Strategy. Each submission creates a separate report, so you can compare runs with different inputs.

For a meaningful comparison, keep the symbols, frequency, period, simulation settings, and strategy version consistent unless you are intentionally testing one change.

Multiple symbols

When several symbols are selected, the strategy receives each compatible data feed. The report can show symbol-specific charts and trade activity. A run still requires one frequency and one date range shared by every selected symbol.

Troubleshooting

No data can be selected. Check that the data set contains a supported frequency and coverage period.

The run cannot start. Confirm that a strategy, at least one data source, a frequency, and a date range are selected.

The date range is unavailable. Select dates inside the overlap shown for all selected symbols, or reduce the symbol set.

The run fails. Read the report error. Common causes include invalid edited code, unsupported data, or an execution configuration that the strategy cannot use.

The run is not available. Some execution or optimization actions can require credits or an available entitlement. Check the account limits shown by the platform.

Backtest checklist

Before selecting Run Strategy, confirm:

  • Strategy name and optional run name
  • Data tab and symbols
  • Common bar frequency
  • Date range inside the coverage overlap
  • Strategy parameter values
  • Initial cash, commission, leverage, and Buy On Close
  • Any displayed usage or credit requirement

Optimize instead of repeating runs

If you want to test combinations of numeric strategy parameters, select Optimize in the Backtest Panel. Optimization can sweep one or two parameters over a grid, evaluate selected metrics, and queue the work in the background. It may require approval, a free optimization entitlement, or credits depending on the account.

Read Optimization best practices before launching a sweep.

Next steps

Continue to Results & Analysis to read metrics, charts, and trade activity.

Last updated on