backtest-kit 3.4.0 → 3.4.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/README.md +22 -22
- package/build/index.cjs +755 -1
- package/build/index.mjs +753 -2
- package/package.json +2 -2
- package/types.d.ts +333 -2
package/README.md
CHANGED
|
@@ -487,6 +487,28 @@ npm install @backtest-kit/pinets pinets backtest-kit
|
|
|
487
487
|
```
|
|
488
488
|
|
|
489
489
|
|
|
490
|
+
### @backtest-kit/graph
|
|
491
|
+
|
|
492
|
+
> **[Explore on NPM](https://www.npmjs.com/package/@backtest-kit/graph)** 🔗
|
|
493
|
+
|
|
494
|
+
The **@backtest-kit/graph** package lets you compose backtest-kit computations as a typed directed acyclic graph (DAG). Define source nodes that fetch market data and output nodes that compute derived values — then resolve the whole graph in topological order with automatic parallelism.
|
|
495
|
+
|
|
496
|
+
#### Key Features
|
|
497
|
+
- 🔌 **DAG Execution**: Nodes are resolved bottom-up in topological order with `Promise.all` parallelism
|
|
498
|
+
- 🔒 **Type-Safe Values**: TypeScript infers the return type of every node through the graph via generics
|
|
499
|
+
- 🧱 **Two APIs**: Low-level `INode` for runtime/storage, high-level `sourceNode` + `outputNode` builders for authoring
|
|
500
|
+
- 💾 **DB-Ready Serialization**: `serialize` / `deserialize` convert the graph to a flat `IFlatNode[]` list with `id` / `nodeIds`
|
|
501
|
+
- 🌐 **Context-Aware Fetch**: `sourceNode` receives `(symbol, when, exchangeName)` from the execution context automatically
|
|
502
|
+
|
|
503
|
+
#### Use Case
|
|
504
|
+
Perfect for multi-timeframe strategies where multiple Pine Script or indicator computations must be combined. Instead of manually chaining async calls, define each computation as a node and let the graph resolve dependencies in parallel. Adding a new filter or timeframe requires no changes to the existing wiring.
|
|
505
|
+
|
|
506
|
+
#### Get Started
|
|
507
|
+
```bash
|
|
508
|
+
npm install @backtest-kit/graph backtest-kit
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
|
|
490
512
|
### @backtest-kit/ui
|
|
491
513
|
|
|
492
514
|
> **[Explore on NPM](https://www.npmjs.com/package/@backtest-kit/ui)** 📊
|
|
@@ -556,28 +578,6 @@ npm install @backtest-kit/signals backtest-kit
|
|
|
556
578
|
|
|
557
579
|
|
|
558
580
|
|
|
559
|
-
### @backtest-kit/graph
|
|
560
|
-
|
|
561
|
-
> **[Explore on NPM](https://www.npmjs.com/package/@backtest-kit/graph)** 🔗
|
|
562
|
-
|
|
563
|
-
The **@backtest-kit/graph** package lets you compose backtest-kit computations as a typed directed acyclic graph (DAG). Define source nodes that fetch market data and output nodes that compute derived values — then resolve the whole graph in topological order with automatic parallelism.
|
|
564
|
-
|
|
565
|
-
#### Key Features
|
|
566
|
-
- 🔌 **DAG Execution**: Nodes are resolved bottom-up in topological order with `Promise.all` parallelism
|
|
567
|
-
- 🔒 **Type-Safe Values**: TypeScript infers the return type of every node through the graph via generics
|
|
568
|
-
- 🧱 **Two APIs**: Low-level `INode` for runtime/storage, high-level `sourceNode` + `outputNode` builders for authoring
|
|
569
|
-
- 💾 **DB-Ready Serialization**: `serialize` / `deserialize` convert the graph to a flat `IFlatNode[]` list with `id` / `nodeIds`
|
|
570
|
-
- 🌐 **Context-Aware Fetch**: `sourceNode` receives `(symbol, when, exchangeName)` from the execution context automatically
|
|
571
|
-
|
|
572
|
-
#### Use Case
|
|
573
|
-
Perfect for multi-timeframe strategies where multiple Pine Script or indicator computations must be combined. Instead of manually chaining async calls, define each computation as a node and let the graph resolve dependencies in parallel. Adding a new filter or timeframe requires no changes to the existing wiring.
|
|
574
|
-
|
|
575
|
-
#### Get Started
|
|
576
|
-
```bash
|
|
577
|
-
npm install @backtest-kit/graph backtest-kit
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
|
|
581
581
|
### @backtest-kit/sidekick
|
|
582
582
|
|
|
583
583
|
> **[Explore on NPM](https://www.npmjs.com/package/@backtest-kit/sidekick)** 🚀
|