plotguy 2.3.5__tar.gz → 2.3.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotguy
3
- Version: 2.3.5
3
+ Version: 2.3.7
4
4
  Summary: Plotguy
5
5
  Home-page: https://pypi.org/project/plotguy/
6
6
  Author: Plotguy Team
@@ -214,7 +214,7 @@ def save_backtest_result(df, para_combination_item):
214
214
  equity_mdd_pct = 0
215
215
 
216
216
  return_on_capital_diff = 0
217
-
217
+
218
218
  num_of_win = 0
219
219
  num_of_trade = 0
220
220
  win_rate = 0
@@ -571,12 +571,12 @@ def su_table_converter():
571
571
  para_items_str += para_key + '=' + para_value + '|'
572
572
  para_items_str = para_items_str[:-1]
573
573
 
574
- su_dict['backtest_name'].append(backtest_name)
575
- su_dict['code'].append(code)
576
- su_dict['freq'].append(freq)
577
- su_dict['para_items_str'].append(para_items_str)
578
- su_dict['equity_mdd_pct'].append(equity_mdd_pct)
579
- su_dict['initial_capital'].append(initial_capital)
574
+ su_dict['backtest_name'].append(backtest_name)
575
+ su_dict['code'].append(code)
576
+ su_dict['freq'].append(freq)
577
+ su_dict['para_items_str'].append(para_items_str)
578
+ su_dict['equity_mdd_pct'].append(equity_mdd_pct)
579
+ su_dict['initial_capital'].append(initial_capital)
580
580
 
581
581
  su_table = pd.DataFrame(su_dict)
582
582
  return su_table
@@ -1002,7 +1002,10 @@ class Components:
1002
1002
  year_count.append(int(total_dict[f'{year} Count']))
1003
1003
  year_count_col.append(html.Div(int(total_dict[f'{year} Count'])))
1004
1004
 
1005
- rate = total_dict[f'{year} Win Count']/total_dict[f'{year} Count']
1005
+ if total_dict[f'{year} Win Count'] > 0:
1006
+ rate = total_dict[f'{year} Win Count']/total_dict[f'{year} Count']
1007
+ else:
1008
+ rate = 0
1006
1009
  year_win_rate_col.append(html.Div( "{:.0%}".format(rate) ))
1007
1010
 
1008
1011
  year_return = total_dict[f'{year}_return']
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotguy
3
- Version: 2.3.5
3
+ Version: 2.3.7
4
4
  Summary: Plotguy
5
5
  Home-page: https://pypi.org/project/plotguy/
6
6
  Author: Plotguy Team
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="plotguy",
8
- version="2.3.5",
8
+ version="2.3.7",
9
9
  author="Plotguy Team",
10
10
  author_email="plotguy.info@gmail.com",
11
11
  description="Plotguy",
File without changes
File without changes
File without changes
File without changes