Backtesting & Paper Trading

Backtesting

HTS has a very powerful backtesting tool that allows our users to test Indicators, Insurances, and Safeties against historical data. The historical data can be anywhere from 6 hours to 32 weeks. This is useful to determine whether or not a specific trading strategy would have been profitable in the past.

Backtest Method

The software support 2 backtest methods. Close price based and order book (bid/ask) price based. This setting controls the price on which the orders are registered in a backtest. Orderbook based is a more realistic method because it will include the spread in the profit calculations.

Both settings are available in the Settings page under the Generals tab.

This feature assumes that:

  • Your order is always filled

  • Your order is always the first order in the orderbook

Outdated video but the principle remains the same

Usage

For trade bots, simply select the bot you wish to backtest and click the backtest button. To backtest our custom bots select the bot you wish to backtest and click on the "Options" button, then select backtest. Alternatively, the Bot Performance Analyzer can be utilized from the left panel menu.

Be sure to select the starting Position that you will be simulating for more accuracy.

Custom Bot Backtest Example

Trade Bot Backtest Example

If you get different results when backtesting, you need to make sure that your Position has not changed and clear the statistics after each backtest. This is a common question with HTS and it's a good practice to always clear statistics and make sure the Position is set up correctly.

Paper Trading / Simulated Accounts

Simulation Type

The simulation type influences the way the simulation engine considers an open order filled. There are 2 options

  • Price reached. When this type is selected an open buy order on $100 is filled when the price is $100 or higher.

  • Price breached. With this type, an open buy order on $100 is filled when the price is higher $100.

Why is this important?

In our simulation engine, the bots are trading in an "empty" order book. Which means you are always the only order on a price point. This is not always the case on the exchange, depending on the order book liquidity. The settings price reached might enable the bot to trade a lot more than in reality would happen. Visa vera, price breached might disable the bot from trading where, in reality, the bot would have traded.

This feature does NOT work with:

  • BitFinex Margin

Steps

  • Login to HTS

  • Click on Price Drivers & Accounts on the left hand pan

  • Click on 'Add New Account'

  • Type in Account Name (e.g. SIM_BINANCE - even if you don’t type it as such, the name will still come up with SIMULATED_)

  • Choose an Account Type (e.g. Spot Trading - Note that not all exchanges have Margin or Leverage Trading)

  • Choose the Platform (e.g. Binance - the selection will change based on what you choose in b)

  • Tick ‘Simulated Account’

  • Click ‘Save’

Adding Funds to a Simulated Account

  • Click on the Dollar Bill sign for the Simulated Account that you want to add funds toelect the 'Coin' that you want to add

  • Type in the Amount

  • Click 'Update'

  • Click 'Save

Removing Funds from a Simulated Account

  • Click on the Dollar Bill sign for the Simulated Account that you want to add funds to

  • Select the ‘Coin’ that you want to remove

  • Type in the Amount as 0

  • Click ‘Update’

  • Click ‘Save