backtest-kit 3.0.12 → 3.0.13

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 CHANGED
@@ -26846,12 +26846,12 @@ async function checkCandles(params) {
26846
26846
  const { timestamp } = candle;
26847
26847
  const aligned = ALIGN_TO_INTERVAL_FN(timestamp, step);
26848
26848
  if (timestamp !== aligned) {
26849
- throw new Error(`checkCandles: ${entry.name} timestamp=${timestamp} is not aligned to ${interval} boundary (expected=${aligned})`);
26849
+ throw new Error(`checkCandles: ${entry.name} timestamp not aligned to ${interval} boundary (actual=${timestamp}, expected=${aligned})`);
26850
26850
  }
26851
26851
  if (prevTimestamp !== null) {
26852
26852
  const gap = timestamp - prevTimestamp;
26853
26853
  if (gap !== stepMs) {
26854
- throw new Error(`checkCandles: gap between ${prevName} and ${entry.name} is ${gap}ms, expected ${stepMs}ms`);
26854
+ throw new Error(`checkCandles: gap between ${prevName} and ${entry.name} (actual=${gap}ms, expected=${stepMs}ms)`);
26855
26855
  }
26856
26856
  }
26857
26857
  prevTimestamp = timestamp;
package/build/index.mjs CHANGED
@@ -26826,12 +26826,12 @@ async function checkCandles(params) {
26826
26826
  const { timestamp } = candle;
26827
26827
  const aligned = ALIGN_TO_INTERVAL_FN(timestamp, step);
26828
26828
  if (timestamp !== aligned) {
26829
- throw new Error(`checkCandles: ${entry.name} timestamp=${timestamp} is not aligned to ${interval} boundary (expected=${aligned})`);
26829
+ throw new Error(`checkCandles: ${entry.name} timestamp not aligned to ${interval} boundary (actual=${timestamp}, expected=${aligned})`);
26830
26830
  }
26831
26831
  if (prevTimestamp !== null) {
26832
26832
  const gap = timestamp - prevTimestamp;
26833
26833
  if (gap !== stepMs) {
26834
- throw new Error(`checkCandles: gap between ${prevName} and ${entry.name} is ${gap}ms, expected ${stepMs}ms`);
26834
+ throw new Error(`checkCandles: gap between ${prevName} and ${entry.name} (actual=${gap}ms, expected=${stepMs}ms)`);
26835
26835
  }
26836
26836
  }
26837
26837
  prevTimestamp = timestamp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backtest-kit",
3
- "version": "3.0.12",
3
+ "version": "3.0.13",
4
4
  "description": "A TypeScript library for trading system backtest",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",