Skip to content

Commit 7ecb5a2

Browse files
committed
Add additional ratios in Overview Tab
1 parent d6c72b9 commit 7ecb5a2

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/ui/layout.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,32 @@ def render_overview(financial_data):
110110
st.write("Open")
111111
st.write("Day High")
112112
st.write("Day Low")
113-
st.write("Bid")
114-
st.write("Ask")
115113
st.write("Volume")
116114
st.write("Market Cap")
115+
st.write("Beta")
116+
st.write("PE Ratio")
117+
st.write("EPS")
118+
st.write("Forward Dividend & Yield")
117119

118120
with values:
119121
st.write(f" **{quotes['previousClose']:,}**")
120122
st.write(f" **{quotes['open']:,}**")
121123
st.write(f" **{quotes['dayHigh']:,}**")
122124
st.write(f" **{quotes['dayLow']:,}**")
123-
st.write(f" **{quotes['bid']:,} x {quotes['bidSize']}**")
124-
st.write(f" **{quotes['ask']:,} x {quotes['askSize']}**")
125125
st.write(f" **{quotes['volume']:,}**")
126126
st.write(f" **{quotes['marketCap']:,}**")
127+
st.write(f" **{quotes['beta']:.3}**")
128+
st.write(f" **{quotes['trailingPE']:.4}**")
129+
st.write(f" **{quotes['trailingEps']:.3}**")
130+
dividend_rate = (
131+
quotes["dividendRate"] if "dividendRate" in quotes.keys() else "0"
132+
)
133+
dividend_yield = (
134+
quotes["dividendYield"] * 100
135+
if "dividendRate" in quotes.keys()
136+
else "0"
137+
)
138+
st.write(f" **{dividend_rate:.2} ({dividend_yield:.2}%)**")
127139

128140
with st.container():
129141
st.markdown("#### Company Profile")

0 commit comments

Comments
 (0)