QuantumLearner commited on
Commit
5d0d4f3
·
verified ·
1 Parent(s): f904616

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -16
app.py CHANGED
@@ -9,11 +9,13 @@ st.title('Expected Stock Price Movement Using Volatility Multipliers')
9
 
10
  # Sidebar section with instructions
11
  st.sidebar.title('Input Parameters')
12
- st.sidebar.subheader('How to Use')
13
- st.sidebar.markdown("""
14
- 1. **Input Parameters**: Enter the stock ticker or cryptocurrency pair, date range, time horizon, standard deviation multipliers, and rolling window period.
15
- 2. **Run the Analysis**: Click the "Run" button to perform the analyses and visualize the results.
16
- """)
 
 
17
 
18
  # Wrapping ticker and date settings in an expander
19
  with st.sidebar.expander("Ticker and Date Settings", expanded=True):
@@ -32,7 +34,6 @@ st.write("""
32
  This tool estimates the potential price movement of a selected stock or cryptocurrency pair over a specified time horizon.
33
  The predictions are based on historical volatility, calculated from the asset's daily returns.
34
  You can adjust the time horizon and standard deviation multipliers to see how the expected price range changes.
35
- To read more about the methodologies, visit [this link](https://entreprenerdly.com/expected-stock-price-movement-with-volatility-multipliers/).
36
  """)
37
 
38
  # Display the main formula with clear, basic LaTeX
@@ -40,16 +41,22 @@ st.latex(r'''
40
  P_t = P_0 \times e^{\sigma \times \sqrt{t} \times z}
41
  ''')
42
 
43
- st.markdown("""
44
- **Formula for price movement estimation explained:**
45
- - **Pt**: Estimated price at time (t)
46
- - **P0**: Current price
47
- - **σ (sigma)**: Standard deviation of the stock's returns, representing volatility
48
- - **t**: Time horizon in days
49
- - **z**: Multiplier corresponding to the desired confidence level, which adjusts for standard deviation
50
- """)
51
-
52
- if st.sidebar.button('Run'):
 
 
 
 
 
 
53
  stock_data = yf.download(ticker, start=start_date, end=end_date)
54
 
55
  if not stock_data.empty:
 
9
 
10
  # Sidebar section with instructions
11
  st.sidebar.title('Input Parameters')
12
+
13
+ with st.sidebar.expander("How to use:", expanded=False):
14
+ #st.subheader('How to Use')
15
+ st.markdown("""
16
+ 1. **Input Parameters**: Enter the stock ticker or cryptocurrency pair, date range, time horizon, standard deviation multipliers, and rolling window period.
17
+ 2. **Run the Analysis**: Click the "Run" button to perform the analyses and visualize the results.
18
+ """)
19
 
20
  # Wrapping ticker and date settings in an expander
21
  with st.sidebar.expander("Ticker and Date Settings", expanded=True):
 
34
  This tool estimates the potential price movement of a selected stock or cryptocurrency pair over a specified time horizon.
35
  The predictions are based on historical volatility, calculated from the asset's daily returns.
36
  You can adjust the time horizon and standard deviation multipliers to see how the expected price range changes.
 
37
  """)
38
 
39
  # Display the main formula with clear, basic LaTeX
 
41
  P_t = P_0 \times e^{\sigma \times \sqrt{t} \times z}
42
  ''')
43
 
44
+ with st.expander("Click here to read more about the methodology", expanded=False):
45
+ st.latex(r'''
46
+ P_t = P_0 \times e^{\sigma \times \sqrt{t} \times z}
47
+ ''')
48
+ st.markdown("""
49
+ **Formula for price movement estimation explained:**
50
+ - **Pt**: Estimated price at time (t)
51
+ - **P0**: Current price
52
+ - **σ (sigma)**: Standard deviation of the stock's returns, representing volatility
53
+ - **t**: Time horizon in days
54
+ - **z**: Multiplier corresponding to the desired confidence level, which adjusts for standard deviation
55
+
56
+ To read more about the methodologies, visit [this link](https://entreprenerdly.com/expected-stock-price-movement-with-volatility-multipliers/).
57
+ """)
58
+
59
+ if st.sidebar.button('Run Analysis'):
60
  stock_data = yf.download(ticker, start=start_date, end=end_date)
61
 
62
  if not stock_data.empty: