LuisLozano commited on
Commit
c20d7b1
1 Parent(s): c904536

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -37,10 +37,16 @@ inv_dict = {"Month": t,
37
  inv_df = pd.DataFrame(inv_dict)
38
  inv_df.columns = inv_dict.keys()
39
 
 
40
  new_df = st.data_editor(inv_df)
41
 
42
- new_df["Returns"] = A * (1 + (new_df["Rate"] / (12*100)))**new_df["Month"]
43
- new_df["Continuous returns"] = A * np.exp(new_df["Rate"] * new_df["Month"] / (12*100))
 
 
 
 
 
44
 
45
  st.dataframe(new_df)
46
 
 
37
  inv_df = pd.DataFrame(inv_dict)
38
  inv_df.columns = inv_dict.keys()
39
 
40
+ st.write(f"Table with returns at an interest rate of {r}")
41
  new_df = st.data_editor(inv_df)
42
 
43
+ # New numpy array with the returns for each month in t
44
+ new_y = A * (1 + (new_df["Rate"] / (12*100)))**new_df["Month"]
45
+ new_df["Returns"] = new_y
46
+
47
+ # New numpy array with the continuously compunded returns
48
+ new_y_c = A * np.exp(new_df["Rate"] * new_df["Month"] / (12*100))
49
+ new_df["Continuous returns"] = new_y_c
50
 
51
  st.dataframe(new_df)
52