Yes, you can achieve this with a single formula in Google Sheets. Assuming your table is set up as follows:
| Cell | Description | Value |
|---|
| A1 | Starting Capital | 20000 |
| B1 | Daily Growth Rate (%) | 1 |
| C1 | Duration (days) | 5 |
| D1 | Withdrawal Amount | 0 |
| E1 | Withdrawal Interval (days) | 5 |
| F1 | End Capital | (Formula) |
Formula for End Capital (F1):
=A1 * (1 + B1/100)^C1 - D1 * SUM(ARRAYFORMULA((1 + B1/100)^(C1 - SEQUENCE(INT(C1/E1), 1, 1, 1) * E1)))
Explanation of the Formula:
-
Compound Growth:
A1 * (1 + B1/100)^C1: This calculates the compounded growth of your starting capital over the duration without considering any withdrawals.
-
Withdrawals:
INT(C1/E1): Determines how many times withdrawals occur within the trading period.
SEQUENCE(INT(C1/E1), 1, 1, 1) * E1: Generates the specific days on which withdrawals occur.
(1 + B1/100)^(C1 - SEQUENCE(...)): Calculates the growth factor from each withdrawal day to the end of the duration.
SUM(ARRAYFORMULA(...)): Sums up all the growth-adjusted withdrawal amounts.
-
Final Calculation:
- The formula subtracts the total adjusted withdrawals from the compounded growth to give you the end capital.
Example with Provided Values:
Given your initial values:
- Starting Capital: €20,000
- Daily Growth Rate: 1%
- Duration: 5 days
- Withdrawal Amount: €0
- Withdrawal Interval: 5 days
Plugging these into the formula:
=20000 * (1 + 1/100)^5 - 0 * SUM(...)
This simplifies to:
=20000 * 1.0510100501
Resulting in:
€21,020.20
Usage Tips:
-
Dynamic Updates: Since all variables are referenced by their cells (A1, B1, C1, D1, E1), you can change any value in these cells, and the end capital (F1) will automatically recalculate.
-
Withdrawals: Ensure that your withdrawal amount and interval are correctly set to reflect your trading strategy. The formula accommodates multiple withdrawals based on the interval specified.
Additional Example:
If you have:
- Starting Capital: €20,000
- Daily Growth Rate: 1%
- Duration: 5 days
- Withdrawal Amount: €500
- Withdrawal Interval: 2 days
The formula will calculate the end capital by accounting for withdrawals on day 2 and day 4, reducing the trading capital each time by €500.
Final Note:
This formula provides a flexible and dynamic way to calculate your end capital based on varying inputs. Ensure that your withdrawal intervals and amounts are set according to your trading plan to get accurate results.