Created
June 7, 2023 18:15
-
-
Save kristopolous/ed2528b0d58ee192b4812534122048e2 to your computer and use it in GitHub Desktop.
The ROI if you decided to withhold your rent during COVID and invest it instead in LA county
This file contains hidden or 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
#!/usr/bin/python3 | |
import math | |
import numpy as np | |
for roi in np.arange(1.01, 1.07, 0.01): | |
monthly = math.log(roi)/12 | |
rent = 1000 | |
ttl = 0 | |
# "From March 2020 - Sept 2021 is due by Aug 2023" | |
# 3/2020 9/2021 8/2023 | |
# (12 + 6 - 1) && (3 * 12 + 5) | |
for i in range(0,17): | |
ttl += (41 - i) * monthly * rent | |
# "From Oct 2021 - Jan 2023 due by Feb 2024" | |
# 10/2021 1/2023 2/2024 | |
# (12 + 3 - 1) (12 * 2 + 4) | |
for i in range(0,14): | |
ttl += (28 - i) * monthly * rent | |
print(roi, ttl/rent) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment