How to use @kiploks/core npm package: TypeScript backtesting tutorial
A practical TypeScript workflow for @kiploks/core: install, typed boundaries, running a minimal analysis pipeline, and where engine validation fits versus hosted Kiploks workflows.
The @kiploks/core npm package is aimed at developers who want deterministic analytics primitives in Node.js or TypeScript services. It is not a full hosted product UI, and it is not a broker connector.
This tutorial focuses on a safe mental model and a minimal integration shape.
Install and versioning
Pin versions explicitly in package.json and record the lockfile in git. Engine packages move on semver; silent drift breaks reproducibility.
Use:
npm install @kiploks/core@<pinned>- a CI step that fails if the lockfile changes unexpectedly
Keep server-only imports out of browser bundles
If you build a Next.js app, ensure engine imports stay on the server path only. The package is designed for Node workflows; bundling it into client code is usually the wrong architecture.
Minimal project shape
A clean layout:
src/data/- candle ingest and normalizationsrc/strategy/- pure functions: signals from statesrc/analysis/- calls engine utilities and prints JSON resultssrc/reports/- writes artifacts for audit
Keep strategy code pure so you can unit test it without network or disk.
A minimal TypeScript skeleton (illustrative)
Swap the placeholder section with your actual engine API calls once you have pinned docs for your version.
Where hosted Kiploks still matters
The engine can help standardize computations, but deployment-grade validation still needs:
- walk-forward discipline
- cost realism
- operational monitoring
Treat npm usage as a building block inside a larger validation system.