Add documentation and log to PerformanceFilter

This commit is contained in:
Matthias
2021-10-14 19:33:32 +02:00
parent 07750518c3
commit c02a538187
3 changed files with 17 additions and 5 deletions

View File

@@ -70,7 +70,13 @@ class PerformanceFilter(IPairList):
.fillna(0).sort_values(by=['count', 'pair'], ascending=True)\
.sort_values(by=['profit'], ascending=False)
if self._min_profit is not None:
removed = sorted_df[sorted_df['profit'] < self._min_profit]
for _, row in removed.iterrows():
self.log_once(
f"Removing pair {row['pair']} since {row['profit']} is "
f"below {self._min_profit}", logger.info)
sorted_df = sorted_df[sorted_df['profit'] >= self._min_profit]
pairlist = sorted_df['pair'].tolist()
return pairlist