Trouble while trying to calculate trading revenues with differential equation

28 Views Asked by At

I'm trying to approximate my revenues assuming I can trade with $p$ yearly earnings with respect to capital $C(t)$ and that I manage to save $M$ euros a month to add to my account.

I started with this simple differential equation:

$\frac{dC(t)}{dt} = pC(t)+12M$

$p$ is expressed in such a way that if the earnings are $+10\%$, $p=0.10$. The unit of time is $1$ year, and I had to approximate the saved euros as though I added them continously instead of once a month, in order to make it a continous function. Over time it should be accurate enough.

To solve

$\frac{dC(t)}{pC(t)+12M} = dt$

Integrating

$\frac{ln(pC(t)+12M)}{p} = t+c_1$

Solve for $C(t)$:

$pC(t)+12M = e^{p(t+c_1)}$

$C(t)= \frac{e^{p(t+c_1)}-12M}{p}$

I would then adjust $c_1$ to match the initial investment. However, if you look at the resulting equation, $M$ seems to have an effect independent from time, and even more surprisingly, negative! What have I gotten wrong?

1

There are 1 best solutions below

0
On

Might have found the answer. I did solve the equation correctly, but I hadn't realized that $c_1$ depends on the saved money!

Let's consider my initial investment is $I$, and let's call $e^{pc_1} = K$

$C(0)=I=\frac{K-12M}{p}$

$K=Ip+12M$

Which means that $K$ increases when $M$ does. Now since the capital at $t$ is

$C(t)= \frac{Ke^{pt}-12M}{p}$

It turns out at $t=0$, $K$ perfectly balances $-12M$ and at $t>0$ increasing $M$ makes $C(t)$ higher, which is the expected behaviour.