backtest-kit 2.1.1 → 2.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backtest-kit",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "A TypeScript library for trading system backtest",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",
package/types.d.ts CHANGED
@@ -397,6 +397,26 @@ interface IExchange {
397
397
  * @returns Promise resolving to order book data
398
398
  */
399
399
  getOrderBook: (symbol: string, depth?: number) => Promise<IOrderBookData>;
400
+ /**
401
+ * Fetch raw candles with flexible date/limit parameters.
402
+ *
403
+ * All modes respect execution context and prevent look-ahead bias.
404
+ *
405
+ * Parameter combinations:
406
+ * 1. sDate + eDate + limit: fetches with explicit parameters, validates eDate <= when
407
+ * 2. sDate + eDate: calculates limit from date range, validates eDate <= when
408
+ * 3. eDate + limit: calculates sDate backward, validates eDate <= when
409
+ * 4. sDate + limit: fetches forward, validates calculated endTimestamp <= when
410
+ * 5. Only limit: uses execution.context.when as reference (backward)
411
+ *
412
+ * @param symbol - Trading pair symbol (e.g., "BTCUSDT")
413
+ * @param interval - Candle interval (e.g., "1m", "1h")
414
+ * @param limit - Optional number of candles to fetch
415
+ * @param sDate - Optional start date in milliseconds
416
+ * @param eDate - Optional end date in milliseconds
417
+ * @returns Promise resolving to array of candles
418
+ */
419
+ getRawCandles: (symbol: string, interval: CandleInterval, limit?: number, sDate?: number, eDate?: number) => Promise<ICandleData[]>;
400
420
  }
401
421
  /**
402
422
  * Unique exchange identifier.
@@ -6825,6 +6845,38 @@ declare function getContext(): Promise<IMethodContext>;
6825
6845
  * ```
6826
6846
  */
6827
6847
  declare function getOrderBook(symbol: string, depth?: number): Promise<IOrderBookData>;
6848
+ /**
6849
+ * Fetches raw candles with flexible date/limit parameters.
6850
+ *
6851
+ * All modes respect execution context and prevent look-ahead bias.
6852
+ *
6853
+ * Parameter combinations:
6854
+ * 1. sDate + eDate + limit: fetches with explicit parameters, validates eDate <= when
6855
+ * 2. sDate + eDate: calculates limit from date range, validates eDate <= when
6856
+ * 3. eDate + limit: calculates sDate backward, validates eDate <= when
6857
+ * 4. sDate + limit: fetches forward, validates calculated endTimestamp <= when
6858
+ * 5. Only limit: uses execution.context.when as reference (backward)
6859
+ *
6860
+ * @param symbol - Trading pair symbol (e.g., "BTCUSDT")
6861
+ * @param interval - Candle interval ("1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h")
6862
+ * @param limit - Optional number of candles to fetch
6863
+ * @param sDate - Optional start date in milliseconds
6864
+ * @param eDate - Optional end date in milliseconds
6865
+ * @returns Promise resolving to array of candle data
6866
+ *
6867
+ * @example
6868
+ * ```typescript
6869
+ * // Fetch 100 candles backward from current context time
6870
+ * const candles = await getRawCandles("BTCUSDT", "1m", 100);
6871
+ *
6872
+ * // Fetch candles for specific date range
6873
+ * const rangeCandles = await getRawCandles("BTCUSDT", "1h", undefined, startMs, endMs);
6874
+ *
6875
+ * // Fetch with all parameters specified
6876
+ * const exactCandles = await getRawCandles("BTCUSDT", "1m", 100, startMs, endMs);
6877
+ * ```
6878
+ */
6879
+ declare function getRawCandles(symbol: string, interval: CandleInterval, limit?: number, sDate?: number, eDate?: number): Promise<ICandleData[]>;
6828
6880
 
6829
6881
  /**
6830
6882
  * Commits signal prompt history to the message array.
@@ -7665,8 +7717,8 @@ interface IEntity {
7665
7717
  * Custom adapters should implement this interface.
7666
7718
  *
7667
7719
  * Architecture:
7668
- * - IPersistBase: Public API for custom adapters (4 methods: waitForInit, readValue, hasValue, writeValue)
7669
- * - PersistBase: Default implementation with internal keys() method for validation
7720
+ * - IPersistBase: Public API for custom adapters (5 methods: waitForInit, readValue, hasValue, writeValue, keys)
7721
+ * - PersistBase: Default implementation with keys() method for validation and iteration
7670
7722
  * - TPersistBaseCtor: Constructor type requiring IPersistBase
7671
7723
  */
