-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.py
79 lines (64 loc) · 1.83 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import streamlit as st
import streamlit.components.v1 as components
from show import show_exchange
import configurations as config
st.set_page_config(layout="wide", page_title="Random Stock Picker")
st.title("Random Stock Picker 📈 ")
# hide menu
st.markdown(
"""
<style>
#MainMenu {visibility: hidden;}
</style>
""",
unsafe_allow_html=True,
)
# hide metric arrow
st.write(
"""
<style>
[data-testid="stMetricDelta"] svg {
display: none;
}
</style>
""",
unsafe_allow_html=True,
)
stock_exchange_option = st.selectbox(
"Stock exchange: ", map(lambda x: x.get("display"), config.stock_exchanges.values())
)
refresh_btn = st.button("Pick another Random Stock", key="refresher1")
refresh_btn = True
while refresh_btn:
refresh_btn = False
exchange = config.display_2_exchange.get(stock_exchange_option)
show_exchange(st, components, exchange)
refresh_btn = st.button("Pick another Random Stock", key="refresher2")
st.markdown("""---""")
st.info(
"""
👉 Buy your own stocks from
[Groww](https://groww.app.link/refe/kuldeep8939658), [IndMoney](https://indmoney.onelink.me/RmHC/81a4b732), [Zerodha](https://zerodha.com/?c=NO1458)
"""
)
st.success(
"""
Share this page:
https://share.streamlit.io/singhsidhukuldeep/random-stock-picker/main/app.py
"""
)
with st.expander("How this works"):
st.info(
"""
There has been ample study where absolutely random selection beats
the stock picks/portfolios created by experts
So just trying that ¯\_(ツ)_/¯
"""
)
with st.expander("Where is the source code"):
st.info(
"""
⭐Star⭐ the code at:
https://github.com/singhsidhukuldeep/random-stock-picker
"""
)