Guavy Logo GUAVY
Trades Get Backtest Summary
GET
·
/api/v1/trades/get-backtest-summary

Get Backtest Summary

This endpoint provides a high-level performance overview of historical backtest trades made by the Guavy simulator for a given instrument and trade strategy.

Attributes

symbol
string
Required
The symbol of the instrument to perform a backtest on.
strategy
string
Required
The risk profile to use for the backtest. Can be 'aggressive' or 'conservative'.
years
integer
Specifies the maximum number of years of historical data to include in the backtest (default is 2).

API Request

Example Request with cURL

curl \
--request GET \
--url     'https://data.guavy.com/api/v1/trades/get-backtest-summary/<symbol>/<strategy>?years=<integer>' \
--header 'Authorization: Bearer YOUR-GUAVY-ACCESS-TOKEN' \
--header 'Content-Type: application/json'

This request format works across all modern HTTP clients, including Python requests, JavaScript fetch, and other programming language libraries.

Example Response for /api/v1/trades/get-backtest-summary/ADA/conservative?years=3

{
  "annualized_return": 76.34747529418902,
  "average_loss": -0.04166862511832097,
  "average_loss_percent": -2.5,
  "average_profit": 0.171470813000714,
  "average_profit_percent": 34.87,
  "average_trade_duration": 7.130434782608695,
  "backtest_duration": 995,
  "buy_and_hold_profit_percent": 16.5,
  "end_date": "2025-12-11",
  "final_value": 3081.2530936361118,
  "initial_investment": 1000,
  "peak_loss": -0.02682384421996198,
  "peak_profit": 0.5428306157842422,
  "profit_percent": 208.13,
  "profitable_trade_percent": 26.09,
  "profitable_trades": 6,
  "start_date": "2023-03-22",
  "total_profit": 2081.2530936361118,
  "total_trades": 23,
  "unprofitable_trades": 17
}

Response Object

annualized_return
float
The expected annualized return based on total profit and backtest duration.
average_loss
float
The average loss per unprofitable trade.
average_loss_percent
float
The average loss per unprofitable trade, as a percentage.
average_profit
float
The average gain per profitable trade.
average_profit_percent
float
The average gain per profitable trade, as a percentage.
average_trade_duration
float
The average length of a trade, in days.
backtest_duration
integer
The length of historical data provided to the backtest, in days.
buy_and_hold_profit_percent
float
Profit gains, as a percentage, if the Guavy simulator had bought and held the instrument for the duration of the backtest.
end_date
string
The end date of the backtest simulation.
final_value
float
The final value of the investment after all simulated trades.
initial_investment
integer
The initial value invested in the instrument.
peak_loss
float
The greatest loss made by a singular trade.
peak_profit
float
The highest profit made by a singular trade.
profit_percent
float
The total profit made from the simulated trades, as a percentage.
profitable_trade_percent
float
The percentage of trades that made a profit.
profitable_trades
integer
The number of trades that made a profit.
start_date
string
The start date of the backtest simulation.
total_profit
float
The total profit made from the simulated trades.
total_trades
integer
The total number of trades made in the simulation.
unprofitable_trades
integer
The number of unprofitable trades made in the simulation.

API Limits

The Guavy API has a limit of 10 simultaneous connections. You'll receive a 429 error if you reach the limit. At exceptionally high volumes, you may receive an HTTP 429 or 403 without a JSON body.

We recommend that you cache frequently accessed values that do not change often in your application's data store. This will prevent your application from bumping up against the throttling limitations and will likely provide faster access to that data.

Account Limits

Your Guavy account will typically have a licensed limit of at least 100,000 API calls per month. In addition, there is a limit of 10,000 API calls per day. If you reach these limits, you will receive a 429 error.

Connection Timeouts

The Guavy API has a 120-second timeout on API calls. You may see this type of timeout after you've made a network socket connection and are already sending and receiving data. Response times are dependent on the complexity of your request and the general load across Guavy. Some endpoints in the Guavy API return values that are large and slow to calculate.

Was this helpful?
Feedback option #{picture.id}
Feedback option #{picture.id}
Feedback option #{picture.id}
Feedback option #{picture.id}

© 2025 Guavy Inc. All rights reserved.