Created
January 23, 2021 05:21
-
-
Save philipmw/f11c30497484def48049e03a82fd6c04 to your computer and use it in GitHub Desktop.
Value of PCC's dividend compared to membership cost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CostOfMembership = 60; | |
AnnualPccSpend = 57 * 12; # chosen to make the two options equivalent | |
i = 0.07; # interest rate of investing this money | |
T = 5; # time period we care about, in years | |
FV_investingMembershipCost = CostOfMembership * (1 + i)^T; | |
singleYearPPrime = function(x, r, t) { | |
return(2 / 100 * x * (1 + r)^t); # https://en.wikipedia.org/wiki/Compound_interest#Periodic_compounding | |
} | |
FV_beingAMember = sum( | |
unlist( | |
Map(function(t) { return (singleYearPPrime(AnnualPccSpend, i, t)); }, 1:T) | |
) | |
); | |
# Results: | |
# FV_beingAMember = 84.18 | |
# FV_investingMembershipCost = 84.15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment