eagle0504 commited on
Commit
60697f7
β€’
1 Parent(s): 2254e31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -18
app.py CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2018-2022 Streamlit Inc.
2
  #
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
  # you may not use this file except in compliance with the License.
@@ -17,29 +17,42 @@ import streamlit as st
17
 
18
  def run():
19
  st.set_page_config(
20
- page_title="Hello",
21
- page_icon="πŸ‘‹",
 
22
  )
23
 
24
- st.write("# Welcome to Streamlit! πŸ‘‹")
25
 
26
- st.sidebar.success("Select a demo above.")
27
 
28
  st.markdown(
29
  """
30
- Streamlit is an open-source app framework built specifically for
31
- Machine Learning and Data Science projects.
32
- **πŸ‘ˆ Select a demo from the sidebar** to see some examples
33
- of what Streamlit can do!
34
- ### Want to learn more?
35
- - Check out [streamlit.io](https://streamlit.io)
36
- - Jump into our [documentation](https://docs.streamlit.io)
37
- - Ask a question in our [community
38
- forums](https://discuss.streamlit.io)
39
- ### See more complex demos
40
- - Use a neural net to [analyze the Udacity Self-driving Car Image
41
- Dataset](https://github.com/streamlit/demo-self-driving)
42
- - Explore a [New York City rideshare dataset](https://github.com/streamlit/demo-uber-nyc-pickups)
 
 
 
 
 
 
 
 
 
 
 
 
43
  """
44
  )
45
 
 
1
+ # Copyright Yiqiao Yin.
2
  #
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
  # you may not use this file except in compliance with the License.
 
17
 
18
  def run():
19
  st.set_page_config(
20
+ page_title="Momentum-Strategy",
21
+ page_icon="πŸ’Ή",
22
+ layout="wide"
23
  )
24
 
25
+ st.write("# Welcome to the Momentum Strategy Simulator! πŸ’Ή")
26
 
27
+ st.sidebar.success("Select a language above.")
28
 
29
  st.markdown(
30
  """
31
+ # Stock Return Simulation App
32
+
33
+ This application is a return simulation tool for selected stocks. It allows users to simulate returns based on a momentum strategy using the 4th factor from the Carhart 4-factor model. The application automatically downloads stock data from Yahoo Finance live when the user presses the button, ensuring that the data is always refreshed to the most recent trading day records.
34
+
35
+ ## Usage
36
+
37
+ 1. **Downloading Data**: Click the "Download Data" button to fetch stock data from Yahoo Finance live. This action ensures that the data is up-to-date with the most recent trading day records.
38
+
39
+ 2. **Select Language**: The application supports multiple languages. Simply click on the desired language option on the left-hand side of the interface. The default language is English.
40
+
41
+ 3. **Momentum Strategy**: The application runs a momentum strategy based on the 4th factor from the Carhart 4-factor model. The strategy balances the portfolio once a month. Each month, the strategy selects a portfolio consisting of stocks that have performed the best in the past month in terms of stock growth rate.
42
+
43
+ 4. **Input Custom Stocks**: Users are free to input any stocks they like. Please separate the stock tickers using commas and ensure that the tickers are in capital letters.
44
+
45
+ 5. **No AI Involved**: Please note that there is no artificial intelligence involved in the strategy. It selects the strongest performing stocks based on the most recent records.
46
+
47
+ ## Instructions
48
+
49
+ 1. Click the "Download Data" button to fetch the latest stock data.
50
+ 2. Select your preferred language from the options provided.
51
+ 3. Input your desired stocks into the designated field, separated by commas.
52
+ 4. Explore the simulated returns based on the momentum strategy.
53
+ 5. Repeat the process as needed to adjust your stock selection and language preference.
54
+
55
+ **Note**: This application is for simulation purposes only and does not provide investment advice. Always perform your own research or consult with a financial advisor before making investment decisions.
56
  """
57
  )
58