First simulation in the app
The shortest path from a fresh install to the result of a first backtest.
In this tutorial you run your first backtest: a moving-average strategy on Bitcoin, over the last six months, with 10,000 USDT of simulated money. It takes about ten minutes, most of it reading. No real money is involved at any point.
You will:
- Open the app and get past the first-start screens.
- Create a simulation in five short steps.
- Run it.
- Read the result.
The example fits the Evaluation plan that every new account starts on. That plan reaches back 12 months, which is why the example uses recent data.
Prerequisites
- Install Neurotrader. See Installation.
- Have a Neurotrader account, or create one when the app asks. See Sign-in and plans.
- Be online. The first run downloads the market data it needs.
Step 1: First start
Open Neurotrader. On a first start, the app asks for three things, once:
- Sign in. Use Continue with Google, or your email and password.
- Accept the terms. If the screen Before you continue appears, tick the box and select Accept and continue.
- Register this computer. If the page says This machine is not registered, select Register this device, then Register this device again under This device, then Register.
Each of these is explained in Sign-in and plans.
You are now on the Simulations page. It is empty, and the sidebar on the left lists the places you work: Simulations, Live Mode, Real Mode, Algorithms, Assistant and Repository.
Step 2: A new simulation
Start a new simulation from the toolbar of the Simulations page, or press
Alt+N. A dialog opens with five steps: Details, Balances, Data,
Algorithms and Review. Next moves forward and Back returns.
Details
- In Name, type
My first backtest. - For the kind of simulation, keep Single account: one strategy trading one account.
- For the primary quote asset, choose
USDT. This is the currency every result of this simulation is measured in. It cannot be changed later, so that every run of the simulation stays comparable with the others. - Leave the fees and the margin block as they are.
- Select Next.
Balances
Give the simulated account its starting money.
- Under Asset, choose
USDT. - Under Amount, type
10000. - Add the balance, then select Next.
Data
Choose what the strategy trades.
- Add a data source.
- Search for
BTCUSDTand select it. - Choose the interval
1h: one candle per hour. - Set the range to the last six months. The range can end no later than the last day of the previous month, because market data is published one whole month at a time.
- Confirm, then select Next.
Algorithms
Choose the strategy.
- Add an algorithm.
- In the list on the left, select SMA Crossover. Its parameters appear on the right. It buys when a fast moving average of the price rises above a slow one, and sells when it falls below.
- Keep the parameters as they are and confirm.
- Select Next.
Review
The last step lists everything the simulation will be created with.
- Under After creating, choose Open it.
- Create the simulation.
The simulation's own page opens. On the left are its three setup cards: Data, Algorithms and the account. The right side is for its runs, and is still empty.
Step 3: The run
Select Run in the toolbar.
On the first run, Neurotrader downloads the six months of candles. The page tells you what it is doing while it fetches them. The data is kept on your computer, so the next run starts at once.
Then the backtest itself runs. A progress bar shows how far through the six months it has got. With hourly candles it finishes within moments.
While it runs, you can Pause it and Resume it, or Stop it. For this tutorial, let it finish.
Step 4: The result
When the run finishes, it appears on the right and selects itself.
The summary at the top shows the run's key figures and a chart:
- Return: how much the account gained or lost, in percent of the starting 10,000 USDT.
- Maximum drawdown: the largest fall from a peak along the way. A strategy can end with a profit and still have been deep in loss on the way there.
- Orders: how many of the orders the strategy placed were filled.
- The chart: the account's value over the whole six months.
The table below lists every run of this simulation. It has one row now.
Your figures depend on what Bitcoin did in your six months, so they differ from anybody else's. A loss is a perfectly good first result: the point of a backtest is to find out.
Limits of a result
A backtest shows what a set of rules would have done in the past. It does not predict what they will do next, and nothing on this page is financial advice.
Step 5: A second run
A simulation is something you work with: change it, run it again, compare.
- In the Algorithms card, open the configuration of SMA Crossover and change one of its two averages.
- The toolbar now notes that the setup has changed since the latest run. Select Run again.
- When the run finishes, the table has two rows. Select either row to see its summary, and compare the two returns and drawdowns.
To see why a run went the way it did, open the run's own page from its row. It shows the candles with every order marked on them, the account's value over time, and the journal of every order the strategy placed.
Next steps
- A fair yardstick. Compare your strategy with simply buying and holding, in one simulation: Algorithm comparison.
- The same walkthrough in depth. First backtest.
- Every option of the dialog. Simulation creation in the app.
- Reading a run. Run results and Charts.
- Today's market. Run the same strategy on live prices with simulated money: Live simulations.
Related
- Simulations: simulations, runs and the three kinds
- Results: what each figure means
- Run control: run, pause, resume, stop, reset
- Market data downloads
- First simulation with the API: the same steps from your own program