Dividend reinvestment calculation script

matthew

Elite
Joined
Mar 4, 2007
Posts
2,768
Location
England
Society
freelancer
Avatar Name
Sir Matt Copping
I was playing with some numbers thinking about what the projected outcome of reinvesting my dividends into different deeds (CLDs/AUDs) might be. I was interested what the weekly payout might be after so many years.

I drafted out this python script to do the calculations and personally find it quite interesting to play with the different parameters. Currently the model is basic and does not correct for increases in deed value (this is easy to add but it is hard to estimate). In terms of increases in dividends these have been fairly stable for some years (if anything the CLDs have decreased) but it would be hard to speculate on future returns. A more sophisticated model could also reinvest the withdraw fund until the point that this fund reaches 1000 ped.

I hope it is ok to post such scripts to the forum, I thought it might be useful. To run it you will need python installed (sorry :rolleyes:), I heard executables can be made from scripts but have no idea how to do that... If you do have python just copy and paste the script in and run it making sure to preserve the indentations. I hope it is clear where you have to add your own values in.

Please feel free to do what ever you like with the script and repost better versions here if you wish. Perhaps we can find a more accessible format as well...


#Versions 1. EU dividend returns model 04/04/2016

##TODO Model increase in deed values over time.

### INSET CUSTOM VALUES HERE

#Current Inventory
CLDs = 5
AUDs = 0

#Current Values
CLDValue = 1800
AUDValue = 60

#Current Payouts
CLDPayout = 3
AUDPayout = 0.02

#Other
YearsToRun = 5 #How many years to run model for
PercentReinvest = 75 #What percentage of dividends to be reinvested

ReinvestInCLDs = True
ReinvestInAUDs = True

SellAUDsForCLDs = False #Do you want sell AUDs when you have enough to buy CLD?
############

Dividends = 0
ReinvestFund = 0
WithdrawFund = 0

PercentWithdraw = 100 - PercentReinvest

WeeksToRun = YearsToRun*52

InitialInvestment = AUDs*AUDValue + CLDs*CLDValue

print ""
print "Initial fund value", InitialInvestment

for i in range(0, WeeksToRun):
#Calculate payouts for each deed each week
TotalAUDPayoutWeekly = AUDs*AUDPayout*7
TotalCLDPayoutWeekly = CLDs*CLDPayout

ReinvestFund = ReinvestFund + (PercentReinvest/100.0)*(TotalCLDPayoutWeekly + TotalAUDPayoutWeekly)
WithdrawFund = WithdrawFund + (PercentWithdraw/100.0)*(TotalCLDPayoutWeekly + TotalAUDPayoutWeekly)

Dividends = Dividends + TotalCLDPayoutWeekly + TotalAUDPayoutWeekly​

if ReinvestInAUDs == True and ReinvestFund > AUDValue:
AUDs = AUDs + 1
ReinvestFund = ReinvestFund - AUDValue​

if SellAUDsForCLDs == True and AUDs*AUDValue > CLDValue:
CLDs = CLDs + 1
ReinvestFund = AUDs*AUDValue - CLDValue #Sell AUDs and buy CLD, reinvest any remainder
AUDs = 0​

print ""
print "Total Dividends", Dividends
print "Total withdrawn", WithdrawFund
print "Total reinvested", Dividends - WithdrawFund
print ""
print "Final number of CLDs", CLDs
print "Final number of AUDs", AUDs
print "Final Weekly payout", AUDs*AUDPayout*7 + CLDs*CLDPayout

FinalValue = AUDs*AUDValue + CLDs*CLDValue + ReinvestFund
print "Final fund value", FinalValue

print "Growth PED", FinalValue - InitialInvestment
print "Growth Percent", ((FinalValue - InitialInvestment)/InitialInvestment)*100
 
Last edited:
To reinvest revenue from deeds sure sounds like a good idea but dont let the greed eat your brain. Until the day money arrives at your real life bank account all this numbers are nothing but hot air. Sometimes its good to withdraw some and realize profits. Never forget that EU is a high risk investment and for a fact more peds exist than real life currency backing it up.

Just saying
 
To reinvest revenue from deeds sure sounds like a good idea but dont let the greed eat your brain. Until the day money arrives at your real life bank account all this numbers are nothing but hot air. Sometimes its good to withdraw some and realize profits. Never forget that EU is a high risk investment and for a fact more peds exist than real life currency backing it up.

Just saying


This is a very good point indeed! Thanks for raising. The model allows for a certain percent to go towards reinvest and withdraw so that a nice balance can be found. A better model would have reinvest/withdraw/play percentages I guess.

Part of why I was thinking about this is I am coming up to the point where my initial investment in the CLDs will have returned. So I am nearly at balance with the universe hehe.
 
Back
Top