[Changelog]
Release notes for PYNE (hoox-pyne / pynescript).
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[0.3.12] - 2026-08-17
Added
- Strategy hyperparameter search —
pynescript.optimize(TPE / random / grid, holdout + walk-forward) scores realRuntimestrategy events.POST /optimize(same free-tier gates as/run) andpyne optimize. Not/backtest/quick; not a Pine builtin. - Real
timeframe.changeon interpret and compile (UTC fixed-width buckets; bar 0 is a new period). - HTF
request.securityallowlist includesta.wmaandta.rma. - Incremental interpret kernels for
ta.aroon,ta.dpo,ta.donchian, andta.kst. - Dual-host plot/drawing identity: compile geometry-only AXIS export, plot_meta kinds, coordinate snapshot at create/set.
[0.3.11] - 2026-08-16
Added
- Incremental interpret
ta.nvi/ta.pviplus matching compilenumba_nvi_inc/numba_pvi_inc. - Flask
POST /runtimeout_secondsandPOST /run/batchlibraries. - Dual-host goldens: Supertrend mid±factor·ATR, trail OHLC, foreign
request.*→na, compile plot keys.
Changed
- Interpret
ta.pvt/ta.vptis cumulative (matches compile / TV). Bar 0 is0.0. pynets/submodule pin v0.2.0 (interpret + JS compile). Python Runtime remains the oracle.
Fixed
- Compile MACD signal SMA-seeds the MACD line; OBV skips the first close change.
- Compile
ta.ao/ta.aroonkernels (were all-na). - Compile foreign
request.securitytuple unpack no longer invents chart close. - Compile titled
bgcolor/ emptyplot(..., title="")keys match interpret (disk IR v10). - Compile
strategy.exitkeeps the Pine exit id for trail events.
[0.3.10] - 2026-08-16
Added
- Incremental interpret kernels for
ta.obv,ta.wad/wvad,ta.cmf, andta.klinger(PYNE_TA_INCREMENTAL).
Changed
- Runtime interpret hot path (Round 9): direct Assign/
plot/Call dispatch, skip unused derived OHLCV series, plot bar-reuse. Same-machine bench @ 2000 bars: minimal 2.7×,ta_sma2.0×,ta_combo1.45×.PYNE_SERIES_RINGstill default off. ta.vwap()with no source still updateshlc3when that identifier is absent from the script.
[0.3.9] - 2026-08-16
Added
FunctionDef.returns— UDF/method return types survive parse → unparse (int ilog2(...)).- Incremental
ta.median/ta.cmoNumba kernels; statementhline/fillstay nopython with synthesized drawings. - Thread-local ANTLR lexer/parser reuse (warm SLL DFA across distinct sources).
- LSP Docker image
ghcr.io/hoox-sh/pyne/lsp(stdiopyne-lsp, slim[lsp]only). Published onv*tags with api/cli.
Changed
- Grammar left-factors typed names; bare
x =isAssign,=reassignment only on attribute/subscript. - Evaluator:
varhistory carry at bar start; series maxlen matches host ≥1000;_pine_site_idfor UDF/call-expr history. - pyne-vscode publisher namespace is
hoox-sh(extension idhoox-sh.pyne).
Fixed
Runtime.run(mode="auto", libraries=)forwardslibrariesinto interpret fallback.- Windows CLI
--helpno longer crashes on cp1252. Open VSX unknown-publisher no longer fails Build & Release. - CORS — AXIS product Origins +
/healthfree CORS path (also in 0.3.8 notes). - Build & Release: Create Release no longer downloads Docker Buildx cache artifacts.
[0.3.8] - 2026-08-15
Added
- Compile UDT field defaults on
Type.new()(omittedbool x = falsestaysFalse;bool(np.nan)no longer trips flags). Fixes interpret↔compile071Entry plot. register_library_sourcefinalizes library exports soRuntime.run(..., libraries=)/POST /runimport ns/Lib/1actually binds members.- Supertrend first-party goldens lock the simplified mid±factor·ATR contract (interpret full/inc + Numba).
- LSP: user-enum completion/hover/outline; soft-keyword hover;
plot(ta.leaf insert; drop C001/C003 false positives.
Fixed
trail_points=0/nano longer disables a validtrail_offset(interpret + compile).- VPS deploy AXIS health probe uses
:80(not stale:8081).
Changed
- Compile disk IR cache meta version 7 → 8 (UDT defaults).
- Docs honesty: tick-offset
profit/loss, omitted bid/askna, H1 Runtime unify done.
[0.3.7] - 2026-08-15
Added
Runtime.run(..., libraries=)— optional[{namespace, name, version, source}]registered viaregister_library_sourcebefore interpret so AXISimport ns/Name/verresolves published git folders. Pro APIPOST /runaccepts the samelibrariesfield.
Changed
- Runtime hot path: skip series dual-write when
PYNE_SERIES_RING=1; tick-offset exits, incremental MA, plot pack, kernels.
Removed
- Colocated
pine-worker/TypeScript extra tool (parser/evaluator port). Lives in the siblingpine-workercheckout, not this repo.
[0.3.6] - 2026-08-13
Added
- Binary search in UDT arrays (Pine August 2026):
array.binary_search(),array.binary_search_leftmost(), andarray.binary_search_rightmost()acceptsort_field(const int field index, default 0, or const string field name) so they can search arrays of user-defined types. The array must be sorted by the same field in ascending order. Interpret + compile object-mode, with dual-host parity tests. - Runtime
timeout_seconds: optional wall-clock circuit breaker on interpret (every 32 bars); partial results withtimed_out+error_kind=runtimefor edge/cron budgets (shared by Pro API and pyne-worker). linefill.newexport —DrawingRegistry.export_for_apiserializes line fills astype: "linefill"quads (line1 + line2 endpoints) so AXIS can paint the band.- Compile drawing set_ fold* —
fold_compile_drawing_mutationsappliesline.set_*/label.set_*/ … onto live handles and drops set events so compile/rundrawings match interpret final state. - Compile drawing
*.delete—line.delete/label.delete/box.delete/polyline.delete/table.deleteemitkind: 'delete'events on__drawings(target =*.newhandle);fold_compile_drawing_mutationsdrops deleted objects (was MVP no-op). force_overlayon export — line/box/label payloads includeforce_overlayfor AXIS pane routing.
Changed
- H1 dual-host: pyne-worker
pynescript_backendis a thin wrap over packagepynescript.runtime(strict OHLCV validation only); vendor via./scripts/sync_vendor.sh.
[0.3.5] - 2026-08-12
Fixed
- Drawing export (
line.new) —export_for_apino longer drops lines whosexloc.bar_indexis past the last bar (classicbar_index + 1onbarstate.islast). Extrapolates from series period; emptybar_timespasses bare bar index for AXIS logical mapping.
[0.3.4] - 2026-08-10
Added
- Package Runtime SoT (
pynescript.runtime): bar-loop host, series, CustomEvaluator live in the installable package;backend.*re-exports for Pro API. - First-party dual-host TA goldens (ATR / Supertrend / Keltner) and full
test_ta_incrementalCI gate. - Strategy exit surface: pending stop/limit + OCA;
from_entrymulti-leg (interpret + compile);qty_percent; minimal trail (interpret + compile); compile risk halt cascade (allow_entry_in,max_position_size,max_drawdown,max_cons_loss_days,max_intraday_loss,max_intraday_filled_orders); open/closed trade fields + MAE/MFE. request.securityhonesty + HTF resample: policy meta on Runtime; same-symbol coarser TF OHLCV bucketing; allowlisted simpleta.sma/ema/rsi/atron HTF.- Realtime host simulation:
realtime_last_bar/realtime_ticks/realtime_bars/realtime_from_barforvaripmulti-tick tests. - Free-tier Pro API guards (bar/script caps, rate, concurrency, SSRF-safe webhooks, chart/mock-only free data).
- Hash-only JSON API key store; first-party fixtures under
tests/fixtures/first_party/. - pine-worker series lookback polarity + parity smoke (
series[1]previous bar). - Plot host:
plot.style_*constants, style/linestyle capture, plotshape size export.
Fixed
- EMA dual-host seed (full-list SMA seed matches incremental/Numba).
ta.atrWilder RMA on interpret + Numba.- AugAssign / tuple unpack series binding; unparser
visit_Simple; linter C004/W002. - Enum/string series history so
d[1]works for plotshape flips. - vscode-extension transitive
brace-expansionDependabot high (2.1.4).
Changed
- CI Core runtime gates parity, strategy, series, TA incremental, first-party goldens, runtime package, free-limits.
- Docs:
docs/known_divergences.md, audit sprint status notes.
[0.3.3] - 2026-08-09
Fixed
- Corpus residual (C1, set01–04): dual-namespace user methods vs bare ta aliases
(
method dmi/float dmi = dmi(...)no longer mis-routes tota.dmiafter series assign);line.get_price/ line getters soft-na onnaline or endpoints and coerce PineSeries samples;request.securityOHLCVT +timelist unpack on different TF; sanitize dangling binary ops inside unclosed trailing calls (truncated docs scrapes). ta.dmisoft-na on unresolved /nalength (aligned with other TA period soft-na).
Changed
- Local open-source corpus set01–04 (2477 scripts, not shipped in git): parse 99.96%
(2476/2477) and Runtime interpret 100% excl. EXPECTED_FAIL (2466 OK + 11 intentional
demos); set01 Runtime 249/249. Harness classifies path-listed intentional demos
(library
runtime.error, lower-TF guards, pathological loops) as EXPECTED_FAIL. - Docs / landing: README, compatibility, roadmap, missing-features, and marketing numbers updated to the 2026-08-09 corpus snapshot (not TradingView® platform parity).
[0.3.2] - 2026-08-09
Changed
- Console scripts: preferred names are
pyneandpyne-lsp. Legacypynescript/pynescript-lspremain installed as aliases (same callables). Import package is stillpynescript; PyPI dist ishoox-pyne. Docs, VS Code auto-detect, and editor client configs preferpyne*with fallback topynescript*.
[0.3.1] - 2026-08-09
Added
- Strategy average-price models (pynescript extension):
strategy(..., avg_price_model=)"stock"(default) — multi-leg FIFO reweight ofposition_avg_priceon partial close (TV-like)"futures"— sticky net AEP until flat (linear USDT-M / BTCUSDT-style)"inverse"— accepted; sticky reduce (harmonic add deferred)- Tokens:
strategy.avg_price_stock/avg_price_futures/avg_price_inverse
- Leverage for futures UI (pynescript extension):
strategy(..., leverage=N)- Scales percent/cash default qty:
qty = margin × leverage / price - Margin held = notional / leverage; free cash adjusts accordingly
- Simple
strategy.margin_liquidation_pricewhen leverage > 1 - Derives TV-style
margin_long/margin_short% as100/leverage - Read-back:
strategy.leverage
- Scales percent/cash default qty:
- Dual-path wiring: interpret + compile broker + compiler emit for both options
- Docs: stock vs futures avg semantics; TV vs PYNE notes on
inputbeforestrategy()
Fixed
- Compile broker ctor no longer emits
name_arr[__bar_idx]for strategy kwargs (undefined at ctor time). Const-like input/literal defvals fold into ctor (e.g.lev = input.float(10)thenstrategy(..., leverage=lev)→leverage=10).
Changed
- Compile emit allowlist also wires
default_qty_type/default_qty_valueintoCompileStrategyBroker(...).
[0.3.0] - 2026-08-06
First public PYNE release. PyPI distribution name is hoox-pyne
(plain pyne / PyNE is taken by an unrelated package; import/CLIs remain
pynescript / pynescript-lsp). Install: pip install "hoox-pyne[lsp]".
Added
- Alert engine (
AlertsMixin): TV-stylealert.freq_*normalization, once-per-bar dedup, once-per-bar-close gating,alertconditionfire-on-true, host helpersexport_alerts/export_alerts_from_evaluator. - Dual-host alerts export: Pro API + pyne-worker
Runtimeclear/exportalerts(and optionalalert_conditions) on interpret/run. - L2 alert webhooks: Pro API
backend/alert_forwarder.py(webhook_url,ALERT_WEBHOOK_URL, last-bar filter, batch JSON); pyne-worker edge webhooks + cron last-bar delivery. Docs:docs/pyne/runtime/alerts.mdx. - Roadmap residual backlog IDs H1–L3 (dual-host, corpus tail, warm compile, series/TA, optional fidelity, long-horizon); see
docs/ROADMAP.md(2026-08-01). L2 closed (Pro API + edge). - Corpus C1 residual goldens: bare
tonumber,math.isfinite, strategyclosedtrades/opentradesentry_id/comment/max_drawdown/max_runup accessors; tests intests/test_corpus_runtime_residuals.py. - Interpret↔compile plot parity harness:
scripts/compare_interp_compile.py(multiprocess series compare with--file-list,--timeout-sec,--ignore-hline-keys,--ignore-fill-keys, and wave workers). - Parity tests:
tests/test_interp_compile_parity.py,tests/test_dividend_yield_parity.py, and R8/R9 kernel suites. - Compiler:
time_arron the compiled execute signature;numba_timestamp/numba_utc_parts; titledfill()series export;clear_numba_function_cacheswith corrupt-cache recovery. - Compile path for
numba_rci/ta.rci. - Strategy events system: StrategyEvent dataclass, full emission from strategy.* builtins, parity test corpus.
- pine-worker/ as colocated extra tool: TypeScript evaluator port + Python to TS converter script.
- var / varip declaration modes and ReAssign support.
- Multi-target Docker image (
api/api-dev/lsp),docker-bake.hcl, prod compose overlay, Makefile docker helpers. - Key-store backends selectable via
STORE_BACKEND(json|sqlite|redis) for multi-worker / multi-replica deploys. - PyPI publish workflow (Trusted Publishing on
v*tags) and package build job in CI. - Compiler disk IR/module cache (
PYNE_COMPILE_DISK_CACHE, default on) + typedCompileError*hierarchy +prewarm_numba_builtins(). - Runtime structured errors:
error_kind(parse|compile|runtime|data|order|mode),error_type,error_bar(API/runforwards).
Changed
- GitHub / package metadata for org
hoox-sh/pyne: project URLs, Docker image source label, docs, CONTRIBUTING, and PyPI Trusted Publisher owner. Seedocs/pyne/devops/publish-checklist.mdx. - PyPI distribution name is
hoox-pyne(import/CLIs remainpynescript/pynescript-lsp). Avoids collision with upstream elbakramerpynescriptand the unrelated pre-existingpyne/PyNEproject on PyPI. - Default image version labels / bake / Cloud Build substitution aligned to 0.3.0.
- Compile
request.securitypolicy: same-symbol simple OHLCV only; other foreign tickers and complex expressions resolve tona. - Disk IR meta version bumped when titled fill series export landed (and again for R8/R9 parity kernels).
- Interpret bar-loop residual wins (visit/Call arg plans, series last-sample, residual TA): ~1.24×
ta_combovs Round 5 (~137 ms @ 2k bars). - Compiler stays numeric for more history/math/chart surface; viewport right bar time is
(n_bars-1)*60000in compile mode. - Runtime
mode=auto: non-emptyinputsforces interpret with clear fallback reason; object-mode compile no longer requires Numba. - VS Code extension rebrand: PYNE — Pine Script™ for VS Code (
pyne0.3.0), HOOX logo icon, marketplace description as part of the HOOX open trading stack, TradingView® / Pine Script™ trademark disclaimer, and richer TextMate syntax highlighting. - VS Code extension packaging: esbuild-bundle
vscode-languageclientinto the VSIX, explicitonCommandactivation, resilient command handlers, and shared output channel. - CI rewritten for the post-AXIS-extract repo: Python lint/test matrix, package build, Docker smoke; removed dead
frontend/jobs. require_admin_tokenenforcesADMIN_TOKEN+X-Admin-Token(fail-closed); prod compose drops host source mounts viavolumes: !override.pyproject.tomlproject URLs, Alpha classifier, Python 3.13,proextra includesredis.- Updated documentation (ROADMAP, missing_features, implementation status, LSP plan, devops Docker) to reflect current state.
Fixed
- R8/R9 interpret↔compile corpus parity: foreign-na / MTF
request.security, Heikin-Ashi security, TA call-site slots, UDF series locals per Call site, series assign bar key(site, name), PineSeries snapshot for typed float/nz/array.set(BBI ring buffer),ta.vwap(hlc3[, anchor]),time(...)[1]call-expr history, strategyposition_size/avg/closedtrades[n]end-of-bar history, Pine==/!=withna(na==naTrue; other na compares False vianumba_pine_eq/ne). - Builtin kwargs merge no longer drops explicit trailing
None/ Pinena(e.g.array.push(id=a, value=na)), unblocking many corpus library scripts. - Corpus C1 8-agent residual pass:
str.replace4-arg/occurrence + coerce; richertimestampdate strings + TZ-first; series negative/na/OOB index →na; TA float/series periods; color hex/string channels;syminfo.prefix/tickerdual-mode; array get/set soft index +index_2d_to_1dstub polyfill;hour/dayofmonth/… series+timezone arity. - set05 6-agent pass:
timestamp(9999,…)year-first + calendar overflow;strategy.initial_capital =reassignment;timenow/dayofweek.*; sanitize keepstype == "SMA"ternary chains; v4random/offset/round_to_mintick+ticker.pointfigurefull arity; call-site cache stored on AST node (fixes id reuse collisions). - set05 residual round 2 (6 agents): bare TA series
obv/accdist/vwap;ta.linreglength<2→na;ta.kama2-arg; UDF name clobber restore; array.push soft arity +newcoloraliases; multi-island sanitize merge for UDF defs; missing UDF soft-na; int()/tonumber soft coerce; ticker.modifyadjustment=; kwargs merge + timestamp const-fold + static for-to. - Round 6 multi-agent pass (perf + correctness + error handling + compiler coverage).
- Compiler nopython kernels:
ta.dmi/ta.adx/ta.supertrend/ta.alma/ta.percentrank(match interpret oracle). - Incremental interpret TA for residual full-history paths:
mfi,sar,kc/kcw,alma,correlation, percentiles (behindPYNE_TA_INCREMENTAL). - Strategy exit commission and exit slippage on interpret + compile paths; bad order args emit events instead of silent fills.
- Stable
CRYPTO_KEY/METADATA_KEYresolution for Fernet metadata encryption (GitHub secrets wired). - User series no longer shadows bare builtins (
ad/tr/obv/pvt):plot(ad)emits the user series instead of re-emitting the Chaikin A/D stub. highestbars/lowestbarsuse negative TradingView®-style offsets (Aroon parity).- Compile Wilder RSI matches interpret (was a rolling SMA of gains).
- NaN-safe EMA/RMA seed for ATR custom
ma_functionand nested DEMA. - UDF last assign of
nano longer retains a prior tuple unpack (ADX early zeros). math.avgpropagatesna;ta.rocuses the standard formula;wmarequires a full non-nawindow;ta.cumtreatsna/ IEEE NaN as 0.request.security: foreign tickers and complex expressions resolve tonainstead of inventing chart close;dividend_yield/ CVI interpret↔compile parity.- Import stub plot cells are not serialized as color strings.
auto_fibinterpret and compile raise the same insufficient-pivot errors;for/toauto step;chart.pointobject dtype.- Interpreter:
ta.rising/ta.falling/ta.highestbars/ta.lowestbarsno longer raiseTypeErroron Pinena(e.g. VIDYA warmup on MA-STER). - Crossover equality aligned with TV/numba (
<=/>=on previous bar); short series rising/falling in bar mode. - Body
TypeErrorin call dispatch no longer soft-fails tona(signature mismatches still soft); strategystrategy()apply fails closed. - Compile object-mode:
array.sort/sort_indiceshonorsort_field;array.fillrange;map.keys/valuesnot coerced viasafe_float. - Corpus sanitize: multi-version islands, UI chrome, safer ternary/call/type-field repairs without FP on
?in input titles. - CI Ruff E,F,W gate: F821/
Anyimports and F401 unused imports cleaned for green CI on main.
Removed
- Stale
Dockerfile.api(folded into multi-targetDockerfile). - Dead
technical_refactored.pyand internal refactoring notes from the published package tree. - Broken AXIS-only GitHub workflows (
axis-nightly, PWA/e2e jobs) — AXIS CI lives in jango-blockchained/axis.