What are the Veles backtests? – Veles Help Center

What are the Veles backtests?

Veles backtests are designed to create and test your own trading strategies. We run the test on historical data on the price of the coin saved from different exchanges, specifically 1-minute candles. That is, you create a bot configuration, and then run a simulation of its trading – and you can see how a bot with such settings would have traded on the selected exchange in the past.

10 free backtests are available to each user every 24 hours. The counter starts when the first backtest is created and resets after 24 hours (not at midnight).

In order to balance the load on the servers, restrictions are implemented – the minimum interval between repeated backtests is 1 minute, and the size of the queue for backtests is limited. If there are already 5 backtests in the queue with the status “In progress” or “Pending”, then you will not be able to start a new analysis.

All the results (tests you have performed) and counters are available on the page:
http://veles.finance/cabinet/backtests
On this page you can also purchase a subscription “Backtests PRO”, which is valid for 30 days from the date of purchase, giving you unlimited number of tests per day.
Subscribers will also have access to a selection of backtests (taken from the public database), which is updated once a week, on Wednesdays. Each release may include tests from last week, if their settings have performed well over the past month.

.

So, first you need a bot. Help on the bot settings is available here:
https://help.veles.finance/en/how-to-create-and-edit-a-bot-full-list-of-bot-settings/

The backtest can run only for a bot that has filters at the start, and they all use the method “Bar close” (“Once per minute” does not allow the Analysis to run). To perform an approximate test of the bot without filters, you can put the indicator “Price is greater than 0” or “RSI 1 min is greater than 0” as a start filter in the bot – so by entry points such a bot will be close to the bot with your “no filters” strategy.

It is also impossible to backtest a bot that works on signals/strategies from TradingView.

.

Every mathematical model has its limitations, and Veles backtests have them too.

Please keep in mind that deals in backtest are always opened at candle opening prices, and closed at candle closing prices. But in reality, bots enter (and exit) the deals somewhere between the opening and closing price of a candle, so the prices of real trading and prices in the test are inevitably different.

The backtest does not take into account the shadows of 1-minute candles. And in real life, trading on shadow happens – a deal may be opened by the order placed with indent, a stop loss or a take profit will be executed, or liquidation will occur. Therefore, where in reality the bot will close the deal on the shadow of the candle and open the next deal a little later, one deal, the first one, will still go on in the backtest all this time.

When studying the output of a backtest (and this is an impressive amount of data), we recommend to look not only at the numbers, but also at the processing of deals on the chart. Thanks to this, you will better understand the mechanics of the bot, which means that you will be able to make better, more effective corrections.

Backtests are a very useful tool, already almost indispensable, which helps you choose the most effective parameters and strategy for the traded asset. But to do this, you need to learn how to use the tool correctly.

.

Recommendations for launching backtests:

  1. Every time check the selected date range (the start and the end of testing), because sometimes the previous selection get lost.
  2. Find out your exchange trading fee and specify it correctly in the test. Sometimes it significantly affects the result.
  3. View the shadows information on the backtest start dialog box (p0.99 for shadows up or down) to set the stop loss (if there is one) in the bot correctly.
    Recommended Stop loss size = 2 * corresponding shadow %.
  4. Do not forget to give the test an informative name. Otherwise, it is difficult to distinguish the tests in the list of all the results.
    For example, “BTC 1 ord SL_5% BB_60 BB_15”, “BTC 1 ord SL_6% BB_30 BB_15”, etc.

You can start the backtest from the bot editor (the “Analysis” button at the bottom of the page) or by clicking on the bots card from the main page.
In the dialog window you need to set the test parameters:

Here we immediately see the parameters of candlesticks for a given coin: their number in the database, their number in the backtest, the length of the shadows (if there is a stop loss in the bot, then for the Long bot it must be at least 2 x shadow down). And even better, if the Stop loss is set larger than the longest known shadow (information about its size will be in the test results). Why is this important? The fact is that if your bot’s Stop Loss is within the shadow of a minute candle, then in reality such a Stop Loss will be triggered in 99 cases out of 100, but the simulation will not show this – since shadows do not count.

Select the testing period. In the free version, you can test for up to 3 months, and with a subscription to Backtests Pro – up to 1 year.

Attention! On those coins that have been listed on the exchange only recently, you will receive deals, of course, only for the time when the coin was traded, even if you chose 1 year. There may also be a “shortened” result if the exchange selected for testing has only recently appeared on the platform and there is no required volume of stored candles (the exchanges themselves do not store minute candles for long, only a few weeks).