7672
7724
  interface IPersistBase<Entity extends IEntity | null = IEntity> {
@@ -7702,6 +7754,15 @@ interface IPersistBase<Entity extends IEntity | null = IEntity> {
7702
7754
  * @throws Error if write fails
7703
7755
  */
7704
7756
  writeValue(entityId: EntityId, entity: Entity): Promise<void>;
7757
+ /**
7758
+ * Async generator yielding all entity IDs.
7759
+ * Sorted alphanumerically.
7760
+ * Used for iteration and validation.
7761
+ *
7762
+ * @returns AsyncGenerator yielding entity IDs
7763
+ * @throws Error if reading fails
7764
+ */
7765
+ keys(): AsyncGenerator<EntityId>;
7705
7766
  }
7706
7767
  /**
7707
7768
  * Base class for file-based persistence with atomic writes.
@@ -8221,6 +8282,82 @@ declare class PersistBreakevenUtils {
8221
8282
  * ```
8222
8283
  */
8223
8284
  declare const PersistBreakevenAdapter: PersistBreakevenUtils;
8285
+ /**
8286
+ * Type for persisted candle cache data.
8287
+ * Each candle is stored as a separate JSON file.
8288
+ */
8289
+ type CandleData = ICandleData;
8290
+ /**
8291
+ * Utility class for managing candles cache persistence.
8292
+ *
8293
+ * Features:
8294
+ * - Each candle stored as separate JSON file: ${exchangeName}/${symbol}/${interval}/${timestamp}.json
8295
+ * - Cache validation: returns cached data if file count matches requested limit
8296
+ * - Automatic cache invalidation and refresh when data is incomplete
8297
+ * - Atomic read/write operations
8298
+ *
8299
+ * Used by ClientExchange for candle data caching.
8300
+ */
8301
+ declare class PersistCandleUtils {
8302
+ private PersistCandlesFactory;
8303
+ private getCandlesStorage;
8304
+ /**
8305
+ * Registers a custom persistence adapter.
8306
+ *
8307
+ * @param Ctor - Custom PersistBase constructor
8308
+ */
8309
+ usePersistCandleAdapter(Ctor: TPersistBaseCtor<string, CandleData>): void;
8310
+ /**
8311
+ * Reads cached candles for a specific exchange, symbol, and interval.
8312
+ * Returns candles only if cache contains exactly the requested limit.
8313
+ *
8314
+ * @param symbol - Trading pair symbol
8315
+ * @param interval - Candle interval
8316
+ * @param exchangeName - Exchange identifier
8317
+ * @param limit - Number of candles requested
8318
+ * @param sinceTimestamp - Start timestamp (inclusive)
8319
+ * @param untilTimestamp - End timestamp (exclusive)
8320
+ * @returns Promise resolving to array of candles or null if cache is incomplete
8321
+ */
8322
+ readCandlesData: (symbol: string, interval: CandleInterval, exchangeName: ExchangeName, limit: number, sinceTimestamp: number, untilTimestamp: number) => Promise<CandleData[] | null>;
8323
+ /**
8324
+ * Writes candles to cache with atomic file writes.
8325
+ * Each candle is stored as a separate JSON file named by its timestamp.
8326
+ *
8327
+ * @param candles - Array of candle data to cache
8328
+ * @param symbol - Trading pair symbol
8329
+ * @param interval - Candle interval
8330
+ * @param exchangeName - Exchange identifier
8331
+ * @returns Promise that resolves when all writes are complete
8332
+ */
8333
+ writeCandlesData: (candles: CandleData[], symbol: string, interval: CandleInterval, exchangeName: ExchangeName) => Promise<void>;
8334
+ /**
8335
+ * Switches to the default JSON persist adapter.
8336
+ * All future persistence writes will use JSON storage.
8337
+ */
8338
+ useJson(): void;
8339
+ /**
8340
+ * Switches to a dummy persist adapter that discards all writes.
8341
+ * All future persistence writes will be no-ops.
8342
+ */
8343
+ useDummy(): void;
8344
+ }
8345
+ /**
8346
+ * Global singleton instance of PersistCandleUtils.
8347
+ * Used by ClientExchange for candle data caching.
8348
+ *
8349
+ * @example
8350
+ * ```typescript
8351
+ * // Read cached candles
8352
+ * const candles = await PersistCandleAdapter.readCandlesData(
8353
+ * "BTCUSDT", "1m", "binance", 100, since.getTime(), until.getTime()
8354
+ * );
8355
+ *
8356
+ * // Write candles to cache
8357
+ * await PersistCandleAdapter.writeCandlesData(candles, "BTCUSDT", "1m", "binance");
8358
+ * ```
8359
+ */
8360
+ declare const PersistCandleAdapter: PersistCandleUtils;
8224
8361
 
8225
8362
  declare const WAIT_FOR_INIT_SYMBOL$1: unique symbol;
8226
8363
  declare const WRITE_SAFE_SYMBOL$1: unique symbol;
@@ -12655,7 +12792,7 @@ declare class ExchangeUtils {
12655
12792
  */
12656
12793
  getCandles: (symbol: string, interval: CandleInterval, limit: number, context: {
12657
12794
  exchangeName: ExchangeName;
12658
- }) => Promise<ICandleData[]>;
12795
+ }) => Promise<any>;
12659
12796
  /**
12660
12797
  * Calculates VWAP (Volume Weighted Average Price) from last N 1m candles.
12661
12798
  *
@@ -12703,6 +12840,22 @@ declare class ExchangeUtils {
12703
12840
  getOrderBook: (symbol: string, context: {
12704
12841
  exchangeName: ExchangeName;
12705
12842
  }, depth?: number) => Promise<IOrderBookData>;
12843
+ /**
12844
+ * Fetches raw candles with flexible date/limit parameters.
12845
+ *
12846
+ * Uses Date.now() instead of execution context when for look-ahead bias protection.
12847
+ *
12848
+ * @param symbol - Trading pair symbol (e.g., "BTCUSDT")
12849
+ * @param interval - Candle interval (e.g., "1m", "1h")
12850
+ * @param context - Execution context with exchange name
12851
+ * @param limit - Optional number of candles to fetch
12852
+ * @param sDate - Optional start date in milliseconds
12853
+ * @param eDate - Optional end date in milliseconds
12854
+ * @returns Promise resolving to array of candle data
12855
+ */
12856
+ getRawCandles: (symbol: string, interval: CandleInterval, context: {
12857
+ exchangeName: ExchangeName;
12858
+ }, limit?: number, sDate?: number, eDate?: number) => Promise<ICandleData[]>;
12706
12859
  }
