Commit Graph

1670 Commits

Author SHA1 Message Date
Matthias
9a42aac0f2 Add testcase for --strategylist 2018-07-31 21:04:03 +02:00
Matthias
56046b3cb3 Add strategylist option to backtesting 2018-07-31 21:04:03 +02:00
Matthias
e7d0439741 Add new arguments 2018-07-31 21:03:17 +02:00
Matthias
136442245c Add todo's and dockstring 2018-07-31 21:02:04 +02:00
Matthias
12417cc303 fix tests 2018-07-31 20:54:51 +02:00
Matthias
52065178e1 use .get all the time 2018-07-31 20:53:32 +02:00
Matthias
b45d465ed8 init _klines properly 2018-07-31 20:50:59 +02:00
Matthias
31870abd25 Refactor async-refresh to it's own function 2018-07-31 20:43:32 +02:00
Matthias
a486b1d01c Use Dict instead of tuplelist, run in _process 2018-07-31 20:25:10 +02:00
misagh
74fa4ddca4 CCXT rate limit config default to => true
+ adding config to config_full.json.example
2018-07-31 16:54:02 +02:00
misagh
be1298dbd2 Initializing CCXT with rate_limit parameter optional (default to false) 2018-07-31 14:19:16 +02:00
misagh
154e4569d7 Merge branch 'develop' into ccxt-async 2018-07-31 12:48:12 +02:00
misagh
c8f125dbb9 ccxt async POC 2018-07-31 12:47:32 +02:00
Janne Sinivirta
1044d15b17
Merge pull request #1096 from freqtrade/cleaner-tests
Cleaning unit tests, first set
2018-07-31 08:22:33 +03:00
Gert
bf0b1af878 merged latest development branch 2018-07-30 13:43:25 -07:00
Gert
b83487cc36 added required changes 2018-07-30 13:00:08 -07:00
Matthias
5a55cd25ff
Merge branch 'develop' into sandbox2 2018-07-30 20:18:48 +02:00
Janne Sinivirta
f85cc422a3
Merge branch 'develop' into cleaner-tests 2018-07-30 21:08:55 +03:00
Janne Sinivirta
155e134f50
Merge pull request #1097 from creslinux/gdax3
Enable GDAX support by rounding amount/rate (with unit tests)
2018-07-30 21:04:26 +03:00
creslin
fe27ca63b4
Update test_exchange.py 2018-07-30 17:08:33 +00:00
creslinux
012fe94333 Recommitted as new branch with unit tests - GIT screwd me on the last PR 2018-07-30 16:49:58 +00:00
Janne Sinivirta
8b8d3f3b75 default_conf is function-scoped fixture, no need to deepcopy it 2018-07-30 15:41:02 +03:00
Janne Sinivirta
67d1693901 avoid validating default_conf hundreds of times 2018-07-30 14:57:51 +03:00
Janne Sinivirta
3083e5d2be use pytest fixture properly in test_hyperopt 2018-07-30 13:26:54 +03:00
Janne Sinivirta
affdeb8fd8 rename func to throttled_func 2018-07-30 12:58:29 +03:00
Janne Sinivirta
fb80964b69 freqtradebot tests don't need to mock coinmarketcap anymore 2018-07-30 12:58:29 +03:00
Janne Sinivirta
1c20ef873d remove parens 2018-07-30 12:09:07 +03:00
Janne Sinivirta
df53e912f0 fix one more test that was missing mock and needed internet 2018-07-30 12:09:07 +03:00
Janne Sinivirta
e242842805 remove more useless docstrings from tests 2018-07-30 12:09:07 +03:00
Matthias
2401fa15d2 Change missed calls to advise_* functions 2018-07-29 21:07:21 +02:00
Matthias
787d6042de Switch from pair(str) to metadata(dict) 2018-07-29 20:56:23 +02:00
Matthias
82680ac6aa improve docstrings for strategy 2018-07-29 20:55:40 +02:00
Matthias
5fbce13830 update hyperopt to use new methods 2018-07-29 20:55:40 +02:00
Matthias
39cf0decce don't use __annotate__
it is only present when typehints are used which cannot be guaranteed
for userdefined classes
2018-07-29 20:55:40 +02:00
Matthias
f286ba6b87 overload populate_indicators to work with and without pair argumen
all while not breaking users strategies
2018-07-29 20:55:40 +02:00
Matthias
98665dcef4 revert inadvertent wihtespace changes 2018-07-29 20:55:37 +02:00
Matthias
791c5ff071 update comments to explain what advise methods do 2018-07-29 20:55:37 +02:00
Matthias
8a9c54ed61 use new methods 2018-07-29 20:55:37 +02:00
Matthias
18b8f20f1c fix small test bug 2018-07-29 20:55:37 +02:00
Matthias
f12167f0dc Fix backtesting test 2018-07-29 20:55:37 +02:00
Matthias
df8700ead0 Adapt after merge from develop 2018-07-29 20:55:37 +02:00
Matthias
0eff6719c2 improve tests for legacy-strategy loading 2018-07-29 20:55:37 +02:00
Matthias
aa772c28ad Add tests for advise_indicator methods 2018-07-29 20:55:37 +02:00
Matthias
c9a97bccb7 Add tests for deprecation 2018-07-29 20:55:32 +02:00
Matthias
7300c0a0fe remove @abstractmethod as this method may not be present in new
strategies
2018-07-29 20:55:06 +02:00
Gert Wohlgemuth
921f645623 fixing tests... 2018-07-29 20:55:06 +02:00
Gert Wohlgemuth
0dcaa82c3b fixed test? 2018-07-29 20:55:06 +02:00
Gert Wohlgemuth
3dd7d209e9 more test fixes 2018-07-29 20:55:06 +02:00
Gert Wohlgemuth
abc55a6e6b fixing? hyperopt 2018-07-29 20:55:06 +02:00
Gert Wohlgemuth
5871488858 fixed errors and making flake pass 2018-07-29 20:55:06 +02:00
xmatthias
2e6e5029ba fix mypy and tests 2018-07-29 20:55:06 +02:00
Gert Wohlgemuth
19b9966417 satisfied flake8 again 2018-07-29 20:55:06 +02:00
Gert Wohlgemuth
57f683697d revised code 2018-07-29 20:55:06 +02:00
Gert Wohlgemuth
296d3d8bbe working on refacturing of the strategy class 2018-07-29 20:55:06 +02:00
Janne Sinivirta
f832edf5bc remove useless docstrings from tests 2018-07-29 17:09:44 +03:00
Janne Sinivirta
1bbb86c621 remove nonsense asserts 2018-07-29 16:23:17 +03:00
Matthias
7f27beff4b
Revert "backtesting: try to load data with ujson if it exists" 2018-07-29 13:23:11 +02:00
creslinux
dd71071740 Added logger.info when Sandbox is enabled. 2018-07-29 09:15:13 +00:00
creslinux
1e804c0df5 flake 8 2018-07-29 08:10:55 +00:00
creslinux
fc06d028b8 Unit tests for sandbox pass / fail scenarios
Big Wave of appreciation to xmatthias for the guidence on how
Mocker works
2018-07-29 08:02:04 +00:00
Matthias
618784d060
Merge pull request #1090 from freqtrade/ujson-loader
backtesting: try to load data with ujson if it exists
2018-07-29 08:54:02 +01:00
Samuel Husso
cfcc2e61e5
Merge pull request #1088 from freqtrade/fix/unpatched_mock
fix rpc test going to network
2018-07-29 09:53:52 +03:00
Samuel Husso
187e039a58
Merge pull request #1034 from freqtrade/feat/positive_sl_limit
add offset for positive trailing stop loss
2018-07-29 08:30:29 +03:00
Gert
ab66fe1b72 prepared for tracking signals 2018-07-28 19:45:33 -07:00
Gert
ed47240b6e working on develop backslap 2018-07-28 18:30:12 -07:00
Gert
1a673c6ac9 working on moving backslap 2018-07-28 14:23:18 -07:00
creslinux
0a059662b3 Submitting with unit test for the working scenario.
Strongly recommend core team check the unit test is even targetting the
correct code in exchange/__init__.py

