backtest-kit 9.8.1 → 9.8.2
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/LICENSE +21 -21
- package/README.md +1893 -1871
- package/build/index.cjs +477 -130
- package/build/index.mjs +476 -131
- package/package.json +86 -86
- package/types.d.ts +123 -3
package/package.json
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "backtest-kit",
|
|
3
|
-
"version": "9.8.
|
|
4
|
-
"description": "A TypeScript library for trading system backtest",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Petr Tripolsky",
|
|
7
|
-
"email": "tripolskypetr@gmail.com",
|
|
8
|
-
"url": "https://github.com/tripolskypetr"
|
|
9
|
-
},
|
|
10
|
-
"funding": {
|
|
11
|
-
"type": "individual",
|
|
12
|
-
"url": "http://paypal.me/tripolskypetr"
|
|
13
|
-
},
|
|
14
|
-
"license": "MIT",
|
|
15
|
-
"homepage": "https://backtest-kit.github.io/documents/article_07_ai_news_trading_signals.html",
|
|
16
|
-
"keywords": [
|
|
17
|
-
"backtesting",
|
|
18
|
-
"backtest",
|
|
19
|
-
"finance",
|
|
20
|
-
"trading",
|
|
21
|
-
"candles",
|
|
22
|
-
"indicators",
|
|
23
|
-
"multi value",
|
|
24
|
-
"multi symbol",
|
|
25
|
-
"framework"
|
|
26
|
-
],
|
|
27
|
-
"files": [
|
|
28
|
-
"build",
|
|
29
|
-
"types.d.ts",
|
|
30
|
-
"README.md"
|
|
31
|
-
],
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "https://github.com/tripolskypetr/backtest-kit",
|
|
35
|
-
"documentation": "https://github.com/tripolskypetr/backtest-kit/tree/master/docs"
|
|
36
|
-
},
|
|
37
|
-
"bugs": {
|
|
38
|
-
"url": "https://github.com/tripolskypetr/backtest-kit/issues"
|
|
39
|
-
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"build": "rollup -c",
|
|
42
|
-
"test": "npm run build && node ./test/index.mjs",
|
|
43
|
-
"build:docs": "rimraf docs && mkdir docs && node ./scripts/dts-docs.cjs ./types.d.ts ./docs",
|
|
44
|
-
"docs:gpt": "npm run build && node ./tools/gpt-docs/index.mjs",
|
|
45
|
-
"docs:uml": "npm run build && node ./scripts/uml.mjs",
|
|
46
|
-
"docs:www": "rimraf docs/wwwroot && node ./tools/typedoc-packages-docs/index.mjs && typedoc && node ./tools/typedoc-yandex-metrica/index.mjs",
|
|
47
|
-
"repl": "dotenv -e .env -- npm run build && node -e \"import('./scripts/repl.mjs')\" --interactive"
|
|
48
|
-
},
|
|
49
|
-
"main": "build/index.cjs",
|
|
50
|
-
"module": "build/index.mjs",
|
|
51
|
-
"source": "src/index.ts",
|
|
52
|
-
"types": "./types.d.ts",
|
|
53
|
-
"exports": {
|
|
54
|
-
"require": "./build/index.cjs",
|
|
55
|
-
"types": "./types.d.ts",
|
|
56
|
-
"import": "./build/index.mjs",
|
|
57
|
-
"default": "./build/index.cjs"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@rollup/plugin-typescript": "11.1.6",
|
|
61
|
-
"@types/node": "22.9.0",
|
|
62
|
-
"glob": "11.0.1",
|
|
63
|
-
"plantuml": "0.0.2",
|
|
64
|
-
"rimraf": "6.0.1",
|
|
65
|
-
"rollup": "3.29.5",
|
|
66
|
-
"rollup-plugin-dts": "6.1.1",
|
|
67
|
-
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
68
|
-
"ts-morph": "27.0.2",
|
|
69
|
-
"tslib": "2.7.0",
|
|
70
|
-
"typedoc": "0.27.9",
|
|
71
|
-
"worker-testbed": "2.0.0"
|
|
72
|
-
},
|
|
73
|
-
"peerDependencies": {
|
|
74
|
-
"typescript": "^5.0.0"
|
|
75
|
-
},
|
|
76
|
-
"dependencies": {
|
|
77
|
-
"di-kit": "^1.1.1",
|
|
78
|
-
"di-scoped": "^1.0.21",
|
|
79
|
-
"di-singleton": "^1.0.5",
|
|
80
|
-
"functools-kit": "^2.3.0",
|
|
81
|
-
"get-moment-stamp": "^1.1.2"
|
|
82
|
-
},
|
|
83
|
-
"publishConfig": {
|
|
84
|
-
"access": "public"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "backtest-kit",
|
|
3
|
+
"version": "9.8.2",
|
|
4
|
+
"description": "A TypeScript library for trading system backtest",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Petr Tripolsky",
|
|
7
|
+
"email": "tripolskypetr@gmail.com",
|
|
8
|
+
"url": "https://github.com/tripolskypetr"
|
|
9
|
+
},
|
|
10
|
+
"funding": {
|
|
11
|
+
"type": "individual",
|
|
12
|
+
"url": "http://paypal.me/tripolskypetr"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"homepage": "https://backtest-kit.github.io/documents/article_07_ai_news_trading_signals.html",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"backtesting",
|
|
18
|
+
"backtest",
|
|
19
|
+
"finance",
|
|
20
|
+
"trading",
|
|
21
|
+
"candles",
|
|
22
|
+
"indicators",
|
|
23
|
+
"multi value",
|
|
24
|
+
"multi symbol",
|
|
25
|
+
"framework"
|
|
26
|
+
],
|
|
27
|
+
"files": [
|
|
28
|
+
"build",
|
|
29
|
+
"types.d.ts",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/tripolskypetr/backtest-kit",
|
|
35
|
+
"documentation": "https://github.com/tripolskypetr/backtest-kit/tree/master/docs"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/tripolskypetr/backtest-kit/issues"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "rollup -c",
|
|
42
|
+
"test": "npm run build && node ./test/index.mjs",
|
|
43
|
+
"build:docs": "rimraf docs && mkdir docs && node ./scripts/dts-docs.cjs ./types.d.ts ./docs",
|
|
44
|
+
"docs:gpt": "npm run build && node ./tools/gpt-docs/index.mjs",
|
|
45
|
+
"docs:uml": "npm run build && node ./scripts/uml.mjs",
|
|
46
|
+
"docs:www": "rimraf docs/wwwroot && node ./tools/typedoc-packages-docs/index.mjs && typedoc && node ./tools/typedoc-yandex-metrica/index.mjs",
|
|
47
|
+
"repl": "dotenv -e .env -- npm run build && node -e \"import('./scripts/repl.mjs')\" --interactive"
|
|
48
|
+
},
|
|
49
|
+
"main": "build/index.cjs",
|
|
50
|
+
"module": "build/index.mjs",
|
|
51
|
+
"source": "src/index.ts",
|
|
52
|
+
"types": "./types.d.ts",
|
|
53
|
+
"exports": {
|
|
54
|
+
"require": "./build/index.cjs",
|
|
55
|
+
"types": "./types.d.ts",
|
|
56
|
+
"import": "./build/index.mjs",
|
|
57
|
+
"default": "./build/index.cjs"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@rollup/plugin-typescript": "11.1.6",
|
|
61
|
+
"@types/node": "22.9.0",
|
|
62
|
+
"glob": "11.0.1",
|
|
63
|
+
"plantuml": "0.0.2",
|
|
64
|
+
"rimraf": "6.0.1",
|
|
65
|
+
"rollup": "3.29.5",
|
|
66
|
+
"rollup-plugin-dts": "6.1.1",
|
|
67
|
+
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
68
|
+
"ts-morph": "27.0.2",
|
|
69
|
+
"tslib": "2.7.0",
|
|
70
|
+
"typedoc": "0.27.9",
|
|
71
|
+
"worker-testbed": "2.0.0"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"typescript": "^5.0.0"
|
|
75
|
+
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"di-kit": "^1.1.1",
|
|
78
|
+
"di-scoped": "^1.0.21",
|
|
79
|
+
"di-singleton": "^1.0.5",
|
|
80
|
+
"functools-kit": "^2.3.0",
|
|
81
|
+
"get-moment-stamp": "^1.1.2"
|
|
82
|
+
},
|
|
83
|
+
"publishConfig": {
|
|
84
|
+
"access": "public"
|
|
85
|
+
}
|
|
86
|
+
}
|
package/types.d.ts
CHANGED
|
@@ -4393,7 +4393,7 @@ type ExchangeName = string;
|
|
|
4393
4393
|
* Parameters for pre-caching candles into persist storage.
|
|
4394
4394
|
* Used to download historical candle data before running a backtest.
|
|
4395
4395
|
*/
|
|
4396
|
-
interface
|
|
4396
|
+
interface IWarmCandlesParams {
|
|
4397
4397
|
/** Trading pair symbol (e.g., "BTCUSDT") */
|
|
4398
4398
|
symbol: string;
|
|
4399
4399
|
/** Name of the registered exchange schema */
|
|
@@ -4421,6 +4421,17 @@ interface ICheckCandlesParams {
|
|
|
4421
4421
|
/** End date of the validation range (inclusive) */
|
|
4422
4422
|
to: Date;
|
|
4423
4423
|
}
|
|
4424
|
+
/**
|
|
4425
|
+
* Parameters for the combined check-then-warm caching flow.
|
|
4426
|
+
* Extends both validation and pre-cache parameter sets and adds
|
|
4427
|
+
* lifecycle callbacks invoked before each phase of the flow.
|
|
4428
|
+
*/
|
|
4429
|
+
interface ICacheCandlesParams extends IWarmCandlesParams, ICheckCandlesParams {
|
|
4430
|
+
/** Invoked before the cache validation phase starts */
|
|
4431
|
+
onWarmStart?: (symbol: string, interval: CandleInterval, from: Date, to: Date) => void;
|
|
4432
|
+
/** Invoked before the cache warm-up phase starts (after a validation miss) */
|
|
4433
|
+
onCheckStart?: (symbol: string, interval: CandleInterval, from: Date, to: Date) => void;
|
|
4434
|
+
}
|
|
4424
4435
|
/**
|
|
4425
4436
|
* Checks cached candle presence via the persist adapter.
|
|
4426
4437
|
* Issues one ranged read; adapter-side `hasValue` covers each expected timestamp,
|
|
@@ -4435,7 +4446,15 @@ declare function checkCandles(params: ICheckCandlesParams): Promise<void>;
|
|
|
4435
4446
|
*
|
|
4436
4447
|
* @param params - Cache parameters
|
|
4437
4448
|
*/
|
|
4438
|
-
declare function warmCandles(params:
|
|
4449
|
+
declare function warmCandles(params: IWarmCandlesParams): Promise<void>;
|
|
4450
|
+
/**
|
|
4451
|
+
* Ensures candles for the given range are present in persist storage.
|
|
4452
|
+
* Runs a check-then-warm pipeline with one retry: validates the cache first
|
|
4453
|
+
* and, on a miss, downloads the missing data and re-validates.
|
|
4454
|
+
*
|
|
4455
|
+
* @param params - Combined cache parameters with optional lifecycle callbacks
|
|
4456
|
+
*/
|
|
4457
|
+
declare function cacheCandles({ symbol, interval, from, to, exchangeName, onCheckStart, onWarmStart, }: ICacheCandlesParams): Promise<void>;
|
|
4439
4458
|
|
|
4440
4459
|
/**
|
|
4441
4460
|
* Type alias for enum objects with string key-value pairs
|
|
@@ -6633,6 +6652,22 @@ declare const GLOBAL_CONFIG: {
|
|
|
6633
6652
|
* Default: true (mutex locking enabled for candle fetching)
|
|
6634
6653
|
*/
|
|
6635
6654
|
CC_ENABLE_CANDLE_FETCH_MUTEX: boolean;
|
|
6655
|
+
/**
|
|
6656
|
+
* Enables cooperative interleaving of concurrently running backtests after each candle fetch.
|
|
6657
|
+
*
|
|
6658
|
+
* Mechanism (implemented in `Candle.spinLock`):
|
|
6659
|
+
* - After `getNextCandles` resolves, the current backtest awaits
|
|
6660
|
+
* `Promise.race([_spin.toPromise(), sleep(50)])`, where `_spin` is emitted whenever
|
|
6661
|
+
* another caller acquires the candle-fetch mutex.
|
|
6662
|
+
* - This hands the event loop to a peer backtest waiting on the same mutex, so multiple
|
|
6663
|
+
* parallel `Backtest.run` / `Walker` workloads progress in round-robin fashion instead
|
|
6664
|
+
* of one monopolizing the event loop until completion.
|
|
6665
|
+
* - The spin is skipped entirely when `Lookup.isParallel` is `false` (single active workload —
|
|
6666
|
+
* no peer to yield to) or when `CC_ENABLE_CANDLE_FETCH_MUTEX` is disabled.
|
|
6667
|
+
*
|
|
6668
|
+
* Default: true (parallel backtests are interleaved on each candle fetch boundary)
|
|
6669
|
+
*/
|
|
6670
|
+
CC_ENABLE_BACKTEST_PARALLEL_SPIN: boolean;
|
|
6636
6671
|
/**
|
|
6637
6672
|
* Enables DCA (Dollar-Cost Averaging) logic even if antirecord is not broken.
|
|
6638
6673
|
* Allows to commitAverageBuy if currentPrice is not the lowest price since entry, but still lower than priceOpen.
|
|
@@ -6809,6 +6844,7 @@ declare function getConfig(): {
|
|
|
6809
6844
|
CC_MAX_SIGNALS: number;
|
|
6810
6845
|
CC_MAX_LOG_LINES: number;
|
|
6811
6846
|
CC_ENABLE_CANDLE_FETCH_MUTEX: boolean;
|
|
6847
|
+
CC_ENABLE_BACKTEST_PARALLEL_SPIN: boolean;
|
|
6812
6848
|
CC_ENABLE_DCA_EVERYWHERE: boolean;
|
|
6813
6849
|
CC_ENABLE_PPPL_EVERYWHERE: boolean;
|
|
6814
6850
|
CC_ENABLE_LONG_SIGNAL: boolean;
|
|
@@ -6867,6 +6903,7 @@ declare function getDefaultConfig(): Readonly<{
|
|
|
6867
6903
|
CC_MAX_SIGNALS: number;
|
|
6868
6904
|
CC_MAX_LOG_LINES: number;
|
|
6869
6905
|
CC_ENABLE_CANDLE_FETCH_MUTEX: boolean;
|
|
6906
|
+
CC_ENABLE_BACKTEST_PARALLEL_SPIN: boolean;
|
|
6870
6907
|
CC_ENABLE_DCA_EVERYWHERE: boolean;
|
|
6871
6908
|
CC_ENABLE_PPPL_EVERYWHERE: boolean;
|
|
6872
6909
|
CC_ENABLE_LONG_SIGNAL: boolean;
|
|
@@ -20290,6 +20327,89 @@ declare class ScheduleUtils {
|
|
|
20290
20327
|
*/
|
|
20291
20328
|
declare const Schedule: ScheduleUtils;
|
|
20292
20329
|
|
|
20330
|
+
/**
|
|
20331
|
+
* Single entry tracking one in-flight backtest or live run.
|
|
20332
|
+
*
|
|
20333
|
+
* Registered into the lookup map on activity start (e.g. `INSTANCE_TASK_FN` in
|
|
20334
|
+
* `Backtest`/`Live`, or per-strategy loop in `WalkerLogicPrivateService`) and
|
|
20335
|
+
* removed on completion or failure.
|
|
20336
|
+
*
|
|
20337
|
+
* Used by `Candle.spinLock` to detect parallel workloads via {@link LookupUtils.isParallel}.
|
|
20338
|
+
*/
|
|
20339
|
+
interface IActivityEntry {
|
|
20340
|
+
/** Trading pair symbol (e.g. `"BTCUSDT"`). */
|
|
20341
|
+
symbol: string;
|
|
20342
|
+
/** Execution context identifying the running strategy. */
|
|
20343
|
+
context: {
|
|
20344
|
+
/** Strategy schema name driving the activity. */
|
|
20345
|
+
strategyName: StrategyName;
|
|
20346
|
+
/** Exchange schema name providing market data. */
|
|
20347
|
+
exchangeName: ExchangeName;
|
|
20348
|
+
/** Frame schema name (backtest only — live runs leave this `undefined`). */
|
|
20349
|
+
frameName?: FrameName;
|
|
20350
|
+
};
|
|
20351
|
+
/** `true` for backtest activities, `false` for live activities. */
|
|
20352
|
+
backtest: boolean;
|
|
20353
|
+
}
|
|
20354
|
+
/**
|
|
20355
|
+
* In-memory registry of currently running backtest and live activities.
|
|
20356
|
+
*
|
|
20357
|
+
* Purpose:
|
|
20358
|
+
* - Each `Backtest.run` / `Live.run` / per-strategy walker iteration registers an
|
|
20359
|
+
* {@link IActivityEntry} on start and removes it on completion.
|
|
20360
|
+
* - `Candle.spinLock` consults {@link isParallel} to decide whether the event-loop
|
|
20361
|
+
* hand-off (post-candle-fetch spin) is worth performing. With a single active
|
|
20362
|
+
* workload there is no peer to yield to, so the spin is skipped entirely.
|
|
20363
|
+
*
|
|
20364
|
+
* Exposed as the `Lookup` singleton; no constructor parameters.
|
|
20365
|
+
*
|
|
20366
|
+
* @example
|
|
20367
|
+
* ```typescript
|
|
20368
|
+
* Lookup.addActivity({ symbol: "BTCUSDT", context, backtest: true });
|
|
20369
|
+
* try {
|
|
20370
|
+
* for await (const _ of run(symbol, context)) { ... }
|
|
20371
|
+
* } finally {
|
|
20372
|
+
* Lookup.removeActivity({ symbol: "BTCUSDT", context, backtest: true });
|
|
20373
|
+
* }
|
|
20374
|
+
* ```
|
|
20375
|
+
*/
|
|
20376
|
+
declare class LookupUtils {
|
|
20377
|
+
/** Active entries keyed by their composite {@link Key}. */
|
|
20378
|
+
private readonly _lookupMap;
|
|
20379
|
+
/**
|
|
20380
|
+
* `true` when more than one activity is currently registered.
|
|
20381
|
+
* Used by `Candle.spinLock` to decide whether yielding the event loop is useful.
|
|
20382
|
+
*/
|
|
20383
|
+
get isParallel(): boolean;
|
|
20384
|
+
/**
|
|
20385
|
+
* Registers a backtest or live activity in the lookup map.
|
|
20386
|
+
* Idempotent for identical keys — duplicate calls overwrite the existing entry.
|
|
20387
|
+
*
|
|
20388
|
+
* @param activity - Activity descriptor identifying the running workload.
|
|
20389
|
+
*/
|
|
20390
|
+
addActivity: (activity: IActivityEntry) => void;
|
|
20391
|
+
/**
|
|
20392
|
+
* Removes a previously registered activity from the lookup map.
|
|
20393
|
+
* Must be paired with a prior {@link addActivity}, typically in a `finally` block,
|
|
20394
|
+
* so a thrown error in the underlying run does not leave a stale entry behind.
|
|
20395
|
+
*
|
|
20396
|
+
* @param activity - Activity descriptor matching the one passed to {@link addActivity}.
|
|
20397
|
+
*/
|
|
20398
|
+
removeActivity: (activity: IActivityEntry) => void;
|
|
20399
|
+
/**
|
|
20400
|
+
* Returns a snapshot of currently active entries.
|
|
20401
|
+
*
|
|
20402
|
+
* @returns Array of all activities present in the lookup map at call time.
|
|
20403
|
+
*/
|
|
20404
|
+
listActivity: () => IActivityEntry[];
|
|
20405
|
+
}
|
|
20406
|
+
/**
|
|
20407
|
+
* Process-wide singleton instance of {@link LookupUtils}.
|
|
20408
|
+
* Imported by `Backtest`, `Live`, `WalkerLogicPrivateService` (registration sites)
|
|
20409
|
+
* and by `Candle` (read-only consumer via `isParallel`).
|
|
20410
|
+
*/
|
|
20411
|
+
declare const Lookup: LookupUtils;
|
|
20412
|
+
|
|
20293
20413
|
/**
|
|
20294
20414
|
* Type alias for column configuration used in performance metrics markdown reports.
|
|
20295
20415
|
*
|
|
@@ -35959,4 +36079,4 @@ declare const getTotalClosed: (signal: Signal) => {
|
|
|
35959
36079
|
remainingCostBasis: number;
|
|
35960
36080
|
};
|
|
35961
36081
|
|
|
35962
|
-
export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, type BreakevenEvent, type BreakevenStatisticsModel, Broker, type BrokerAverageBuyPayload, BrokerBase, type BrokerBreakevenPayload, type BrokerPartialLossPayload, type BrokerPartialProfitPayload, type BrokerSignalClosePayload, type BrokerSignalOpenPayload, type BrokerTrailingStopPayload, type BrokerTrailingTakePayload, Cache, type CancelScheduledCommit, type CancelScheduledCommitNotification, type CandleData, type CandleInterval, type ClosePendingCommit, type ClosePendingCommitNotification, type ColumnConfig, type ColumnModel, type CommitPayload, Constant, type CriticalErrorNotification, type DoneContract, Dump, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, HighestProfit, type HighestProfitContract, type HighestProfitEvent, type HighestProfitStatisticsModel, type IActionSchema, type IActivateScheduledCommitRow, type IAggregatedTradeData, type IBidData, type IBreakevenCommitRow, type IBroker, type ICandleData, type ICommitRow, type IDumpContext, type IDumpInstance, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type ILog, type ILogEntry, type ILogger, type IMarkdownDumpOptions, type IMemoryInstance, type INotificationUtils, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type IPersistBreakevenInstance, type IPersistCandleInstance, type IPersistIntervalInstance, type IPersistLogInstance, type IPersistMeasureInstance, type IPersistMemoryInstance, type IPersistNotificationInstance, type IPersistPartialInstance, type IPersistRecentInstance, type IPersistRiskInstance, type IPersistScheduleInstance, type IPersistSessionInstance, type IPersistSignalInstance, type IPersistStateInstance, type IPersistStorageInstance, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicAction, type IPublicCandleData, type IPublicSignalRow, type IRecentUtils, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, type IRiskSignalRow, type IRiskValidation, type IRiskValidationFn, type IRiskValidationPayload, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISessionInstance, type ISignalDto, type ISignalIntervalDto, type ISignalRow, type ISizingCalculateParams, type ISizingCalculateParamsATR, type ISizingCalculateParamsFixedPercentage, type ISizingCalculateParamsKelly, type ISizingParams, type ISizingParamsATR, type ISizingParamsFixedPercentage, type ISizingParamsKelly, type ISizingSchema, type ISizingSchemaATR, type ISizingSchemaFixedPercentage, type ISizingSchemaKelly, type IStateInstance, type IStorageSignalRow, type IStorageUtils, type IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IStrategyTickResultWaiting, type ITrailingStopCommitRow, type ITrailingTakeCommitRow, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type IdlePingContract, type InfoErrorNotification, Interval, type IntervalData, Live, type LiveStatisticsModel, Log, type LogData, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, MemoryBacktest, MemoryBacktestAdapter, type MemoryData, MemoryLive, MemoryLiveAdapter, type MessageModel, type MessageRole, type MessageToolCall, MethodContextService, type MetricStats, Notification, NotificationBacktest, type NotificationData, NotificationLive, type NotificationModel, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossAvailableNotification, type PartialLossCommit, type PartialLossCommitNotification, type PartialLossContract, type PartialProfitAvailableNotification, type PartialProfitCommit, type PartialProfitCommitNotification, type PartialProfitContract, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistBreakevenInstance, PersistCandleAdapter, PersistCandleInstance, PersistIntervalAdapter, PersistIntervalInstance, PersistLogAdapter, PersistLogInstance, PersistMeasureAdapter, PersistMeasureInstance, PersistMemoryAdapter, PersistMemoryInstance, PersistNotificationAdapter, PersistNotificationInstance, PersistPartialAdapter, PersistPartialInstance, PersistRecentAdapter, PersistRecentInstance, PersistRiskAdapter, PersistRiskInstance, PersistScheduleAdapter, PersistScheduleInstance, PersistSessionAdapter, PersistSessionInstance, PersistSignalAdapter, PersistSignalInstance, PersistStateAdapter, PersistStateInstance, PersistStorageAdapter, PersistStorageInstance, Position, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Recent, RecentBacktest, type RecentData, RecentLive, Reflect, Report, ReportBase, type ReportName, ReportWriter, Risk, type RiskContract, type RiskData, type RiskEvent, type RiskRejectionNotification, type RiskStatisticsModel, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, SessionBacktest, type SessionData, SessionLive, type SignalCancelledNotification, type SignalCloseContract, type SignalClosedNotification, type SignalData, type SignalInfoContract, type SignalInfoNotification, type SignalInterval, type SignalOpenContract, type SignalOpenedNotification, type SignalScheduledNotification, type SignalSyncCloseNotification, type SignalSyncContract, type SignalSyncOpenNotification, State, StateBacktest, StateBacktestAdapter, type StateData, StateLive, StateLiveAdapter, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, System, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TPersistBreakevenInstanceCtor, type TPersistCandleInstanceCtor, type TPersistIntervalInstanceCtor, type TPersistLogInstanceCtor, type TPersistMeasureInstanceCtor, type TPersistMemoryInstanceCtor, type TPersistNotificationInstanceCtor, type TPersistPartialInstanceCtor, type TPersistRecentInstanceCtor, type TPersistRiskInstanceCtor, type TPersistScheduleInstanceCtor, type TPersistSessionInstanceCtor, type TPersistSignalInstanceCtor, type TPersistStateInstanceCtor, type TPersistStorageInstanceCtor, type TRecentUtilsCtor, type TReportBase, type TSessionInstanceCtor, type TStateInstanceCtor, type TStorageUtilsCtor, type TickEvent, type TrailingStopCommit, type TrailingStopCommitNotification, type TrailingTakeCommit, type TrailingTakeCommitNotification, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, alignToInterval, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, createSignalState, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getClosePrice, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getEffectivePriceOpen, getExchangeSchema, getFrameSchema, getLatestSignal, getMaxDrawdownDistancePnlCost, getMaxDrawdownDistancePnlPercentage, getMinutesSinceLatestSignalCreated, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionActiveMinutes, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestMaxDrawdownPnlCost, getPositionHighestMaxDrawdownPnlPercentage, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitDistancePnlCost, getPositionHighestProfitDistancePnlPercentage, getPositionHighestProfitMinutes, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, getPositionMaxDrawdownMinutes, getPositionMaxDrawdownPnlCost, getPositionMaxDrawdownPnlPercentage, getPositionMaxDrawdownPrice, getPositionMaxDrawdownTimestamp, getPositionPartialOverlap, getPositionPartials, getPositionPnlCost, getPositionPnlPercent, getPositionWaitingMinutes, getRawCandles, getRiskSchema, getScheduledSignal, getSessionData, getSignalState, getSizingSchema, getStrategySchema, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, intervalStepMs, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenHighestProfit, listenHighestProfitOnce, listenIdlePing, listenIdlePingOnce, listenMaxDrawdown, listenMaxDrawdownOnce, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalNotify, listenSignalNotifyOnce, listenSignalOnce, listenStrategyCommit, listenStrategyCommitOnce, listenSync, listenSyncOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, percentDiff, percentToCloseCost, percentValue, readMemory, removeMemory, roundTicks, runInMockContext, searchMemory, set, setColumns, setConfig, setLogger, setSessionData, setSignalState, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, waitForReady, warmCandles, writeMemory };
|
|
36082
|
+
export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, type BreakevenEvent, type BreakevenStatisticsModel, Broker, type BrokerAverageBuyPayload, BrokerBase, type BrokerBreakevenPayload, type BrokerPartialLossPayload, type BrokerPartialProfitPayload, type BrokerSignalClosePayload, type BrokerSignalOpenPayload, type BrokerTrailingStopPayload, type BrokerTrailingTakePayload, Cache, type CancelScheduledCommit, type CancelScheduledCommitNotification, type CandleData, type CandleInterval, type ClosePendingCommit, type ClosePendingCommitNotification, type ColumnConfig, type ColumnModel, type CommitPayload, Constant, type CriticalErrorNotification, type DoneContract, Dump, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, HighestProfit, type HighestProfitContract, type HighestProfitEvent, type HighestProfitStatisticsModel, type IActionSchema, type IActivateScheduledCommitRow, type IAggregatedTradeData, type IBidData, type IBreakevenCommitRow, type IBroker, type ICandleData, type ICommitRow, type IDumpContext, type IDumpInstance, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type ILog, type ILogEntry, type ILogger, type IMarkdownDumpOptions, type IMemoryInstance, type INotificationUtils, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type IPersistBreakevenInstance, type IPersistCandleInstance, type IPersistIntervalInstance, type IPersistLogInstance, type IPersistMeasureInstance, type IPersistMemoryInstance, type IPersistNotificationInstance, type IPersistPartialInstance, type IPersistRecentInstance, type IPersistRiskInstance, type IPersistScheduleInstance, type IPersistSessionInstance, type IPersistSignalInstance, type IPersistStateInstance, type IPersistStorageInstance, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicAction, type IPublicCandleData, type IPublicSignalRow, type IRecentUtils, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, type IRiskSignalRow, type IRiskValidation, type IRiskValidationFn, type IRiskValidationPayload, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISessionInstance, type ISignalDto, type ISignalIntervalDto, type ISignalRow, type ISizingCalculateParams, type ISizingCalculateParamsATR, type ISizingCalculateParamsFixedPercentage, type ISizingCalculateParamsKelly, type ISizingParams, type ISizingParamsATR, type ISizingParamsFixedPercentage, type ISizingParamsKelly, type ISizingSchema, type ISizingSchemaATR, type ISizingSchemaFixedPercentage, type ISizingSchemaKelly, type IStateInstance, type IStorageSignalRow, type IStorageUtils, type IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IStrategyTickResultWaiting, type ITrailingStopCommitRow, type ITrailingTakeCommitRow, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type IdlePingContract, type InfoErrorNotification, Interval, type IntervalData, Live, type LiveStatisticsModel, Log, type LogData, Lookup, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, MemoryBacktest, MemoryBacktestAdapter, type MemoryData, MemoryLive, MemoryLiveAdapter, type MessageModel, type MessageRole, type MessageToolCall, MethodContextService, type MetricStats, Notification, NotificationBacktest, type NotificationData, NotificationLive, type NotificationModel, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossAvailableNotification, type PartialLossCommit, type PartialLossCommitNotification, type PartialLossContract, type PartialProfitAvailableNotification, type PartialProfitCommit, type PartialProfitCommitNotification, type PartialProfitContract, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistBreakevenInstance, PersistCandleAdapter, PersistCandleInstance, PersistIntervalAdapter, PersistIntervalInstance, PersistLogAdapter, PersistLogInstance, PersistMeasureAdapter, PersistMeasureInstance, PersistMemoryAdapter, PersistMemoryInstance, PersistNotificationAdapter, PersistNotificationInstance, PersistPartialAdapter, PersistPartialInstance, PersistRecentAdapter, PersistRecentInstance, PersistRiskAdapter, PersistRiskInstance, PersistScheduleAdapter, PersistScheduleInstance, PersistSessionAdapter, PersistSessionInstance, PersistSignalAdapter, PersistSignalInstance, PersistStateAdapter, PersistStateInstance, PersistStorageAdapter, PersistStorageInstance, Position, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Recent, RecentBacktest, type RecentData, RecentLive, Reflect, Report, ReportBase, type ReportName, ReportWriter, Risk, type RiskContract, type RiskData, type RiskEvent, type RiskRejectionNotification, type RiskStatisticsModel, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, SessionBacktest, type SessionData, SessionLive, type SignalCancelledNotification, type SignalCloseContract, type SignalClosedNotification, type SignalData, type SignalInfoContract, type SignalInfoNotification, type SignalInterval, type SignalOpenContract, type SignalOpenedNotification, type SignalScheduledNotification, type SignalSyncCloseNotification, type SignalSyncContract, type SignalSyncOpenNotification, State, StateBacktest, StateBacktestAdapter, type StateData, StateLive, StateLiveAdapter, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, System, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TPersistBreakevenInstanceCtor, type TPersistCandleInstanceCtor, type TPersistIntervalInstanceCtor, type TPersistLogInstanceCtor, type TPersistMeasureInstanceCtor, type TPersistMemoryInstanceCtor, type TPersistNotificationInstanceCtor, type TPersistPartialInstanceCtor, type TPersistRecentInstanceCtor, type TPersistRiskInstanceCtor, type TPersistScheduleInstanceCtor, type TPersistSessionInstanceCtor, type TPersistSignalInstanceCtor, type TPersistStateInstanceCtor, type TPersistStorageInstanceCtor, type TRecentUtilsCtor, type TReportBase, type TSessionInstanceCtor, type TStateInstanceCtor, type TStorageUtilsCtor, type TickEvent, type TrailingStopCommit, type TrailingStopCommitNotification, type TrailingTakeCommit, type TrailingTakeCommitNotification, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, alignToInterval, cacheCandles, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, createSignalState, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getClosePrice, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getEffectivePriceOpen, getExchangeSchema, getFrameSchema, getLatestSignal, getMaxDrawdownDistancePnlCost, getMaxDrawdownDistancePnlPercentage, getMinutesSinceLatestSignalCreated, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionActiveMinutes, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestMaxDrawdownPnlCost, getPositionHighestMaxDrawdownPnlPercentage, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitDistancePnlCost, getPositionHighestProfitDistancePnlPercentage, getPositionHighestProfitMinutes, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, getPositionMaxDrawdownMinutes, getPositionMaxDrawdownPnlCost, getPositionMaxDrawdownPnlPercentage, getPositionMaxDrawdownPrice, getPositionMaxDrawdownTimestamp, getPositionPartialOverlap, getPositionPartials, getPositionPnlCost, getPositionPnlPercent, getPositionWaitingMinutes, getRawCandles, getRiskSchema, getScheduledSignal, getSessionData, getSignalState, getSizingSchema, getStrategySchema, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, intervalStepMs, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenHighestProfit, listenHighestProfitOnce, listenIdlePing, listenIdlePingOnce, listenMaxDrawdown, listenMaxDrawdownOnce, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalNotify, listenSignalNotifyOnce, listenSignalOnce, listenStrategyCommit, listenStrategyCommitOnce, listenSync, listenSyncOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, percentDiff, percentToCloseCost, percentValue, readMemory, removeMemory, roundTicks, runInMockContext, searchMemory, set, setColumns, setConfig, setLogger, setSessionData, setSignalState, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, waitForReady, warmCandles, writeMemory };
|