move backtesting to freqtrade.optimize.backtesting

This commit is contained in:
gcarq
2017-11-24 23:58:35 +01:00
parent 858d2329e5
commit 3b37f77a4d
9 changed files with 80 additions and 102 deletions

View File

@@ -1,16 +1,17 @@
# pragma pylint: disable=missing-docstring
import json
import os
from typing import Optional, List
def load_backtesting_data(ticker_interval: int = 5):
def load_backtesting_data(ticker_interval: int = 5, pairs: Optional[List[str]] = None):
path = os.path.abspath(os.path.dirname(__file__))
result = {}
pairs = [
_pairs = pairs or [
'BTC_BCC', 'BTC_ETH', 'BTC_DASH', 'BTC_POWR', 'BTC_ETC',
'BTC_VTC', 'BTC_WAVES', 'BTC_LSK', 'BTC_XLM', 'BTC_OK',
]
for pair in pairs:
for pair in _pairs:
with open('{abspath}/testdata/{pair}-{ticker_interval}.json'.format(
abspath=path,
pair=pair,