Spaces:
Runtime error
Runtime error
Commit
•
9c6a1e8
1
Parent(s):
27b0db3
Update app.py
Browse files
app.py
CHANGED
@@ -21,22 +21,21 @@ t = np.arange(T + 1)
|
|
21 |
# Numpy array for the interest rate
|
22 |
r_list = np.array([r] * len(t))
|
23 |
|
24 |
-
st.write(r_list)
|
25 |
-
|
26 |
# Numpy array with the returns for each month in t
|
27 |
-
y = A * (1 + (
|
28 |
|
29 |
# Numpy array with the continuously compunded returns
|
30 |
-
y_c = A * np.exp(
|
31 |
|
32 |
# Create the investment dictionary
|
33 |
inv_dict = {"Month": t,
|
34 |
-
|
35 |
-
|
|
|
36 |
|
37 |
# Create the investment dataframe
|
38 |
inv_df = pd.DataFrame(inv_dict)
|
39 |
inv_df.columns = inv_dict.keys()
|
40 |
|
41 |
-
st.
|
42 |
|
|
|
21 |
# Numpy array for the interest rate
|
22 |
r_list = np.array([r] * len(t))
|
23 |
|
|
|
|
|
24 |
# Numpy array with the returns for each month in t
|
25 |
+
y = A * (1 + (r_list / (12*100)))**t
|
26 |
|
27 |
# Numpy array with the continuously compunded returns
|
28 |
+
y_c = A * np.exp(r_list * t / (12*100))
|
29 |
|
30 |
# Create the investment dictionary
|
31 |
inv_dict = {"Month": t,
|
32 |
+
"Rate": r_list,
|
33 |
+
"Returns": y,
|
34 |
+
"Continuous returns": y_c}
|
35 |
|
36 |
# Create the investment dataframe
|
37 |
inv_df = pd.DataFrame(inv_dict)
|
38 |
inv_df.columns = inv_dict.keys()
|
39 |
|
40 |
+
st.data_editor(inv_df)
|
41 |
|