Run control
Start, pause, resume, stop and reset a simulation in the app, read its progress and status line, and know what each action keeps and what it discards.
You have a simulation set up and you want to run it, watch it, and perhaps interrupt it. The controls are in the header of the simulation's page. This page covers simulations on historical data. A live simulation is started and stopped differently: see Live simulations.
For what a run is and how it ends, see Runs and statuses.
Header controls
Open a simulation from the Simulations page. Its header shows, from left to right: the simulation's name, its status, the favourite button, a note when the setup has changed since the latest run, and four buttons.
| Button | Offered in status | Effect |
|---|---|---|
| Run | Ready | Starts a new run |
| Pause | Running | Freezes the run so it can carry on later |
| Resume | Paused (in the place of Pause) | Carries the paused run on from where it stopped |
| Stop | Running or Paused | Ends the run |
| Reset | Ready, Paused or Error | Returns the simulation to Ready |
A button that does not apply to the current status is greyed out.
Statuses
The status beside the name says what the simulation is doing now.
| Status | Meaning |
|---|---|
| Ready | Nothing is running. You can start a run. |
| Running | A run is in progress. |
| Paused | A run is frozen and waiting to be resumed or stopped. |
| Error | The last attempt went wrong. Select the status to see why, then reset. |
The status belongs to the simulation, not to a run. However a run ends, the simulation goes back to Ready and can be started again.
Run start
- Check that the simulation has at least one data source and one algorithm, and that every algorithm reads the data it should.
- Select Run.
The status changes to Running. If the run needs market data that is not on your computer, Neurotrader downloads it first and the status line reports the download. That counts towards your plan's data quota: see Market data downloads.
If the simulation cannot start, a message says why. Common reasons are a missing data source or algorithm, a quote asset that no data source is priced in, an instrument sweep whose instruments disagree, and a plan limit on how many backtests run at once. See Plan limits.
Progress and the status line
While a run is in flight, a card at the top of the runs column describes it.
- Run in progress, followed by the status line: the engine's latest message about what the run is doing, for example the data it is downloading.
- A progress bar showing how much of the run is done, with the time elapsed since it started.
- On a margin account, a badge if the account has received a margin call or has been liquidated.
Below it, the summary of the selected run and the table of finished runs are dimmed under a "Run in progress" note. They describe finished runs, and the run in flight is not one of them until it ends.
When the run reaches the end of its date range, the status returns to Ready, the new run appears at the top of the Runs table with the outcome Completed, and its summary is shown. You can ask for a desktop notification when a run finishes: see Settings.
Pause and resume
Pause when you want to free the computer for a while, or close the app, without losing a long run.
- Select Pause. The status changes to Paused.
- When you are ready, select Resume. The run carries on from the step it stopped at.
While paused:
- The card reads Run paused and shows the steps done out of the total, for example "61,000 / 100,000". There is no elapsed clock, because nothing is happening.
- The Data, Algorithms and Account cards are locked. The run is frozen against exactly this setup, so the setup cannot change under it.
- Finished runs stay readable. They are what you want to see when deciding whether to resume.
- Run is not offered. A paused run is resumed, not started again.
A paused run survives closing the app and restarting your computer.
No history entry for a paused run
The run history holds finished runs only. A paused run has not finished, so nothing of it is recorded yet. If you stop or reset while paused, everything the run did is lost. Resume and let it finish, or resume and then stop, if you want to keep it.
Stop
What Stop does depends on the status.
While Running, select Stop to end the run early. The run is recorded in the history with the outcome Cancelled and how far it got, for example "at 61%". Its results describe exactly the part that ran, and they are as valid as a completed run's for that part.
While Paused, select Stop and the app asks you to confirm, because the paused run ends where it stands, cannot be resumed and is not recorded.
- Select Stop. The "Stop the paused simulation?" dialog opens.
- Select Stop to discard the run, or Cancel to keep it paused.
To keep a paused run's results, select Resume first and then Stop.
Reset
Reset returns the simulation to Ready. Use it in two cases:
- After an error. The status reads Error and no other button is offered. Select the status to read what went wrong, fix the cause, then select Reset.
- To throw away a paused run. Select Reset, then confirm in the "Reset the paused simulation?" dialog. The paused run is discarded.
Reset does not touch the setup or the finished runs in the history.
Discarded work by action
| Action | The run in flight | Finished runs | The setup |
|---|---|---|---|
| Pause | Kept, frozen | Kept | Kept, locked until the run ends |
| Resume | Carries on | Kept | Kept |
| Stop while Running | Recorded as Cancelled, with the part that ran | Kept | Kept |
| Stop while Paused | Discarded | Kept | Kept |
| Reset while Paused | Discarded | Kept | Kept |
| Reset after an error | Nothing to discard | Kept | Kept |
Nothing here deletes a finished run. To delete one, see Run results.
Setup changes between runs
When the setup differs from what the latest run used, a note appears before the Run button: "Changed since the latest run:" followed by what changed, such as "market data", "algorithms", "starting balance", "fees" or "margin terms". It is a reminder, not a warning. Changing the setup and running again is how you work with a simulation. The note goes away once you run.
Several simulations at once
On the Simulations page you can control several simulations together.
- Select Selection in the toolbar, then select the simulations, or use the select-all button.
- Select Run, Stop or Pause in the toolbar.
Each button acts on the selected simulations it applies to: Run starts the ones that are ready, Stop ends the ones with a run in flight. The pause button reads Resume only when every selected simulation is paused. If the selection includes paused simulations, Stop asks you to confirm, as it does on a simulation's own page.
Related
- Runs and statuses
- Run results: reading what a run produced
- Live simulations
- Plan limits
- Run a simulation with the API
Algorithm setup
Add an algorithm to a simulation, set its label and parameters, add the same algorithm twice, change or remove it, and group algorithms onto one account.
Run results
Open a run, read its summary figures, the comparison table, one algorithm in detail and the journal, label and tag it, restore its setup, or delete it.