As the cryptocurrency market continues to grow, analytics will become an increasingly valuable aspect of the market. The Shrimpy developer APIs plan on providing a selection of analytical tools which will help developers analyse their user's portfolios, surface additional information, and provide insights into the current state of the market. 

Rebalancing Backtests

Traditionally, Shrimpy has been a portfolio management solution which heavily focused on portfolio rebalancing. While the developer APIs largely move away from this concept, we still have some endpoints which are remnant from this original focus. These endpoints are one of those endpoints.

You can backtest custom rebalancing strategies, portfolio allocations, time periods, and more with the backtesting endpoint. 

In order to run a backtest, simply request the assets which were available on a given exchange. Shrimpy will return all of the assets available along with the time periods for which they were available.

Next, run the backtest by calling the "Run Backtest" endpoint. This endpoing will require you to pass in data like the fee, startTime, endTime, initialvalue, allocations, and rebalancePeriod. 

The response to this request will be a list of time and value datapoints which can be plotted.

Response

{
  "rebalanceData": [
    {
      "time": "2018-05-19T07:00:00.000Z",
      "usdValue": 4999.999999999999
    },
    {
      "time": "2018-05-20T00:59:43.836Z",
      "usdValue": 4995.4975344538725
    },
    ...
  ],
  "holdingData": [
    {
      "time": "2018-05-19T07:00:00.000Z",
      "usdValue": 4999.999999999999
    },
    {
      "time": "2018-05-20T00:59:43.836Z",
      "usdValue": 4995.4975344538725
    },
    ...
  ]
}
Did this answer your question?