backtest-kit 2.2.16 → 2.2.18
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/build/index.cjs +739 -209
- package/build/index.mjs +738 -210
- package/package.json +1 -1
- package/types.d.ts +240 -133
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1285,6 +1285,74 @@ interface IScheduledSignalCancelRow extends IScheduledSignalRow {
|
|
|
1285
1285
|
/** Cancellation ID (only for user-initiated cancellations) */
|
|
1286
1286
|
cancelId?: string;
|
|
1287
1287
|
}
|
|
1288
|
+
/**
|
|
1289
|
+
* Base interface for queued commit events.
|
|
1290
|
+
* Used to defer commit emission until proper execution context is available.
|
|
1291
|
+
*/
|
|
1292
|
+
interface ICommitRowBase {
|
|
1293
|
+
/** Trading pair symbol */
|
|
1294
|
+
symbol: string;
|
|
1295
|
+
/** Whether running in backtest mode */
|
|
1296
|
+
backtest: boolean;
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* Queued partial profit commit.
|
|
1300
|
+
*/
|
|
1301
|
+
interface IPartialProfitCommitRow extends ICommitRowBase {
|
|
1302
|
+
/** Discriminator */
|
|
1303
|
+
action: "partial-profit";
|
|
1304
|
+
/** Percentage of position closed */
|
|
1305
|
+
percentToClose: number;
|
|
1306
|
+
/** Price at which partial was executed */
|
|
1307
|
+
currentPrice: number;
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* Queued partial loss commit.
|
|
1311
|
+
*/
|
|
1312
|
+
interface IPartialLossCommitRow extends ICommitRowBase {
|
|
1313
|
+
/** Discriminator */
|
|
1314
|
+
action: "partial-loss";
|
|
1315
|
+
/** Percentage of position closed */
|
|
1316
|
+
percentToClose: number;
|
|
1317
|
+
/** Price at which partial was executed */
|
|
1318
|
+
currentPrice: number;
|
|
1319
|
+
}
|
|
1320
|
+
/**
|
|
1321
|
+
* Queued breakeven commit.
|
|
1322
|
+
*/
|
|
1323
|
+
interface IBreakevenCommitRow extends ICommitRowBase {
|
|
1324
|
+
/** Discriminator */
|
|
1325
|
+
action: "breakeven";
|
|
1326
|
+
/** Price at which breakeven was set */
|
|
1327
|
+
currentPrice: number;
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1330
|
+
* Queued trailing stop commit.
|
|
1331
|
+
*/
|
|
1332
|
+
interface ITrailingStopCommitRow extends ICommitRowBase {
|
|
1333
|
+
/** Discriminator */
|
|
1334
|
+
action: "trailing-stop";
|
|
1335
|
+
/** Percentage shift applied */
|
|
1336
|
+
percentShift: number;
|
|
1337
|
+
/** Price at which trailing was set */
|
|
1338
|
+
currentPrice: number;
|
|
1339
|
+
}
|
|
1340
|
+
/**
|
|
1341
|
+
* Queued trailing take commit.
|
|
1342
|
+
*/
|
|
1343
|
+
interface ITrailingTakeCommitRow extends ICommitRowBase {
|
|
1344
|
+
/** Discriminator */
|
|
1345
|
+
action: "trailing-take";
|
|
1346
|
+
/** Percentage shift applied */
|
|
1347
|
+
percentShift: number;
|
|
1348
|
+
/** Price at which trailing was set */
|
|
1349
|
+
currentPrice: number;
|
|
1350
|
+
}
|
|
1351
|
+
/**
|
|
1352
|
+
* Discriminated union of all queued commit events.
|
|
1353
|
+
* These are stored in _commitQueue and processed in tick()/backtest().
|
|
1354
|
+
*/
|
|
1355
|
+
type ICommitRow = IPartialProfitCommitRow | IPartialLossCommitRow | IBreakevenCommitRow | ITrailingStopCommitRow | ITrailingTakeCommitRow;
|
|
1288
1356
|
/**
|
|
1289
1357
|
* Optional lifecycle callbacks for signal events.
|
|
1290
1358
|
* Called when signals are opened, active, idle, closed, scheduled, or cancelled.
|
|
@@ -12494,219 +12562,258 @@ declare class RiskUtils {
|
|
|
12494
12562
|
*/
|
|
12495
12563
|
declare const Risk: RiskUtils;
|
|
12496
12564
|
|
|
12565
|
+
/**
|
|
12566
|
+
* Type alias for signal storage row identifier.
|
|
12567
|
+
* Extracted from IStorageSignalRow for type safety and reusability.
|
|
12568
|
+
*/
|
|
12497
12569
|
type StorageId = IStorageSignalRow["id"];
|
|
12498
12570
|
/**
|
|
12499
|
-
*
|
|
12500
|
-
*
|
|
12501
|
-
* Stores trading signal history for admin dashboard display during backtesting
|
|
12502
|
-
* with automatic initialization, deduplication, and storage limits.
|
|
12503
|
-
*
|
|
12504
|
-
* @example
|
|
12505
|
-
* ```typescript
|
|
12506
|
-
* import { StorageBacktestUtils } from "./classes/Storage";
|
|
12507
|
-
*
|
|
12508
|
-
* const storage = new StorageBacktestUtils();
|
|
12509
|
-
*
|
|
12510
|
-
* // Handle signal events
|
|
12511
|
-
* await storage.handleOpened(tickResult);
|
|
12512
|
-
* await storage.handleClosed(tickResult);
|
|
12513
|
-
*
|
|
12514
|
-
* // Query signals
|
|
12515
|
-
* const signal = await storage.findById("signal-123");
|
|
12516
|
-
* const allSignals = await storage.list();
|
|
12517
|
-
* ```
|
|
12571
|
+
* Base interface for storage adapters.
|
|
12572
|
+
* All storage adapters must implement this interface.
|
|
12518
12573
|
*/
|
|
12519
|
-
|
|
12520
|
-
|
|
12574
|
+
interface IStorageUtils {
|
|
12575
|
+
/**
|
|
12576
|
+
* Handles signal opened event.
|
|
12577
|
+
* @param tick - The opened signal tick data
|
|
12578
|
+
*/
|
|
12579
|
+
handleOpened(tick: IStrategyTickResultOpened): Promise<void>;
|
|
12521
12580
|
/**
|
|
12522
|
-
*
|
|
12523
|
-
*
|
|
12581
|
+
* Handles signal closed event.
|
|
12582
|
+
* @param tick - The closed signal tick data
|
|
12524
12583
|
*/
|
|
12525
|
-
|
|
12584
|
+
handleClosed(tick: IStrategyTickResultClosed): Promise<void>;
|
|
12526
12585
|
/**
|
|
12527
|
-
*
|
|
12528
|
-
*
|
|
12529
|
-
|
|
12530
|
-
|
|
12586
|
+
* Handles signal scheduled event.
|
|
12587
|
+
* @param tick - The scheduled signal tick data
|
|
12588
|
+
*/
|
|
12589
|
+
handleScheduled(tick: IStrategyTickResultScheduled): Promise<void>;
|
|
12590
|
+
/**
|
|
12591
|
+
* Handles signal cancelled event.
|
|
12592
|
+
* @param tick - The cancelled signal tick data
|
|
12593
|
+
*/
|
|
12594
|
+
handleCancelled(tick: IStrategyTickResultCancelled): Promise<void>;
|
|
12595
|
+
/**
|
|
12596
|
+
* Finds a signal by its ID.
|
|
12597
|
+
* @param id - The signal ID to search for
|
|
12598
|
+
* @returns The signal row or null if not found
|
|
12531
12599
|
*/
|
|
12532
|
-
|
|
12600
|
+
findById(id: StorageId): Promise<IStorageSignalRow | null>;
|
|
12601
|
+
/**
|
|
12602
|
+
* Lists all stored signals.
|
|
12603
|
+
* @returns Array of all signal rows
|
|
12604
|
+
*/
|
|
12605
|
+
list(): Promise<IStorageSignalRow[]>;
|
|
12606
|
+
}
|
|
12607
|
+
/**
|
|
12608
|
+
* Constructor type for storage adapters.
|
|
12609
|
+
* Used for custom storage implementations.
|
|
12610
|
+
*/
|
|
12611
|
+
type TStorageUtilsCtor = new () => IStorageUtils;
|
|
12612
|
+
/**
|
|
12613
|
+
* Backtest storage adapter with pluggable storage backend.
|
|
12614
|
+
*
|
|
12615
|
+
* Features:
|
|
12616
|
+
* - Adapter pattern for swappable storage implementations
|
|
12617
|
+
* - Default adapter: StoragePersistBacktestUtils (persistent storage)
|
|
12618
|
+
* - Alternative adapters: StorageMemoryBacktestUtils, StorageDummyBacktestUtils
|
|
12619
|
+
* - Convenience methods: usePersist(), useMemory(), useDummy()
|
|
12620
|
+
*/
|
|
12621
|
+
declare class StorageBacktestAdapter implements IStorageUtils {
|
|
12622
|
+
/** Internal storage utils instance */
|
|
12623
|
+
private _signalBacktestUtils;
|
|
12533
12624
|
/**
|
|
12534
12625
|
* Handles signal opened event.
|
|
12535
|
-
*
|
|
12536
|
-
* @param tick -
|
|
12537
|
-
* @returns Promise resolving when storage is updated
|
|
12626
|
+
* Proxies call to the underlying storage adapter.
|
|
12627
|
+
* @param tick - The opened signal tick data
|
|
12538
12628
|
*/
|
|
12539
12629
|
handleOpened: (tick: IStrategyTickResultOpened) => Promise<void>;
|
|
12540
12630
|
/**
|
|
12541
12631
|
* Handles signal closed event.
|
|
12542
|
-
*
|
|
12543
|
-
* @param tick -
|
|
12544
|
-
* @returns Promise resolving when storage is updated
|
|
12632
|
+
* Proxies call to the underlying storage adapter.
|
|
12633
|
+
* @param tick - The closed signal tick data
|
|
12545
12634
|
*/
|
|
12546
12635
|
handleClosed: (tick: IStrategyTickResultClosed) => Promise<void>;
|
|
12547
12636
|
/**
|
|
12548
12637
|
* Handles signal scheduled event.
|
|
12549
|
-
*
|
|
12550
|
-
* @param tick -
|
|
12551
|
-
* @returns Promise resolving when storage is updated
|
|
12638
|
+
* Proxies call to the underlying storage adapter.
|
|
12639
|
+
* @param tick - The scheduled signal tick data
|
|
12552
12640
|
*/
|
|
12553
12641
|
handleScheduled: (tick: IStrategyTickResultScheduled) => Promise<void>;
|
|
12554
12642
|
/**
|
|
12555
12643
|
* Handles signal cancelled event.
|
|
12556
|
-
*
|
|
12557
|
-
* @param tick -
|
|
12558
|
-
* @returns Promise resolving when storage is updated
|
|
12644
|
+
* Proxies call to the underlying storage adapter.
|
|
12645
|
+
* @param tick - The cancelled signal tick data
|
|
12559
12646
|
*/
|
|
12560
12647
|
handleCancelled: (tick: IStrategyTickResultCancelled) => Promise<void>;
|
|
12561
12648
|
/**
|
|
12562
|
-
* Finds a signal by its
|
|
12563
|
-
*
|
|
12564
|
-
* @param id -
|
|
12565
|
-
* @returns
|
|
12649
|
+
* Finds a signal by its ID.
|
|
12650
|
+
* Proxies call to the underlying storage adapter.
|
|
12651
|
+
* @param id - The signal ID to search for
|
|
12652
|
+
* @returns The signal row or null if not found
|
|
12566
12653
|
*/
|
|
12567
12654
|
findById: (id: StorageId) => Promise<IStorageSignalRow | null>;
|
|
12568
12655
|
/**
|
|
12569
|
-
* Lists all stored
|
|
12570
|
-
*
|
|
12571
|
-
* @returns
|
|
12656
|
+
* Lists all stored signals.
|
|
12657
|
+
* Proxies call to the underlying storage adapter.
|
|
12658
|
+
* @returns Array of all signal rows
|
|
12572
12659
|
*/
|
|
12573
12660
|
list: () => Promise<IStorageSignalRow[]>;
|
|
12574
|
-
}
|
|
12575
|
-
/**
|
|
12576
|
-
* Utility class for managing live trading signal history.
|
|
12577
|
-
*
|
|
12578
|
-
* Stores trading signal history for admin dashboard display during live trading
|
|
12579
|
-
* with automatic initialization, deduplication, and storage limits.
|
|
12580
|
-
*
|
|
12581
|
-
* @example
|
|
12582
|
-
* ```typescript
|
|
12583
|
-
* import { StorageLiveUtils } from "./classes/Storage";
|
|
12584
|
-
*
|
|
12585
|
-
* const storage = new StorageLiveUtils();
|
|
12586
|
-
*
|
|
12587
|
-
* // Handle signal events
|
|
12588
|
-
* await storage.handleOpened(tickResult);
|
|
12589
|
-
* await storage.handleClosed(tickResult);
|
|
12590
|
-
*
|
|
12591
|
-
* // Query signals
|
|
12592
|
-
* const signal = await storage.findById("signal-123");
|
|
12593
|
-
* const allSignals = await storage.list();
|
|
12594
|
-
* ```
|
|
12595
|
-
*/
|
|
12596
|
-
declare class StorageLiveUtils {
|
|
12597
|
-
private _signals;
|
|
12598
12661
|
/**
|
|
12599
|
-
*
|
|
12600
|
-
*
|
|
12662
|
+
* Sets the storage adapter constructor.
|
|
12663
|
+
* All future storage operations will use this adapter.
|
|
12664
|
+
*
|
|
12665
|
+
* @param Ctor - Constructor for storage adapter
|
|
12601
12666
|
*/
|
|
12602
|
-
|
|
12667
|
+
useStorageAdapter: (Ctor: TStorageUtilsCtor) => void;
|
|
12603
12668
|
/**
|
|
12604
|
-
*
|
|
12605
|
-
*
|
|
12606
|
-
|
|
12607
|
-
|
|
12669
|
+
* Switches to dummy storage adapter.
|
|
12670
|
+
* All future storage writes will be no-ops.
|
|
12671
|
+
*/
|
|
12672
|
+
useDummy: () => void;
|
|
12673
|
+
/**
|
|
12674
|
+
* Switches to persistent storage adapter (default).
|
|
12675
|
+
* Signals will be persisted to disk.
|
|
12676
|
+
*/
|
|
12677
|
+
usePersist: () => void;
|
|
12678
|
+
/**
|
|
12679
|
+
* Switches to in-memory storage adapter.
|
|
12680
|
+
* Signals will be stored in memory only.
|
|
12608
12681
|
*/
|
|
12609
|
-
|
|
12682
|
+
useMemory: () => void;
|
|
12683
|
+
}
|
|
12684
|
+
/**
|
|
12685
|
+
* Live trading storage adapter with pluggable storage backend.
|
|
12686
|
+
*
|
|
12687
|
+
* Features:
|
|
12688
|
+
* - Adapter pattern for swappable storage implementations
|
|
12689
|
+
* - Default adapter: StoragePersistLiveUtils (persistent storage)
|
|
12690
|
+
* - Alternative adapters: StorageMemoryLiveUtils, StorageDummyLiveUtils
|
|
12691
|
+
* - Convenience methods: usePersist(), useMemory(), useDummy()
|
|
12692
|
+
*/
|
|
12693
|
+
declare class StorageLiveAdapter implements IStorageUtils {
|
|
12694
|
+
/** Internal storage utils instance */
|
|
12695
|
+
private _signalLiveUtils;
|
|
12610
12696
|
/**
|
|
12611
12697
|
* Handles signal opened event.
|
|
12612
|
-
*
|
|
12613
|
-
* @param tick -
|
|
12614
|
-
* @returns Promise resolving when history is updated
|
|
12698
|
+
* Proxies call to the underlying storage adapter.
|
|
12699
|
+
* @param tick - The opened signal tick data
|
|
12615
12700
|
*/
|
|
12616
12701
|
handleOpened: (tick: IStrategyTickResultOpened) => Promise<void>;
|
|
12617
12702
|
/**
|
|
12618
12703
|
* Handles signal closed event.
|
|
12619
|
-
*
|
|
12620
|
-
* @param tick -
|
|
12621
|
-
* @returns Promise resolving when history is updated
|
|
12704
|
+
* Proxies call to the underlying storage adapter.
|
|
12705
|
+
* @param tick - The closed signal tick data
|
|
12622
12706
|
*/
|
|
12623
12707
|
handleClosed: (tick: IStrategyTickResultClosed) => Promise<void>;
|
|
12624
12708
|
/**
|
|
12625
12709
|
* Handles signal scheduled event.
|
|
12626
|
-
*
|
|
12627
|
-
* @param tick -
|
|
12628
|
-
* @returns Promise resolving when history is updated
|
|
12710
|
+
* Proxies call to the underlying storage adapter.
|
|
12711
|
+
* @param tick - The scheduled signal tick data
|
|
12629
12712
|
*/
|
|
12630
12713
|
handleScheduled: (tick: IStrategyTickResultScheduled) => Promise<void>;
|
|
12631
12714
|
/**
|
|
12632
12715
|
* Handles signal cancelled event.
|
|
12633
|
-
*
|
|
12634
|
-
* @param tick -
|
|
12635
|
-
* @returns Promise resolving when history is updated
|
|
12716
|
+
* Proxies call to the underlying storage adapter.
|
|
12717
|
+
* @param tick - The cancelled signal tick data
|
|
12636
12718
|
*/
|
|
12637
12719
|
handleCancelled: (tick: IStrategyTickResultCancelled) => Promise<void>;
|
|
12638
12720
|
/**
|
|
12639
|
-
* Finds a signal by its
|
|
12640
|
-
*
|
|
12641
|
-
* @param id -
|
|
12642
|
-
* @returns
|
|
12721
|
+
* Finds a signal by its ID.
|
|
12722
|
+
* Proxies call to the underlying storage adapter.
|
|
12723
|
+
* @param id - The signal ID to search for
|
|
12724
|
+
* @returns The signal row or null if not found
|
|
12643
12725
|
*/
|
|
12644
12726
|
findById: (id: StorageId) => Promise<IStorageSignalRow | null>;
|
|
12645
12727
|
/**
|
|
12646
|
-
* Lists all stored
|
|
12647
|
-
*
|
|
12648
|
-
* @returns
|
|
12728
|
+
* Lists all stored signals.
|
|
12729
|
+
* Proxies call to the underlying storage adapter.
|
|
12730
|
+
* @returns Array of all signal rows
|
|
12649
12731
|
*/
|
|
12650
12732
|
list: () => Promise<IStorageSignalRow[]>;
|
|
12733
|
+
/**
|
|
12734
|
+
* Sets the storage adapter constructor.
|
|
12735
|
+
* All future storage operations will use this adapter.
|
|
12736
|
+
*
|
|
12737
|
+
* @param Ctor - Constructor for storage adapter
|
|
12738
|
+
*/
|
|
12739
|
+
useStorageAdapter: (Ctor: TStorageUtilsCtor) => void;
|
|
12740
|
+
/**
|
|
12741
|
+
* Switches to dummy storage adapter.
|
|
12742
|
+
* All future storage writes will be no-ops.
|
|
12743
|
+
*/
|
|
12744
|
+
useDummy: () => void;
|
|
12745
|
+
/**
|
|
12746
|
+
* Switches to persistent storage adapter (default).
|
|
12747
|
+
* Signals will be persisted to disk.
|
|
12748
|
+
*/
|
|
12749
|
+
usePersist: () => void;
|
|
12750
|
+
/**
|
|
12751
|
+
* Switches to in-memory storage adapter.
|
|
12752
|
+
* Signals will be stored in memory only.
|
|
12753
|
+
*/
|
|
12754
|
+
useMemory: () => void;
|
|
12651
12755
|
}
|
|
12652
12756
|
/**
|
|
12653
|
-
* Main storage adapter
|
|
12654
|
-
*
|
|
12655
|
-
* Provides unified interface for accessing backtest and live signal history
|
|
12656
|
-
* for admin dashboard. Subscribes to signal emitters and automatically
|
|
12657
|
-
* updates history on signal events.
|
|
12658
|
-
*
|
|
12659
|
-
* @example
|
|
12660
|
-
* ```typescript
|
|
12661
|
-
* import { Storage } from "./classes/Storage";
|
|
12662
|
-
*
|
|
12663
|
-
* // Enable signal history tracking
|
|
12664
|
-
* const unsubscribe = Storage.enable();
|
|
12665
|
-
*
|
|
12666
|
-
* // Query signals
|
|
12667
|
-
* const backtestSignals = await Storage.listSignalBacktest();
|
|
12668
|
-
* const liveSignals = await Storage.listSignalLive();
|
|
12669
|
-
* const signal = await Storage.findSignalById("signal-123");
|
|
12757
|
+
* Main storage adapter that manages both backtest and live signal storage.
|
|
12670
12758
|
*
|
|
12671
|
-
*
|
|
12672
|
-
*
|
|
12673
|
-
*
|
|
12759
|
+
* Features:
|
|
12760
|
+
* - Subscribes to signal emitters for automatic storage updates
|
|
12761
|
+
* - Provides unified access to both backtest and live signals
|
|
12762
|
+
* - Singleshot enable pattern prevents duplicate subscriptions
|
|
12763
|
+
* - Cleanup function for proper unsubscription
|
|
12674
12764
|
*/
|
|
12675
12765
|
declare class StorageAdapter {
|
|
12676
|
-
_signalLiveUtils: StorageLiveUtils;
|
|
12677
|
-
_signalBacktestUtils: StorageBacktestUtils;
|
|
12678
12766
|
/**
|
|
12679
|
-
* Enables signal
|
|
12767
|
+
* Enables signal storage by subscribing to signal emitters.
|
|
12768
|
+
* Uses singleshot to ensure one-time subscription.
|
|
12680
12769
|
*
|
|
12681
|
-
* @returns Cleanup function
|
|
12770
|
+
* @returns Cleanup function that unsubscribes from all emitters
|
|
12682
12771
|
*/
|
|
12683
12772
|
enable: (() => () => void) & functools_kit.ISingleshotClearable;
|
|
12684
12773
|
/**
|
|
12685
|
-
* Disables signal
|
|
12774
|
+
* Disables signal storage by unsubscribing from all emitters.
|
|
12775
|
+
* Safe to call multiple times.
|
|
12686
12776
|
*/
|
|
12687
12777
|
disable: () => void;
|
|
12688
12778
|
/**
|
|
12689
|
-
* Finds a signal by ID across both backtest and live
|
|
12779
|
+
* Finds a signal by ID across both backtest and live storage.
|
|
12690
12780
|
*
|
|
12691
|
-
* @param id -
|
|
12692
|
-
* @returns
|
|
12693
|
-
* @throws Error if
|
|
12781
|
+
* @param id - The signal ID to search for
|
|
12782
|
+
* @returns The signal row or throws if not found
|
|
12783
|
+
* @throws Error if StorageAdapter is not enabled
|
|
12784
|
+
* @throws Error if signal is not found in either storage
|
|
12694
12785
|
*/
|
|
12695
12786
|
findSignalById: (id: StorageId) => Promise<IStorageSignalRow | null>;
|
|
12696
12787
|
/**
|
|
12697
|
-
* Lists all backtest
|
|
12788
|
+
* Lists all backtest signals from storage.
|
|
12698
12789
|
*
|
|
12699
|
-
* @returns
|
|
12790
|
+
* @returns Array of all backtest signal rows
|
|
12791
|
+
* @throws Error if StorageAdapter is not enabled
|
|
12700
12792
|
*/
|
|
12701
12793
|
listSignalBacktest: () => Promise<IStorageSignalRow[]>;
|
|
12702
12794
|
/**
|
|
12703
|
-
* Lists all live
|
|
12795
|
+
* Lists all live signals from storage.
|
|
12704
12796
|
*
|
|
12705
|
-
* @returns
|
|
12797
|
+
* @returns Array of all live signal rows
|
|
12798
|
+
* @throws Error if StorageAdapter is not enabled
|
|
12706
12799
|
*/
|
|
12707
12800
|
listSignalLive: () => Promise<IStorageSignalRow[]>;
|
|
12708
12801
|
}
|
|
12802
|
+
/**
|
|
12803
|
+
* Global singleton instance of StorageAdapter.
|
|
12804
|
+
* Provides unified signal storage management for backtest and live trading.
|
|
12805
|
+
*/
|
|
12709
12806
|
declare const Storage: StorageAdapter;
|
|
12807
|
+
/**
|
|
12808
|
+
* Global singleton instance of StorageLiveAdapter.
|
|
12809
|
+
* Provides live trading signal storage with pluggable backends.
|
|
12810
|
+
*/
|
|
12811
|
+
declare const StorageLive: StorageLiveAdapter;
|
|
12812
|
+
/**
|
|
12813
|
+
* Global singleton instance of StorageBacktestAdapter.
|
|
12814
|
+
* Provides backtest signal storage with pluggable backends.
|
|
12815
|
+
*/
|
|
12816
|
+
declare const StorageBacktest: StorageBacktestAdapter;
|
|
12710
12817
|
|
|
12711
12818
|
/**
|
|
12712
12819
|
* Utility class for exchange operations.
|
|
@@ -19629,4 +19736,4 @@ declare const backtest: {
|
|
|
19629
19736
|
loggerService: LoggerService;
|
|
19630
19737
|
};
|
|
19631
19738
|
|
|
19632
|
-
export { ActionBase, type ActivePingContract, Backtest, type BacktestStatisticsModel, Breakeven, type BreakevenAvailableNotification, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, Cache, type CandleData, type CandleInterval, type ColumnConfig, type ColumnModel, Constant, type CriticalErrorNotification, type DoneContract, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, type IBidData, type ICandleData, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type IMarkdownDumpOptions, type IOrderBookData, type IPersistBase, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicSignalRow, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, type IRiskSignalRow, type IRiskValidation, type IRiskValidationFn, type IRiskValidationPayload, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISignalDto, type ISignalRow, type ISizingCalculateParams, type ISizingCalculateParamsATR, type ISizingCalculateParamsFixedPercentage, type ISizingCalculateParamsKelly, type ISizingSchema, type ISizingSchemaATR, type ISizingSchemaFixedPercentage, type ISizingSchemaKelly, type IStorageSignalRow, type IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IStrategyTickResultWaiting, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type InfoErrorNotification, Live, type LiveStatisticsModel, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MethodContextService, type MetricStats, Notification, type NotificationModel, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossAvailableNotification, type PartialLossCommitNotification, type PartialLossContract, type PartialProfitAvailableNotification, type PartialProfitCommitNotification, type PartialProfitContract, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistCandleAdapter, PersistPartialAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PersistStorageAdapter, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Report, ReportBase, type ReportName, Risk, type RiskContract, type RiskData, type RiskEvent, type RiskRejectionNotification, type RiskStatisticsModel, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, type SignalCancelledNotification, type SignalClosedNotification, type SignalData, type SignalInterval, type SignalOpenedNotification, type SignalScheduledNotification, Storage, type StorageData, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, type TMarkdownBase, type TPersistBase, type TPersistBaseCtor, type TReportBase, type TickEvent, type TrailingStopCommitNotification, 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, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialProfit, commitTrailingStop, commitTrailingTake, emitters, formatPrice, formatQuantity, get, getActionSchema, getAveragePrice, getBacktestTimeframe, getCandles, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getExchangeSchema, getFrameSchema, getMode, getOrderBook, getRawCandles, getRiskSchema, getSizingSchema, getStrategySchema, getSymbol, getWalkerSchema, hasTradeContext, backtest as lib, listExchangeSchema, listFrameSchema, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalOnce, listenStrategyCommit, listenStrategyCommitOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, roundTicks, set, setColumns, setConfig, setLogger, stopStrategy, validate };
|
|
19739
|
+
export { ActionBase, type ActivePingContract, Backtest, type BacktestStatisticsModel, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, Cache, type CancelScheduledCommit, type CandleData, type CandleInterval, type ClosePendingCommit, type ColumnConfig, type ColumnModel, Constant, type CriticalErrorNotification, type DoneContract, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, type IBidData, type IBreakevenCommitRow, type ICandleData, type ICommitRow, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type IMarkdownDumpOptions, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicSignalRow, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, type IRiskSignalRow, type IRiskValidation, type IRiskValidationFn, type IRiskValidationPayload, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISignalDto, 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 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 InfoErrorNotification, Live, type LiveStatisticsModel, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MethodContextService, type MetricStats, Notification, 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, PersistCandleAdapter, PersistPartialAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PersistStorageAdapter, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Report, ReportBase, type ReportName, Risk, type RiskContract, type RiskData, type RiskEvent, type RiskRejectionNotification, type RiskStatisticsModel, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, type SignalCancelledNotification, type SignalClosedNotification, type SignalData, type SignalInterval, type SignalOpenedNotification, type SignalScheduledNotification, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, type TMarkdownBase, type TPersistBase, type TPersistBaseCtor, type TReportBase, 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, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialProfit, commitTrailingStop, commitTrailingTake, emitters, formatPrice, formatQuantity, get, getActionSchema, getAveragePrice, getBacktestTimeframe, getCandles, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getExchangeSchema, getFrameSchema, getMode, getOrderBook, getRawCandles, getRiskSchema, getSizingSchema, getStrategySchema, getSymbol, getWalkerSchema, hasTradeContext, backtest as lib, listExchangeSchema, listFrameSchema, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalOnce, listenStrategyCommit, listenStrategyCommitOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, roundTicks, set, setColumns, setConfig, setLogger, stopStrategy, validate };
|