Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def convert_result_into_dict(index, evaluators, time_frames, risk, score, trades):
return {
TestSuiteResult.INDEX: index,
TestSuiteResult.EVALUATORS: evaluators,
TestSuiteResult.TIME_FRAMES: time_frames,
TestSuiteResult.RISK: risk,
TestSuiteResult.SCORE: score,
TestSuiteResult.AVERAGE_TRADES: trades,
}
def convert_result_into_dict(index, evaluators, time_frames, risk, score, trades):
return {
TestSuiteResult.INDEX: index,
TestSuiteResult.EVALUATORS: evaluators,
TestSuiteResult.TIME_FRAMES: time_frames,
TestSuiteResult.RISK: risk,
TestSuiteResult.SCORE: score,
TestSuiteResult.AVERAGE_TRADES: trades,
}
def convert_result_into_dict(index, evaluators, time_frames, risk, score, trades):
return {
TestSuiteResult.INDEX: index,
TestSuiteResult.EVALUATORS: evaluators,
TestSuiteResult.TIME_FRAMES: time_frames,
TestSuiteResult.RISK: risk,
TestSuiteResult.SCORE: score,
TestSuiteResult.AVERAGE_TRADES: trades,
}
def convert_result_into_dict(index, evaluators, time_frames, risk, score, trades):
return {
TestSuiteResult.INDEX: index,
TestSuiteResult.EVALUATORS: evaluators,
TestSuiteResult.TIME_FRAMES: time_frames,
TestSuiteResult.RISK: risk,
TestSuiteResult.SCORE: score,
TestSuiteResult.AVERAGE_TRADES: trades,
}
def convert_result_into_dict(index, evaluators, time_frames, risk, score, trades):
return {
TestSuiteResult.INDEX: index,
TestSuiteResult.EVALUATORS: evaluators,
TestSuiteResult.TIME_FRAMES: time_frames,
TestSuiteResult.RISK: risk,
TestSuiteResult.SCORE: score,
TestSuiteResult.AVERAGE_TRADES: trades,
}
def convert_result_into_dict(index, evaluators, time_frames, risk, score, trades):
return {
TestSuiteResult.INDEX: index,
TestSuiteResult.EVALUATORS: evaluators,
TestSuiteResult.TIME_FRAMES: time_frames,
TestSuiteResult.RISK: risk,
TestSuiteResult.SCORE: score,
TestSuiteResult.AVERAGE_TRADES: trades,
}
def get_report(self):
# index, evaluators, risk, score, trades
if self.sorted_results_through_all_time_frame:
results = [TestSuiteResult.convert_result_into_dict(rank, result[CONFIG].evaluators, "",
result[CONFIG].risk, result[RANK],
round(result[TRADES_IN_RESULT], 5))
for rank, result in enumerate(self.sorted_results_through_all_time_frame[0:100])]
else:
results = []
return results