Merge branch 'develop' into config-allow-comments
This commit is contained in:
@@ -59,8 +59,8 @@ working directory.
|
||||
|
||||
The bot allows you to use multiple configuration files by specifying multiple
|
||||
`-c/--config` options in the command line. Configuration parameters
|
||||
defined in the last configuration file override parameters with the same name
|
||||
defined in the previous configuration file specified in the command line.
|
||||
defined in the latter configuration files override parameters with the same name
|
||||
defined in the previous configuration files specified in the command line earlier.
|
||||
|
||||
For example, you can make a separate configuration file with your key and secrete
|
||||
for the Exchange you use for trading, specify default configuration file with
|
||||
@@ -259,12 +259,13 @@ optional arguments:
|
||||
--continue Continue hyperopt from previous runs. By default,
|
||||
temporary files will be removed and hyperopt will
|
||||
start from scratch.
|
||||
--hyperopt-loss NAME
|
||||
Specify the class name of the hyperopt loss function
|
||||
--hyperopt-loss NAME Specify the class name of the hyperopt loss function
|
||||
class (IHyperOptLoss). Different functions can
|
||||
generate completely different results, since the
|
||||
target for optimization is different. (default:
|
||||
`DefaultHyperOptLoss`).
|
||||
target for optimization is different. Built-in
|
||||
Hyperopt-loss-functions are: DefaultHyperOptLoss,
|
||||
OnlyProfitHyperOptLoss, SharpeHyperOptLoss.
|
||||
(default: `DefaultHyperOptLoss`).
|
||||
```
|
||||
|
||||
## Edge commands
|
||||
|
@@ -31,6 +31,16 @@ df = load_trades_from_db("sqlite:///tradesv3.sqlite")
|
||||
df.groupby("pair")["sell_reason"].value_counts()
|
||||
```
|
||||
|
||||
### Load multiple configuration files
|
||||
|
||||
This option can be usefull to inspect the results of passing in multiple configs in case of problems
|
||||
|
||||
``` python
|
||||
from freqtrade.configuration import Configuration
|
||||
config = Configuration.from_files(["config1.json", "config2.json"])
|
||||
print(config)
|
||||
```
|
||||
|
||||
## Strategy debugging example
|
||||
|
||||
Debugging a strategy can be time-consuming. FreqTrade offers helper functions to visualize raw data.
|
||||
|
@@ -17,6 +17,29 @@ Alternatively (if your system is not supported by the setup.sh script), follow t
|
||||
|
||||
This will install all required tools for development, including `pytest`, `flake8`, `mypy`, and `coveralls`.
|
||||
|
||||
### Tests
|
||||
|
||||
New code should be covered by basic unittests. Depending on the complexity of the feature, Reviewers may request more in-depth unittests.
|
||||
If necessary, the Freqtrade team can assist and give guidance with writing good tests (however please don't expect anyone to write the tests for you).
|
||||
|
||||
#### Checking log content in tests
|
||||
|
||||
Freqtrade uses 2 main methods to check log content in tests, `log_has()` and `log_has_re()` (to check using regex, in case of dynamic log-messages).
|
||||
These are available from `conftest.py` and can be imported in any test module.
|
||||
|
||||
A sample check looks as follows:
|
||||
|
||||
``` python
|
||||
from freqtrade.tests.conftest import log_has, log_has_re
|
||||
|
||||
def test_method_to_test(caplog):
|
||||
method_to_test()
|
||||
|
||||
assert log_has("This event happened", caplog)
|
||||
# Check regex with trailing number ...
|
||||
assert log_has_re(r"This dynamic event happened and produced \d+", caplog)
|
||||
```
|
||||
|
||||
## Modules
|
||||
|
||||
### Dynamic Pairlist
|
||||
|
@@ -164,7 +164,11 @@ By default, FreqTrade uses a loss function, which has been with freqtrade since
|
||||
A different loss function can be specified by using the `--hyperopt-loss <Class-name>` argument.
|
||||
This class should be in its own file within the `user_data/hyperopts/` directory.
|
||||
|
||||
Currently, the following loss functions are builtin: `DefaultHyperOptLoss` (default legacy Freqtrade hyperoptimization loss function), `SharpeHyperOptLoss` (optimizes Sharpe Ratio calculated on the trade returns) and `OnlyProfitHyperOptLoss` (which takes only amount of profit into consideration).
|
||||
Currently, the following loss functions are builtin:
|
||||
|
||||
* `DefaultHyperOptLoss` (default legacy Freqtrade hyperoptimization loss function)
|
||||
* `OnlyProfitHyperOptLoss` (which takes only amount of profit into consideration)
|
||||
* `SharpeHyperOptLoss` (optimizes Sharpe Ratio calculated on the trade returns)
|
||||
|
||||
### Creating and using a custom loss function
|
||||
|
||||
|
Reference in New Issue
Block a user