-
Notifications
You must be signed in to change notification settings - Fork 247
Expand file tree
/
Copy pathconfig.schema.json
More file actions
149 lines (149 loc) · 5.47 KB
/
config.schema.json
File metadata and controls
149 lines (149 loc) · 5.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://hyperview.dev/config.schema.json",
"title": "HyperView Configuration",
"description": "Configuration file for the HyperView backtesting and optimization engine.",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "Path or URL to the JSON schema for editor validation and autocompletion."
},
"bot_name": {
"type": "string",
"description": "Identifier for this HyperView instance. Used in logs and result file headers.",
"default": "hyperview",
"minLength": 1
},
"timeframe": {
"type": "string",
"description": "Candle timeframe for data download, backtesting, and optimization.",
"default": "1h",
"minLength": 1
},
"session": {
"type": "string",
"description": "Market session type for candle data.",
"enum": ["regular", "extended"],
"default": "regular"
},
"mode": {
"type": "string",
"description": "Default trade direction mode for backtesting and optimization.",
"enum": ["long", "short", "both"],
"default": "long"
},
"strategy": {
"type": "string",
"description": "Name of the strategy class to use for backtesting and optimization. Must match a registered strategy_name.",
"minLength": 1
},
"initial_capital": {
"type": "number",
"description": "Starting capital (in currency units) for backtesting and optimization.",
"default": 100000,
"exclusiveMinimum": 0
},
"data_dir": {
"type": "string",
"description": "Directory where downloaded candle data is stored.",
"default": "data",
"minLength": 1
},
"output_dir": {
"type": "string",
"description": "Directory where optimization results and reports are written.",
"default": "results",
"minLength": 1
},
"strategy_path": {
"type": "string",
"description": "Directory containing strategy modules. Strategies are auto-discovered from Python files in this directory.",
"default": "strategy",
"minLength": 1
},
"dataformat": {
"type": "string",
"description": "Storage format for candle data files.",
"enum": ["csv"],
"default": "csv"
},
"add_config_files": {
"type": "array",
"description": "Additional config files to load and merge, in order. Paths are resolved relative to this config file's directory. Later files override earlier values.",
"items": {
"type": "string",
"minLength": 1
},
"default": []
},
"pairlist": {
"type": "array",
"description": "List of trading pairs in 'EXCHANGE:SYMBOL' format (e.g. 'NASDAQ:AAPL', 'COINBASE:BTCUSD').",
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9_]+:[A-Za-z0-9_.]+$",
"minLength": 1
},
"default": []
},
"optimization": {
"type": "object",
"description": "Parameters controlling hyperparameter optimization runs.",
"properties": {
"n_trials": {
"type": "integer",
"description": "Number of trials for Bayesian (Optuna TPE) optimization.",
"default": 200,
"minimum": 1
},
"objective": {
"type": "string",
"description": "Metric to optimize.",
"enum": [
"net_profit_pct",
"profit_factor",
"win_rate_pct",
"max_drawdown_pct",
"trade_count"
],
"default": "net_profit_pct"
},
"top_n": {
"type": "integer",
"description": "Number of top results to report.",
"default": 10,
"minimum": 1
},
"sl_range": {
"$ref": "#/$defs/range",
"description": "Stop-loss percentage search range."
},
"tp_range": {
"$ref": "#/$defs/range",
"description": "Take-profit percentage search range."
}
},
"additionalProperties": false
}
},
"$defs": {
"range": {
"type": "object",
"description": "Numeric range with min and max bounds. Grid resolution is determined automatically by the optimizer.",
"properties": {
"min": {
"type": "number",
"description": "Lower bound (inclusive)."
},
"max": {
"type": "number",
"description": "Upper bound (inclusive)."
}
},
"required": ["min", "max"],
"additionalProperties": false
}
},
"additionalProperties": false
}