I couldn't come up with a proper formula for the scenario below. I'm not so good at Maths.
$X$ - monthly gains in percentage
$C$ - Initial capital
$N$ - number of years
$M$ - Amount gained (only) after which, gains so far can be re-invested.
I need a formula which can give me the compounded amount for the initial capital X after N no of years
Example: With $3\%$ monthly gains, $M = 30000$ for an initial capital of $10$ Lakh each month would give me $30000$ which equals $M$ , hence the gain of $30K$ can be reinvested next month. Hence gains after second month would be $3\%$ of ($10$ lakh + $30000$).
Let me know if the question is not clear.
To give you some context on why I need this, I m investing in some kind of options(stock derivatives) strategy. I know the average monthly $\%$ gains(expectancy) but the monthly gains can not be reinvested immediately as average cost of a trade is say $30000$. Hence I cannot apply the compound interest formula I believe