eagle0504 commited on
Commit
2d2132b
1 Parent(s): 567b0a8

ui updated

Browse files
Files changed (1) hide show
  1. utils/ui_helper.py +14 -14
utils/ui_helper.py CHANGED
@@ -168,6 +168,14 @@ def main_algo_trader():
168
  col1, col2 = st.columns(2)
169
 
170
  with col1:
 
 
 
 
 
 
 
 
171
  # Download
172
  st.download_button(
173
  label="Download data as CSV",
@@ -176,14 +184,6 @@ def main_algo_trader():
176
  mime="text/csv",
177
  )
178
 
179
- with col2:
180
- # Checkpoint: ask user whether they want portfolio weights
181
- if csv:
182
- recent_selected_stocks = df["portfolio_history"][-1]
183
- st.success(
184
- f"The algorithm suggests to hold the following stocks for the current month (equally weighted): {recent_selected_stocks}"
185
- )
186
-
187
 
188
  # chinese
189
  def main_algo_trader_chinese():
@@ -344,6 +344,12 @@ def main_algo_trader_chinese():
344
  col1, col2 = st.columns(2)
345
 
346
  with col1:
 
 
 
 
 
 
347
  # Download
348
  st.download_button(
349
  label="下载数据为CSV格式",
@@ -351,9 +357,3 @@ def main_algo_trader_chinese():
351
  file_name=f"history_{end_date}.csv",
352
  mime="text/csv",
353
  )
354
-
355
- with col2:
356
- # Checkpoint: ask user whether they want portfolio weights
357
- if csv:
358
- recent_selected_stocks = df["portfolio_history"][-1]
359
- st.success(f"算法建议在本月持有以下股票(均仓位): {recent_selected_stocks}")
 
168
  col1, col2 = st.columns(2)
169
 
170
  with col1:
171
+ # Checkpoint: ask user whether they want portfolio weights
172
+ if csv:
173
+ recent_selected_stocks = df["portfolio_history"][-1]
174
+ st.success(
175
+ f"The algorithm suggests to hold the following stocks for the current month (equally weighted): {recent_selected_stocks}"
176
+ )
177
+
178
+ with col2:
179
  # Download
180
  st.download_button(
181
  label="Download data as CSV",
 
184
  mime="text/csv",
185
  )
186
 
 
 
 
 
 
 
 
 
187
 
188
  # chinese
189
  def main_algo_trader_chinese():
 
344
  col1, col2 = st.columns(2)
345
 
346
  with col1:
347
+ # Checkpoint: ask user whether they want portfolio weights
348
+ if csv:
349
+ recent_selected_stocks = df["portfolio_history"][-1]
350
+ st.success(f"算法建议在本月持有以下股票(均仓位): {recent_selected_stocks}")
351
+
352
+ with col2:
353
  # Download
354
  st.download_button(
355
  label="下载数据为CSV格式",
 
357
  file_name=f"history_{end_date}.csv",
358
  mime="text/csv",
359
  )