-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
184 lines (140 loc) · 5.52 KB
/
app.py
File metadata and controls
184 lines (140 loc) · 5.52 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
import streamlit as st
from utils.constants import BANK_TICKERS
# ==================================================
# =============== PAGE CONFIG ======================
# ==================================================
st.set_page_config(
page_title="FINA | Financial Intelligence & Analytics",
layout="wide"
)
st.sidebar.image("assets/NMIMS_B.png", use_container_width=True)
st.sidebar.markdown("---")
# ==================================================
# =============== HIDE DEFAULT NAV =================
# ==================================================
st.markdown("""
<style>
section[data-testid="stSidebarNav"] {
display: none;
}
</style>
""", unsafe_allow_html=True)
# ==================================================
# =============== SESSION STATE ====================
# ==================================================
if "banks" not in st.session_state:
st.session_state.banks = []
if "mode" not in st.session_state:
st.session_state.mode = None
# ==================================================
# ================= BRANDING =======================
# ==================================================
col1,col1a, col2,col3a, col3 = st.columns([1,1, 2,1, 1])
with col2:
st.image("assets/NMIMS_B.png", use_container_width=True)
# ---- Banner ----
st.image("assets/Banner.png", use_container_width=True)
# ---- Logo + Title ----
col_logo, col_title = st.columns([1, 5])
# with col_logo:
# st.image("assets/NMIMS_B.png", width=120)
st.set_page_config(
page_title="Financial Analytics Platform",
layout="wide"
)
st.title("⭕ FINA - A Financial Analytics Platform")
st.caption("An integrated platform for portfolio construction, trading, and financial econometrics")
st.markdown(
"An integrated platform for portfolio construction, volatility-aware trading, "
"and financial econometrics."
)
st.divider()
# ==================================================
# =============== BANK SELECTION ===================
# ==================================================
st.subheader("Step 1: Select Companies")
selected_banks = st.multiselect(
"Choose companies for analysis",
options=list(BANK_TICKERS.keys()),
default=st.session_state.banks,
key="bank_selector"
)
st.session_state.banks = selected_banks
if st.session_state.banks:
st.success(f"🟠 {len(st.session_state.banks)} companies(s) selected")
st.divider()
# ==================================================
# =============== OBJECTIVE SELECTION ==============
# ==================================================
st.subheader("Step 2: Choose Objective")
col1, col2, col3 = st.columns(3)
# ---------------- Long-Term ----------------
with col1:
st.markdown("### 🟠 Long-Term Investing")
st.caption("Portfolio optimisation & asset allocation")
if st.button("📈 Go to Portfolio Optimisation", use_container_width=True):
if not st.session_state.banks:
st.warning("Please select at least one Org.")
else:
st.session_state.mode = "long_term"
st.switch_page("pages/2_Portfolio_Optimisation.py")
# ---------------- Trading ----------------
with col2:
st.markdown("### 🔴 Active Trading")
st.caption("Volatility → GARCH → Trading signals")
if st.button("🤖 Go to Trading", use_container_width=True):
if not st.session_state.banks:
st.warning("Please select at least one Org.")
else:
st.session_state.mode = "trading"
st.switch_page("pages/4_GARCH_Volatility.py")
# ---------------- Advanced ----------------
with col3:
st.markdown("### 🔴 Advanced Analytics")
st.caption("VAR, VECM, DLM & system dynamics")
if st.button("🔬 Go to Advanced Analysis", use_container_width=True):
if len(st.session_state.banks) < 2:
st.warning("Please select at least two Orgs.")
else:
st.session_state.mode = "advanced"
st.switch_page("pages/3_VAR_VECM.py")
# ==================================================
# ================= STATUS =========================
# ==================================================
if st.session_state.banks:
st.info(f"**Selected Companies:** {', '.join(st.session_state.banks)}")
# ==================================================
# ================= FOOTER =========================
# ==================================================
# st.markdown("---")
# if st.session_state.banks:
# st.info(f"**Selected Companies:** {', '.join(st.session_state.banks)}")
st.markdown("""
---
### 🧭 How to use this platform
- **Long-Term Investing** → Portfolio Optimisation
- **Active Trading** → Volatility modelling → Algorithmic strategies
- **Advanced Analytics** → VAR, VECM & Distributed Lag Models
Your selected Companies persist across modules.
""")
st.markdown("---")
# import streamlit as st
import pandas as pd
st.subheader("👥 Team – FINA")
team_df = pd.DataFrame([
["Joshith Reddy Gopidi", "joshithreddy.gopidi837@nmims.in"],
["Kavya T", "kavya.t701@nmims.in"],
["Sidharth Prakash", "sidharth.prakash383@nmims.in"],
["Sabarimayurnath U", "sabarimayurnath.u139@nmims.in"],
["Narendhran", "narendhran.171@nmims.in"],
["Vaishnavi Rajkumar", "vaishnavi.rajkumar320@nmims.in"],
], columns=["Name", "Email"])
st.table(team_df)
st.markdown(
"""
**Programme:** MBA
**Institution:** SVKM’s Narsee Monjee Institute of Management Studies (NMIMS)
**Project:** Financial Analytics Capstone – **FINA** \n
**Mentor:** Dr. Neha Chhabra Roy (Neha.ChhabraRoy@nmims.edu)
"""
)