forked from QuantConnect/Lean
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.json
252 lines (212 loc) · 11 KB
/
config.json
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
{
// this configuration file works by first loading all top-level
// configuration items and then will load the specified environment
// on top, this provides a layering affect. environment names can be
// anything, and just require definition in this file. There's
// two predefined environments, 'backtesting' and 'live', feel free
// to add more!
"environment": "backtesting",// "live-paper", "backtesting", "live-interactive", "live-interactive-iqfeed"
// algorithm class selector
"algorithm-type-name": "BasicTemplateAlgorithm",
// Algorithm language selector - options CSharp, FSharp, VisualBasic, Python, Java
"algorithm-language": "CSharp",
//Physical DLL location
"algorithm-location": "QuantConnect.Algorithm.CSharp.dll",
//"algorithm-location": "QuantConnect.Algorithm.Python.dll",
//"algorithm-location": "QuantConnect.Algorithm.FSharp.dll",
//"algorithm-location": "QuantConnect.Algorithm.VisualBasic.dll",
//"algorithm-location": "QuantConnect.Algorithm.Java.dll",
// engine
"data-folder": "../../../Data/",
// handlers
"log-handler": "QuantConnect.Logging.CompositeLogHandler",
"messaging-handler": "QuantConnect.Messaging.Messaging",
"job-queue-handler": "QuantConnect.Queues.JobQueue",
"api-handler": "QuantConnect.Api.Api",
"command-queue-handler": "QuantConnect.Queues.EmptyCommandQueueHandler",
// this command queue will check a file to read json serialized commands (use TypeNameHandling.All)
//"command-queue-handler": "QuantConnect.Queues.FileCommandQueueHandler",
// used by the FileComandQueueHandler, serialize a ICommand and it will be run against algorithm
"command-json-file": "command.json",
"map-file-provider": "QuantConnect.Data.Auxiliary.LocalDiskMapFileProvider",
"factor-file-provider": "QuantConnect.Data.Auxiliary.LocalDiskFactorFileProvider",
"data-provider": "QuantConnect.Lean.Engine.DataFeeds.DefaultDataProvider",
// limits on number of symbols to allow
"symbol-minute-limit": 10000,
"symbol-second-limit": 10000,
"symbol-tick-limit": 10000,
// if one uses true in following token, market hours will remain open all hours and all days.
// if one uses false will make lean operate only during regular market hours.
"force-exchange-always-open": false,
// save list of transactions to the specified csv file
"transaction-log": "",
// To get your api access token go to quantconnect.com/account
"job-user-id": "0",
"api-access-token": "",
// live data configuration
"live-data-url": "ws://www.quantconnect.com/api/v2/live/data/",
"live-data-port": 8020,
// interactive brokers configuration
"ib-account": "",
"ib-user-name": "",
"ib-password": "",
"ib-host": "127.0.0.1",
"ib-port": "4002",
"ib-agent-description": "Individual",
"ib-use-tws": false,
"ib-tws-dir": "C:\\Jts",
"ib-trading-mode": "paper",
"ib-controller-dir": "C:\\IBController",
// tradier configuration
"tradier-account-id": "",
"tradier-access-token": "",
"tradier-refresh-token": "",
"tradier-issued-at": "",
"tradier-lifespan": "",
"tradier-refresh-session": true,
// oanda configuration
"oanda-environment": "Practice",
"oanda-access-token": "",
"oanda-account-id": "",
// fxcm configuration
"fxcm-server": "http://www.fxcorporate.com/Hosts.jsp",
"fxcm-terminal": "Demo", //Real or Demo
"fxcm-user-name": "",
"fxcm-password": "",
"fxcm-account-id": "",
// iqfeed configuration
"iqfeed-username": "",
"iqfeed-password": "",
"iqfeed-productName": "",
"iqfeed-version": "1.0",
// Required to access data from Quandl
// To get your access token go to https://www.quandl.com/account/api
"quandl-auth-token": "",
// parameters to set in the algorithm (the below are just samples)
"parameters": {
"ema-fast": 10,
"ema-slow": 20
},
"environments": {
// defines the 'backtesting' environment
"backtesting": {
"live-mode": false,
"setup-handler": "QuantConnect.Lean.Engine.Setup.ConsoleSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.BacktestingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.BacktestingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler"
},
// defines the 'live-paper' environment
"live-paper": {
"live-mode": true,
// the paper brokerage requires the BacktestingTransactionHandler
"live-mode-brokerage": "PaperBrokerage",
"setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed",
"data-queue-handler": "QuantConnect.Lean.Engine.DataFeeds.Queues.LiveDataQueue",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler"
},
// defines the 'live-tradier' environment
"live-tradier": {
"live-mode": true,
// this setting will save tradier access/refresh tokens to a tradier-tokens.txt file
// that can be read in next time, this makes it easier to start/stop a tradier algorithm
"tradier-save-tokens": true,
// real brokerage implementations require the BrokerageTransactionHandler
"live-mode-brokerage": "TradierBrokerage",
"data-queue-handler": "TradierBrokerage",
"setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler"
},
// defines the 'live-interactive' environment
"live-interactive": {
"live-mode": true,
// real brokerage implementations require the BrokerageTransactionHandler
"live-mode-brokerage": "InteractiveBrokersBrokerage",
"setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed",
"data-queue-handler": "QuantConnect.Brokerages.InteractiveBrokers.InteractiveBrokersBrokerage",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler",
"history-provider" : "QuantConnect.Brokerages.InteractiveBrokers.InteractiveBrokersBrokerage"
},
// defines the 'live-interactive-iqfeed' environment
"live-interactive-iqfeed": {
"live-mode": true,
// real brokerage implementations require the BrokerageTransactionHandler
"live-mode-brokerage": "InteractiveBrokersBrokerage",
"setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed",
"data-queue-handler": "QuantConnect.ToolBox.IQFeed.IQFeedDataQueueHandler",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler",
"history-provider" : "QuantConnect.ToolBox.IQFeed.IQFeedDataQueueHandler"
},
// defines the 'live-fxcm' environment
"live-fxcm": {
"live-mode": true,
// real brokerage implementations require the BrokerageTransactionHandler
"live-mode-brokerage": "FxcmBrokerage",
"data-queue-handler": "FxcmBrokerage",
"setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler",
"history-provider": "FxcmBrokerage"
},
// defines the 'live-oanda' environment
"live-oanda": {
"live-mode": true,
// real brokerage implementations require the BrokerageTransactionHandler
"live-mode-brokerage": "OandaBrokerage",
"data-queue-handler": "OandaBrokerage",
"setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler",
"history-provider": "OandaBrokerage"
},
// defines the 'backtesting-desktop' environment
"backtesting-desktop": {
"live-mode": false,
"send-via-api": true,
"setup-handler": "QuantConnect.Lean.Engine.Setup.ConsoleSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.BacktestingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.BacktestingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler",
"messaging-handler": "QuantConnect.Messaging.StreamingMessageHandler",
"log-handler": "QuantConnect.Logging.QueueLogHandler",
"desktop-http-port": "1234",
"desktop-exe": "../../../UserInterface/bin/Debug/QuantConnect.Views.exe"
},
// defines the 'live-desktop' environment
"live-desktop": {
"live-mode": true,
"send-via-api": true,
// Set your own brokerage and data queue handlers here.
// Live desktop charting isn't as cool as on quantconnect.com but its pretty neat!
"live-mode-brokerage": "FxcmBrokerage",
"data-queue-handler": "FxcmBrokerage",
"setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler",
"messaging-handler": "QuantConnect.Messaging.StreamingMessageHandler",
"log-handler": "QuantConnect.Logging.QueueLogHandler",
"desktop-http-port": "1234",
"desktop-exe": "../../../UserInterface/bin/Debug/QuantConnect.Views.exe"
}
}
}