Repository navigation
docs: runnable quick start; pinned 0.1.12 and opt-in 1.0.0 runtimes; in-process ABI limit - #13
Merged
Merged
Conversation
- README/getting-started/backtesting/ccxt quickstarts used venue kraken for
2025-07 15m bars; Kraken serves only its latest 720 candles, so step 2
raised IndexError and step 3 exited 1 ("provider returned no confirmed
bars"). Switched those examples to bitstamp (live runs: 96 bars, report
exit 0) and noted the Kraken history limit in the CCXT guide.
- README strategy fixed 1 BTC per order against 10,000 capital (Pine v6
default margin 100%): pinned runtime produced 90 zero-PnL same-bar trades,
release 0.1.25 produced none. Size at 10% of equity (88/89 real trades).
- README and backtesting guide now name the pinned runtime:
pineforge-release 0.1.12, engine 0.11.0, codegen 0.9.0
(release_contract.py DEFAULT_RELEASE_IMAGE + image OCI labels).
- Report envelope example: provider_start_ms/first_bar_ms described 5000
warmup bars, not 500 (warmup_request_start_ms and a live run give
1750878000000); added the top-level strategy section the CLI emits.
- csv.md infer_bar_mapping({"timestamp": ...}) raised SchemaMappingError on
the page's own header; removed that line.
- tabular-schema: ISO-8601/datetime sub-ms values are truncated, only
numeric ones fail (tabular.py _timestamp_ms; reproduced).
- data-model: expiry_ms may be 0; only contract size and strike must be
positive (models.py ContractSpec).
- server.md: /cache is the image default; code default differs.
- api/server.md: the packaged pineforge-backtest-server command serves
/readyz 503 and fails backtests (runtime_unavailable) outside the server
image; point to the image built from docker/server.Dockerfile.
- README SQLAlchemy row needs a dialect driver, as providers.md says.
- index.md, pyproject description, mkdocs site_description claimed macro
providers/adapters; none ship (only macro contract types), and only bars
reach pineforge-release.
- CORPUS.md: name the upstream market data (corpus NOTICE) and state the
LFS object size in MiB (176,093,499 bytes).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No macro-data provider ships; the package has only the macro contract types (MacroObservation, MacroRequest, MacroDataProvider). The previous commit dropped "macro" from the description; the keyword now matches. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The docs named only the pinned 0.1.12 runtime (engine 0.11.0, codegen 0.9.0). pineforge-release 1.0.0 (engine 1.0.0, codegen 1.0.0) is now the latest release. This revision (c244330) was tested on Linux arm64 with the README steps from this branch: - step 2 prints the bitstamp bar (timestamp_ms 1751413500000, close 105709.0); - step 3 exits 0 on the pinned default (88 trades, all with nonzero PnL, none same-bar, 772 equity points) and with --runtime-image pineforge-release:1.0.0@sha256:b271873d... (89 trades, same checks, same top-level report keys); - DockerBacktestRuntime runs the docker-test fixture on 1.0.0 (24 of 24 bars), and the server image built on the 1.0.0 base serves concurrent requests and reuses its compile cache; - PineForgeBacktestRunner refuses a v1.0.0 strategy library with "PineForge ABI mismatch: strategy reports 4, expected 2": backtest.py pins ABI 2, which engine v0.10.2 through v0.12.3 build. The README, docs/backtesting.md and docs/server.md now show how to run 1.0.0 pinned by digest and that results differ from 0.1.12; docs/api/backtesting.md states the in-process runner's ABI limit. mkdocs build --strict passes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documentation and package metadata text only: no code, test or version change. The quick start runs as written again, and the docs say which runtimes and engines the harness supports.
IndexErrorand step 3 exited 1. The examples in the README, getting-started, backtesting and CCXT pages now usebitstamp. The example strategy sizes 10% of equity instead of an unfunded 1 BTC, whose 90 trades all had zero PnL on the pinned runtime.pineforge-release0.1.12 (engine 0.11.0, codegen 0.9.0). They now say how to run release 1.0.0 (engine 1.0.0, codegen 1.0.0), pinned by digest, in the CLI and in the server image, and that results differ between the two.docs/api/backtesting.mdstates thatPineForgeBacktestRunneraccepts only PineForge C ABI 2, which engine v0.10.2 through v0.12.3 build. It refuses v0.13.x and v1.0.0 libraries.strategyblock;SchemaMappingErroris removed;Verification
This revision (
c244330) on Linux arm64, with the README steps taken verbatim from this branch:pytesttimestamp_ms=1751413500000 … close=105709.0--runtime-image pineforge-release:1.0.0@sha256:b271873d…DockerBacktestRuntime(image=1.0.0)PineForgeBacktestRunner.load(<v1.0.0 strategy.so>)EngineBacktestError: PineForge ABI mismatch: strategy reports 4, expected 2mkdocs build --strictAdded URLs return HTTP 200, and relative links in the changed files resolve. CI's
twine check --strictstep will likely fail on this PR:twine<7rejects the Metadata-Version 2.5 that hatchling 1.32 and later write. That predates this PR.Needed for engine 1.0 (not in this PR)
In-process runner on ABI 4 (
src/pineforge_data/backtest.py):EXPECTED_PF_ABIto 4 (line 21);open_at_end(int32) to_PfTrade;sharpe_tvandsortino_tvin_PfEquityStats: v1.0.0 renamed the C fieldssharpe_monthlyandsortino_monthlyat the same offsets, and its release report keeps the old keys, so a rename here changes this report's JSON keys;broker_state_hash(uint64_t*) andbroker_state_hash_len(int64_t) to_PfReport;pf_trade_t.max_runupandmax_drawdownnow hold whole-trade excursions in account currency, not per-unit price travel.pf_bar_tandpf_trade_tick_tare unchanged from engine v0.11.0 to v1.0.0.Default runtime. If 1.0.0 should become the default, move the pin in
release_contract.py:14-17, thedocker/server.Dockerfile:3default, the assertions attests/test_docker_integration.py:64andtests/test_docker_runtime.py:18, and the 0.1.12 trace-collection error atrelease_contract.py:91, and note the changed results.Other follow-up
Before the next release, fix the
twine>=6.2,<7pin: it rejects the Metadata-Version 2.5 that hatchling 1.32 and later write.🤖 Generated with Claude Code