Find out and correctly specify the trading fee for your exchange.

A “Public test” means that the results (and therefore the strategy settings) will be recorded in a public database and can be used in our newsletter or published on the showcase. Subscribers of the Backtests Pro tariff can disable this check mark and thus not share their strategies.

On the second screen, you check if all the settings are correct before starting the test.

.

After the test is completed, you will receive a screen with the results.

Let’s analyze it in detail.

There is a “Share” button at the top – you will receive a link to this test, which we recommend attaching to all questions.
You can this test here: https://veles.finance/share/VTCCv
The Gross profit is also indicated here, which is an intermediate result of your trading.

Let’s note the main points:

Gross (coin or USDT) – the result of the test in coin or USDT, excluding funding and exchange trading fee. Gross is calculated as the sum of the results of all trades, both profitable and unprofitable (closed by stop loss).

Net (coin or USDT) is the result of the test without taking into account funding, but taking into account the exchange trading fee. We are looking closely at this figure, it is the main one.

Commission (Trading fee) is the amount of exchange fees for all the deals in this test.

MFE (Maximum Favorable Excursion) is the largest possible percent of profit in the context of a single deal. It is calculated at the close price of the candle, from the average price of the position.

MAE (Maximum Adverse Excursion) is the percent of drawdown from the average position price and its amount in USDT, taken at the close of the candle. At the same time, please remember that the shadows of candles are not taken into account in the backtest, and according to the chart you can see that the drawdown of the position on the shadow of the candle will be noticeably deeper than the MAE shows.

If there is a Stop Loss in the bot, and it will work somewhere in the backtest, then MAE is the closing price of that candle where the Stop Loss was triggered. The Long-bot will have a high MAE if it got into a “dump” when there was a particularly sharp drop in the price of the coin. You just need to take into account that this can happen – and plan the settings of the bot / its margin taking into account this data. Therefore, it is even recommended to include periods when there were squeeses in the market during the selected testing period.

Each deal has its own MAE, and for the entire test, the maximum of all deals is shown (not the total of them). This parameter allows you to evaluate how the bot is going through the drawdowns. To say it short, on an Isolated margin, liquidation will occur when the MAE is greater than or equal to the bot’s Deposit (in fact, earlier, about 75% of the drawdown), and on the Cross margin, liquidation will occur when the MAE is greater than or equal to the entire amount of funds in the account (Balance).

If we consider it more precisely (which we welcome), then you need to add up the percent of MAE with the maximum shadow for this test and multiply this amount by the volume of the position, taking into account the leverage. You will get the amount of funds that you need to keep in a supporting margin for this bot so that it does not liquidate.

It will not be written “Liquidation has occurred” anywhere in the results of the backtest. You should judge the probability of it yourself, using the method described above.

.

The “Deals” section shows the calculation of all the deals and results – the number of Take Pofits, Stop Losses, Pull-ups (these are canceled deals). It often happens that the “Total” of deals is one less than the sum of closed deals with different results. This is because the last deals in the period is not completed, its Take Profit or Stop Loss has not yet been executed.
The backtest ignores the bot’s “Stop after stop loss execution” settings, a limit on the number of deals, or deep drawdowns (which in reality would lead to liquidation). In the test, it is assumed that the bot has enough margin in support and is limited only by the start and end dates of the test.

In the “Time” section you should pay attention to long-lasting deals. Moreover, there may be several of them, so it is recommended to go to the “Deals” tab and sort the deals by duration.

The “Charts” tab allows you to view the statistics of order execution in the bot, its win rate and the cumulative profit chart.

The “Deals” tab is the place where you sort out each simulated deal. The table is wide, you need to scroll to the right to see all the columns. Set the number of deals on one screen page using the drop-down list in the right corner (maximum number of deals per page = 100).

Important! Be sure to sort the list of deals by date (fresh ones at the top), and look at the top deal, whether it has been completed or has been hanging in the invest for several months (you need to look at the dates of execution of orders, scroll the list to the right to see that).

Before analyzing the deals, we recommend switching the chart to the minimum timeframe that was used in the bot (it is 5 minutes in this test).

The top deal in the list still has no results, while it is not finished to the end date of the backtest/
You have to open its list of orders (the “+” button) or go to the deal on the chart (the chart button) to see what happened there. For example, in this test we will see the following:

