Withdrawing+reinvesting profit

Posted By: krial057

Withdrawing+reinvesting profit - 05/07/15 14:49

Hello,

I just started learning automatic trading and have a question regarding memory management. I understand how much money I can reinvest(by how much I can increase the margin). I also understand how much money I can withdraw. However I don't know how to do when I want to do both at the same time. In the Zorro manual stands the following:

Quote:

Balance on account: C+P-W
Must stay on account: C*f
Available to withdraw: C+P-W - C*f
Available to reinvest: C*f - W/f


The formulas work fine, except for the last one. I don't understand what the result means/ by how much I can increase the margin.

Example Scenario:
Capital: 3000
Total Profit: 350
Total Withdrawn: 0

Quote:

Balance on account: 3350
Must stay on account: 3170.173497
Available to withdraw: 179.8265032
Available to reinvest: 3170.173497


As far as I understand, I am now allowed to withdraw up to 179?
Suppose I only want to withdraw 100. By how much can I can increase the margin then? What does the amount under "Available to reinvest" has to do with it?

kind regards,

Alain
Posted By: jcl

Re: Withdrawing+reinvesting profit - 05/08/15 11:04

In your scenario, "Available to reinvest" is 3170 - 100/sqrt(1+350/3000) = 3075. So you increase your Margin from 3000 to 3075 required capital.
Posted By: krial057

Re: Withdrawing+reinvesting profit - 05/08/15 11:32

Hmm, but my margin per trade was 50(default avg of Z-systems) not 3000?
3000 was my capital.
So should I increase my margin by 3075/3000 = 1.025
Old margin: 50 -> new margin: 51.25 ?

(Maybe you could add an example scenario for this in the manual too. You have a scenario for reinvesting and one for withdrawing, but none for both)
Posted By: jcl

Re: Withdrawing+reinvesting profit - 05/08/15 11:44

Almost, but not quite: the relation between margin and capital is not completely linear. So the very precise method would be to move your Margin slider until the backtest shows $3075 required capital. But I think the factor 1.025 is normally good enough.
Posted By: krial057

Re: Withdrawing+reinvesting profit - 05/08/15 12:17

That makes sense, thanks!

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=451505&#Post451505
© 2023 lite-C Forums