12707
12860
  /**
12708
12861
  * Singleton instance of ExchangeUtils for convenient exchange operations.
@@ -14333,6 +14486,32 @@ declare class ClientExchange implements IExchange {
14333
14486
  * @returns Promise resolving to formatted price as string
14334
14487
  */
14335
14488
  formatPrice(symbol: string, price: number): Promise<string>;
14489
+ /**
14490
+ * Fetches raw candles with flexible date/limit parameters.
14491
+ *
14492
+ * All modes respect execution context and prevent look-ahead bias.
14493
+ *
14494
+ * Parameter combinations:
14495
+ * 1. sDate + eDate + limit: fetches with explicit parameters, validates eDate <= when
14496
+ * 2. sDate + eDate: calculates limit from date range, validates eDate <= when
14497
+ * 3. eDate + limit: calculates sDate backward, validates eDate <= when
14498
+ * 4. sDate + limit: fetches forward, validates calculated endTimestamp <= when
14499
+ * 5. Only limit: uses execution.context.when as reference (backward)
14500
+ *
14501
+ * Edge cases:
14502
+ * - If calculated limit is 0 or negative: throws error
14503
+ * - If sDate >= eDate: throws error
14504
+ * - If eDate > when: throws error to prevent look-ahead bias
14505
+ *
14506
+ * @param symbol - Trading pair symbol
14507
+ * @param interval - Candle interval
14508
+ * @param limit - Optional number of candles to fetch
14509
+ * @param sDate - Optional start date in milliseconds
14510
+ * @param eDate - Optional end date in milliseconds
14511
+ * @returns Promise resolving to array of candles
14512
+ * @throws Error if parameters are invalid or conflicting
14513
+ */
14514
+ getRawCandles(symbol: string, interval: CandleInterval, limit?: number, sDate?: number, eDate?: number): Promise<ICandleData[]>;
14336
14515
  /**
14337
14516
  * Fetches order book for a trading pair.
14338
14517
  *
@@ -14450,6 +14629,19 @@ declare class ExchangeConnectionService implements IExchange {
14450
14629
  * @returns Promise resolving to order book data
14451
14630
  */
14452
14631
  getOrderBook: (symbol: string, depth?: number) => Promise<IOrderBookData>;
14632
+ /**
14633
+ * Fetches raw candles with flexible date/limit parameters.
14634
+ *
14635
+ * Routes to exchange determined by methodContextService.context.exchangeName.
14636
+ *
14637
+ * @param symbol - Trading pair symbol (e.g., "BTCUSDT")
14638
+ * @param interval - Candle interval (e.g., "1h", "1d")
14639
+ * @param limit - Optional number of candles to fetch
14640
+ * @param sDate - Optional start date in milliseconds
14641
+ * @param eDate - Optional end date in milliseconds
14642
+ * @returns Promise resolving to array of candle data
14643
+ */
14644
+ getRawCandles: (symbol: string, interval: CandleInterval, limit?: number, sDate?: number, eDate?: number) => Promise<ICandleData[]>;
14453
14645
  }
14454
14646
 
14455
14647
  /**
@@ -16129,6 +16321,19 @@ declare class ExchangeCoreService implements TExchange {
16129
16321
  * @returns Promise resolving to order book data
16130
16322
  */
