backtest-kit 1.5.24 โ†’ 1.5.25

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.
Files changed (2) hide show
  1. package/README.md +50 -6
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -25,8 +25,9 @@ Build reliable trading systems: backtest on historical data, deploy live bots wi
25
25
  - ๐Ÿ›ก๏ธ **Risk Management**: Custom rules for position limits, time windows, and multi-strategy coordination.
26
26
  - ๐Ÿ”Œ **Pluggable**: Custom data sources (CCXT), persistence (file/Redis), and sizing calculators.
27
27
  - ๐Ÿงช **Tested**: 280+ unit/integration tests for validation, recovery, and events.
28
+ - ๐Ÿ”“ **Self hosted**: Zero dependency on third-party node_modules or platforms; run entirely in your own environment.
28
29
 
29
- ### ๐Ÿ“‹ Supported Order Types
30
+ ## ๐Ÿ“‹ Supported Order Types
30
31
 
31
32
  - Market/Limit entries
32
33
  - TP/SL/OCO exits
@@ -34,6 +35,8 @@ Build reliable trading systems: backtest on historical data, deploy live bots wi
34
35
 
35
36
  ## ๐Ÿš€ Quick Start
36
37
 
38
+ > Link to [the source code](https://github.com/tripolskypetr/backtest-kit/tree/master/demo)
39
+
37
40
  ### ๐Ÿ“ฆ Installation
38
41
  ```bash
39
42
  npm install backtest-kit ccxt ollama uuid
@@ -179,16 +182,14 @@ Customize via `setConfig()`:
179
182
  - `CC_SCHEDULE_AWAIT_MINUTES`: Pending timeout (default: 120).
180
183
  - `CC_AVG_PRICE_CANDLES_COUNT`: VWAP candles (default: 5).
181
184
 
182
- ## โœ… Tested & Reliable
183
-
184
- 280+ tests cover validation, recovery, reports, and events.
185
-
186
185
  ## ๐Ÿ’ป Developer Note
187
186
 
187
+ Backtest Kit is **not a data-processing library** - it is a **time execution engine**. Think of the engine as an **async stream of time**, where your strategy is evaluated step by step.
188
+
188
189
  ### ๐Ÿ” How getCandles Works
189
190
 
190
191
  backtest-kit uses Node.js `AsyncLocalStorage` to automatically provide
191
- temporal context to your strategies.
192
+ temporal time context to your strategies.
192
193
 
193
194
  ### ๐Ÿ’ญ What this means:
194
195
  - `getCandles()` always returns data UP TO the current backtest timestamp using `async_hooks`
@@ -196,10 +197,53 @@ temporal context to your strategies.
196
197
  - **Impossible to introduce look-ahead bias**
197
198
  - Same code works in both backtest and live modes
198
199
 
200
+
201
+ ## ๐Ÿง  Two Ways to Run the Engine
202
+
203
+ Backtest Kit exposes the same runtime in two equivalent forms. Both approaches use **the same engine and guarantees** - only the consumption model differs.
204
+
205
+ ### 1๏ธโƒฃ Event-driven (background execution)
206
+
207
+ Suitable for production bots, monitoring, and long-running processes.
208
+
209
+ ```typescript
210
+ Backtest.background('BTCUSDT', config);
211
+
212
+ listenSignalBacktest(event => { /* handle signals */ });
213
+ listenDoneBacktest(event => { /* finalize / dump report */ });
214
+ ```
215
+
216
+ ### 2๏ธโƒฃ Async Iterator (pull-based execution)
217
+
218
+ Suitable for research, scripting, testing, and LLM agents.
219
+
220
+ ```typescript
221
+ for await (const event of Backtest.run('BTCUSDT', config)) {
222
+ // signal | trade | progress | done
223
+ }
224
+ ```
225
+
226
+ ## ๐Ÿ†š Think of it as...
227
+
228
+ **Open-source QuantConnect without the vendor lock-in**
229
+
230
+ Unlike cloud-based platforms, backtest-kit runs entirely in your environment. You own the entire stack from data ingestion to live execution. In addition to Ollama, you can use [neural-trader](https://www.npmjs.com/package/neural-trader) in `getSignal` function or any other third party library
231
+
232
+ - No C# required - pure TypeScript/JavaScript
233
+ - Self-hosted - your code, your data, your infrastructure
234
+ - No platform fees or hidden costs
235
+ - Full control over execution and data sources
236
+ - [GUI](https://backtest-kit.github.io/documents/design_30_markdown-report-system.html#method-signatures) for visualization and monitoring
237
+
238
+
199
239
  ## ๐Ÿค– Are you a robot?
200
240
 
201
241
  **For language models**: Read extended description in [./LLMs.md](./LLMs.md)
202
242
 
243
+ ## โœ… Tested & Reliable
244
+
245
+ 280+ tests cover validation, recovery, reports, and events.
246
+
203
247
  ## ๐Ÿค Contribute
204
248
 
205
249
  Fork/PR on [GitHub](https://github.com/tripolskypetr/backtest-kit).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backtest-kit",
3
- "version": "1.5.24",
3
+ "version": "1.5.25",
4
4
  "description": "A TypeScript library for trading system backtest",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",
@@ -12,7 +12,7 @@
12
12
  "url": "http://paypal.me/tripolskypetr"
13
13
  },
14
14
  "license": "MIT",
15
- "homepage": "https://backtest-kit.github.io/modules.html",
15
+ "homepage": "https://backtest-kit.github.io/documents/example_02_first_backtest.html",
16
16
  "keywords": [
17
17
  "backtesting",
18
18
  "backtest",