LuisLozano commited on
Commit
d651670
1 Parent(s): 2d285b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -21,19 +21,19 @@ n = int(st.number_input("For how many months?", step = 1))
21
 
22
  Pn_d = (A * 12 / r) * (1 - (1 / (1 + r/12)**n))
23
 
24
- Pn_c = (A / (np.exp(r/12) - 1)) * (1 - np.exp(- r * n / 12))
25
 
26
 
27
  # Print the outputs
28
 
29
  st.write(f"The value of P is {Pn_d:,.2f} with discrete model")
30
 
31
- st.write(f"The value of P is {Pn_c:,.2f} with continuous model")
32
 
33
 
34
  # Draw the plot
35
 
36
- cf_list = [-Pn_c] + [A] * n
37
  cf_dict = pd.DataFrame({"cashflows": cf_list}).astype(float)
38
  cf_df = st.dataframe(cf_dict.T)
39
 
 
21
 
22
  Pn_d = (A * 12 / r) * (1 - (1 / (1 + r/12)**n))
23
 
24
+ # Pn_c = (A / (np.exp(r/12) - 1)) * (1 - np.exp(- r * n / 12))
25
 
26
 
27
  # Print the outputs
28
 
29
  st.write(f"The value of P is {Pn_d:,.2f} with discrete model")
30
 
31
+ # st.write(f"The value of P is {Pn_c:,.2f} with continuous model")
32
 
33
 
34
  # Draw the plot
35
 
36
+ cf_list = [-Pn_d] + [A] * n
37
  cf_dict = pd.DataFrame({"cashflows": cf_list}).astype(float)
38
  cf_df = st.dataframe(cf_dict.T)
39