The green “arrows” on the chart represent triggered grid orders.
The green dotted line is the average price of the position. In order for the deal to close, the price must rise above this average price. So this deals is now in the invest state, which is not a good sign.

You can also display all deals from the screen page (that is, a maximum of 100) on the chart by clicking “Show all” in the top menu bar.

It will be more convenient to view the chart with all deals in full-screen mode (the button with “corners” or the hot key combination Shift+F)

Scroll the chart to the left to view the deals that took place earlier.

And the last tab is “Settings”, where you can view the parameters of the tested bot.

Not only the strategy parameters are important here, but also the start and end dates of the test.

The “Create Bot” button transfers these settings to the bot editor, where you can either continue changes and tests, or save the bot. After saving, the bot will appear in the list on the main page of the site, and it can be launched on the exchange.

.

Let’s look at some questions that arise when analyzing the results of the backtest.

1. Why does the bot enter the deal not according to the established indicators?
Check how the “First Order Indent” and “Pull up” are configured in your bot. If they are not optimal, then a situation is possible when the bot enters a trade using its indicators (places orders), and the execution of the first order occurs much later. Expand the list of orders in the deal, look at the exact time of placing orders and the value of the indicators at that moment.
Please also remember that the bot enters a deal on the candles next after the indicator is triggered, and not on the one where the indicator had the desired value.

2. Why is the MAE not equal to the percent of drawdown of the bot’s deposit amount?
When you allocate a deposit to a bot, it does not mean that your position will strictly use all of it. This means that no more than the amount given to the bot will be involved.
A mathematically calculated grid of orders usually cannot be sent to the exchange exactly as it is. The exchange’s requirements (on the minimum order volume, on the price step and so on), must be respected, and as a result, the bot must make a number of rounds to make trading possible.

For example, the test of a bot with a deposit of 100 USDT with 10 leverage shows an MAE of 11%, but at the same time its amount is 77.88 USDT (not 110).
If you look at the grid orders in this deal, you can see that the bot placed orders for a total amount of 0.012 BTC, the average position price turned out to be 59,000 USDT, and the volume of this position is 708 USDT. And not 1000 (=100×10), as one might assume.
Therefore, the drawdown of 11% from 708 USDT is 77.88 USDT.

By the way, please keep in mind that the backtest does not take into account candle shadows – and according to the graph you can see that the real drawdown on candle shadows was, for example, more than 13%.

3. Why is the percent of MAE not equal to the amount in USDT taken from the deal volume?
Why is the MAE in a deal where only a part of the orders were executed is bigger than in a deal where the bot executed the entire grid?

MAE is a value floating from order to order, it reflects the distance between the average price of the position (taking into account averages) and the current price.
And the absolute value (the amount in USDT) also depends on the number of executed orders (deal volume). Therefore, such calculations are obtained, and they are correct.
Now we show the maximum percent of MAEs obtained subsequently after every order, and next to it is the maximum of the absolute values among all the orders.

4. Why are there deals with the result “Profit” in the list of deals, but they have only dashes in the results?
Expand the list of orders and look in the “Status” column. If all orders in the deal are canceled, it means that the close was triggered by the indicator signal in the deal. If this happens, checking for the minimum PnL is not involved. Technically, this is a profit, but the trigger mechanism is similar to the “Pull Up” – therefore, it can be avoided if you set the indentation of the first order to “0” or “Market”.
If the orders in the deal were executed, then it may be a matter of rounding. Some coins have a price with a large number of decimal digits, exceeding the exchange’s limit for placing orders. Therefore, the bot tries to round the price to an acceptable one, and it may turn out that the opening and closing prices of the deal are the same. An increase in the percentage of Take Profit will help here.

5. Why are the gaps between deals visible on the chart of the bot with the filter “Price is greater than 0”, when it is supposed to enter the new deal every minute?
The chart shows only the deals that you have on the current page of the full list of deals. Check the sorting of the list – if it is not “By date”, then “By duration”, for example, you can get such a picture.
If the deals are sorted correctly, but there are still empty gaps, then it may be a matter of a Pull ups. Set the Indent of the first order = 0 (Market), or increase the percent of the Pull up. Deals with a Pull up are also displayed in the list of backtest deals history.

Veles cooperates with exchanges!

Register using our links and get maximum bonuses from exchanges.