Backtest

This endpoint allows you to get a snapshot of the bot's performance, showcasing its ability to generate profitable positions etc.

Get Backtest Results

GET https://api.aitrade.com/api/get_back_test_data

Query Params

Name
Type
Required
Description

template_id

integer

Unique id of the bot template

initial_fund

float

Fund allocation for the bot

exchange_pair_id

integer

A unique ID to identify the pair. Refer Trading Pairs Api to get the list of pairs available. pair_id of a pair object is passed as exchange_pair_id

frequency

integer

options are, 1,5,15,60,240,1440

strategy

string

Options are Long, Short

base_order_percentage

integer

Percentage of Fund used for the base order

extra_order_percentage

integer

Remaining Fund not used in base order are used to create extra orders. The number indicates percentage used for the next order.

base_order_type

string

Options static, dynamic. Static will always use the same Base Order Limit set, regardless of the bots performance. Dynamic allows the bot to use profits from it’s previous trades for it’s next trade or lowers the base order if it has encountered a loss previously

order_type

string

Options are limit,market . Limit order is normally used to ensure price level especially when your take profit level is small. Market order is typically used when you need to ensure immediate Filled condition

profit

float

Take profit percentage

stop_loss

float

Stop loss percentage

bot_indicators

Object

An object containing the indicators. Please refer to Bot Indicator Parameter Sample in Create/Update Bot From Template

indicator_triggers_entry

integer

Number of entry indicators

indicator_triggers_exit

integer

Number of exit indicators

back_test_start

timestamp

Timestamp of start date

back_test_end

timestamp

Timestamp of end date

Bot's Backtest Summary

The backtest performed returned a success code (200) with the key statistics provided for the performance evaluation of the trading bot over a specified time frame. Below is a brief summary of the key metrics:

  • Total Positions Evaluated: 67

  • Profitable Positions: 40, indicating a win-loss ratio of approximately 59.7%

  • Average Return Value: -2.26

  • Total Performance: -22.62%

  • Average Deal Duration: About 1 day and 23 hours

  • Annual Percentage Yield (APY): 0.02%

  • Average Monthly Deals: 11.23

  • Maximum Drawdown: 6.31%, reflecting the largest drop from peak to trough during the specified backtest period.

Last updated