@marleena/trb-proto 1.0.45 → 1.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gen/js-ts/indicators/params_pb.d.ts +0 -524
- package/gen/js-ts/indicators/params_pb.js +3919 -8184
- package/gen/js-ts/indicators/values_pb.d.ts +0 -236
- package/gen/js-ts/indicators/values_pb.js +161 -2031
- package/gen/js-ts/strategy/StrategyServiceClientPb.ts +733 -0
- package/gen/js-ts/strategy/backtest_pb.d.ts +334 -0
- package/gen/js-ts/strategy/backtest_pb.js +2607 -0
- package/gen/js-ts/strategy/search_pb.d.ts +432 -0
- package/gen/js-ts/strategy/search_pb.js +3467 -0
- package/gen/js-ts/strategy/spec_pb.d.ts +388 -0
- package/gen/js-ts/strategy/spec_pb.js +3023 -0
- package/gen/js-ts/strategy/strategy_pb.d.ts +775 -0
- package/gen/js-ts/strategy/strategy_pb.js +6470 -0
- package/package.json +1 -1
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import * as jspb from 'google-protobuf'
|
|
2
|
+
|
|
3
|
+
import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto"
|
|
4
|
+
import * as strategy_spec_pb from '../strategy/spec_pb'; // proto import: "strategy/spec.proto"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class BacktestConfig extends jspb.Message {
|
|
8
|
+
getUid(): string;
|
|
9
|
+
setUid(value: string): BacktestConfig;
|
|
10
|
+
|
|
11
|
+
getInterval(): number;
|
|
12
|
+
setInterval(value: number): BacktestConfig;
|
|
13
|
+
|
|
14
|
+
getStart(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
|
15
|
+
setStart(value?: google_protobuf_timestamp_pb.Timestamp): BacktestConfig;
|
|
16
|
+
hasStart(): boolean;
|
|
17
|
+
clearStart(): BacktestConfig;
|
|
18
|
+
|
|
19
|
+
getEnd(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
|
20
|
+
setEnd(value?: google_protobuf_timestamp_pb.Timestamp): BacktestConfig;
|
|
21
|
+
hasEnd(): boolean;
|
|
22
|
+
clearEnd(): BacktestConfig;
|
|
23
|
+
|
|
24
|
+
getInitialCash(): number;
|
|
25
|
+
setInitialCash(value: number): BacktestConfig;
|
|
26
|
+
|
|
27
|
+
getCommissionPct(): number;
|
|
28
|
+
setCommissionPct(value: number): BacktestConfig;
|
|
29
|
+
|
|
30
|
+
getSlippagePct(): number;
|
|
31
|
+
setSlippagePct(value: number): BacktestConfig;
|
|
32
|
+
|
|
33
|
+
getLongOnly(): boolean;
|
|
34
|
+
setLongOnly(value: boolean): BacktestConfig;
|
|
35
|
+
|
|
36
|
+
serializeBinary(): Uint8Array;
|
|
37
|
+
toObject(includeInstance?: boolean): BacktestConfig.AsObject;
|
|
38
|
+
static toObject(includeInstance: boolean, msg: BacktestConfig): BacktestConfig.AsObject;
|
|
39
|
+
static serializeBinaryToWriter(message: BacktestConfig, writer: jspb.BinaryWriter): void;
|
|
40
|
+
static deserializeBinary(bytes: Uint8Array): BacktestConfig;
|
|
41
|
+
static deserializeBinaryFromReader(message: BacktestConfig, reader: jspb.BinaryReader): BacktestConfig;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export namespace BacktestConfig {
|
|
45
|
+
export type AsObject = {
|
|
46
|
+
uid: string,
|
|
47
|
+
interval: number,
|
|
48
|
+
start?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
|
49
|
+
end?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
|
50
|
+
initialCash: number,
|
|
51
|
+
commissionPct: number,
|
|
52
|
+
slippagePct: number,
|
|
53
|
+
longOnly: boolean,
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export class BacktestMetrics extends jspb.Message {
|
|
58
|
+
getTotalReturn(): number;
|
|
59
|
+
setTotalReturn(value: number): BacktestMetrics;
|
|
60
|
+
|
|
61
|
+
getCagr(): number;
|
|
62
|
+
setCagr(value: number): BacktestMetrics;
|
|
63
|
+
|
|
64
|
+
getSharpe(): number;
|
|
65
|
+
setSharpe(value: number): BacktestMetrics;
|
|
66
|
+
|
|
67
|
+
getSortino(): number;
|
|
68
|
+
setSortino(value: number): BacktestMetrics;
|
|
69
|
+
|
|
70
|
+
getMaxDrawdown(): number;
|
|
71
|
+
setMaxDrawdown(value: number): BacktestMetrics;
|
|
72
|
+
|
|
73
|
+
getWinRate(): number;
|
|
74
|
+
setWinRate(value: number): BacktestMetrics;
|
|
75
|
+
|
|
76
|
+
getProfitFactor(): number;
|
|
77
|
+
setProfitFactor(value: number): BacktestMetrics;
|
|
78
|
+
|
|
79
|
+
getSqn(): number;
|
|
80
|
+
setSqn(value: number): BacktestMetrics;
|
|
81
|
+
|
|
82
|
+
getTradesCount(): number;
|
|
83
|
+
setTradesCount(value: number): BacktestMetrics;
|
|
84
|
+
|
|
85
|
+
getExposure(): number;
|
|
86
|
+
setExposure(value: number): BacktestMetrics;
|
|
87
|
+
|
|
88
|
+
getFinalEquity(): number;
|
|
89
|
+
setFinalEquity(value: number): BacktestMetrics;
|
|
90
|
+
|
|
91
|
+
getAvgTradePct(): number;
|
|
92
|
+
setAvgTradePct(value: number): BacktestMetrics;
|
|
93
|
+
|
|
94
|
+
getExpectancy(): number;
|
|
95
|
+
setExpectancy(value: number): BacktestMetrics;
|
|
96
|
+
|
|
97
|
+
getExtraMap(): jspb.Map<string, number>;
|
|
98
|
+
clearExtraMap(): BacktestMetrics;
|
|
99
|
+
|
|
100
|
+
serializeBinary(): Uint8Array;
|
|
101
|
+
toObject(includeInstance?: boolean): BacktestMetrics.AsObject;
|
|
102
|
+
static toObject(includeInstance: boolean, msg: BacktestMetrics): BacktestMetrics.AsObject;
|
|
103
|
+
static serializeBinaryToWriter(message: BacktestMetrics, writer: jspb.BinaryWriter): void;
|
|
104
|
+
static deserializeBinary(bytes: Uint8Array): BacktestMetrics;
|
|
105
|
+
static deserializeBinaryFromReader(message: BacktestMetrics, reader: jspb.BinaryReader): BacktestMetrics;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export namespace BacktestMetrics {
|
|
109
|
+
export type AsObject = {
|
|
110
|
+
totalReturn: number,
|
|
111
|
+
cagr: number,
|
|
112
|
+
sharpe: number,
|
|
113
|
+
sortino: number,
|
|
114
|
+
maxDrawdown: number,
|
|
115
|
+
winRate: number,
|
|
116
|
+
profitFactor: number,
|
|
117
|
+
sqn: number,
|
|
118
|
+
tradesCount: number,
|
|
119
|
+
exposure: number,
|
|
120
|
+
finalEquity: number,
|
|
121
|
+
avgTradePct: number,
|
|
122
|
+
expectancy: number,
|
|
123
|
+
extraMap: Array<[string, number]>,
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export class EquityPoint extends jspb.Message {
|
|
128
|
+
getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
|
129
|
+
setTime(value?: google_protobuf_timestamp_pb.Timestamp): EquityPoint;
|
|
130
|
+
hasTime(): boolean;
|
|
131
|
+
clearTime(): EquityPoint;
|
|
132
|
+
|
|
133
|
+
getEquity(): number;
|
|
134
|
+
setEquity(value: number): EquityPoint;
|
|
135
|
+
|
|
136
|
+
getCash(): number;
|
|
137
|
+
setCash(value: number): EquityPoint;
|
|
138
|
+
|
|
139
|
+
getPositionValue(): number;
|
|
140
|
+
setPositionValue(value: number): EquityPoint;
|
|
141
|
+
|
|
142
|
+
getDrawdown(): number;
|
|
143
|
+
setDrawdown(value: number): EquityPoint;
|
|
144
|
+
|
|
145
|
+
getRet(): number;
|
|
146
|
+
setRet(value: number): EquityPoint;
|
|
147
|
+
|
|
148
|
+
serializeBinary(): Uint8Array;
|
|
149
|
+
toObject(includeInstance?: boolean): EquityPoint.AsObject;
|
|
150
|
+
static toObject(includeInstance: boolean, msg: EquityPoint): EquityPoint.AsObject;
|
|
151
|
+
static serializeBinaryToWriter(message: EquityPoint, writer: jspb.BinaryWriter): void;
|
|
152
|
+
static deserializeBinary(bytes: Uint8Array): EquityPoint;
|
|
153
|
+
static deserializeBinaryFromReader(message: EquityPoint, reader: jspb.BinaryReader): EquityPoint;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export namespace EquityPoint {
|
|
157
|
+
export type AsObject = {
|
|
158
|
+
time?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
|
159
|
+
equity: number,
|
|
160
|
+
cash: number,
|
|
161
|
+
positionValue: number,
|
|
162
|
+
drawdown: number,
|
|
163
|
+
ret: number,
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export class TradeRecord extends jspb.Message {
|
|
168
|
+
getTradeId(): number;
|
|
169
|
+
setTradeId(value: number): TradeRecord;
|
|
170
|
+
|
|
171
|
+
getIsLong(): boolean;
|
|
172
|
+
setIsLong(value: boolean): TradeRecord;
|
|
173
|
+
|
|
174
|
+
getEntryTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
|
175
|
+
setEntryTime(value?: google_protobuf_timestamp_pb.Timestamp): TradeRecord;
|
|
176
|
+
hasEntryTime(): boolean;
|
|
177
|
+
clearEntryTime(): TradeRecord;
|
|
178
|
+
|
|
179
|
+
getEntryPrice(): number;
|
|
180
|
+
setEntryPrice(value: number): TradeRecord;
|
|
181
|
+
|
|
182
|
+
getExitTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
|
183
|
+
setExitTime(value?: google_protobuf_timestamp_pb.Timestamp): TradeRecord;
|
|
184
|
+
hasExitTime(): boolean;
|
|
185
|
+
clearExitTime(): TradeRecord;
|
|
186
|
+
|
|
187
|
+
getExitPrice(): number;
|
|
188
|
+
setExitPrice(value: number): TradeRecord;
|
|
189
|
+
|
|
190
|
+
getSize(): number;
|
|
191
|
+
setSize(value: number): TradeRecord;
|
|
192
|
+
|
|
193
|
+
getPnl(): number;
|
|
194
|
+
setPnl(value: number): TradeRecord;
|
|
195
|
+
|
|
196
|
+
getPnlPct(): number;
|
|
197
|
+
setPnlPct(value: number): TradeRecord;
|
|
198
|
+
|
|
199
|
+
getBarsHeld(): number;
|
|
200
|
+
setBarsHeld(value: number): TradeRecord;
|
|
201
|
+
|
|
202
|
+
getMae(): number;
|
|
203
|
+
setMae(value: number): TradeRecord;
|
|
204
|
+
|
|
205
|
+
getMfe(): number;
|
|
206
|
+
setMfe(value: number): TradeRecord;
|
|
207
|
+
|
|
208
|
+
getEntryReason(): string;
|
|
209
|
+
setEntryReason(value: string): TradeRecord;
|
|
210
|
+
|
|
211
|
+
getExitReason(): string;
|
|
212
|
+
setExitReason(value: string): TradeRecord;
|
|
213
|
+
|
|
214
|
+
serializeBinary(): Uint8Array;
|
|
215
|
+
toObject(includeInstance?: boolean): TradeRecord.AsObject;
|
|
216
|
+
static toObject(includeInstance: boolean, msg: TradeRecord): TradeRecord.AsObject;
|
|
217
|
+
static serializeBinaryToWriter(message: TradeRecord, writer: jspb.BinaryWriter): void;
|
|
218
|
+
static deserializeBinary(bytes: Uint8Array): TradeRecord;
|
|
219
|
+
static deserializeBinaryFromReader(message: TradeRecord, reader: jspb.BinaryReader): TradeRecord;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export namespace TradeRecord {
|
|
223
|
+
export type AsObject = {
|
|
224
|
+
tradeId: number,
|
|
225
|
+
isLong: boolean,
|
|
226
|
+
entryTime?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
|
227
|
+
entryPrice: number,
|
|
228
|
+
exitTime?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
|
229
|
+
exitPrice: number,
|
|
230
|
+
size: number,
|
|
231
|
+
pnl: number,
|
|
232
|
+
pnlPct: number,
|
|
233
|
+
barsHeld: number,
|
|
234
|
+
mae: number,
|
|
235
|
+
mfe: number,
|
|
236
|
+
entryReason: string,
|
|
237
|
+
exitReason: string,
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export class BacktestRun extends jspb.Message {
|
|
242
|
+
getRunId(): string;
|
|
243
|
+
setRunId(value: string): BacktestRun;
|
|
244
|
+
|
|
245
|
+
getStrategyId(): string;
|
|
246
|
+
setStrategyId(value: string): BacktestRun;
|
|
247
|
+
|
|
248
|
+
getSpec(): strategy_spec_pb.StrategySpec | undefined;
|
|
249
|
+
setSpec(value?: strategy_spec_pb.StrategySpec): BacktestRun;
|
|
250
|
+
hasSpec(): boolean;
|
|
251
|
+
clearSpec(): BacktestRun;
|
|
252
|
+
|
|
253
|
+
getConfig(): BacktestConfig | undefined;
|
|
254
|
+
setConfig(value?: BacktestConfig): BacktestRun;
|
|
255
|
+
hasConfig(): boolean;
|
|
256
|
+
clearConfig(): BacktestRun;
|
|
257
|
+
|
|
258
|
+
getStatus(): RunStatus;
|
|
259
|
+
setStatus(value: RunStatus): BacktestRun;
|
|
260
|
+
|
|
261
|
+
getError(): string;
|
|
262
|
+
setError(value: string): BacktestRun;
|
|
263
|
+
|
|
264
|
+
getEngineVersion(): string;
|
|
265
|
+
setEngineVersion(value: string): BacktestRun;
|
|
266
|
+
|
|
267
|
+
getSearchRunId(): string;
|
|
268
|
+
setSearchRunId(value: string): BacktestRun;
|
|
269
|
+
|
|
270
|
+
getCreatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
|
271
|
+
setCreatedAt(value?: google_protobuf_timestamp_pb.Timestamp): BacktestRun;
|
|
272
|
+
hasCreatedAt(): boolean;
|
|
273
|
+
clearCreatedAt(): BacktestRun;
|
|
274
|
+
|
|
275
|
+
getStartedAt(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
|
276
|
+
setStartedAt(value?: google_protobuf_timestamp_pb.Timestamp): BacktestRun;
|
|
277
|
+
hasStartedAt(): boolean;
|
|
278
|
+
clearStartedAt(): BacktestRun;
|
|
279
|
+
|
|
280
|
+
getFinishedAt(): google_protobuf_timestamp_pb.Timestamp | undefined;
|
|
281
|
+
setFinishedAt(value?: google_protobuf_timestamp_pb.Timestamp): BacktestRun;
|
|
282
|
+
hasFinishedAt(): boolean;
|
|
283
|
+
clearFinishedAt(): BacktestRun;
|
|
284
|
+
|
|
285
|
+
serializeBinary(): Uint8Array;
|
|
286
|
+
toObject(includeInstance?: boolean): BacktestRun.AsObject;
|
|
287
|
+
static toObject(includeInstance: boolean, msg: BacktestRun): BacktestRun.AsObject;
|
|
288
|
+
static serializeBinaryToWriter(message: BacktestRun, writer: jspb.BinaryWriter): void;
|
|
289
|
+
static deserializeBinary(bytes: Uint8Array): BacktestRun;
|
|
290
|
+
static deserializeBinaryFromReader(message: BacktestRun, reader: jspb.BinaryReader): BacktestRun;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export namespace BacktestRun {
|
|
294
|
+
export type AsObject = {
|
|
295
|
+
runId: string,
|
|
296
|
+
strategyId: string,
|
|
297
|
+
spec?: strategy_spec_pb.StrategySpec.AsObject,
|
|
298
|
+
config?: BacktestConfig.AsObject,
|
|
299
|
+
status: RunStatus,
|
|
300
|
+
error: string,
|
|
301
|
+
engineVersion: string,
|
|
302
|
+
searchRunId: string,
|
|
303
|
+
createdAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
|
304
|
+
startedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
|
305
|
+
finishedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export class BacktestTask extends jspb.Message {
|
|
310
|
+
getRunId(): string;
|
|
311
|
+
setRunId(value: string): BacktestTask;
|
|
312
|
+
|
|
313
|
+
serializeBinary(): Uint8Array;
|
|
314
|
+
toObject(includeInstance?: boolean): BacktestTask.AsObject;
|
|
315
|
+
static toObject(includeInstance: boolean, msg: BacktestTask): BacktestTask.AsObject;
|
|
316
|
+
static serializeBinaryToWriter(message: BacktestTask, writer: jspb.BinaryWriter): void;
|
|
317
|
+
static deserializeBinary(bytes: Uint8Array): BacktestTask;
|
|
318
|
+
static deserializeBinaryFromReader(message: BacktestTask, reader: jspb.BinaryReader): BacktestTask;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export namespace BacktestTask {
|
|
322
|
+
export type AsObject = {
|
|
323
|
+
runId: string,
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export enum RunStatus {
|
|
328
|
+
RUN_STATUS_UNSPECIFIED = 0,
|
|
329
|
+
RUN_QUEUED = 1,
|
|
330
|
+
RUN_RUNNING = 2,
|
|
331
|
+
RUN_SUCCEEDED = 3,
|
|
332
|
+
RUN_FAILED = 4,
|
|
333
|
+
RUN_CANCELED = 5,
|
|
334
|
+
}
|