Commit Graph

362 Commits

Author SHA1 Message Date
Janne Sinivirta
8272120c3a convert stoploss and ROI search spaces to skopt format 2018-06-23 14:37:36 +03:00
Janne Sinivirta
8fee2e2409 move result logging out from optimizer 2018-06-23 14:37:36 +03:00
Janne Sinivirta
c415014153 use multiple jobs in acq 2018-06-23 14:37:36 +03:00
Janne Sinivirta
964cbdc262 increase initial sampling points 2018-06-23 14:37:36 +03:00
Janne Sinivirta
a46badd5c0 reuse pool workers 2018-06-23 14:37:36 +03:00
Janne Sinivirta
0cb1aedf5b problem with pickling 2018-06-23 14:37:36 +03:00
Janne Sinivirta
b485e6e0ba start small 2018-06-23 14:37:36 +03:00
gcarq
78f50a1471 move logic from hyperopt to freqtrade.strategy 2018-06-23 14:37:36 +03:00
gcarq
5aae215c94 wrap strategies with HyperoptStrategy for module lookups with pickle 2018-06-23 14:37:36 +03:00
Janne Sinivirta
a68c90c512 avoid calling exchange.get_fee inside loop 2018-06-23 14:37:36 +03:00
gcarq
c40e6a12d1 move logic from hyperopt to freqtrade.strategy 2018-06-23 11:13:49 +02:00
gcarq
3360bf4001 wrap strategies with HyperoptStrategy for module lookups with pickle 2018-06-23 10:42:33 +02:00
Janne Sinivirta
c73b9f5c77 avoid calling exchange.get_fee inside loop 2018-06-22 21:04:07 +03:00
xmatthias
251f7db3ca require exchange object to delete pairs 2018-06-17 23:38:07 +02:00
xmatthias
21edcbdc27 Refactor exchange to class 2018-06-17 23:38:07 +02:00
Anton
ae94ab17f4 Merge branch 'develop' into feature-unlimited-stake_amount 2018-06-17 02:23:40 +03:00
Matthias
a5511e2e30
Merge pull request #894 from freqtrade/feature/force_close_backtest
Display open trades after backtest period
2018-06-16 12:49:08 +02:00
Janne Sinivirta
0c85febe76 remove all mongodb related code 2018-06-16 09:09:28 +03:00
Janne Sinivirta
c1f8f641e6 remove use of hyperopt_conf.py 2018-06-16 09:09:28 +03:00
xmatthias
c0289ad844 use list comprehension to build list 2018-06-13 19:53:12 +02:00
xmatthias
e600be4f56 Reduce force-sell verbosity 2018-06-13 19:44:00 +02:00
xmatthias
6357812743 fix backtest report able 2018-06-13 06:57:49 +02:00
xmatthias
e3ced7c15e extract export from backtest function 2018-06-12 22:29:30 +02:00
xmatthias
bfde33c945 Use timestamp() instead of strftime
this will avoid a bug shifting epoch time by 1 hour:
https://stackoverflow.com/questions/11743019/convert-python-datetime-to-epoch-with-strftime
2018-06-12 21:12:55 +02:00
xmatthias
335d1fbbbc Check if no backtest data is found and fail gracefully 2018-06-11 19:50:43 +02:00
Anton
ce663f6af5 Merge with develop 2018-06-11 16:25:05 +03:00
xmatthias
12e455cbf5 add buy/sell index to backtest result 2018-06-10 20:52:42 +02:00
xmatthias
4710210cff fix hyperopt to use new backtesting result tuple 2018-06-10 13:56:10 +02:00
xmatthias
27ee8f7360 make flake happy 2018-06-10 13:55:48 +02:00
xmatthias
1cd7ac55a8 Added "left open trades" report 2018-06-10 13:45:16 +02:00
xmatthias
b81588307f Add "open_at_end" parameter 2018-06-10 13:37:53 +02:00
xmatthias
31025216f9 fix type of open/close timestmap 2018-06-10 13:32:07 +02:00
xmatthias
322a528c12 fix bug with backtestResult 2018-06-10 13:25:16 +02:00
xmatthias
9c57d3aa8b add BacktestresultTuple 2018-06-10 13:15:46 +02:00
xmatthias
c1b2e06eda simplify return from _get_sell_trade_entry 2018-06-10 09:07:04 +02:00
xmatthias
3094acc7fb update comment 2018-06-10 08:58:28 +02:00
xmatthias
24a875ed46 remove experimental parameters - they are read by analyze.py anyway 2018-06-09 21:44:57 +02:00
xmatthias
5623ea3ac6 Add forcesell at end of backtest period 2018-06-09 21:44:20 +02:00
xmatthias
8effc5f929 fix windows-specific init issue with named tuple 2018-06-08 19:46:07 +02:00
Anton
b4138f29c8 Merge with develop 2018-06-08 00:29:44 +03:00
Janne Sinivirta
b4ae5a36a8 use .copy() to avoid Pandas mistake. drop first row because of shifting 2018-06-07 17:29:40 +03:00
Janne Sinivirta
7f8e0ba25f use buy/sell signal from previous candle, not current to avoid seeing to the future 2018-06-07 17:28:40 +03:00
xmatthias
f37c5b70ba Fix tests - read optional argument 2018-06-05 23:53:49 +02:00
xmatthias
7a34578b4d refactor timerange to named tuple 2018-06-05 23:34:26 +02:00
Anton
87f750da35 Merge with develop 2018-06-04 01:50:10 +03:00
xmatthias
e3227a741c add --export-filename for backtesting 2018-06-03 19:36:53 +02:00
xmatthias
50fc5f91ca Merge branch 'develop' into mypy_typecheck 2018-06-03 10:35:56 +02:00
Janne Sinivirta
a657e3d24a
Merge pull request #826 from gcarq/fix/hyperopt-stake_currency
Fix stake_currency returned by Hyperopt  …
2018-06-03 07:19:24 +03:00
Janne Sinivirta
2cd8782a88
Merge pull request #825 from gcarq/fix/hyperopt-in-progress
Fix the in-progress dot that does not show up during a Hyperopt run
2018-06-03 07:16:39 +03:00
Gerald Lonlas
fe8ff1b929 Fix stake_currency return by Hyperopt
Hyperopt had BTC hard coded in the result. This commit  will display
the real stake_currency used.

