Statistics data backtest

Can we add these three pieces of information to the backtest stats? Please :pray:

1) max used funds
It’s an important metric to understand how much money we use when more than one active deal (with DCAs) is used - it’s also important for -1 simultaneous deals as it give us the actual max used funds

2) max % deviation
This is one of the most important value when looking at the price movement from the initial base order - it’s important to understand the effectiveness of our strategy and the number of potential DCAs

3) max simultaneous deals
It helps to understand the usage of funds and how many simultaneous deals the bot opens over the backtesting time

2 Likes

Do you have the formula for 1 and 2?

  1. is the maximum amount of funds that were really used in simultaneous deals during the backtest.

  2. is the maximum that a deal has reached during the backtest

  3. could a counter how many deals were closed with only 0, 1, 2, 3, … DCA orders.

The following tool gives a good overview what stats could be there:

https://www.3c-tools.com/

Formulas are quite simple - is there a way to paste formulas here?

You don’t have MathJax here, but can format it via Markdown a little.

1) Max used funds

The formula finds the maximum funds required at any point in time for all active trades, including the base order and any added DCA. It helps finding the maximum funds required when trades overlap.

Example

Deal Base Order (BO) DCA Orders Count Total DCA Active Period
Deal 1 $100 2 ($50 each) $100 10:00-10:30
Deal 2 $100 3 ($50 each) $150 10:15-10:45
Deal 3 $100 4 ($50 each) $200 10:30-11:00

Calculation by Interval

  1. Interval 10:00-10:15: Only Deal 1 is active.

    • Deal 1:
      • Base Order (BO₁) = $100
      • DCA Orders Total (DCA₁) = $100 (from 2 orders of $50 each)
      • Funds Used = BO₁ + DCA₁ = $100 + $100 = $200

    Total Funds Used = $200

  2. Interval 10:15-10:30: Deals 1 and 2 are active.

    • Deal 1:
      • Base Order (BO₁) = $100
      • DCA Orders Total (DCA₁) = $100
      • Funds Used = $100 + $100 = $200
    • Deal 2:
      • Base Order (BO₂) = $100
      • DCA Orders Total (DCA₂) = $150 (from 3 orders of $50 each)
      • Funds Used = $100 + $150 = $250

    Total Funds Used = $200 (Deal 1) + $250 (Deal 2) = $450

  3. Interval 10:30-10:45: Deals 2 and 3 are active.

    • Deal 2:
      • Base Order (BO₂) = $100
      • DCA Orders Total (DCA₂) = $150
      • Funds Used = $100 + $150 = $250
    • Deal 3:
      • Base Order (BO₃) = $100
      • DCA Orders Total (DCA₃) = $200 (from 4 orders of $50 each)
      • Funds Used = $100 + $200 = $300

    Total Funds Used = $250 (Deal 2) + $300 (Deal 3) = $550

  4. Interval 10:45-11:00: Only Deal 3 is active.

    • Deal 3:
      • Base Order (BO₃) = $100
      • DCA Orders Total (DCA₃) = $200
      • Funds Used = $100 + $200 = $300

    Total Funds Used = $300

Result

The Max Used Funds is $550 during the interval 10:30-10:45.

2) Max % Deviation

The Max % Deviation calculates the maximum percentage price deviation from the initial base order price over a trade’s lifespan. It shows how far the price moved against the base order, which can highlight the need for more DCAs or strategy adjustments.

Explanation: This is the maximum percentage change from the base order price, either upwards or downwards. It can help assess if the strategy’s DCA limits or evaluates the entry points.

Let me know if anything isn’t clear or if you need further clarification.

You have already all the values from the current stats it should be easier to get these new data considering the amount of info you have already implemented.




This above could also be useful data to understand how many deals use x amount of DCA - easy to calculate on 100 deals 20 deals used 3 DCA therefore the 20% of the deals closed the trade using only 3 DCA - you already have all these info it will be a quick recap. Also be useful in future when comparing different strategies

Thanks

1 Like

Are these the backbones for the backtest stats? you have most of the info there already