16131
16323
  getOrderBook: (symbol: string, when: Date, backtest: boolean, depth?: number) => Promise<IOrderBookData>;
16324
+ /**
16325
+ * Fetches raw candles with flexible date/limit parameters and execution context.
16326
+ *
16327
+ * @param symbol - Trading pair symbol
16328
+ * @param interval - Candle interval (e.g., "1m", "1h")
16329
+ * @param when - Timestamp for context (used in backtest mode)
16330
+ * @param backtest - Whether running in backtest mode
16331
+ * @param limit - Optional number of candles to fetch
16332
+ * @param sDate - Optional start date in milliseconds
16333
+ * @param eDate - Optional end date in milliseconds
16334
+ * @returns Promise resolving to array of candles
16335
+ */
16336
+ getRawCandles: (symbol: string, interval: CandleInterval, when: Date, backtest: boolean, limit?: number, sDate?: number, eDate?: number) => Promise<ICandleData[]>;
16132
16337
  }
16133
16338
 
16134
16339
  /**
@@ -19341,4 +19546,4 @@ declare const backtest: {
19341
19546
  loggerService: LoggerService;
19342
19547
  };
19343
19548
 
19344
- export { ActionBase, type ActivePingContract, Backtest, type BacktestDoneNotification, type BacktestStatisticsModel, Breakeven, type BreakevenContract, type BreakevenData, Cache, 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 IOptimizerCallbacks, type IOptimizerData, type IOptimizerFetchArgs, type IOptimizerFilterArgs, type IOptimizerRange, type IOptimizerSchema, type IOptimizerSource, type IOptimizerStrategy, type IOptimizerTemplate, type IOrderBookData, type IPersistBase, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicSignalRow, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, 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 IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type InfoErrorNotification, Live, type LiveDoneNotification, type LiveStatisticsModel, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, type MessageModel, type MessageRole, MethodContextService, type MetricStats, Notification, type NotificationModel, Optimizer, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossContract, type PartialLossNotification, type PartialProfitContract, type PartialProfitNotification, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistPartialAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PositionSize, type ProgressBacktestContract, type ProgressBacktestNotification, type ProgressOptimizerContract, 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, type TMarkdownBase, type TPersistBase, type TPersistBaseCtor, type TReportBase, type TickEvent, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addOptimizerSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialProfit, commitSignalPromptHistory, commitTrailingStop, commitTrailingTake, dumpSignalData, emitters, formatPrice, formatQuantity, get, getActionSchema, getAveragePrice, getBacktestTimeframe, getCandles, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getExchangeSchema, getFrameSchema, getMode, getOptimizerSchema, getOrderBook, getRiskSchema, getSizingSchema, getStrategySchema, getSymbol, getWalkerSchema, hasTradeContext, backtest as lib, listExchangeSchema, listFrameSchema, listOptimizerSchema, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenOptimizerProgress, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideOptimizerSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, roundTicks, set, setColumns, setConfig, setLogger, stopStrategy, validate };
19549
+ export { ActionBase, type ActivePingContract, Backtest, type BacktestDoneNotification, type BacktestStatisticsModel, Breakeven, 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 IOptimizerCallbacks, type IOptimizerData, type IOptimizerFetchArgs, type IOptimizerFilterArgs, type IOptimizerRange, type IOptimizerSchema, type IOptimizerSource, type IOptimizerStrategy, type IOptimizerTemplate, type IOrderBookData, type IPersistBase, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicSignalRow, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, 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 IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type InfoErrorNotification, Live, type LiveDoneNotification, type LiveStatisticsModel, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, type MessageModel, type MessageRole, MethodContextService, type MetricStats, Notification, type NotificationModel, Optimizer, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossContract, type PartialLossNotification, type PartialProfitContract, type PartialProfitNotification, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistCandleAdapter, PersistPartialAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PositionSize, type ProgressBacktestContract, type ProgressBacktestNotification, type ProgressOptimizerContract, 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, type TMarkdownBase, type TPersistBase, type TPersistBaseCtor, type TReportBase, type TickEvent, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addOptimizerSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialProfit, commitSignalPromptHistory, commitTrailingStop, commitTrailingTake, dumpSignalData, emitters, formatPrice, formatQuantity, get, getActionSchema, getAveragePrice, getBacktestTimeframe, getCandles, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getExchangeSchema, getFrameSchema, getMode, getOptimizerSchema, getOrderBook, getRawCandles, getRiskSchema, getSizingSchema, getStrategySchema, getSymbol, getWalkerSchema, hasTradeContext, backtest as lib, listExchangeSchema, listFrameSchema, listOptimizerSchema, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenOptimizerProgress, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideOptimizerSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, roundTicks, set, setColumns, setConfig, setLogger, stopStrategy, validate };