If you used `"stake_currency": "USDT",` in your config file.
Before this commit you saw a message like:
"2 trades. Avg profit  0.13%. Total profit  0.00002651 BTC (0.0027Σ%). Avg duration 142.5 mins."

Now with the commit, we fix the wrong BTC currency:
"2 trades. Avg profit  0.13%. Total profit  0.00002651 USDT (0.0027Σ%). Avg duration 142.5 mins."
2018-06-02 14:07:31 -07:00
Gerald Lonlas
127cf5d619 Backtesting: Add the Interval required when data is missing
Change the message:
"No data for pair ETH/BTC, use --refresh-pairs-cached to download the data"
for:
"No data for pair: "ETH/BTC", Interval: 5m. Use --refresh-pairs-cached to download the data"

The message structure is unified with the download message:
"Download the pair: "ETH/BTC", Interval: 5m"
2018-06-02 13:55:05 -07:00
Gerald Lonlas
dc65753a64 Fix the in-progress dot that does not show up during a Hyperopt run 2018-06-02 12:35:07 -07:00
Raymond Luo
2791d543ea Make backtesting report markdown shareable
Small tweak to make the backtesting report markdown ready and much easier to share reports on many markdown publishing tools and editors that already support Markdown Extra with just a copy and paste

Example:
![Example](https://i.imgur.com/HXlNkfm.png)
2018-06-02 19:52:16 +02:00
xmatthias
f88729f0e8 add ignore comment 2018-06-02 14:14:28 +02:00
xmatthias
3447e4bb97 comment on ignore hint 2018-06-02 14:13:17 +02:00
xmatthias
0007002c80 fix test failure 2018-06-02 14:07:54 +02:00
xmatthias
0a595190a3 fix last typechecks 2018-06-02 13:59:35 +02:00
xmatthias
d9e951447f remove _init function in backtesting (and according test) 2018-06-02 13:54:22 +02:00
xmatthias
4a322abd4d Typecheck improvements 2018-06-02 13:44:05 +02:00
Gerald Lonlas
792dd556a1 Fix wrong hint '--update-pairs-cached' from Backtesting/Hyperopt 2018-06-01 19:46:53 -07:00
xmatthias
3fb1dd02f1 add typehints and type: ignores 2018-05-31 22:00:46 +02:00
xmatthias
45909af7e0 type anotation fixes 2018-05-30 22:38:09 +02:00
Anton
3427c7eb54 Use constants 2018-05-25 17:04:08 +03:00
Anton
9be98cd8f7 Add ability to set unlimited stake_amount 2018-05-23 13:15:03 +03:00
Anton
8c22cfce37 Fix tests; fix codestyle 2018-05-21 23:15:01 +03:00
Anton
e1cb0dbf28 Do not try to redownload pair data if --refresh-pairs-cached is not set 2018-05-21 22:31:08 +03:00
Anton
2bfce64e6a Fix conflicts 2018-05-04 13:38:51 +03:00
Anton
ceeb98dda9 Fix conflicts 2018-05-03 11:16:29 +03:00
gcarq
306885e174 Merge branch 'develop' into feat/objectify-ccxt 2018-05-02 22:49:55 +02:00
Anton
24ab1b5be5 Fix review comments, documenation update 2018-05-01 00:27:05 +03:00
Anton
a127e1db07 Fix case with empty dict 2018-04-28 01:40:48 +03:00
Anton
2267a420a4 Fix codestyle 2018-04-28 00:30:42 +03:00
Anton
82ea56c8fd Fix review comments. Add support of datetime timeganges 2018-04-28 00:16:34 +03:00
Matthias Voppichler
a140748b5a Merge branch 'feat/objectify-ccxt' into cxxt_obj_sellfix 2018-04-21 22:39:22 +02:00
gcarq
f4077a51c1 log hyperopt progress to stdout instead to the logger 2018-04-21 20:52:01 +02:00
gcarq
403f59ef45 use native python logger 2018-04-21 20:47:06 +02:00
Matthias Voppichler
ce90ee4ac2 have backtesting use fee_open and fee_close 2018-04-21 20:05:49 +02:00
enenn
94287d66a8 Flake8 fixes 2018-04-12 18:16:27 +02:00
enenn
1678518cd4 Add dry_run=True to config during backtesting 2018-04-12 18:16:26 +02:00
enenn
e42403fecc Change date to timestamp conversion method in backtesting 2018-04-12 18:07:44 +02:00
enenn
db46ad6502 Change ticker interval from minutes as integer to string (1m, 5m, 1h,...) 2018-04-07 16:57:47 +02:00
enenn
c1c6ed6ed7 Replace 'BTC_XXX' with 'XXX/BTC' for pairs and 'XXX_BTC' for files 2018-04-07 16:51:50 +02:00
enenn
1f75636e56 [1/3] Add support for multiple exchanges with ccxt (objectified version) (#585)
* remove obsolete helper functions and make _state a public member.

* remove function assertions

* revert worker() changes

* Update pytest from 3.4.2 to 3.5.0

* Adapt exchange functions to ccxt API
Remove get_market_summaries and get_wallet_health, add exception handling

* Add NetworkException

* Change pair format in constants.py

* Add tests for exchange functions that comply with ccxt

* Remove bittrex tests

* Remove Bittrex and Interface classes

* Add retrier decorator

* Remove cache from get_ticker

* Remove unused and duplicate imports

* Add keyword arguments for get_fee

* Implement 'get_pair_detail_url'

* Change get_ticker_history format to ccxt format

* Fix exchange urls dict, don't need to initialize exchanges

* Add "Using Exchange ..." logging line
2018-04-06 10:57:08 +03:00
gcarq
fee8d0a2e1 refactor get_timeframe 2018-03-29 20:16:25 +02:00
gcarq
702402e1fe simplify download_backtesting_testdata 2018-03-29 20:15:32 +02:00
Janne Sinivirta
85a81b18a3
Merge pull request #586 from xmatthias/obj_backtest_pr2
fix backtest --export format
2018-03-27 12:43:52 +03:00
Matthias Voppichler
a182cab27f fix backtest --export format
reverts regression introduced in c623564
2018-03-26 20:28:51 +02:00
gcarq
611bb52d1f log hyperopt progress to stdout instead to the logger 2018-03-25 22:57:40 +02:00
gcarq
f374a062e1 remove freqtrade/logger.py 2018-03-25 21:43:00 +02:00
gcarq
fa7f74b4bc use native python logger 2018-03-25 21:43:00 +02:00
gcarq
3f8d7dae39 make name a required argument and add fallback to getEffectiveLevel 2018-03-25 21:42:03 +02:00
Matthias Voppichler
f51ef1a791 refactor format_ms_time to misc.py 2018-03-25 13:38:50 +02:00
Matthias Voppichler
016232a8e9 Revert OHLVC dataformat to ccxt format
* Also fixes backtesting - but data must be refreshed for now as no
conversation is happening yet
2018-03-25 13:32:46 +02:00
Matthias Voppichler
85af68d807 ccxt - make backtesting work 2018-03-24 19:45:23 +01:00
Samuel Husso
eb4ac73b78 remove last bittrex references so that bot is runnable 2018-03-22 08:29:52 +02:00
gcarq
d2aea7bdc1 optimize imports 2018-03-20 19:50:04 +01:00
gcarq
5327533188 optimize: set correct typehints 2018-03-20 19:48:03 +01:00
gcarq
a6a38735b1 backtesting: only respect max_open_trades with realistic_simulation 2018-03-20 19:38:33 +01:00
gcarq
93931eb32b fix typo in _generate_text_table 2018-03-19 23:05:12 +01:00
Gerald Lonlas
0bb7cc8ab5 Hyperopt: fix 'Ran out of input' error 2018-03-05 20:49:45 -08:00
Gerald Lonlas
de468c6fc8 Fix wrong realistic_simulation implementation in Hyperopt 2018-03-04 02:31:25 -08:00
Gerald Lonlas
6fcc173489 Merge commit '35c51c73f713bfdb81bd84721f3dceab0c19e819' into feature/objectify 2018-03-04 01:33:39 -08:00
Gerald Lonlas
bb1e38f584 Merge commit '8eed9c08a6cffdd7c6b43fa3db2c3e08d1657f43' into feature/objectify 2018-03-04 01:01:19 -08:00
Gerald Lonlas
2001c20426 Merge commit '028700d86f130d5c3cbfef4e422dc701340f58c9' into feature/objectify 2018-03-04 00:53:27 -08:00
Gerald Lonlas
722ed48d9d Merge commit 'e3d222912dfd775b7456a44d6d6055430711f251' into feature/objectify 2018-03-04 00:51:22 -08:00
Gerald Lonlas
38510d4b03 Merge commit '1134c81aad049d4357c8f299ffc801218f3d9574' into feature/objectify 2018-03-03 17:26:06 -08:00
Gerald Lonlas
84759073d9 Refactor Configuration() to apply common configurations all the time and to remove show_info 2018-03-03 13:43:14 -08:00
Gerald Lonlas
0632cf0f44 Merge commit 'aa7aeb046ef72412cadd094666efc8e4c503ef2d' into feature/objectify 2018-03-02 23:28:36 -08:00
Gerald Lonlas
bbb1a31fda Merge commit 'c5400b6c37c7de64a86c9db39a4d0fa9169b35f6' into feature/objectify 2018-03-03 10:01:06 +08:00
Gerald Lonlas
390501bac0 Make Pylint Happy chapter 1 2018-03-03 09:33:54 +08:00
Gerald Lonlas
d274f13480 Remove Memory profiler in Backtesting 2018-03-03 09:33:54 +08:00
Gerald Lonlas
8bd0f4d0d7 Remove ugly pprints 2018-03-03 09:33:54 +08:00
Gerald Lonlas
6ef7b7d93d Complete Backtesting and Hyperopt unit tests 2018-03-03 09:33:54 +08:00
Gerald Lonlas
1d251d6151 Move Backtesting to a class and add unit tests 2018-03-03 09:33:54 +08:00
Samuel Husso
35c51c73f7
Merge pull request #518 from gcarq/cleaning_up_backtesting
Cleaning up backtesting/hyperopt
2018-02-18 10:18:00 +02:00
Janne Sinivirta
fac122891f remove stoploss parameter from backtest, it is loaded from strategy 2018-02-17 11:14:03 +02:00
Janne Sinivirta
d1bdbcd273
Fix wrong duration calculation in hyperopting 2018-02-16 22:08:20 +02:00
Janne Sinivirta
bf72b5bc37 make args available for optimizer and use them instead of guessing from params 2018-02-16 14:00:12 +02:00
Janne Sinivirta
f64c8cc9ce realistic should be False by default and enabled with a --realistic-simulation flag 2018-02-15 13:11:17 +02:00
Janne Sinivirta
a1ba57186b correctly join paths and debug log the found results 2018-02-15 08:59:02 +02:00
Samuel Husso
e3d222912d
Merge pull request #511 from gcarq/hyperopt_selectable_spaces
Allow selecting Hyperopt search space
2018-02-12 08:28:24 +02:00
Janne Sinivirta
3e07d41fa9 remove mention of sell space 2018-02-12 07:01:51 +02:00
Janne Sinivirta
2ce03ab1b5 make Strategy store roi and stoploss values as numbers to avoid later casting 2018-02-11 15:25:30 +02:00
Janne Sinivirta
2dd2f31431 remove repeated condition 2018-02-11 14:31:37 +02:00
Janne Sinivirta
dc105d5eae better names for row variables 2018-02-11 14:24:19 +02:00
Janne Sinivirta
c62356438a loop over arrays instead of dataframes 2018-02-11 14:18:57 +02:00
Janne Sinivirta
f14d6249e0 allow selecting hyperopt searchspace 2018-02-09 20:59:06 +02:00
kryofly
12a19e400f tests: more backtesting testing (#496)
* tests: more backtesting testing

* tests: hyperopt

* tests: document kludge

* tests: improve test_dataframe_correct_length

* tests: remove remarks
2018-02-08 21:49:43 +02:00
Janne Sinivirta
a28ffcbcf7 remove slow unnecessary table scan 2018-02-06 21:21:47 +02:00
Janne Sinivirta
a071571eac switch to faster short circuiting condition 2018-02-06 12:13:12 +02:00
Janne Sinivirta
5cf2dd79f2 don't reset index if not needed 2018-02-06 11:34:01 +02:00
Janne Sinivirta
cf7c6d2e9c switch to properly using dates as indexes, makes date based searching and slicing a lot faster 2018-02-06 11:34:00 +02:00
Janne Sinivirta
8c7b29734e use date info to calculate trade durations 2018-02-06 11:34:00 +02:00
Janne Sinivirta
0a42a0e814
Merge pull request #479 from gcarq/fix/issue-478
Fix Backtesting / Hyperopt ticker_interval download
2018-01-31 17:15:47 +02:00
Jean-Baptiste LE STANG
07b7828f39 Fixing bug in backtesting causing to much sells 2018-01-31 07:59:45 +01:00
Gerald Lonlas
d313eb812d Forgot one args.ticker_interval 2018-01-29 23:07:54 -08:00
Gerald Lonlas
321e3ede30 Fix hyperopt ticker interval download 2018-01-29 22:53:28 -08:00
Gerald Lonlas
524290d678 Fix backtesting ticker interval download 2018-01-29 22:51:29 -08:00
Jean-Baptiste LE STANG
94172091ae Refactoring the sell conditions evaluation to share the function with backtesting 2018-01-29 10:10:19 +01:00
Janne Sinivirta
a5155b3b20
Merge pull request #465 from gcarq/fix/increase_test_coverage
Fix/increase test coverage
2018-01-29 08:47:26 +02:00
Gerald Lonlas
2bccaa31c9 Increase pylint score on misc.py 2018-01-28 14:28:28 -08:00
Michael Smith
f66958c34f optimize/__init__.py:
Added support for gzip ticker data files if they exist.
2018-01-28 21:57:25 +08:00
Michael Smith
b44adaa5ab Added support in /optimize for gzip ticker data files if they exist. 2018-01-28 21:52:27 +08:00
Janne Sinivirta
a6a479f7aa balances to min roi hyperopt settings 2018-01-28 10:46:22 +02:00
Janne Sinivirta
67ddb2e7f8 lower precision for most search space variables 2018-01-27 09:51:06 +02:00
Janne Sinivirta
95ab7c84bc remove unnecessary else 2018-01-26 18:41:41 +02:00
Janne Sinivirta
f33923c784 fix typings for hyperopt code 2018-01-26 18:32:45 +02:00
Janne Sinivirta
a7a7c37121 add day counter to timeframe 2018-01-26 18:32:45 +02:00
Janne Sinivirta
b7e297ebda remove unused loop variable 2018-01-26 11:50:00 +02:00
Janne Sinivirta
4fe6ae0bae fix search space for min ROI 2018-01-25 22:32:46 +02:00