backtest-kit 15.1.0 → 15.3.0
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 +34 -1
- package/build/index.cjs +387 -68
- package/build/index.mjs +387 -68
- package/package.json +2 -2
- package/types.d.ts +202 -14
package/README.md
CHANGED
|
@@ -747,6 +747,12 @@ MongoDB source-of-truth + Redis O(1) cache. All 15 persistence contracts, atomic
|
|
|
747
747
|
npm install @backtest-kit/mongo backtest-kit mongoose ioredis
|
|
748
748
|
```
|
|
749
749
|
|
|
750
|
+
### `@backtest-kit/pg` — [npm](https://www.npmjs.com/package/@backtest-kit/pg)
|
|
751
|
+
PostgreSQL + Redis O(1) cache via TypeORM. All 15 persistence contracts, atomic upserts, soft delete, look-ahead-safe `when`. Tuned for Pgpool-II so read fan-out scales across replicas: up to ~4× faster
|
|
752
|
+
```bash
|
|
753
|
+
npm install @backtest-kit/pg backtest-kit typeorm pg ioredis reflect-metadata
|
|
754
|
+
```
|
|
755
|
+
|
|
750
756
|
### `@backtest-kit/ollama` — [npm](https://www.npmjs.com/package/@backtest-kit/ollama)
|
|
751
757
|
Universal LLM adapter: 10+ providers, structured output, token rotation, fallback chains, trading-context injection.
|
|
752
758
|
```bash
|
|
@@ -767,13 +773,14 @@ npx -y @backtest-kit/sidekick my-trading-bot && cd my-trading-bot && npm start
|
|
|
767
773
|
|
|
768
774
|
---
|
|
769
775
|
|
|
770
|
-
##
|
|
776
|
+
## 👨👩👦 Community
|
|
771
777
|
|
|
772
778
|
Real, runnable templates — not slideware. And worth naming the concern directly: yes, this is one author's ecosystem, which is exactly what makes it *coherent* — but coherent is not captive. Everything is **MIT and open-source**, the core engine has **zero hard dependency** on any `@backtest-kit/*` add-on (you can run `getSignal` + `listen*` against a bare `addExchangeSchema` and nothing else), and each repo below is an independent reference you're meant to **fork and own**. The lock-in you'd normally fear — a closed runtime, a proprietary data format, a cloud you can't leave — none of it applies; the persistence is plain files or your own Mongo, the signals are your code, and the exit cost is a `git clone`.
|
|
773
779
|
|
|
774
780
|
- **[backtest-monorepo-parallel](https://github.com/backtest-kit/backtest-monorepo-parallel)** — 9 symbols in parallel in one Node process on shared Mongo+Redis, ~6,300× real-time, self-enforcement runtime exposing the workspace DI container to `./content/` strategy files. The scaling recipe: +1 service = +1 file, +1 provider, +1 ioc entry.
|
|
775
781
|
- **[backtest-ollama-crontab](https://github.com/backtest-kit/backtest-ollama-crontab)** — a local Ollama (`gpt-oss` quantized) as a per-signal risk gate plus a 15-minute crontab ingesting any public Telegram channel; the *same code* re-polls live and bulk-prepares in backtest. Documented result: **+52.22% → +68.90%** with the LLM gate on.
|
|
776
782
|
- **[backtest-kit-redis-mongo-docker](https://github.com/backtest-kit/backtest-kit-redis-mongo-docker)** — production persistence: all 15 adapters on Mongo+Redis, atomic read-after-write, `docker-compose` one-command deploy.
|
|
783
|
+
- **[backtest-kit-redis-postgres-pgpool-docker](https://github.com/backtest-kit/backtest-kit-redis-postgres-pgpool-docker)** — backtest-kit persistence on PostgreSQL (Pgpool-II) + Redis cache, with atomic upserts and a replica cluster.
|
|
777
784
|
- **[backtest-kit-skills](https://github.com/backtest-kit/backtest-kit-skills)** — a Claude Code skill + Mintlify docs: describe a strategy in plain language, get working TypeScript with every schema registration wired. `npx skills add https://github.com/backtest-kit/backtest-kit-skills`
|
|
778
785
|
- **[uzse-backtest-app](https://github.com/backtest-kit/uzse-backtest-app)** — Pine Script on regional exchanges that aren't on TradingView (UZSE, MSE, DSE…): download raw trades, build candles, feed them through a custom Mongo exchange adapter.
|
|
779
786
|
- **[backtest-kit-docs](https://github.com/backtest-kit/backtest-kit-docs)** — Architecture handbook and knowledge base: explains the engine's design, AI workflows, production patterns, and quantitative trading concepts beyond the API.
|
|
@@ -790,6 +797,32 @@ Zero-dependency TypeScript ports of the quant math behind [vectorbt](https://git
|
|
|
790
797
|
|
|
791
798
|
---
|
|
792
799
|
|
|
800
|
+
## 🌐 Internationalization
|
|
801
|
+
|
|
802
|
+
The `@backtest-kit/ui` dashboard ships in **7 languages**: English, Русский, Türkçe, 中文, हिन्दी, Español, Português. Switch via the language picker in the header
|
|
803
|
+
|
|
804
|
+
<details>
|
|
805
|
+
<summary>Locales</summary>
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
- 🇬🇧 **English** — ~1.5B speakers. Backtest Kit is a TypeScript engine where the strategy you test on history is byte-for-byte the one that trades live — only the clock changes. It removes the failure modes that kill bots (look-ahead bias, crash corruption, silent order rejects, averaging up) at the API level, then adds first-class DCA, partial closes, portfolio risk, and AI/Pine signals on top.
|
|
809
|
+
|
|
810
|
+
- 🇨🇳 **中文** — ~1.1B speakers. Backtest Kit 是一个 TypeScript 引擎:在历史数据上回测的策略代码,与实盘运行的代码逐字节一致,唯一区别只是时钟来源。它在 API 层面消除了让交易机器人崩溃的隐患(未来函数、崩溃损坏、静默拒单、越买越亏),并内置分批建仓、部分平仓、组合风控以及 AI/Pine 信号。
|
|
811
|
+
|
|
812
|
+
- 🇮🇳 **हिन्दी** — ~600M speakers. Backtest Kit एक TypeScript इंजन है जिसमें इतिहास पर परखा गया कोड ही बिना बदलाव के लाइव ट्रेड करता है — केवल घड़ी बदलती है। यह बॉट को बर्बाद करने वाली गलतियाँ (लुक-अहेड बायस, क्रैश करप्शन, चुपचाप ऑर्डर रिजेक्ट, ऊपर औसत करना) API स्तर पर ही रोकता है, और ऊपर से DCA, आंशिक क्लोज़, पोर्टफोलियो जोखिम व AI/Pine सिग्नल देता है।
|
|
813
|
+
|
|
814
|
+
- 🇪🇸 **Español** — ~560M speakers. Backtest Kit es un motor TypeScript donde la estrategia que pruebas con datos históricos es, byte a byte, la que opera en vivo — solo cambia el reloj. Elimina en la propia API los fallos que arruinan bots (sesgo look-ahead, corrupción por caídas, rechazos silenciosos de órdenes, promediar al alza) y suma DCA, cierres parciales, riesgo de cartera y señales de IA/Pine.
|
|
815
|
+
|
|
816
|
+
- 🇧🇷 **Português** — ~260M speakers. Backtest Kit é um motor TypeScript em que a estratégia testada no histórico é, byte a byte, a mesma que opera ao vivo — só o relógio muda. Ele elimina no próprio API os erros que matam bots (viés look-ahead, corrupção por falha, rejeição silenciosa de ordens, preço médio para cima) e ainda oferece DCA, fechamentos parciais, risco de carteira e sinais de IA/Pine.
|
|
817
|
+
|
|
818
|
+
- 🇷🇺 **Русский** — ~255M speakers. Backtest Kit — TypeScript-движок, где стратегия, проверенная на истории, побайтово совпадает с той, что торгует вживую: меняются только часы. Он устраняет на уровне API ошибки, губящие ботов (заглядывание в будущее, порча состояния при сбое, тихий отказ ордера, усреднение вверх), и добавляет полноценный DCA, частичные закрытия, портфельный риск и сигналы от AI/Pine.
|
|
819
|
+
|
|
820
|
+
- 🇹🇷 **Türkçe** — ~90M speakers. Backtest Kit, geçmiş veride test ettiğiniz stratejinin canlıda bayt bayt aynısını çalıştıran bir TypeScript motorudur — yalnızca saat değişir. Botları çökerten hataları (look-ahead yanlılığı, çökme bozulması, sessiz emir reddi, yukarı ortalama) API düzeyinde ortadan kaldırır; üstüne DCA, kısmi kapanışlar, portföy riski ve AI/Pine sinyalleri ekler.
|
|
821
|
+
|
|
822
|
+
</details>
|
|
823
|
+
|
|
824
|
+
---
|
|
825
|
+
|
|
793
826
|
## 💯 Tested
|
|
794
827
|
|
|
795
828
|
950+ unit and integration tests cover exchange helpers, the event-listener system, signal validation (valid long/short, inverted TP/SL, negative prices, future timestamps), PnL accuracy with 0.1% fees + 0.1% slippage, the full lifecycle and every close reason, strategy callbacks, and report generation. Tests use unique schema names per case (no cross-contamination), a forward-progressing mock candle generator, and event-driven completion detection.
|