Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +18 -25
src/streamlit_app.py
CHANGED
|
@@ -17,22 +17,18 @@ with tabs[0]:
|
|
| 17 |
|
| 18 |
future_value = a * ((1 + r) ** T)
|
| 19 |
st.write(f"Future Value = {a} * (1 + {r})^{T} = **{future_value:,.2f}**")
|
| 20 |
-
st.write(f"Future Value = {a} * (1 + {r})^{T} = **{future_value:,.2f}**")
|
| 21 |
|
| 22 |
# LaTeX formula note
|
|
|
|
|
|
|
| 23 |
st.markdown(
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
- \(a\) = initial amount
|
| 32 |
-
- \(r\) = annual return rate
|
| 33 |
-
- \(T\) = number of years
|
| 34 |
-
""",
|
| 35 |
-
unsafe_allow_html=True
|
| 36 |
)
|
| 37 |
|
| 38 |
# --- Consistent Cash Flow Investment ---
|
|
@@ -50,19 +46,16 @@ with tabs[1]:
|
|
| 50 |
st.write(f"Future Value of Cash Flows = **{fv_cf:,.2f}**")
|
| 51 |
|
| 52 |
# LaTeX formula note
|
|
|
|
|
|
|
| 53 |
st.markdown(
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
- \(a\) = annual cash flow
|
| 62 |
-
- \(r\) = annual return rate
|
| 63 |
-
- \(T\) = number of years
|
| 64 |
-
""",
|
| 65 |
-
unsafe_allow_html=True
|
| 66 |
)
|
| 67 |
|
| 68 |
# --- Monte Carlo Simulation ---
|
|
|
|
| 17 |
|
| 18 |
future_value = a * ((1 + r) ** T)
|
| 19 |
st.write(f"Future Value = {a} * (1 + {r})^{T} = **{future_value:,.2f}**")
|
|
|
|
| 20 |
|
| 21 |
# LaTeX formula note
|
| 22 |
+
st.write("**Note:** The formula used is:")
|
| 23 |
+
st.latex(r"FV = a \cdot (1 + r)^T")
|
| 24 |
st.markdown(
|
| 25 |
+
"""
|
| 26 |
+
where:
|
| 27 |
+
- **FV** = future value
|
| 28 |
+
- **a** = initial amount
|
| 29 |
+
- **r** = annual return rate
|
| 30 |
+
- **T** = number of years
|
| 31 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
)
|
| 33 |
|
| 34 |
# --- Consistent Cash Flow Investment ---
|
|
|
|
| 46 |
st.write(f"Future Value of Cash Flows = **{fv_cf:,.2f}**")
|
| 47 |
|
| 48 |
# LaTeX formula note
|
| 49 |
+
st.write("**Note:** The formula used is:")
|
| 50 |
+
st.latex(r"FV = a \cdot \left( \frac{(1 + r)^T - 1}{r} \right)")
|
| 51 |
st.markdown(
|
| 52 |
+
"""
|
| 53 |
+
where:
|
| 54 |
+
- **FV** = future value of the cash flow stream
|
| 55 |
+
- **a** = annual cash flow
|
| 56 |
+
- **r** = annual return rate
|
| 57 |
+
- **T** = number of years
|
| 58 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
)
|
| 60 |
|
| 61 |
# --- Monte Carlo Simulation ---
|