diff --git a/main.py b/main.py index ce7ef52..b041e69 100644 --- a/main.py +++ b/main.py @@ -20,8 +20,8 @@ pd.options.plotting.backend = "plotly" # PARAMETERS CONFIGS = { - # "ENV": "development", - # "DEBUG": True, + "ENV": "development", + "DEBUG": True, "SECRET_KEY": os.urandom(30), # Set the secret key for session authentication "PERMANENT_SESSION_LIFETIME": timedelta(minutes=60) } diff --git a/static/js/addStock.js b/static/js/addStock.js index e4db9be..ce6b3c7 100644 --- a/static/js/addStock.js +++ b/static/js/addStock.js @@ -1,11 +1,10 @@ // Initialize empty stock list let stockList = ['2330.TW']; let currentList = []; -const layout={'autosize': true, 'legend': {'title': {'text': ''}, - 'tracegroupgap': 0}, 'title': {'text': 'Assets'}, 'xaxis': {'anchor': 'y', 'domain': [0.0, 1.0], - 'title': {'text': 'Date'}, 'rangeslider': {'visible': true}}, - 'yaxis': {'anchor': 'x', 'domain': [0.0, 1.0], 'title': {'text': 'Price'}}, - 'legend': {'yanchor': 'top', 'y': 1.3, 'xanchor': 'left', 'x': 0.01}, 'margin': {'l': 40, 'r': 40, 't': 40, 'b': 40}, +const layout={'autosize': true, 'title': {'text': 'Assets'}, + 'xaxis': {'anchor': 'y', 'domain': [0.0, 1.0], 'rangeslider': {'visible': true}}, + 'yaxis': {'anchor': 'x', 'domain': [0.0, 1.0]}, + 'legend': {'yanchor': 'top', 'y': 1.3, 'xanchor': 'left', 'x': 0.01}, 'margin': {'l': 25, 'r': 5, 't': 10, 'b': 5}, } // Cache frequently-used DOM elements const $stockForm = $('#stock-form'); diff --git a/templates/strategy_tw.html b/templates/strategy_tw.html index 7dce183..8e9fc72 100644 --- a/templates/strategy_tw.html +++ b/templates/strategy_tw.html @@ -35,180 +35,177 @@ div.card{ {% endblock style %} {% block content %} -
-
-
-
- -
- -
- {% if session.tw == 1 %}台股{% endif %}投資組合建立指南
-
    -
  1. 輸入投資組合名稱
  2. -
  3. 選擇所參加的課程或競賽
  4. -
  5. 選擇資產後按下加入
  6. -
  7. 確認資產後按下確認資產後, 查看資產價格動態圖表
  8. -
  9. 選擇建立策略相關參數
  10. -
  11. 確認後按下確認建立後, 查看回傳訊息
  12. -
- -
+
+
+
+ +
+ +
+ {% if session.tw == 1 %}台股{% endif %}投資組合建立指南
+
    +
  1. 輸入投資組合名稱
  2. +
  3. 選擇所參加的課程或競賽
  4. +
  5. 選擇資產後按下加入
  6. +
  7. 確認資產後按下確認資產後, 查看資產價格動態圖表
  8. +
  9. 選擇建立策略相關參數
  10. +
  11. 確認後按下確認建立後, 查看回傳訊息
  12. +
+
-
-
- 投資組合名稱 -
-
- -
+
+
+
+ 投資組合名稱
-
-
- 請選擇所參加的課程/競賽 -
-
- -
- +
+ +
+
+
+
+ 請選擇所參加的課程/競賽 +
+
+
-
- -
-
-
- 已選擇的資產 -
-
- - -
+
+
+ + +
+
+
+ 已選擇的資產
-
- - - 美股 - {% if session.tw==0 %} - {% for key, data in data_us.items() -%} - - {% endfor %} - {% endif %} - {% for key, data in data_tw.items() -%} - - {% endfor %} - -
-
-
    -
  1. - 2330.TW - - - -
  2. -
-
-
-
-
- 價格動態圖表 -
-
- -
-
-
-
- - 按下 - - 後,圖表將在此渲染。 - -
-
+
+ + + {% if session.tw==0 %} + {% for key, data in data_us.items() -%} + + {% endfor %} + {% endif %} + {% for key, data in data_tw.items() -%} + + {% endfor %} + +
-
-
策略參數選擇
-
- 訓練 / 回測數據比 - +
    +
  1. + 2330.TW + + + +
  2. +
+
+
+
+
+
+ 價格動態圖表
-
- 最佳化目標函數 - +
+
- - -