Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -223,10 +223,11 @@ data = st.session_state.data
|
|
| 223 |
|
| 224 |
# Display results based on the selected method
|
| 225 |
if selected == "Candlestick Chart":
|
|
|
|
|
|
|
|
|
|
| 226 |
with st.expander("Method Description", expanded=False):
|
| 227 |
-
st.markdown("""
|
| 228 |
-
### Candlestick Chart
|
| 229 |
-
The candlestick chart visually represents the open, high, low, and close prices of a stock or crypto for each day. This type of chart helps identify patterns in the price movements and provides insights into market sentiment.
|
| 230 |
**Components of a Candlestick:**
|
| 231 |
- **Open**: The price at which a stock or crypto started trading at the beginning of the time period.
|
| 232 |
- **High**: The highest price reached during the time period.
|
|
@@ -250,10 +251,13 @@ if selected == "Candlestick Chart":
|
|
| 250 |
st.plotly_chart(fig)
|
| 251 |
|
| 252 |
elif selected == "Returns Distribution":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 253 |
with st.expander("Method Description", expanded=False):
|
| 254 |
st.markdown("""
|
| 255 |
-
### Returns Distribution
|
| 256 |
-
This analysis shows the distribution of daily, weekly, and monthly returns. It helps understand the stock's or crypto's return characteristics by visualizing the frequency and magnitude of price changes over different time periods.
|
| 257 |
**Components:**
|
| 258 |
- **Daily Returns**: Calculated as the percentage change in the closing price from one day to the next.
|
| 259 |
- **Weekly Returns**: Calculated as the percentage change in the closing price from the last trading day of one week to the last trading day of the next week.
|
|
@@ -273,7 +277,7 @@ elif selected == "Returns Distribution":
|
|
| 273 |
|
| 274 |
st.markdown("""
|
| 275 |
where:
|
| 276 |
-
- \( P_{\text{close}, t} \) is the closing price at time \( t \)
|
| 277 |
- \( P_{\text{close}, t-1} \) is the closing price at time \( t-1 \)
|
| 278 |
- \( P_{\text{close}, \text{week}_t} \) is the closing price at the end of the current week
|
| 279 |
- \( P_{\text{close}, \text{week}_{t-1}} \) is the closing price at the end of the previous week
|
|
|
|
| 223 |
|
| 224 |
# Display results based on the selected method
|
| 225 |
if selected == "Candlestick Chart":
|
| 226 |
+
st.markdown("""### Candlestick Chart
|
| 227 |
+
The candlestick chart visually represents the open, high, low, and close prices of a stock or crypto for each day.
|
| 228 |
+
""")
|
| 229 |
with st.expander("Method Description", expanded=False):
|
| 230 |
+
st.markdown("""
|
|
|
|
|
|
|
| 231 |
**Components of a Candlestick:**
|
| 232 |
- **Open**: The price at which a stock or crypto started trading at the beginning of the time period.
|
| 233 |
- **High**: The highest price reached during the time period.
|
|
|
|
| 251 |
st.plotly_chart(fig)
|
| 252 |
|
| 253 |
elif selected == "Returns Distribution":
|
| 254 |
+
|
| 255 |
+
st.markdown("""### Returns Distribution
|
| 256 |
+
This analysis shows the distribution of daily, weekly, and monthly returns.
|
| 257 |
+
It helps understand the asset return characteristics by visualizing the frequency and magnitude of price changes over different time periods.
|
| 258 |
+
""")
|
| 259 |
with st.expander("Method Description", expanded=False):
|
| 260 |
st.markdown("""
|
|
|
|
|
|
|
| 261 |
**Components:**
|
| 262 |
- **Daily Returns**: Calculated as the percentage change in the closing price from one day to the next.
|
| 263 |
- **Weekly Returns**: Calculated as the percentage change in the closing price from the last trading day of one week to the last trading day of the next week.
|
|
|
|
| 277 |
|
| 278 |
st.markdown("""
|
| 279 |
where:
|
| 280 |
+
- $$ \( P_{\text{close}, t} \) $$ is the closing price at time \( t \)
|
| 281 |
- \( P_{\text{close}, t-1} \) is the closing price at time \( t-1 \)
|
| 282 |
- \( P_{\text{close}, \text{week}_t} \) is the closing price at the end of the current week
|
| 283 |
- \( P_{\text{close}, \text{week}_{t-1}} \) is the closing price at the end of the previous week
|