@hoox-sh/pynets 0.7.0 → 0.9.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/CHANGELOG.md CHANGED
@@ -7,6 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.0] - 2026-11-04
11
+
12
+ Realtime stream session API and forming-bar semantics.
13
+
14
+ ### Added
15
+ - `RuntimeStream.updateLastBar(bar)` — re-tick the forming last bar without advancing `barCount`; `once`, TA state, and broker fills recompute from the revised history.
16
+ - `RuntimeStream.appendBars(bars)` and `RuntimeStream.barCount`.
17
+ - `RuntimeOptions.realtimeLastBar` / `Runtime.run(..., { realtimeLastBar: true })` — last bar sees `barstate.isrealtime=1`, `ishistory=0`, `islastconfirmedhistory=0`.
18
+ - `RuntimeStream.push` uses realtime last-bar semantics; `close()` confirms the last bar.
19
+
20
+ ### Changed
21
+ - `barstate.ishistory` is `1` on historical bars (including the last), matching PYNE; the realtime forming bar is `0`.
22
+ - `once` commits its fired flag only on a confirmed bar, ready for multi-tick rollback.
23
+
24
+ ### Fixed
25
+ - README stream example used the non-existent `stream.end()`; it now uses `close()`.
26
+
27
+ ## [0.8.0] - 2026-11-04
28
+
29
+ Full builtin surface: every name registered by PYNE's `BuiltinEvaluator`
30
+ (941) now resolves in PyneTS, including the capstone synthesizer and
31
+ list-returning gamma levels.
32
+
33
+ ### Added
34
+ - `ta.gamma_levels` — returns a `PineArray` (`array.get(g, 0)` / `array.get(g, 1)`), interpret + compile.
35
+ - `ta.intelligent_strategy_synthesizer` — multi-list trend/momentum/volatility/volume synthesis with market-regime and risk-profile adaptation.
36
+ - `ta.signal_confluence` — dict/map signal agreement, including boolean signals.
37
+
38
+ ### Changed
39
+ - `ta.breakout_detection` treats a bare series argument as `0`, matching PYNE's `isinstance` bar-mode quirk.
40
+
41
+ ### Notes
42
+ - All 941 registered builtin names resolve. `color.*`, `*.all`, `syminfo.ticker`, `timeframe.*`, and `last_bar_time` are handled structurally rather than by quoted dispatch keys; see `PARITY.md`.
43
+
10
44
  ## [0.7.0] - 2026-11-04
11
45
 
12
46
  Wave 13: history-based, sentiment, and macro analytics, plus the newest-first
package/README.md CHANGED
@@ -134,7 +134,7 @@ Wired through one dispatcher (`src/runtime/interpret.ts`). Not a second engine.
134
134
 
135
135
  **Language** — `var` / `varip` / `:=`, tuples, `if` / `for` / `while` / `switch`, UDFs, `type` / `enum`, `import`, `library()`.
136
136
 