I have a real knowledge gap on mocker, in so far as how tests map to
what they're targeting.
2018-07-28 20:32:10 +00:00
Samuel Husso
cb2fff8909 mypy doesn't handle common idiomacy so disable the line (see the open issue more details) 2018-07-28 22:06:26 +03:00
Samuel Husso
cdd8cc551c backtesting: try to load data with ujson if it exists 2018-07-28 21:56:11 +03:00
Samuel Husso
6ab8fa8c71
Merge pull request #1079 from creslinux/apiAuthPass
add Password option to API login, GDAX as example requires.
2018-07-28 13:53:39 +03:00
Matthias
243b63e39c fix rpc test going to network (unsuitable for flights...) 2018-07-27 21:14:41 +01:00
creslin
40ae250193
Update constants.py
Adding UID also, as itll get ran into in future on an exchange that needs it.
2018-07-27 12:19:01 +00:00
creslinux
c47253133a have to begin before we can stop 2018-07-27 12:07:07 +00:00
creslinux
7efa81073a Removed ; at line end. 2018-07-27 09:10:09 +00:00
creslinux
d23b3ccc5e odd cut and paste error fixed. 2018-07-27 08:55:36 +00:00
Matthias
48cd468b6c Don't do all network calls at once without async 2018-07-27 07:40:27 +01:00
creslinux
0372485cf0 Some reason did not push this...
vector calcs redone.
2018-07-26 19:17:00 +00:00
creslinux
e39ae45d2f Some reason did not push this...
vector calcs redone.
2018-07-26 18:40:45 +00:00
Matthias
df3e76a65d Remove legacy code, fix missed call 2018-07-26 19:11:51 +01:00
Matthias
f2a9be3684 Adjust tests and remove legacy variable 2018-07-26 19:06:25 +01:00
Matthias
3324cdfcbe add mock for get_history in patch_get_signal 2018-07-26 18:58:49 +01:00
Matthias
484103b957 extract get_history_data from get_signal 2018-07-26 18:23:42 +01:00
Janne Sinivirta
726b94b077
Merge pull request #1069 from freqtrade/feat/movefiatconverttorpc
Feat/movefiatconverttorpc
2018-07-26 14:25:58 +03:00
Matthias
452a1cad9d don't default fiat_convert to None for outputs 2018-07-26 07:26:23 +01:00
Matthias
7b49f746d1 remove #FIX which was fixed 2018-07-25 22:47:20 +01:00
Janne Sinivirta
4b38c8b11d use pandas own min and max for column sorting 2018-07-25 17:04:25 +03:00
Matthias
dc1ad3cbf6 whitespace issues 2018-07-24 23:08:40 +01:00
Matthias
ff6435948e Fix random test failure 2018-07-24 22:53:10 +01:00
Matthias
4928686af9 Remove currency from daily table 2018-07-24 09:37:25 +01:00
Matthias
30b72ad98a don't show fiat-currency if not set 2018-07-24 08:20:32 +01:00
Matthias
1a9ead45eb fix missed fiat_display_currency config value 2018-07-24 08:00:56 +01:00
Janne Sinivirta
0b3190552e
Merge pull request #1018 from freqtrade/feat/sell_reason
Record sell reason
2018-07-24 09:09:45 +03:00
Matthias
456e49fe35 default fiat_currency to none 2018-07-24 00:01:51 +01:00
Matthias
10fc2c67c7 Fix bug causing a database-migration to fail from aspecific state 2018-07-23 09:10:37 +01:00
Matthias
643de58c4d Add test to check for a mid-migrated database (not old but not new) 2018-07-23 09:09:56 +01:00
Janne Sinivirta
aba3c69765
Merge pull request #1061 from freqtrade/fix_networkcall
Add missing mock
2018-07-23 07:19:37 +03:00
Matthias
0775a371fe rename sellreason to sell_Reason, fix typos 2018-07-23 00:54:20 +01:00
Matthias
23fe0db2df Add missing mock 2018-07-22 17:06:42 +01:00
Matthias
f54ac5a8de revert bugfix done in it's own branch 2018-07-22 17:05:22 +01:00
Matthias
4c8411537f Don't require fiat-currency 2018-07-22 14:53:46 +02:00
Matthias
bd2771b8f9 use correct property 2018-07-22 14:52:58 +02:00
Matthias
4d864df59e Add tests for no_fiat functionality 2018-07-22 14:49:07 +02:00
Matthias
fae4c3a4e3 only init if stake_currency is set 2018-07-22 14:48:06 +02:00
Matthias
2b297869a1 adjust checks to fit new functionality 2018-07-22 14:35:59 +02:00
Matthias
6cc0a72bca ADd optional to class _fiat_convert 2018-07-22 14:35:37 +02:00
Matthias
f297d22edb fix some tests in rpc_telegram 2018-07-21 20:49:57 +02:00
Matthias
0681a806cc move cryptofiatconvert to rpc 2018-07-21 20:44:38 +02:00
Matthias
be3f04775a remove unnecessary mocks - add mocks which went to exchange 2018-07-21 20:21:00 +02:00
Matthias
9467461160 only init FIATConvert when telegram is enabled 2018-07-21 20:13:32 +02:00
Matthias
66af41192a Catch all exceptions from fiat-convert api calls 2018-07-21 19:50:38 +02:00
Matthias
dd1290e38e Add multiple verbosity levels 2018-07-19 21:12:27 +02:00
Matthias
90915b6b2f
Revert "Add more verbosity levels" 2018-07-19 20:43:41 +02:00
Matthias
1b2bfad348 Fix wrong test 2018-07-19 20:36:49 +02:00
Matthias
060469fefc Add stuff after rebase 2018-07-19 20:12:20 +02:00
Matthias
4fb9823cfb fix rebase problem 2018-07-19 19:50:06 +02:00
Matthias
760c79c5e9 Use .center() to output trades header line 2018-07-19 19:39:08 +02:00
Matthias
a452864b41 Use namedtuple for sell_return 2018-07-19 19:39:08 +02:00
Matthias
506aa0e3d3 Add print_sales table and test 2018-07-19 19:34:14 +02:00
Matthias
426c25f631 record ticker_interval and strategyname 2018-07-19 19:34:14 +02:00
Matthias
4059871c28 Add get_strategy_name 2018-07-19 19:34:14 +02:00
Matthias
2a61629014 Export sell_reason from backtest 2018-07-19 19:29:31 +02:00
Matthias
8c0b19f80c Check sell-reason for sell-reason-specific tests 2018-07-19 19:29:31 +02:00
Matthias
838b0e7b76 Remove unused import 2018-07-19 19:29:31 +02:00
Matthias
cbffd3650b add sell_reason to backtesting 2018-07-19 19:29:31 +02:00
Matthias
0147b1631a remove optional from selltype 2018-07-19 19:27:33 +02:00
Matthias
49a7c7f08e fix tests 2018-07-19 19:27:33 +02:00
Janne Sinivirta
0cc1b66ae7
Merge pull request #1037 from freqtrade/fix/backtest-comment
replace --realistic with 2 separate flags
2018-07-19 17:33:19 +03:00
Janne Sinivirta
6070d819b8
Merge pull request #1040 from freqtrade/xmatthias_backtest_duration
Fix backtest duration calculation
2018-07-19 17:32:11 +03:00
Matthias
f991109b0a Add sell-reason to sell-tree 2018-07-19 13:29:42 +02:00
Matthias
6bb7167b56 Add sellType enum 2018-07-19 13:25:48 +02:00
Matthias
c0a7725c1f Add stoploss offset 2018-07-19 13:22:44 +02:00
Matthias
8f254031c6 Add short form for parameters, change default for hyperopt 2018-07-19 13:19:36 +02:00
Matthias
aa69177436 Properly check emptyness and adjust floatfmt 2018-07-19 13:14:21 +02:00
Matthias
64f933477d
Merge pull request #1007 from freqtrade/remove-analyze
Remove Analyze
2018-07-19 10:12:36 +02:00
Matthias
75c0a476f8 Test setting verbosity in commandline 2018-07-18 23:40:04 +02:00
Matthias
1ab7f5fb6d add tests for more debug levels 2018-07-18 22:53:44 +02:00
Matthias
789b98015f Allow different loglevels 2018-07-18 22:52:57 +02:00
Matthias
7134c15e86
Merge pull request #1024 from freqtrade/feature/webhook
Feature/webhook
2018-07-18 20:39:57 +02:00
Matthias
79b1030435 output duration in a more readable way 2018-07-18 20:08:55 +02:00
Matthias
f9f6a3bd04
cast to int to keep exports constant 2018-07-18 09:29:51 +02:00
Matthias
8e4d2abd4e
Fix typo 2018-07-18 09:10:17 +02:00
Matthias
08237abe20
Fix wrong backtest duration
identified in #1038
2018-07-18 09:06:12 +02:00
Luis Felipe Diaz Chica
ee8e890f50 Add docs to get_trade_stake_amount function 2018-07-18 01:36:39 -05:00
creslinux
3184c85dca default settings to trigger low, take stop 2018-07-17 21:33:11 +00:00
Matthias
3df79b8542 fix hanging intend 2018-07-17 21:12:05 +02:00
Matthias
c82276ecbe add --disable-max-market-positions 2018-07-17 21:05:03 +02:00
Matthias
e17618407b Rename --realistic-simulation to --enable-position-stacking 2018-07-17 20:26:59 +02:00
Janne Sinivirta
85fd4dd3ff rename analyze.py to exchange_helpers.py 2018-07-17 21:26:52 +03:00
creslinux
8cea0517eb Added stop_stops
stop_stops is an int value
when number of stops in a pair reached the int the pair is stopped
trading.

