Gamestudio Links
Zorro Links
Newest Posts
AssetAdd() vs. modern asset list?
by jcl. 02/21/24 15:01
How many still using A8
by Aku_Aku. 02/20/24 12:18
Zorro Trader GPT
by TipmyPip. 02/16/24 06:53
Support PEEK for time and calendar functions
by AndrewAMD. 02/14/24 22:23
Deeplearning Script
by tomaslolo. 02/07/24 18:28
The Super-System
by TipmyPip. 02/06/24 19:32
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 594 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Withdrawing profits with a re-investing strategy #487184
02/03/23 06:05
02/03/23 06:05
Joined: Mar 2019
Posts: 22
S
Smallz Offline OP
Newbie
Smallz  Offline OP
Newbie
S

Joined: Mar 2019
Posts: 22
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!

Re: Withdrawing profits with a re-investing strategy [Re: Smallz] #487185
02/03/23 12:32
02/03/23 12:32
Joined: Nov 2022
Posts: 13
Tampa Bay
B
bigsmack Offline
Newbie
bigsmack  Offline
Newbie
B

Joined: Nov 2022
Posts: 13
Tampa Bay
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 Files invest_calc.PNG
Re: Withdrawing profits with a re-investing strategy [Re: bigsmack] #487192
02/06/23 20:11
02/06/23 20:11
Joined: Mar 2019
Posts: 22
S
Smallz Offline OP
Newbie
Smallz  Offline OP
Newbie
S

Joined: Mar 2019
Posts: 22
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?

Re: Withdrawing profits with a re-investing strategy [Re: Smallz] #487195
02/07/23 18:16
02/07/23 18:16
Joined: Nov 2022
Posts: 13
Tampa Bay
B
bigsmack Offline
Newbie
bigsmack  Offline
Newbie
B

Joined: Nov 2022
Posts: 13
Tampa Bay
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)



Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1