OnlineResamplers.jl Documentation

Welcome to the comprehensive documentation for OnlineResamplers.jl - a high-performance Julia package for real-time resampling of financial market data.

Documentation Overview

📚 Getting Started

  • Tutorial - Step-by-step guide from basic concepts to advanced usage
    • Installation and setup
    • Core concepts (MarketDataPoint, TimeWindow, OHLC)
    • Basic resampling strategies
    • Real-time processing patterns
    • Performance optimization tips

📖 Comprehensive Reference

  • User Guide - Complete guide with detailed examples and best practices

    • Installation options
    • Core concepts and data structures
    • Basic and advanced usage patterns
    • Real-world examples (CSV processing, multi-timeframe analysis)
    • Performance optimization strategies
    • OnlineStats integration
    • Troubleshooting and debugging
  • API Reference - Detailed technical documentation

    • Complete function signatures and parameters
    • Type specifications and compatibility
    • Return value documentation
    • Performance characteristics
    • Usage examples for each function
  • Edge Cases & Limitations - Important behaviors and gotchas

    • Out-of-order data handling
    • Empty windows and single data points
    • Type mismatch issues
    • Memory considerations
    • Best practices for edge cases

💡 Examples and Patterns

🧪 Tests


Quick Navigation

By Use Case

Use CaseDocumentationExamples
Getting StartedTutorial - Getting StartedBasic Usage
OHLC CandlesticksUser Guide - OHLCOHLC Examples
High-Precision DataTutorial - Custom TypesPrecision Examples
Real-time ProcessingTutorial - Real-timeStreaming Examples
Performance OptimizationUser Guide - PerformanceBenchmarks
Parallel ProcessingTutorial - ParallelMerge Examples
Out-of-Order DataEdge Cases - Out-of-OrderOut-of-Order Examples

By Experience Level

LevelStart HereThen ReadFinally Try
BeginnerTutorialUser Guide - Basic UsageBasic Examples
IntermediateUser GuideAPI ReferenceAdvanced Examples
ExpertAPI ReferenceSource CodeCustom implementations

By Topic

Core Concepts

Resampling Methods

Advanced Features

Integration


Package Architecture

OnlineResamplers.jl is built on a clean, extensible architecture:

OnlineResamplers.jl
├── Core Types
│   ├── MarketDataPoint{T,P,V}      # Input data structure
│   ├── OHLC{P}                     # Price aggregation result
│   └── TimeWindow{T}               # Time interval definition
├── Abstract Types
│   └── AbstractResampler{T,P,V}    # Base for all resamplers
├── Concrete Resamplers
│   ├── OHLCResampler{T,P,V}        # OHLC price aggregation
│   ├── MeanResampler{T,P,V}        # Mean price aggregation
│   ├── SumResampler{T,P,V}         # Sum aggregation (volumes)
│   └── MarketResampler{T,P,V}      # Composite resampler
└── OnlineStatsBase Integration
    ├── fit!(resampler, data)       # Process data
    ├── value(resampler)            # Get results
    ├── nobs(resampler)             # Count observations
    └── merge!(r1, r2)              # Combine resamplers

Type System

The package uses a comprehensive parametric type system:

  • T: Timestamp type (DateTime, NanoDate, ZonedDateTime, etc.)
  • P: Price type (Float64, FixedDecimal, Rational, etc.)
  • V: Volume type (Float64, FixedDecimal, Int64, etc.)

This design enables:

  • Type Safety: Compile-time type checking prevents runtime errors
  • Performance: Type-stable operations for maximum speed
  • Flexibility: Support for any numeric type with appropriate operations
  • Precision: Use exact arithmetic types for financial calculations

Performance Characteristics

OnlineResamplers.jl is designed for high-performance applications:

  • Memory: O(1) constant memory usage regardless of data volume
  • Speed: ~50 nanoseconds per operation on modern hardware
  • Throughput: >2 million operations per second
  • Allocations: Zero allocations in steady-state processing
  • Scalability: Supports parallel processing with merge operations

Contributing

We welcome contributions! Areas where help is especially appreciated:

  • New Resampling Methods: Implement additional aggregation strategies
  • Performance Improvements: Optimize hot code paths
  • Documentation: Improve examples and explanations
  • Testing: Add test cases for edge conditions
  • Integration: Examples with other Julia packages

See the source code and test files for implementation examples.


Support and Community

  • Issues: Report bugs and request features on GitHub Issues
  • Discussions: Ask questions on GitHub Discussions
  • Documentation: Contribute improvements to help others learn

This documentation covers OnlineResamplers.jl v0.1.0 and later. For earlier versions, please refer to the appropriate git tags.