Skip to content

Releases: Mario-SO/ohlcv

v2.0.0 - Zig 0.15.1 update

09 Oct 21:47

Choose a tag to compare

Changelog

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.

[2.0.0] - 2025-10-09

🚀 Compatibility & Tooling

Build System

  • Reworked build.zig for Zig 0.15+: executables/tests/benchmarks now share helper-generated modules, and
    the static archive installs via b.addLibrary.
  • Exported module name stays stable for dependents (@import("ohlcv")), removing the old lib/ohlcv.zig
    path requirement.
  • zig build run, zig build test, and benchmark steps (zig build benchmark, zig build benchmark-streaming, etc.) stay available through new helper wiring.

HTTP & IO Updates

  • HTTP data source now streams into a managed ArrayList writer adapted with writer.adaptToNewApi(...),
    passing the new response_writer on Zig 0.15’s std.http.Client.fetch.
  • Demo stdout uses std.fs.File.stdout().writer(...) and guards against std.Io.Writer.Error.WriteFailed
    (common when piping output).

🧠 Library Improvements

Parsers & Time Series

  • CSV parser, streaming parser, and time-series utilities now rely on std.array_list.Managed, preserving
    .init, .writer, and capacity helpers under Zig 0.15.
  • Benchmarks allocate via the managed lists, matching parser semantics for non-streaming and streaming
    runs.

Consumer Experience

  • README now highlights Zig 0.15+ support, with import instructions showing const ohlcv = @import("ohlcv");.
  • Build instructions clarify dependency wiring:
    const ohlcv_dep = b.dependency("ohlcv", .{ .target = target, .optimize = optimize });
    exe.root_module.addImport("ohlcv", ohlcv_dep.module("ohlcv"));
    

✅ Verification

  • Commands executed on macOS arm64 with Zig 0.15.1:
    • zig build
    • zig build test
    • zig build benchmark, zig build benchmark-streaming, zig build benchmark-performance
    • zig build profile-memory
  • Downstream sample (rayzig) compiles once imports switch to @import("ohlcv") and zig fetch --save …
    refreshes the dependency.

Known Limitations

  • Requires Zig 0.15.0 or higher.
  • CSV dates before 1970 are skipped.
  • Rows with zero values are filtered out.

v1.0.0 - Initial Release

18 Aug 16:02
4af74a1

Choose a tag to compare

Changelog

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.

1.0.0 - 2025-08-18

🎉 Initial Release

Features

  • 37 Technical Indicators - Complete suite of trading indicators:

    • Trend: SMA, EMA, WMA, ADX, DMI, Parabolic SAR
    • Momentum: RSI, MACD, Stochastic, Williams %R, ROC, TRIX, and more
    • Volatility: ATR, Bollinger Bands, Keltner Channels, Donchian Channels
    • Volume: OBV, MFI, CMF, Force Index, Accumulation/Distribution
    • Advanced: Ichimoku Cloud, Heikin Ashi, Pivot Points, Elder Ray, Aroon, Zig Zag
  • High-Performance Parsing:

    • Standard CSV parser with 15,000+ rows/ms throughput
    • Streaming parser for processing gigabyte-sized files with constant 4KB memory
    • Optimized fast parser primitives with SIMD-aware line counting
    • Robust error handling (skips invalid rows automatically)
  • Memory Management:

    • Memory pooling system for efficient allocation reuse
    • IndicatorArena for batch indicator calculations
    • Zero memory leaks verified across all components
  • Data Sources:

    • HTTP data source for remote CSV files
    • File data source for local files
    • Memory data source for in-memory data
    • Preset sources: Bitcoin, S&P 500, Ethereum, Gold
  • Time Series Operations:

    • Efficient slicing by time range
    • Filtering with custom predicates
    • Sorting and transformation operations
    • Zero-copy operations where possible

Performance

  • Parser throughput: 15,000+ rows/millisecond
  • SMA-20 calculation: <0.03ms for 1K data points
  • Memory usage: ~47KB per 1K OHLCV rows
  • Streaming mode: Constant 4KB regardless of file size

Infrastructure

  • Comprehensive test suite with 100% indicator coverage
  • GitHub Actions CI/CD pipeline (3 streamlined workflows)
  • Automated daily market data updates
  • Performance benchmarking suite
  • Memory profiling tools

Documentation

  • Complete API documentation
  • Usage guide with examples
  • Architecture documentation
  • Performance monitoring guide

Known Limitations

  • Requires Zig 0.14.0 or higher
  • CSV dates before 1970 are skipped
  • Rows with zero values are filtered out