plotguy 2.1.2__tar.gz → 2.1.3__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.1.2
3
+ Version: 2.1.3
4
4
  Summary: Plotguy
5
5
  Home-page: https://pypi.org/project/plotguy/
6
6
  Author: Plotguy Team
@@ -160,7 +160,6 @@ def save_backtest_result(df, para_combination_item):
160
160
 
161
161
  if len(df_count) == 0:
162
162
  num_of_trade = 0
163
-
164
163
  equity_net_profit = 0
165
164
  equity_return_on_capital = 0
166
165
  equity_annualized_return = 0
@@ -179,6 +178,15 @@ def save_backtest_result(df, para_combination_item):
179
178
  cov_count = 0
180
179
  total_commission = 0
181
180
 
181
+ start_year = df.index[0].year
182
+ end_year = df.index[-1].year
183
+
184
+ yearly_stats_string = ''
185
+ for year in range(start_year, end_year + 1):
186
+ yearly_stats_string += f'{year},year_trade_count:0.00,year_win_rate:00.00,year_return:-00.00|'
187
+
188
+ yearly_stats_string = yearly_stats_string[:-1]
189
+
182
190
  elif len(df_count) > 0:
183
191
 
184
192
  ########### by year count, win rate and return ###############
@@ -281,7 +289,6 @@ def save_backtest_result(df, para_combination_item):
281
289
  'equity_annualized_std': equity_annualized_std,
282
290
  'equity_annualized_sr': equity_annualized_sr,
283
291
  'equity_net_profit_to_mdd': equity_net_profit_to_mdd,
284
-
285
292
  'equity_mdd_dollar': equity_mdd_dollar,
286
293
  'equity_mdd_pct': equity_mdd_pct,
287
294
 
@@ -291,7 +298,6 @@ def save_backtest_result(df, para_combination_item):
291
298
  'price_annualized_std': price_annualized_std,
292
299
  'price_annualized_sr': price_annualized_sr,
293
300
  'price_net_profit_to_mdd': price_net_profit_to_mdd,
294
-
295
301
  'price_mdd_dollar': price_mdd_dollar,
296
302
  'price_mdd_pct': price_mdd_pct,
297
303
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotguy
3
- Version: 2.1.2
3
+ Version: 2.1.3
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.1.2",
8
+ version="2.1.3",
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
File without changes