Skip to content

Commit c4268dd

Browse files
committed
Created Investment Rules folder and added a snippet to calulate time take to double your investments
1 parent 1719912 commit c4268dd

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

INVESTMENT_RULES/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## What Is the Rule of 72?
2+
The Rule of 72 is a simple way to determine how long an investment will take to double given a fixed annual rate of interest. Dividing 72 by the annual rate of return gives investors a rough estimate of how many years it will take for the initial investment to duplicate itself.
3+
4+
### Key takeaways
5+
The Rule of 72 is not precise, but is a quick way to get a useful ballpark figure.
6+
For investments without a fixed rate of return, you can instead divide 72 by the number of years you hope it will take to double your money. This will give you an estimate of the annual rate of return you’ll need to achieve that goal.
7+
The calculation is most accurate for rates of return of about 5% to 10%.
8+
For more precise outcomes, divide 69.3 by the rate of return. While not as easy to do in one’s head, it is more accurate.
9+
10+
### How the Rule of 72 Works
11+
For example, the Rule of 72 states that $1 invested at an annual fixed interest rate of 10% would take 7.2 years ((72 ÷ 10) = 7.2) to grow to $2.
12+
13+
For more details refer https://www.investopedia.com/ask/answers/what-is-the-rule-72/

INVESTMENT_RULES/rule_of_72.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Get Aannual fixed interest rate
2+
fixed_interest_rate = input("Please enter the Annual Fixed interest rate (don't use % sign): ")
3+
4+
5+
def calculate_time_taken_to_double(fixed_interest_rate):
6+
# It will get the time zone of the user location
7+
time_taken = 72/float(fixed_interest_rate)
8+
return time_taken
9+
10+
time_taken_to_double = round(calculate_time_taken_to_double(fixed_interest_rate),2)
11+
print(f"Your investment will take {time_taken_to_double} year(s) to double")

0 commit comments

Comments
 (0)