137
- **`ta.*`** — SMA/EMA/RMA/WMA/VWMA/HMA/ALMA/DEMA/TEMA/KAMA/SWMA, RSI, ATR, Supertrend, Keltner, BB/BBW, MACD, Stoch, CCI, WPR, DMI/ADX, SAR, MFI, CMO, TSI, COG, stdev/dev/variance, highest/lowest, crossover/crossunder, volume (OBV, PVT, AD, WAD, NVI/PVI, III, WVAD), pivots, barssince, valuewhen, percentiles, and the v3/v4 bare names. Also `uo`, `rci`, `dpo`, `kst`, `stochrsi`, `donchian`, `ichimoku`, `bb_pct`, `emv`, `fractal`, `atr_stop`, `zigzag`, the Python bar-mode detectors (`hammer`, `gap_detector`, `macd_signal`, `acceleration_factor`, `stoch_smooth`, `engulfing`, `inside_bar_pattern`, `double_top_bottom`, `voi`, `bid_ask_imbalance`, `rsi_oversold_overbought`, `rsi_divergence`, `cumulative_delta`, `volume_momentum`, `volume_profile_high` / `low`, `volume_thrust`), and the statistical / risk analytics waves: `sma_weighted`, `apo`, `atr_normalized`, `beta`, `r_squared`, `comovement`, `skewness`, `kurtosis`, `volume_weighted_momentum`, `parkinson`, `garman_klass`, `mean_reversion_score`, `market_condition`, `order_flow_imbalance`, `liquidity_score`, `fear_greed_index`, `crowd_sentiment`, `smart_money_flow`, `trend_confirmation_score`, `max_loss_level`, `profit_lock_level`, `position_sizing`, `kelly_criterion`, `risk_reward_ratio`, `risk_reward_asymmetry`, `probability_of_movement`, `trend_strength`, `breakeven_level`, `market_structure_pivot`, `position_sizing_score`, `trailing_exit_level`, `optimal_entry_zone`, `mean_reversion_entry`, `multi_timeframe_signal`, `market_timing_index`, `regime_adaptive_signal`, `strategy_score`, `breakout_detection`, `ema_cross_signal`, `momentum_filter`, `volatility_regime`, `economic_impact_score`, `contrarian_signal`, `drawdown_recovery_level`, `pivot_point_levels`, `volatility_regime_score`, `correlation_filter`, `advanced_breakout_detector`, `pullback_bounce_level`, `divergence_detector`, `momentum_divergence`, `spread_analysis`, `employment_cycle_indicator`, `gdp_growth_proxy`, `inflation_proxy_indicator`, `expected_value`. Compile emits the same names. See [`PARITY.md`](PARITY.md) for the remaining advanced analytics.
137
+ **`ta.*`** — SMA/EMA/RMA/WMA/VWMA/HMA/ALMA/DEMA/TEMA/KAMA/SWMA, RSI, ATR, Supertrend, Keltner, BB/BBW, MACD, Stoch, CCI, WPR, DMI/ADX, SAR, MFI, CMO, TSI, COG, stdev/dev/variance, highest/lowest, crossover/crossunder, volume (OBV, PVT, AD, WAD, NVI/PVI, III, WVAD), pivots, barssince, valuewhen, percentiles, and the v3/v4 bare names. Also `uo`, `rci`, `dpo`, `kst`, `stochrsi`, `donchian`, `ichimoku`, `bb_pct`, `emv`, `fractal`, `atr_stop`, `zigzag`, the Python bar-mode detectors (`hammer`, `gap_detector`, `macd_signal`, `acceleration_factor`, `stoch_smooth`, `engulfing`, `inside_bar_pattern`, `double_top_bottom`, `voi`, `bid_ask_imbalance`, `rsi_oversold_overbought`, `rsi_divergence`, `cumulative_delta`, `volume_momentum`, `volume_profile_high` / `low`, `volume_thrust`), and the statistical / risk analytics waves: `sma_weighted`, `apo`, `atr_normalized`, `beta`, `r_squared`, `comovement`, `skewness`, `kurtosis`, `volume_weighted_momentum`, `parkinson`, `garman_klass`, `mean_reversion_score`, `market_condition`, `order_flow_imbalance`, `liquidity_score`, `fear_greed_index`, `crowd_sentiment`, `smart_money_flow`, `trend_confirmation_score`, `max_loss_level`, `profit_lock_level`, `position_sizing`, `kelly_criterion`, `risk_reward_ratio`, `risk_reward_asymmetry`, `probability_of_movement`, `trend_strength`, `breakeven_level`, `market_structure_pivot`, `position_sizing_score`, `trailing_exit_level`, `optimal_entry_zone`, `mean_reversion_entry`, `multi_timeframe_signal`, `market_timing_index`, `regime_adaptive_signal`, `strategy_score`, `breakout_detection`, `ema_cross_signal`, `momentum_filter`, `volatility_regime`, `economic_impact_score`, `contrarian_signal`, `drawdown_recovery_level`, `pivot_point_levels`, `volatility_regime_score`, `correlation_filter`, `advanced_breakout_detector`, `pullback_bounce_level`, `divergence_detector`, `momentum_divergence`, `spread_analysis`, `employment_cycle_indicator`, `gdp_growth_proxy`, `inflation_proxy_indicator`, `expected_value`, `gamma_levels`, `intelligent_strategy_synthesizer`, `signal_confluence`. Compile emits the same names. **All 941 PYNE-registered builtin names resolve** — see [`PARITY.md`](PARITY.md) for the structural aliases and remaining edge semantics.
138
138
 
139
139
  **`math.*` / `str.*` / `color.*` / `input.*` / `log.*`** — the Python set, including `nz`, `iff`, `fixnan`, `timestamp`, `weekofyear`, `time_tradingday`.
140
140
 
@@ -178,9 +178,17 @@ const stream = rt.stream(source);
178
178
  stream.on("bar", (out) => { /* one result per push */ });
179
179
  stream.push({ close: 1 });
180
180
  stream.push({ close: 2 });
181
- stream.end();
181
+
182
+ // Re-tick the forming last bar (does not advance barCount):
183
+ // barstate.isrealtime is 1, ishistory 0; once/TA/broker state recomputes.
184
+ stream.updateLastBar({ open: 2, high: 3, low: 1, close: 2.5 });
185
+ stream.appendBars([{ close: 3 }, { close: 4 }]);
186
+ stream.close(); // confirm the last bar (realtimeLastBar: false)
182
187
  ```
183
188
 
189
+ `Runtime.run(src, bars, { realtimeLastBar: true })` exposes the same flag for a
190
+ single call.
191
+
184
192
  ### Bars you actually have
185
193
 
186
194
  Hosts feed OHLCV. PyneTS will not invent a foreign market.