1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Rangebar Configuration File
#
# This configuration file provides centralized settings for the rangebar crate.
# Configuration precedence (highest to lowest):
# 1. Command-line arguments
# 2. Environment variables (with RANGEBAR_ prefix)
# 3. This configuration file
# 4. Default values
[]
# Application-wide settings
= "rangebar"
= "0.5.0"
= "info" # error, warn, info, debug, trace
# worker_threads = 8 # Uncomment to set specific thread count (auto-detect if not set)
= 10
= "/tmp"
= false
= false
[]
# Data source and processing configuration
= "https://data.binance.vision/data/"
= "um" # um (USD-M Futures), cm (Coin-M Futures), spot
= "aggTrades" # aggTrades, klines, depth, trades
= "./data/downloads"
= "./data/cache"
= 5
= 30
= 3
= 1000
= 1000000
= true
= true
[]
# Range bar algorithm configuration
= 25 # 0.25% (25 basis points)
= 1 # 0.01%
= 1000 # 10%
= true
= 8
= true
= true
= 0.1 # 0.1% of total bars
= true
= true
= true
= 100000
= true
= false
[]
# Export and output configuration
= "./output"
= "csv" # csv, parquet, json, tsv, binary
= false
= true
= true
= true
= 0 # 0 = unlimited
= "detailed" # simple, detailed, timestamped, iso
= "date" # date, datetime, iso_date, iso_datetime, unix
= true
= true
= true
# export_worker_threads = 4 # Uncomment to set specific thread count (auto-detect if not set)
= 10000
= true
= false
# Environment Variable Examples:
# ============================
# You can override any configuration value using environment variables with the RANGEBAR_ prefix:
#
# export RANGEBAR_ALGORITHM__DEFAULT_THRESHOLD_BPS=25 # 0.25%
# export RANGEBAR_DATA__BASE_URL="https://custom.data.source/"
# export RANGEBAR_EXPORT__DEFAULT_FORMAT="parquet"
# export RANGEBAR_APP__DEBUG_MODE=true
#
# Command-line arguments will override both this file and environment variables.
# Tier-1 Symbol Examples:
# ======================
# This configuration supports processing all 18 Tier-1 symbols:
# BTC, ETH, SOL, ADA, AVAX, DOT, MATIC, LTC, UNI, LINK,
# XRP, BCH, ETC, FIL, EOS, TRX, XMR, ATOM
#
# Example usage with tier1-symbol-discovery:
# cargo run --bin tier1-symbol-discovery -- --format comprehensive
#
# Example usage with rangebar-analyze:
# cargo run --bin rangebar-analyze
#
# Example usage with rangebar-export:
# cargo run --bin rangebar-export -- BTCUSDT 2024-01-01 2024-01-02 0.0025 ./output um
# Performance Notes:
# ==================
# For maximum performance with large datasets:
# - Set algorithm.processing_batch_size = 1000000
# - Set algorithm.enable_memory_optimization = true
# - Set export.enable_parallel_export = true
# - Set data.max_concurrent_downloads = 10 (if network allows)
# - Set app.worker_threads to match your CPU cores
# Validation Notes:
# =================
# All validations are enabled by default for data integrity:
# - validate_precision: Ensures fixed-point arithmetic precision
# - validate_non_lookahead: Verifies no future data leakage
# - validate_zero_duration: Validates zero-duration bars (NOTABUG)
# - validate_temporal_integrity: Ensures chronological ordering
# - validate_ohlc_consistency: Verifies OHLC data consistency
# - validate_volume_consistency: Validates volume calculations