parent
2f33b97b95
commit
6129c5ca9e
@ -75,7 +75,7 @@ class HyperoptTools():
|
|||||||
if fn:
|
if fn:
|
||||||
HyperoptTools.export_params(params, strategy_name, fn.with_suffix('.json'))
|
HyperoptTools.export_params(params, strategy_name, fn.with_suffix('.json'))
|
||||||
else:
|
else:
|
||||||
logger.warn("Strategy not found, not exporting parameter file.")
|
logger.warning("Strategy not found, not exporting parameter file.")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def has_space(config: Dict[str, Any], space: str) -> bool:
|
def has_space(config: Dict[str, Any], space: str) -> bool:
|
||||||
|
@ -325,8 +325,9 @@ def generate_strategy_stats(btdata: Dict[str, DataFrame],
|
|||||||
key=lambda x: x['profit_sum']) if len(pair_results) > 1 else None
|
key=lambda x: x['profit_sum']) if len(pair_results) > 1 else None
|
||||||
worst_pair = min([pair for pair in pair_results if pair['key'] != 'TOTAL'],
|
worst_pair = min([pair for pair in pair_results if pair['key'] != 'TOTAL'],
|
||||||
key=lambda x: x['profit_sum']) if len(pair_results) > 1 else None
|
key=lambda x: x['profit_sum']) if len(pair_results) > 1 else None
|
||||||
results['open_timestamp'] = results['open_date'].astype(int64) // 1e6
|
if not results.empty:
|
||||||
results['close_timestamp'] = results['close_date'].astype(int64) // 1e6
|
results['open_timestamp'] = results['open_date'].view(int64) // 1e6
|
||||||
|
results['close_timestamp'] = results['close_date'].view(int64) // 1e6
|
||||||
|
|
||||||
backtest_days = (max_date - min_date).days
|
backtest_days = (max_date - min_date).days
|
||||||
strat_stats = {
|
strat_stats = {
|
||||||
|
@ -48,7 +48,7 @@ class OffsetFilter(IPairList):
|
|||||||
"""
|
"""
|
||||||
if self._offset > len(pairlist):
|
if self._offset > len(pairlist):
|
||||||
self.log_once(f"Offset of {self._offset} is larger than " +
|
self.log_once(f"Offset of {self._offset} is larger than " +
|
||||||
f"pair count of {len(pairlist)}", logger.warn)
|
f"pair count of {len(pairlist)}", logger.warning)
|
||||||
pairs = pairlist[self._offset:]
|
pairs = pairlist[self._offset:]
|
||||||
self.log_once(f"Searching {len(pairs)} pairs: {pairs}", logger.info)
|
self.log_once(f"Searching {len(pairs)} pairs: {pairs}", logger.info)
|
||||||
return pairs
|
return pairs
|
||||||
|
@ -761,7 +761,7 @@ class RPC:
|
|||||||
sell_signals = 0
|
sell_signals = 0
|
||||||
if has_content:
|
if has_content:
|
||||||
|
|
||||||
dataframe.loc[:, '__date_ts'] = dataframe.loc[:, 'date'].astype(int64) // 1000 // 1000
|
dataframe.loc[:, '__date_ts'] = dataframe.loc[:, 'date'].view(int64) // 1000 // 1000
|
||||||
# Move open to seperate column when signal for easy plotting
|
# Move open to seperate column when signal for easy plotting
|
||||||
if 'buy' in dataframe.columns:
|
if 'buy' in dataframe.columns:
|
||||||
buy_mask = (dataframe['buy'] == 1)
|
buy_mask = (dataframe['buy'] == 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user