This allows backtest to align with my pre_trade_mgt that does the same
in dry and live operations
2018-07-17 11:22:38 +00:00
creslinux
ed4bf32f2a Fixed Stop closing in Index 0
when buy opening on Index 1
2018-07-17 10:59:17 +00:00
Janne Sinivirta
e11ec28962 remove leftover commented-out code 2018-07-17 11:13:35 +03:00
creslinux
baaf0a5b21 Handle when 0 trades are found in any pairs being tested. 2018-07-17 08:12:21 +00:00
Janne Sinivirta
084264669f fix the last failing unit test 2018-07-17 11:02:07 +03:00
Janne Sinivirta
dbc3874b4f __init__ must return None to please mypy 2018-07-17 10:47:15 +03:00
Janne Sinivirta
78af4bc785 move and fix tests from Analyze to interface of strategy 2018-07-17 10:23:04 +03:00
creslinux
a313917347 Handle a buy on the last candle
We will never see this, as buy is on close which is the end of backtest
e.g there is no next candle OPEN to buy at, or on
2018-07-16 18:59:48 +00:00
creslinux
357c8c0ba0 sensible defaults 2018-07-16 18:32:41 +00:00
creslinux
8d5da4e6ad changed defaults
Seperated save trades and print trades options.
2018-07-16 17:48:11 +00:00
creslinux
ec1960530b Added Show trades option
If true, prints trades ordered by date after summary.
Useful for spotting trends.
2018-07-16 17:06:06 +00:00
creslinux
99d16e82c0 disable time calcs output on vector displaying in debug. Excessive. 2018-07-16 16:30:11 +00:00
creslinux
885a653439 Disabled full debug on in last commit
Switched Stops to trigger on Low
Switched Stops to pay stop-rate not close.
2018-07-16 16:18:54 +00:00
creslinux
059aceb582 Disabled full debug on in last commit
Switched Stops to trigger on Low
Switched Stops to pay stop-rate not close.
2018-07-16 16:12:33 +00:00
creslinux
0f3339f74f use ujson to load ticker files 30% faster from disk. 2018-07-16 16:09:42 +00:00
creslinux
4a39a754f4 Fixed: self.use_backslap = Bool on line97
If self.use_backslap = True   Backslap executes
If self.use_backslap = False  Original Backtest Code executes
2018-07-16 15:57:15 +00:00
creslinux
5aaf454f12 GAS trades verified from candle data to excel by hand
All pass
3 sells 1 stop loss
2018-07-16 15:48:06 +00:00
creslinux
fb0edd71ff in tech test 2018-07-16 14:16:35 +00:00
creslinux
eed29a6b8a update 2018-07-16 13:16:18 +00:00
creslinux
7174f27eb8 Rewrite to used algned numpy/dataframes
updated logic
added vector fill for abs/profit/duration in single hit on results.
2018-07-16 12:01:02 +00:00
Samuel Husso
a3466f4b42
Merge pull request #1031 from freqtrade/feat/update_configdict
Update config dict with attributes loaded from strategy
2018-07-16 10:00:46 +03:00
Samuel Husso
050afe2bc0
Merge pull request #979 from creslinux/Check_timeframes
Handle if ticker_interval in config.json is not supported on exchange.
2018-07-16 09:57:46 +03:00
Janne Sinivirta
5c87c420c7 restore one analyze test 2018-07-16 08:59:14 +03:00
Janne Sinivirta
aeb4102bcb refactor Analyze class methods to base Strategy class 2018-07-16 08:23:39 +03:00
Janne Sinivirta
f6b8c2b40f move parse_ticker_dataframe outside Analyze class 2018-07-16 08:23:39 +03:00
Janne Sinivirta
85e6c9585a remove pass-through methods from Analyze 2018-07-16 08:23:39 +03:00
Janne Sinivirta
a74147c472 move strategy initialization outside Analyze 2018-07-16 08:23:39 +03:00
creslinux
a8b62a21cc hmm 2018-07-15 17:03:47 +00:00
creslinux
4e68362d46 Works with reporting output
Bugs
Calculating % prof ok, but abs wrong

