2023-06-15 22:17:45 +02:00 | | | {
|
| | | "api_key": "<binance-key>",
|
| | | "api_secret": "<binance-secret>",
|
| | |
|
| | | "telegram_bot_token": "<token>",
|
| | | "telegram_chat_id": "<chat-id-to-publish-messages>",
|
| | |
|
2023-08-08 20:56:43 +02:00 | | | "data_folder": "C:/DATA_ITB",
|
2023-06-15 22:17:45 +02:00 | | |
|
| | | // === DOWNLOAD AND MERGE ===
|
| | |
|
| | | "symbol": "BTCUSDT",
|
| | |
|
| | | "data_sources": [
|
| | | {"folder": "BTCUSDT", "file": "klines", "column_prefix": ""}
|
| | | ],
|
| | |
|
| | | // === GENERATE FEATURES ===
|
| | |
|
| | | "feature_sets": [
|
2023-08-27 16:43:38 +02:00 | | | {"column_prefix": "", "generator": "talib", "feature_prefix": "", "config": {"columns": ["close"], "functions": ["SMA"], "windows": [1, 5, 10, 15, 60]}},
|
| | | {"column_prefix": "", "generator": "talib", "feature_prefix": "", "config": {"columns": ["close"], "functions": ["LINEARREG_SLOPE"], "windows": [5, 10, 15, 60]}},
|
| | | {"column_prefix": "", "generator": "talib", "feature_prefix": "", "config": {"columns": ["close"], "functions": ["STDDEV"], "windows": [5, 10, 15, 60]}}
|
2023-06-15 22:17:45 +02:00 | | | ],
|
| | |
|
| | | // === LABELS ===
|
| | |
|
| | | "label_sets": [
|
2023-08-27 16:43:38 +02:00 | | | {"column_prefix": "", "generator": "highlow2", "feature_prefix": "", "config": {"columns": ["close", "high", "low"], "function": "high", "thresholds": [2.0], "tolerance": 0.2, "horizon": 60, "names": ["high_20"]}},
|
| | | {"column_prefix": "", "generator": "highlow2", "feature_prefix": "", "config": {"columns": ["close", "high", "low"], "function": "low", "thresholds": [2.0], "tolerance": 0.2, "horizon": 60, "names": ["low_20"]}}
|
2023-06-15 22:17:45 +02:00 | | | ],
|
| | |
|
| | | // === TRAIN ===
|
| | |
|
2023-10-05 12:02:55 +02:00 | | | "label_horizon": 60,
|
| | | "train_length": 525600,
|
2023-06-15 22:17:45 +02:00 | | |
|
| | | "train_features": [
|
2023-08-27 16:43:38 +02:00 | | | "close_SMA_1", "close_SMA_5", "close_SMA_10", "close_SMA_15", "close_SMA_60",
|
| | | "close_LINEARREG_SLOPE_5", "close_LINEARREG_SLOPE_10", "close_LINEARREG_SLOPE_15", "close_LINEARREG_SLOPE_60",
|
| | | "close_STDDEV_5", "close_STDDEV_10", "close_STDDEV_15", "close_STDDEV_60"
|
2023-06-15 22:17:45 +02:00 | | | ],
|
| | |
|
| | | "labels": [
|
2023-08-27 16:43:38 +02:00 | | | "high_20",
|
| | | "low_20"
|
2023-06-15 22:17:45 +02:00 | | | ],
|
| | |
|
2023-08-08 20:56:43 +02:00 | | | "algorithms": [
|
| | | {
|
2023-10-05 12:02:55 +02:00 | | | "name": "lc", // Unique name will be used as a column suffix
|
| | | "algo": "lc", // Altorithm type is used to choose the train/predict function
|
| | | "params": {"penalty": "l2", "C": 1.0, "class_weight": null, "solver": "sag", "max_iter": 100},
|
2023-08-27 16:43:38 +02:00 | | | "train": {"is_scale": true, "length": 1000000, "shifts": []},
|
2023-08-08 20:56:43 +02:00 | | | "predict": {"length": 1440}
|
| | | }
|
| | | ],
|
2023-06-15 22:17:45 +02:00 | | |
|
2023-08-27 16:43:38 +02:00 | | | "features_horizon": 100, // Minimum data length for computing features (in online mode). Take it from feature generator parameters
|
2023-06-15 22:17:45 +02:00 | | |
|
| | | // === AGGREGATION AND POST-PROCESSING ===
|
| | |
|
2023-08-05 12:02:07 +02:00 | | | "score_aggregation_sets": [
|
| | | {
|
2023-08-11 20:17:11 +02:00 | | | "column": "trade_score", // Output column name: positive values - buy, negative values - sell
|
2023-06-15 22:17:45 +02:00 | | |
|
2023-08-27 16:43:38 +02:00 | | | "buy_labels": ["high_20_lc"],
|
| | | "sell_labels": ["low_20_lc"],
|
2023-06-15 22:17:45 +02:00 | | |
|
2023-08-11 20:17:11 +02:00 | | | "parameters": {
|
| | | "point_threshold": null, // Produce boolean column (optional)
|
| | | "window": 3, // Aggregate in time
|
| | | "combine": "difference", // "no_combine" (or empty), "relative", "difference"
|
| | | "coefficient": 1.0,
|
| | | "constant": 0.0
|
| | | }
|
2023-08-05 12:02:07 +02:00 | | | }
|
| | | ],
|
2023-06-15 22:17:45 +02:00 | | |
|
| | | // === SIGNAL RULES FOR TRADING ===
|
| | |
|
| | | "signal_model": {
|
2023-08-06 13:33:05 +02:00 | | | "rule_name": "",
|
| | |
|
| | | "signal_columns": ["buy_signal_column", "sell_signal_column"],
|
| | |
|
| | | "parameters": {
|
2023-10-05 12:02:55 +02:00 | | | "buy_signal_threshold": 0.05,
|
| | | "sell_signal_threshold": -0.05
|
2023-08-06 13:33:05 +02:00 | | | },
|
| | | "notification": {
|
2023-10-05 12:02:55 +02:00 | | | "buy_notify_threshold": 0.02,
|
| | | "sell_notify_threshold": -0.02,
|
2023-08-27 16:43:38 +02:00 | | | "trade_icon_step": 0.05,
|
2023-09-30 12:58:45 +02:00 | | | "notify_frequency_minutes": 1,
|
| | | "notify_signal": true,
|
| | | "notify_transaction": true,
|
| | | "notify_diagram": false
|
2023-08-06 13:33:05 +02:00 | | | }
|
2023-06-15 22:17:45 +02:00 | | | },
|
| | |
|
| | | "train_signal_model": {
|
2023-09-02 10:44:14 +02:00 | | | "data_start": 0,
|
| | | "data_end": null,
|
| | |
|
2023-06-15 22:17:45 +02:00 | | | "buy_sell_equal": false,
|
2023-09-02 10:29:47 +02:00 | | | "direction": "long",
|
| | | "topn_to_store": 10,
|
2023-06-15 22:17:45 +02:00 | | |
|
| | | "grid": {
|
2023-10-05 12:02:55 +02:00 | | | "buy_signal_threshold": [0.02, 0.03, 0.04, 0.05, 0.1, 0.15],
|
| | | "sell_signal_threshold": [-0.02, -0.03, -0.04, -0.05, -0.1, -0.15]
|
2023-06-15 22:17:45 +02:00 | | | }
|
2023-08-19 13:41:48 +02:00 | | | },
|
| | |
|
| | | "rolling_predict": {
|
2023-09-02 10:44:14 +02:00 | | | // int, null or string with date which will be resolved using time_column and removed from source data
|
2023-08-19 13:41:48 +02:00 | | | "data_start": "2020-02-01 00:00:00",
|
| | | "data_end": null,
|
| | |
|
| | | // One of these 3 parameters can be null and will be computed from the other two
|
| | | "prediction_start": null, // First row for starting predictions, for example, "2022-02-01 00:00:00"
|
| | | "prediction_size": 10080, // How many predictions, for example, 1 week 7*1440
|
| | | "prediction_steps": 4, // How many train-prediction steps
|
| | |
|
| | | "use_multiprocessing": false,
|
| | | "max_workers": 8
|
| | | }
|
2023-06-15 22:17:45 +02:00 | | | }
|