Withdrawing profits with a re-investing strategy

Posted By: Smallz

Withdrawing profits with a re-investing strategy - 02/03/23 06:05

Hi

I have a script that reinvests profits automatically according to the square rule. I'm not sure how to adjust the slider after I withdraw profits. Here is the setup.

Account Balance at the start is USD 20'000.00.
Capital Slider at the start is 14'000.00
After 6 months of trading, the system has generated 15% profit, i.e. USD 3'000.00.
The slider position hasn't changed, but the lots have been adjusted of course during the period of these 6 months.

I'd like to withdraw USD 2'000.00. What should I do about the capital slider now? Do I need to reduce it? By how much?

Thanks!
Posted By: bigsmack

Re: Withdrawing profits with a re-investing strategy - 02/03/23 12:32

It seems like the $20k account size is not relevant because you had the slider set to $14k to make your $3k.

If you take $2k from your $3k then that leaves $1k profit.

So you put $14k and $1k (leaving the Root at 2) in the InvestCalculator script and that gives you $14,491 as your new slider value.

Attached picture invest_calc.PNG
Posted By: Smallz

Re: Withdrawing profits with a re-investing strategy - 02/06/23 20:11

Originally Posted by bigsmack
It seems like the $20k account size is not relevant because you had the slider set to $14k to make your $3k.

If you take $2k from your $3k then that leaves $1k profit.

So you put $14k and $1k (leaving the Root at 2) in the InvestCalculator script and that gives you $14,491 as your new slider value.





Are you sure this is correct? I have to move the slider upwards, even if the system is already re-investing the profits and even if I withdraw money? shouldn't I reduce the slider?
Posted By: bigsmack

Re: Withdrawing profits with a re-investing strategy - 02/07/23 18:16

It looks like I may not be using this invest script correctly. I guess I don't get it.

I copied the formulas from the Black Book and made a Python script and got different results so it looks like your instincts were probably correct.

With the new code I got 13612.27 as the new slider value.

I'll paste the output and attach the code and let you be the judge.

Capital: 14000
Profit: 3000
C
14000.0
P
3000.0
W
0

Balance_on_the_account
17000.0

Minimum_amount_in_the_account
15427.248620541512

Available_for_removal
1572.7513794584884

Available_for_reinvesting
15427.248620541512

Withdraw Amount: 2000
Actual Payout
2000.0

Account_after_profit
15000.0

Growth_factor
1.2142857142857142

f
1.1019463300386794

Account_minimum
15427.248620541512

Maximum_payout
-427.2486205415116

Investment After Payout of $2000.0
13612.278194595452



Code
import math

C = float(input("Capital: "))
P = float(input("Profit: "))
W = 0
f=math.sqrt(1+(P/C))

print('C')
print(C)

print('P')
print(P)

print('W')
print(W)

Balance_on_the_account= C + P - W 
Minimum_amount_in_the_account= C * f 
Available_for_removal= C + P - W - C * f 
Available_for_reinvesting= C * f - W/f 
print()
#print(f)
print('Balance_on_the_account')
print(Balance_on_the_account)
print()
print('Minimum_amount_in_the_account')
print(Minimum_amount_in_the_account)
print()
print('Available_for_removal')
print(Available_for_removal)
print()
print('Available_for_reinvesting')
print(Available_for_reinvesting)
print()

W = float(input("Withdraw Amount: "))

#Previous_margin =  0.5 * OptimalF * $10000 
Account_after_profit =  C + P-W  # $13,000 
Growth_factor =  1+P/C # 1.3, 
f=math.sqrt(Growth_factor)
#its_square_root f  # 1.14 
Account_minimum =  C * f # $10,000 * 1.14 # $11,400 
Maximum_payout =  C + P-W-C * f # $13,000-$11,400 # $1600

print("Actual Payout")
print(W)
print()
print('Account_after_profit' )
print(Account_after_profit )
print()
print('Growth_factor' )
print(Growth_factor )
print()
print('f')
print(f)
print()
#print(#its_square_root f  # 1.14 )
print('Account_minimum' )
print(Account_minimum )
print()
print('Maximum_payout' )
print(Maximum_payout )
print()
Investment_after_Payout = C * f - W/f
print("Investment After Payout of $" + str(W))
print(Investment_after_Payout)

© 2024 lite-C Forums