BAT/BTC DF is very broken all OHLC are the same - but exposes a
buy after stop on last row "oddness" to be investigated / handled
2018-07-15 10:33:00 +00:00
creslinux
71c3106f8f Added ABS and Fees
Fixed Index Alignment that was off moving from scratch to FT
Fixed Stoploss,
  its a negative in FT, had been using positve stop -1 in scratch
2018-07-15 09:30:01 +00:00
Matthias
158226012a consistent use of the config dict within the test 2018-07-15 09:08:14 +02:00
Matthias
b4ba641131 Update config dict with attributes loaded from strategy 2018-07-15 09:01:08 +02:00
creslinux
07175ebc5a up 2018-07-14 23:45:06 +00:00
creslinux
90e3c38757 First cut, Bslap
science project replacement for freqtrade backtest analysis

- appprox 300-500x quicker to execute

- fixes stop on close take close price bug in FT
Bslap is configurable but by default stops are triggerd on
low and pay stop price

Not implimented dynamic stops or roi
2018-07-14 22:54:23 +00:00
Matthias
278e7159bc adjust webhook tests 2018-07-14 13:32:35 +02:00
Matthias
1284627219 move url to private class level 2018-07-14 13:32:35 +02:00
Matthias
120fc29643 use dict comprehension 2018-07-14 13:32:35 +02:00
Matthias
6336d8a0e2 remove copy leftover 2018-07-14 13:32:35 +02:00
Matthias
ee2f6ccbe9 Add test for enable_webhook 2018-07-14 13:32:35 +02:00
Matthias
144d308e5e Allow enabling of webhook 2018-07-14 13:32:35 +02:00
Matthias
a4643066a8 allow more flexibility in webhook 2018-07-14 13:32:35 +02:00
Matthias
25250f7c10 don't hardcode post parameters 2018-07-14 13:32:35 +02:00
Matthias
fa8512789f add tests for webhook 2018-07-14 13:32:35 +02:00
Matthias
ae22af1ea3 fix typo 2018-07-14 13:32:35 +02:00
Matthias
6e16c1d80d add webhook test file 2018-07-14 13:32:35 +02:00
Samuel Husso
fa8b349200 rpc: dont re-use variables with different types 2018-07-14 08:02:39 +03:00
gcarq
cb8cd21e22 add tests for telegram.send_msg 2018-07-12 17:50:11 +02:00
gcarq
a559e22f16 remove duplicate send_msg invocation 2018-07-12 17:29:02 +02:00
gcarq
7eaeb8d146 status: return arrow object instead humanized str 2018-07-12 17:27:40 +02:00
gcarq
0920fb6120 use more granular msg dict for buy/sell notifications 2018-07-12 17:16:31 +02:00
gcarq
4cb1aa1d97 use dict as argument for rpc.send_msg 2018-07-12 17:12:42 +02:00
gcarq
96a405feb7 implement name property in abstract class 2018-07-12 17:11:31 +02:00