Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +33 -0
src/streamlit_app.py
CHANGED
@@ -17,6 +17,23 @@ 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 |
|
21 |
# --- Consistent Cash Flow Investment ---
|
22 |
with tabs[1]:
|
@@ -32,6 +49,22 @@ with tabs[1]:
|
|
32 |
|
33 |
st.write(f"Future Value of Cash Flows = **{fv_cf:,.2f}**")
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
# --- Monte Carlo Simulation ---
|
36 |
with tabs[2]:
|
37 |
st.header("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 |
+
st.write(f"Future Value = {a} * (1 + {r})^{T} = **{future_value:,.2f}**")
|
21 |
+
|
22 |
+
# LaTeX formula note
|
23 |
+
st.markdown(
|
24 |
+
r"""
|
25 |
+
**Note:** The formula used is:
|
26 |
+
\[
|
27 |
+
FV = a \cdot (1 + r)^T
|
28 |
+
\]
|
29 |
+
where:
|
30 |
+
- \(FV\) = future value
|
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 ---
|
39 |
with tabs[1]:
|
|
|
49 |
|
50 |
st.write(f"Future Value of Cash Flows = **{fv_cf:,.2f}**")
|
51 |
|
52 |
+
# LaTeX formula note
|
53 |
+
st.markdown(
|
54 |
+
r"""
|
55 |
+
**Note:** The formula used is:
|
56 |
+
\[
|
57 |
+
FV = a \cdot \left( \frac{(1 + r)^T - 1}{r} \right)
|
58 |
+
\]
|
59 |
+
where:
|
60 |
+
- \(FV\) = future value of the cash flow stream
|
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 ---
|
69 |
with tabs[2]:
|
70 |
st.header("Monte Carlo Simulation")
|