exness-data-preprocess 1.2.0__tar.gz → 1.2.1__tar.gz

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.
Files changed (157) hide show
  1. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/.mise.toml +4 -3
  2. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/CHANGELOG.md +7 -0
  3. exness_data_preprocess-1.2.1/CLAUDE.md +150 -0
  4. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/CONTRIBUTING.md +14 -20
  5. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/PKG-INFO +1 -1
  6. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/pyproject.toml +1 -1
  7. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/__init__.py +1 -1
  8. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/clickhouse_client.py +2 -1
  9. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/clickhouse_manager.py +9 -2
  10. exness_data_preprocess-1.2.0/.lint-relative-paths-results.txt +0 -62
  11. exness_data_preprocess-1.2.0/CLAUDE.md +0 -213
  12. exness_data_preprocess-1.2.0/docs/archive/CLAUDE_MD_AUDIT_2025-10-16_PASS2.md +0 -378
  13. exness_data_preprocess-1.2.0/docs/archive/CLAUDE_MD_VERIFICATION_CHECKLIST_2025-10-16.md +0 -438
  14. exness_data_preprocess-1.2.0/docs/archive/CLAUDE_MD_VERIFICATION_FINDINGS_2025-10-16.md +0 -340
  15. exness_data_preprocess-1.2.0/docs/archive/DOCUMENTATION_AUDIT_2025-10-15.md +0 -363
  16. exness_data_preprocess-1.2.0/docs/archive/DOCUMENTATION_AUDIT_PASS2_2025-10-15.md +0 -208
  17. exness_data_preprocess-1.2.0/docs/archive/DOCUMENTATION_BEST_PRACTICES_LINE_COUNTS.md +0 -527
  18. exness_data_preprocess-1.2.0/docs/archive/E2E_TESTING_PLAN_v1.0.0.md +0 -197
  19. exness_data_preprocess-1.2.0/docs/archive/EXCHANGE_SESSION_AUDIT_2025-10-17.md +0 -520
  20. exness_data_preprocess-1.2.0/docs/archive/FUNCTIONALITY_VALIDATION_REPORT_2025-10-15.md +0 -415
  21. exness_data_preprocess-1.2.0/docs/archive/FUNCTIONALITY_VALIDATION_REPORT_2025-10-16.md +0 -386
  22. exness_data_preprocess-1.2.0/docs/archive/GAP_DETECTION_COMPARISON.md +0 -496
  23. exness_data_preprocess-1.2.0/docs/archive/GAP_DETECTION_SQL_APPROACH.md +0 -434
  24. exness_data_preprocess-1.2.0/docs/archive/REFACTORING_CHECKLIST.md +0 -219
  25. exness_data_preprocess-1.2.0/docs/archive/RESEARCH_PATTERNS_CANONICALIZATION_2025-10-17.md +0 -315
  26. exness_data_preprocess-1.2.0/docs/archive/SCHEMA_v1.6.0_AUDIT_FINDINGS.md +0 -434
  27. exness_data_preprocess-1.2.0/docs/archive/SCHEMA_v1.6.0_MIGRATION_GUIDE.md +0 -574
  28. exness_data_preprocess-1.2.0/docs/archive/SESSION_2025-10-15_SUMMARY.md +0 -342
  29. exness_data_preprocess-1.2.0/docs/archive/UNIFIED_DUCKDB_PLAN_v1.0.0_LEGACY.md +0 -705
  30. exness_data_preprocess-1.2.0/docs/archive/implementation-plan-2024-11-24.yaml +0 -36
  31. exness_data_preprocess-1.2.0/docs/validation/ARCHITECTURE_AUDIT_2025-10-17.md +0 -406
  32. exness_data_preprocess-1.2.0/docs/validation/ARCHITECTURE_EFFICIENCY_AUDIT_2025-10-18.md +0 -374
  33. exness_data_preprocess-1.2.0/docs/validation/DOCUMENTATION_SURVEY_v1.7.0.md +0 -294
  34. exness_data_preprocess-1.2.0/docs/validation/WEEKEND_GAP_VALIDATION_SUMMARY.md +0 -109
  35. exness_data_preprocess-1.2.0/docs/validation/WORKSPACE_SURVEY_2025-10-17.md +0 -267
  36. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/.cz.toml +0 -0
  37. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/.github/workflows/ci.yml +0 -0
  38. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/.github/workflows/pre-commit-autoupdate.yml +0 -0
  39. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/.github/workflows/publish.yml +0 -0
  40. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/.gitignore +0 -0
  41. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/.pre-commit-config.yaml +0 -0
  42. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/.releaserc.yml +0 -0
  43. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/LICENSE +0 -0
  44. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/Makefile +0 -0
  45. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/README.md +0 -0
  46. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/cliff-release-notes.toml +0 -0
  47. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/cliff.toml +0 -0
  48. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/DATABASE_SCHEMA.md +0 -0
  49. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/EXNESS_DATA_SOURCES.md +0 -0
  50. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/MODULE_ARCHITECTURE.md +0 -0
  51. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/PRIORITY3_CLEANUP_PLAN.yaml +0 -0
  52. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/README.md +0 -0
  53. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/REPOSITORY_REFACTORING_PLAN.yaml +0 -0
  54. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/RESEARCH_PATTERNS.md +0 -0
  55. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/TRADING_HOURS_RESEARCH.md +0 -0
  56. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/UNIFIED_DUCKDB_PLAN_v2.md +0 -0
  57. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/adr/2025-12-09-codebase-pruning.md +0 -0
  58. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/adr/2025-12-09-exness-clickhouse-migration.md +0 -0
  59. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/adr/2025-12-10-clickhouse-e2e-validation-pipeline.md +0 -0
  60. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/adr/2025-12-10-clickhouse-pydantic-config.md +0 -0
  61. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/adr/diagrams/2025-12-10-clickhouse-pydantic-config-after.dot +0 -0
  62. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/adr/diagrams/2025-12-10-clickhouse-pydantic-config-arch.dot +0 -0
  63. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/adr/diagrams/2025-12-10-clickhouse-pydantic-config-before.dot +0 -0
  64. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/archive/PHASE4_DRY_RUN_CONFIG_PLAN.yaml +0 -0
  65. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/archive/PHASE7_v1.5.0_REFACTORING_PLAN.md +0 -0
  66. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/archive/PHASE7_v1.6.0_REFACTORING_PROGRESS.md +0 -0
  67. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/archive/PYDANTIC_REFACTORING_PLAN_v0.2.0_COMPLETE.md +0 -0
  68. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/archive/PYDANTIC_REFACTORING_STATUS_v0.2.0_COMPLETE.md +0 -0
  69. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/design/2025-12-09-codebase-pruning/spec.md +0 -0
  70. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/design/2025-12-09-exness-clickhouse-migration/spec.md +0 -0
  71. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/design/2025-12-10-clickhouse-e2e-validation-pipeline/spec.md +0 -0
  72. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/design/2025-12-10-clickhouse-pydantic-config/spec.md +0 -0
  73. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/optimization/OPTIMIZATION_OPPORTUNITIES_2025-10-18.md +0 -0
  74. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml +0 -0
  75. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml +0 -0
  76. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/releases/RELEASE_NOTES.md +0 -0
  77. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/releases/RELEASE_NOTES_SHORT.md +0 -0
  78. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/HYBRID_SESSION_DETECTION_ANALYSIS.md +0 -0
  79. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/compression-benchmarks/README.md +0 -0
  80. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/compression-benchmarks/test_all_compression_methods.py +0 -0
  81. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/compression-benchmarks/test_delta_encoding_properly.py +0 -0
  82. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/compression-benchmarks/test_parquet_compression_methods.py +0 -0
  83. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/01-methodology.md +0 -0
  84. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/02-mode-truncated-analysis.md +0 -0
  85. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/03-hurdle-model-analysis.md +0 -0
  86. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/04-temporal-patterns.md +0 -0
  87. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/05-final-recommendations.md +0 -0
  88. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/README.md +0 -0
  89. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/scripts/reproduction_guide.md +0 -0
  90. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/visualizations/hurdle-model/hurdle_decomposition.png +0 -0
  91. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/visualizations/mode-truncated/cv_mode_comparison.png +0 -0
  92. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/visualizations/mode-truncated/distribution_overlay.png +0 -0
  93. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/visualizations/mode-truncated/signal_quality_comparison.png +0 -0
  94. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/visualizations/mode-truncated/variance_decomposition.png +0 -0
  95. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/visualizations/temporal/concentration_curve.png +0 -0
  96. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-spread-analysis/visualizations/temporal/percentile_analysis.png +0 -0
  97. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/01-methodology.md +0 -0
  98. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/02-baseline-sep2024.md +0 -0
  99. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/03-multiperiod-validation.md +0 -0
  100. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/04-discoveries-and-plan-evolution.md +0 -0
  101. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/README.md +0 -0
  102. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/findings/baseline-sep2024-comprehensive-summary.md +0 -0
  103. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/findings/phase2-mean-reversion-report.md +0 -0
  104. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/findings/phase3-volatility-model-report.md +0 -0
  105. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/findings/phase4-5-statistical-tests-survivorship-report.md +0 -0
  106. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/baseline-sep2024/01_mean_reversion_analysis.py +0 -0
  107. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/baseline-sep2024/02_volatility_model_simple.py +0 -0
  108. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/baseline-sep2024/03_liquidity_crisis_detection.py +0 -0
  109. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/baseline-sep2024/04_regime_detection_analysis.py +0 -0
  110. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase1_data_validation.py +0 -0
  111. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase2_mean_reversion.py +0 -0
  112. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase3_volatility_model.py +0 -0
  113. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase4_statistical_tests.py +0 -0
  114. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase5_survivorship_bias.py +0 -0
  115. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase5_survivorship_bias_v1.0.1.py +0 -0
  116. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase6a_interval_analysis.py +0 -0
  117. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase6b_price_clustering.py +0 -0
  118. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase6c_combined_pattern.py +0 -0
  119. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/reproduction_guide.md +0 -0
  120. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/visualization/diagnostic_burst_decay.py +0 -0
  121. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/visualization/generate_interactive_dashboard.py +0 -0
  122. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/visualization/generate_lightweight_dashboard.py +0 -0
  123. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/eurusd-zero-spread-deviations/scripts/visualization/prepare_visualization_data.py +0 -0
  124. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/research/gap_detection_implementation_example.py +0 -0
  125. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/setup/GITHUB_PYPI_SETUP.md +0 -0
  126. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/validation/E2E_VALIDATION_RESULTS_v1.6.0.md +0 -0
  127. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md +0 -0
  128. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md +0 -0
  129. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/examples/basic_usage.py +0 -0
  130. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/examples/batch_processing.py +0 -0
  131. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/package-lock.json +0 -0
  132. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/package.json +0 -0
  133. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/scripts/generate_dbeaver_config.py +0 -0
  134. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/clickhouse_base.py +0 -0
  135. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/clickhouse_gap_detector.py +0 -0
  136. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/clickhouse_ohlc_generator.py +0 -0
  137. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/clickhouse_query_engine.py +0 -0
  138. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/config.py +0 -0
  139. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/database_manager.py +0 -0
  140. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/downloader.py +0 -0
  141. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/exchanges.py +0 -0
  142. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/gap_detector.py +0 -0
  143. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/models.py +0 -0
  144. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/ohlc_generator.py +0 -0
  145. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/processor.py +0 -0
  146. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/query_engine.py +0 -0
  147. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/schema.py +0 -0
  148. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/session_detector.py +0 -0
  149. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/src/exness_data_preprocess/tick_loader.py +0 -0
  150. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/tests/README.md +0 -0
  151. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/tests/__init__.py +0 -0
  152. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/tests/conftest.py +0 -0
  153. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/tests/test_basic.py +0 -0
  154. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/tests/test_functional_regression.py +0 -0
  155. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/tests/test_models.py +0 -0
  156. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/tests/test_processor_pydantic.py +0 -0
  157. {exness_data_preprocess-1.2.0 → exness_data_preprocess-1.2.1}/tests/test_types.py +0 -0
@@ -2,8 +2,8 @@
2
2
  # E2E validation workflow for codebase pruning verification
3
3
 
4
4
  [env]
5
- # Python version for validation
6
- PYTHON_VERSION = "3.14"
5
+ # Python version for validation (pinned for alpha-forge compatibility)
6
+ PYTHON_VERSION = "3.11"
7
7
  # Package name
8
8
  PACKAGE_NAME = "exness_data_preprocess"
9
9
  # Validation temp directory
@@ -26,7 +26,8 @@ DBEAVER_CONFIG_PATH = ".dbeaver/data-sources.json"
26
26
  # CLICKHOUSE_PASSWORD_READONLY - set in .env
27
27
 
28
28
  [tools]
29
- python = "3.14"
29
+ # Pin Python 3.11 for alpha-forge compatibility (numpy requirements)
30
+ python = "3.11"
30
31
 
31
32
  # =============================================================================
32
33
  # Validation Tasks - E2E Testing Pipeline
@@ -1,3 +1,10 @@
1
+ ## [1.2.1](https://github.com/terrylica/exness-data-preprocess/compare/v1.2.0...v1.2.1) (2025-12-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **clickhouse:** bootstrap database creation without existing database context ([0fdfef1](https://github.com/terrylica/exness-data-preprocess/commit/0fdfef17cf797d64a66b3b163037a01c1e8245a7))
7
+
1
8
  # [1.2.0](https://github.com/terrylica/exness-data-preprocess/compare/v1.1.0...v1.2.0) (2025-12-10)
2
9
 
3
10
 
@@ -0,0 +1,150 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ **Package**: `exness-data-preprocess` — Forex tick data preprocessing with DuckDB (local) and ClickHouse (cloud) backends
6
+
7
+ **Version**: See [`pyproject.toml`](pyproject.toml) line 3 (SSoT via semantic-release)
8
+
9
+ **Quick Start**: [`README.md`](README.md) — Installation, API reference, usage examples
10
+
11
+ ---
12
+
13
+ ## Documentation Hub (Progressive Disclosure)
14
+
15
+ ### Essential Links
16
+
17
+ | Topic | SSoT Document | Purpose |
18
+ | ---------------- | ------------------------------------------------------------------ | ------------------------------------- |
19
+ | **User Guide** | [`README.md`](README.md) | Installation, API, examples |
20
+ | **Architecture** | [`docs/UNIFIED_DUCKDB_PLAN_v2.md`](docs/UNIFIED_DUCKDB_PLAN_v2.md) | Unified single-file DuckDB design |
21
+ | **Schema** | [`docs/DATABASE_SCHEMA.md`](docs/DATABASE_SCHEMA.md) | Phase7 30-column OHLC specification |
22
+ | **Modules** | [`docs/MODULE_ARCHITECTURE.md`](docs/MODULE_ARCHITECTURE.md) | 19 modules with SLOs |
23
+ | **Data Sources** | [`docs/EXNESS_DATA_SOURCES.md`](docs/EXNESS_DATA_SOURCES.md) | Exness tick data variants |
24
+ | **Research** | [`docs/RESEARCH_PATTERNS.md`](docs/RESEARCH_PATTERNS.md) | Hybrid materialization lifecycle |
25
+ | **Tasks** | [`.mise.toml`](.mise.toml) | Validation, ClickHouse, DBeaver tasks |
26
+ | **Contributing** | [`CONTRIBUTING.md`](CONTRIBUTING.md) | Development guidelines |
27
+
28
+ ### Deep Dives (On-Demand)
29
+
30
+ | Topic | Location | When to Read |
31
+ | ------------------ | -------------------------------------- | -------------------------------- |
32
+ | ADRs | [`docs/adr/`](docs/adr/) | Architecture decisions |
33
+ | Design Specs | [`docs/design/`](docs/design/) | Implementation blueprints |
34
+ | Optimization Plans | [`docs/phases/`](docs/phases/) | Phase 2/3 SSoT YAML plans |
35
+ | Validation Results | [`docs/validation/`](docs/validation/) | Spike test proofs |
36
+ | Research Analysis | [`docs/research/`](docs/research/) | Zero-spread, compression studies |
37
+
38
+ ---
39
+
40
+ ## Architecture Overview
41
+
42
+ ### Dual Backend Design
43
+
44
+ | Backend | Storage | Use Case | Entry Point |
45
+ | -------------- | ----------------------------------------- | ----------------- | --------------------- |
46
+ | **DuckDB** | One file per instrument (`eurusd.duckdb`) | Local development | `ExnessDataProcessor` |
47
+ | **ClickHouse** | Single table with instrument column | Cloud deployment | `ClickHouseManager` |
48
+
49
+ ### Module Structure (19 Modules)
50
+
51
+ **DuckDB Backend (8 modules)**:
52
+
53
+ - `processor.py` — Thin orchestrator facade
54
+ - `downloader.py` — HTTP download operations
55
+ - `tick_loader.py` — CSV parsing
56
+ - `database_manager.py` — Database operations
57
+ - `session_detector.py` — Holiday/session detection (vectorized)
58
+ - `gap_detector.py` — Incremental update logic (SQL-based)
59
+ - `ohlc_generator.py` — Phase7 OHLC generation
60
+ - `query_engine.py` — Query operations
61
+
62
+ **ClickHouse Backend (7 modules)**:
63
+
64
+ - `clickhouse_manager.py` — Schema management, data loading
65
+ - `clickhouse_gap_detector.py` — Gap detection for ClickHouse
66
+ - `clickhouse_query_engine.py` — Query with pagination
67
+ - `clickhouse_ohlc_generator.py` — OHLC generation
68
+ - `clickhouse_client.py` — Connection factory with error handling
69
+ - `clickhouse_base.py` — Shared mixin for client lifecycle
70
+ - `clickhouse_cloud.py` — Cloud-specific configuration
71
+
72
+ **Shared (4 modules)**:
73
+
74
+ - `config.py` — Configuration management
75
+ - `models.py` — Pydantic models (UpdateResult, CoverageInfo, etc.)
76
+ - `schema.py` — SQL schema definitions
77
+ - `exchanges.py` — Exchange calendar integration
78
+
79
+ **Complete Details**: [`docs/MODULE_ARCHITECTURE.md`](docs/MODULE_ARCHITECTURE.md)
80
+
81
+ ---
82
+
83
+ ## Development Commands
84
+
85
+ ### Quick Reference
86
+
87
+ ```bash
88
+ # Setup
89
+ uv sync --dev
90
+
91
+ # Testing (48 tests)
92
+ uv run pytest # All tests
93
+ mise run validate # Full E2E validation
94
+
95
+ # Linting
96
+ uv run ruff check --fix src/ tests/
97
+
98
+ # ClickHouse
99
+ mise run clickhouse:start # Start local server
100
+ mise run clickhouse:status # Check connection
101
+ mise run validate:clickhouse # E2E ClickHouse tests
102
+
103
+ # Build & Publish
104
+ uv build
105
+ mise run db-client-generate # Generate DBeaver config
106
+ ```
107
+
108
+ ### mise Tasks
109
+
110
+ All validation and tooling tasks are defined in [`.mise.toml`](.mise.toml):
111
+
112
+ | Task | Description |
113
+ | ------------------------------ | ------------------------------------------------------------------------- |
114
+ | `mise run validate` | Full E2E pipeline (imports, lint, typecheck, test, build, install, mixin) |
115
+ | `mise run validate:clickhouse` | ClickHouse E2E tests (requires running server) |
116
+ | `mise run clickhouse:start` | Start mise-installed ClickHouse |
117
+ | `mise run db-client-generate` | Generate DBeaver config from Pydantic model |
118
+ | `mise run ci` | Simulate CI pipeline locally |
119
+
120
+ ---
121
+
122
+ ## Key Patterns
123
+
124
+ ### Performance Optimizations (~16x total speedup)
125
+
126
+ | Phase | Optimization | Speedup | SSoT |
127
+ | ----- | --------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------- |
128
+ | 1 | Incremental OHLC | 7.3x | [`docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md) |
129
+ | 2 | Session Vectorization | 2.2x | [`docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml`](docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml) |
130
+ | 3 | SQL Gap Detection | 46% LOC reduction | [`docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml`](docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml) |
131
+
132
+ ### Research Lifecycle
133
+
134
+ ```
135
+ Explore (pandas/Polars) → Validate → Graduate (DuckDB) → Query (SQL)
136
+ ```
137
+
138
+ **SSoT**: [`docs/RESEARCH_PATTERNS.md`](docs/RESEARCH_PATTERNS.md)
139
+
140
+ ---
141
+
142
+ ## References
143
+
144
+ - **Exness Data**: <https://ticks.ex2archive.com/>
145
+ - **DuckDB**: <https://duckdb.org/>
146
+ - **ClickHouse**: <https://clickhouse.com/>
147
+
148
+ ---
149
+
150
+ **Last Updated**: 2025-12-10
@@ -6,7 +6,7 @@ Thank you for your interest in contributing to Exness Data Preprocess! This docu
6
6
 
7
7
  ### Prerequisites
8
8
 
9
- - Python 3.9 or higher
9
+ - Python 3.11 or higher (see `pyproject.toml` requires-python)
10
10
  - uv package manager (recommended) or pip
11
11
  - Git
12
12
 
@@ -114,6 +114,7 @@ When reporting issues, please include:
114
114
  ```
115
115
 
116
116
  7. **Push to your fork** and submit a pull request:
117
+
117
118
  ```bash
118
119
  git push origin feature/your-feature-name
119
120
  ```
@@ -143,31 +144,24 @@ test: add integration tests for DuckDB operations
143
144
 
144
145
  ### Project Structure
145
146
 
146
- ```
147
- exness-data-preprocess/
148
- ├── src/exness_data_preprocess/
149
- │ ├── __init__.py # Package entry point
150
- │ ├── processor.py # Core processor class
151
- │ ├── api.py # Simple API functions
152
- │ └── cli.py # Command-line interface
153
- ├── tests/
154
- │ ├── conftest.py # Pytest fixtures
155
- │ ├── test_processor.py # Processor tests
156
- │ ├── test_api.py # API tests
157
- │ └── test_cli.py # CLI tests
158
- ├── docs/ # Documentation
159
- ├── pyproject.toml # Package configuration
160
- └── README.md # Main documentation
161
- ```
147
+ **See [`CLAUDE.md`](CLAUDE.md) for complete module structure (19 modules).**
148
+
149
+ Key directories:
150
+
151
+ - `src/exness_data_preprocess/` — Source modules (DuckDB + ClickHouse backends)
152
+ - `tests/` — Test suite (48 tests)
153
+ - `docs/` — Documentation hub
154
+ - `.mise.toml` — Validation and tooling tasks
155
+ - `pyproject.toml` — Package configuration (SSoT for version via semantic-release)
162
156
 
163
157
  ### Adding New Features
164
158
 
165
159
  When adding new features:
166
160
 
167
- 1. **Add implementation** in appropriate module (processor.py, api.py, or cli.py)
168
- 2. **Add tests** in corresponding test file
161
+ 1. **Add implementation** in appropriate module (see CLAUDE.md Module Structure)
162
+ 2. **Add tests** in corresponding test file under `tests/`
169
163
  3. **Update API exports** in `__init__.py` if needed
170
- 4. **Update README.md** with usage examples
164
+ 4. **Update CLAUDE.md** with module links if adding new modules
171
165
  5. **Add docstrings** following Google style
172
166
 
173
167
  Example docstring:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: exness-data-preprocess
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: Professional Exness forex tick data preprocessing with optimal compression (Parquet Zstd-22) and DuckDB OHLC generation. Provides efficient storage (9% smaller than ZIP) with lossless precision and direct queryability.
5
5
  Project-URL: Homepage, https://github.com/terrylica/exness-data-preprocess
6
6
  Project-URL: Documentation, https://github.com/terrylica/exness-data-preprocess#readme
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "exness-data-preprocess"
3
- version = "1.2.0"
3
+ version = "1.2.1"
4
4
  description = "Professional Exness forex tick data preprocessing with optimal compression (Parquet Zstd-22) and DuckDB OHLC generation. Provides efficient storage (9% smaller than ZIP) with lossless precision and direct queryability."
5
5
  readme = { file = "README.md", content-type = "text/markdown" }
6
6
  authors = [
@@ -57,7 +57,7 @@ AI Agent Discovery:
57
57
  >>> print(get_args(TimeframeType)) # ('1m', '5m', '15m', ...)
58
58
  """
59
59
 
60
- __version__ = "1.2.0"
60
+ __version__ = "1.2.1"
61
61
  __author__ = "Terry Li <terry@eonlabs.com>"
62
62
  __license__ = "MIT"
63
63
 
@@ -79,7 +79,8 @@ def get_client(
79
79
  resolved_host = host or os.environ.get("CLICKHOUSE_HOST", DEFAULT_HOST)
80
80
  resolved_user = user or os.environ.get("CLICKHOUSE_USER", DEFAULT_USER)
81
81
  resolved_password = password or os.environ.get("CLICKHOUSE_PASSWORD", DEFAULT_PASSWORD)
82
- resolved_database = database or os.environ.get("CLICKHOUSE_DATABASE", DEFAULT_DATABASE)
82
+ # Database can be None for initial schema creation (CREATE DATABASE needs no database context)
83
+ resolved_database = database if database is not None else os.environ.get("CLICKHOUSE_DATABASE", DEFAULT_DATABASE)
83
84
 
84
85
  # Mode-based SSL detection (ADR: 2025-12-10-clickhouse-pydantic-config)
85
86
  # CLICKHOUSE_MODE takes precedence over CLICKHOUSE_SECURE for clarity
@@ -78,8 +78,15 @@ class ClickHouseManager(ClickHouseClientMixin):
78
78
  Raises:
79
79
  ClickHouseQueryError: If schema creation fails
80
80
  """
81
- # Create database
82
- execute_command(self.client, f"CREATE DATABASE IF NOT EXISTS {self.DATABASE}")
81
+ # Create database using a client without database context
82
+ # (database may not exist yet, so we can't connect to it)
83
+ from exness_data_preprocess.clickhouse_client import get_client as get_client_fn
84
+
85
+ bootstrap_client = get_client_fn(database="") # Empty string = no database
86
+ try:
87
+ execute_command(bootstrap_client, f"CREATE DATABASE IF NOT EXISTS {self.DATABASE}")
88
+ finally:
89
+ bootstrap_client.close()
83
90
 
84
91
  # Create tick tables
85
92
  self._create_raw_spread_ticks_table()
@@ -1,62 +0,0 @@
1
- 🔍 Scanning for non-repo-relative paths in: /Users/terryli/eon/exness-data-preprocess
2
- Violations: paths not starting with / or http(s)
3
-
4
- ❌ Found 140 violation(s):
5
-
6
- /Users/terryli/eon/exness-data-preprocess/README.md:112:- **Column Definitions**: See [`schema.py`](src/exness_data_preprocess/schema.py) - Single source of truth
7
- /Users/terryli/eon/exness-data-preprocess/README.md:113:- **Comprehensive Reference**: See [`DATABASE_SCHEMA.md`](docs/DATABASE_SCHEMA.md) - Query examples and usage patterns
8
- /Users/terryli/eon/exness-data-preprocess/README.md:401:- Validation: [`docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md)
9
- /Users/terryli/eon/exness-data-preprocess/README.md:409:- SSoT: [`docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml`](docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)
10
- /Users/terryli/eon/exness-data-preprocess/README.md:410:- Validation: [`docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md)
11
- /Users/terryli/eon/exness-data-preprocess/README.md:417:- SSoT: [`docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml`](docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)
12
- /Users/terryli/eon/exness-data-preprocess/README.md:419:**Release Notes**: See [`CHANGELOG.md`](CHANGELOG.md) for complete v0.5.0 details
13
- /Users/terryli/eon/exness-data-preprocess/README.md:485:**[📚 Complete Documentation Hub](docs/README.md)** - Organized guide from beginner to advanced (72+ documents)
14
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:7:**Full Documentation**: [`README.md`](README.md) - Installation, usage, API reference
15
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:15:- **[README.md](README.md)** - Installation, API reference, usage examples
16
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:16:- **[examples/basic_usage.py](examples/basic_usage.py)** - Download, query, coverage operations
17
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:17:- **[examples/batch_processing.py](examples/batch_processing.py)** - Multi-instrument parallel processing
18
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:21:- **[docs/README.md](docs/README.md)** - Architecture, planning, research findings
19
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:22:- **[docs/MODULE_ARCHITECTURE.md](docs/MODULE_ARCHITECTURE.md)** - Complete module documentation with SLOs (v1.7.0)
20
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:23:- **[docs/DATABASE_SCHEMA.md](docs/DATABASE_SCHEMA.md)** - Complete database schema with self-documentation
21
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:24:- **[docs/RESEARCH_PATTERNS.md](docs/RESEARCH_PATTERNS.md)** - Research lifecycle and tool selection (v1.0.0)
22
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:25:- **[docs/UNIFIED_DUCKDB_PLAN_v2.md](docs/UNIFIED_DUCKDB_PLAN_v2.md)** - v2.0.0 architecture specification
23
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:26:- **[docs/EXNESS_DATA_SOURCES.md](docs/EXNESS_DATA_SOURCES.md)** - Data source variants and URLs
24
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:27:- **[Makefile](Makefile)** - Module introspection commands (module-stats, module-complexity, module-deps)
25
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:31:- **[docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml](docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)** - SSoT plan v2.0.0 (2.2x speedup)
26
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:32:- **[docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml](docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)** - SSoT plan v2.0.0 (complete coverage)
27
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:33:- **[docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md](docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md)** - Phase 1 validation
28
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:34:- **[docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md](docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md)** - Phase 2 validation
29
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:40:- **[CONTRIBUTING.md](CONTRIBUTING.md)** - Contribution guidelines
30
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:55:**Complete Specification**: [`docs/UNIFIED_DUCKDB_PLAN_v2.md`](docs/UNIFIED_DUCKDB_PLAN_v2.md)
31
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:76:**Complete Details**: [`docs/MODULE_ARCHITECTURE.md`](docs/MODULE_ARCHITECTURE.md)
32
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:83: - SSoT: [`docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md)
33
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:89: - SSoT: [`docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml`](docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)
34
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:90: - Validation: [`docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md)
35
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:96: - SSoT: [`docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml`](docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)
36
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:109:**Complete Schema**: [`docs/DATABASE_SCHEMA.md`](docs/DATABASE_SCHEMA.md)
37
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:118:**Complete Guide**: [`docs/EXNESS_DATA_SOURCES.md`](docs/EXNESS_DATA_SOURCES.md)
38
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:128:**Complete Specification**: [`docs/RESEARCH_PATTERNS.md`](docs/RESEARCH_PATTERNS.md)
39
- /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:196:**Complete Development Guide**: [`README.md`](README.md) (Installation section)
40
- /Users/terryli/eon/exness-data-preprocess/tests/README.md:30:- **New**: Phase7 13-column (v1.2.0) OHLC - See [`../src/exness_data_preprocess/schema.py`](../src/exness_data_preprocess/schema.py)
41
- /Users/terryli/eon/exness-data-preprocess/docs/EXNESS_DATA_SOURCES.md:310:**Full Specification**: [`docs/research/eurusd-zero-spread-deviations/data/plan/phase7_bid_ohlc_construction_v1.1.0.md`](research/eurusd-zero-spread-deviations/data/plan/phase7_bid_ohlc_construction_v1.1.0.md)
42
- /Users/terryli/eon/exness-data-preprocess/docs/EXNESS_DATA_SOURCES.md:386:- **Phase7 Methodology**: [`docs/research/eurusd-zero-spread-deviations/01-methodology.md`](research/eurusd-zero-spread-deviations/01-methodology.md)
43
- /Users/terryli/eon/exness-data-preprocess/docs/EXNESS_DATA_SOURCES.md:387:- **Zero-Spread Research**: [`docs/research/eurusd-zero-spread-deviations/README.md`](research/eurusd-zero-spread-deviations/README.md)
44
- /Users/terryli/eon/exness-data-preprocess/docs/EXNESS_DATA_SOURCES.md:391:- **Current Processor**: [`src/exness_data_preprocess/processor.py`](../src/exness_data_preprocess/processor.py) (needs refactoring)
45
- /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:5:**Related**: [`README.md`](../README.md) - Architecture overview
46
- /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:43:- See [`docs/validation/ARCHITECTURE_AUDIT_2025-10-17.md`](validation/ARCHITECTURE_AUDIT_2025-10-17.md) for complete audit findings
47
- /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:964:See [`Makefile`](../Makefile) for implementation.
48
- /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1076:- **[README.md](../README.md)** - User-facing API reference
49
- /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1077:- **[docs/README.md](README.md)** - Documentation hub
50
- /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1078:- **[docs/DATABASE_SCHEMA.md](DATABASE_SCHEMA.md)** - Complete database schema
51
- /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1079:- **[docs/UNIFIED_DUCKDB_PLAN_v2.md](UNIFIED_DUCKDB_PLAN_v2.md)** - v2.0.0 architecture specification
52
- /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1080:- **[Makefile](../Makefile)** - Module introspection commands
53
- /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1082:- **[docs/validation/ARCHITECTURE_AUDIT_2025-10-17.md](validation/ARCHITECTURE_AUDIT_2025-10-17.md)** - Complete audit findings and corrections
54
- /Users/terryli/eon/exness-data-preprocess/docs/DATABASE_SCHEMA.md:244:**Column Definitions**: See [`../src/exness_data_preprocess/schema.py`](../src/exness_data_preprocess/schema.py) for complete column definitions with types and descriptions.
55
- /Users/terryli/eon/exness-data-preprocess/docs/DATABASE_SCHEMA.md:258:**Architecture**: Exchange Registry Pattern (v1.6.0) - Session columns dynamically generated from centralized EXCHANGES dict in [`exchanges.py`](../src/exness_data_preprocess/exchanges.py)
56
-
57
- ... and 90 more (showing first 50)
58
-
59
- 📝 Fix: Convert relative paths to repo-relative paths starting with /
60
- WRONG: [Link](../docs/foo.md)
61
- WRONG: [Link](docs/foo.md)
62
- RIGHT: [Link](/docs/foo.md)
@@ -1,213 +0,0 @@
1
- # CLAUDE.md
2
-
3
- This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
-
5
- **Architecture**: Forex tick data preprocessing with unified single-file DuckDB storage
6
-
7
- **Full Documentation**: [`README.md`](README.md) - Installation, usage, API reference
8
-
9
- ---
10
-
11
- ## Documentation Hub
12
-
13
- ### User Documentation
14
-
15
- - **[README.md](README.md)** - Installation, API reference, usage examples
16
- - **[examples/basic_usage.py](examples/basic_usage.py)** - Download, query, coverage operations
17
- - **[examples/batch_processing.py](examples/batch_processing.py)** - Multi-instrument parallel processing
18
-
19
- ### AI Assistant Documentation
20
-
21
- - **[docs/README.md](docs/README.md)** - Architecture, planning, research findings
22
- - **[docs/MODULE_ARCHITECTURE.md](docs/MODULE_ARCHITECTURE.md)** - Complete module documentation with SLOs (v1.7.0)
23
- - **[docs/DATABASE_SCHEMA.md](docs/DATABASE_SCHEMA.md)** - Complete database schema with self-documentation
24
- - **[docs/RESEARCH_PATTERNS.md](docs/RESEARCH_PATTERNS.md)** - Research lifecycle and tool selection (v1.0.0)
25
- - **[docs/UNIFIED_DUCKDB_PLAN_v2.md](docs/UNIFIED_DUCKDB_PLAN_v2.md)** - v2.0.0 architecture specification
26
- - **[docs/EXNESS_DATA_SOURCES.md](docs/EXNESS_DATA_SOURCES.md)** - Data source variants and URLs
27
- - **[Makefile](Makefile)** - Module introspection commands (module-stats, module-complexity, module-deps)
28
-
29
- ### Optimization Plans (v1.7.0)
30
-
31
- - **[docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml](docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)** - SSoT plan v2.0.0 (2.2x speedup)
32
- - **[docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml](docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)** - SSoT plan v2.0.0 (complete coverage)
33
- - **[docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md](docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md)** - Phase 1 validation
34
- - **[docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md](docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md)** - Phase 2 validation
35
-
36
- ### Implementation
37
-
38
- - **src/exness_data_preprocess/** - Source code (7 specialized modules + facade)
39
- - **tests/** - Test suite (48 tests, 100% passing)
40
- - **[CONTRIBUTING.md](CONTRIBUTING.md)** - Contribution guidelines
41
-
42
- ---
43
-
44
- ## Architecture Summary
45
-
46
- ### Storage Pattern (v2.0.0)
47
-
48
- - **Single DuckDB file per instrument** (e.g., eurusd.duckdb containing all historical data)
49
- - **Dual-variant storage** (Raw_Spread + Standard in same database)
50
- - **Incremental updates** with automatic gap detection
51
- - **PRIMARY KEY constraints** prevent duplicates during updates
52
- - **Sub-15ms query performance** with date range filtering
53
- - **On-demand resampling** to any timeframe (5m, 1h, 1d)
54
-
55
- **Complete Specification**: [`docs/UNIFIED_DUCKDB_PLAN_v2.md`](docs/UNIFIED_DUCKDB_PLAN_v2.md)
56
-
57
- ### Module Pattern (v1.7.0)
58
-
59
- - **Facade orchestrator** (processor.py) coordinating 6 module instances + 1 static utility
60
- - **Separation of concerns** with single-responsibility modules
61
- - **SLO-based design** (Availability, Correctness, Observability, Maintainability)
62
- - **Off-the-shelf libraries** (httpx, pandas, DuckDB, exchange_calendars)
63
- - **Zero regressions** (48 tests pass)
64
-
65
- **Modules**:
66
-
67
- 1. **processor.py** - Thin orchestrator facade
68
- 2. **downloader.py** - HTTP download operations
69
- 3. **tick_loader.py** - CSV parsing
70
- 4. **database_manager.py** - Database operations
71
- 5. **session_detector.py** - Holiday and session detection (v1.7.0: vectorized, 2.2x speedup)
72
- 6. **gap_detector.py** - Incremental update logic (v1.7.0: SQL gap detection, complete coverage)
73
- 7. **ohlc_generator.py** - Phase7 OHLC generation (v1.7.0: incremental, 7.3x speedup)
74
- 8. **query_engine.py** - Query operations
75
-
76
- **Complete Details**: [`docs/MODULE_ARCHITECTURE.md`](docs/MODULE_ARCHITECTURE.md)
77
-
78
- ### Performance Optimizations (v1.7.0)
79
-
80
- - **Incremental OHLC Generation** (Phase 1): 7.3x speedup
81
- - Optional date-range filtering for regeneration
82
- - Measured: 8.05s → 1.10s for incremental updates (7 months)
83
- - SSoT: [`docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md)
84
-
85
- - **Session Vectorization** (Phase 2): 2.2x speedup
86
- - Pre-compute trading minutes, vectorized .isin() lookup
87
- - Measured: 5.99s → 2.69s for 302K bars across 10 exchanges
88
- - Combined Phase 1+2: **~16x total speedup** (8.05s → 0.50s)
89
- - SSoT: [`docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml`](docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)
90
- - Validation: [`docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md)
91
-
92
- - **SQL Gap Detection** (Phase 3): Complete coverage + 46% LOC reduction
93
- - SQL EXCEPT query detects ALL gaps (internal + edges)
94
- - Bug fix: Now detects internal gaps missed by Python MIN/MAX
95
- - Measured: 41 → 42 gaps detected (spike test validation)
96
- - SSoT: [`docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml`](docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)
97
-
98
- **Pattern**: Spike test first (validate theory) → Implement → Iterative SSoT plan updates
99
-
100
- ### Schema (v1.6.0)
101
-
102
- - **Phase7 30-column OHLC** with dual-variant spreads
103
- - **BID-only OHLC** from Raw_Spread execution prices
104
- - **Normalized metrics** (range_per_spread, range_per_tick, body_per_spread, body_per_tick)
105
- - **10 global exchange sessions with trading hour detection** (NYSE, LSE, XSWX, XFRA, XTSE, XNZE, XTKS, XASX, XHKG, XSES)
106
- - **Holiday tracking** (US, UK, major holidays)
107
- - **Self-documenting** via COMMENT ON statements
108
-
109
- **Complete Schema**: [`docs/DATABASE_SCHEMA.md`](docs/DATABASE_SCHEMA.md)
110
-
111
- ### Data Sources
112
-
113
- - **Source**: https://ticks.ex2archive.com/ (public Exness tick data)
114
- - **Primary**: Raw_Spread variant (97.81% zero-spreads, execution prices)
115
- - **Reference**: Standard variant (0% zero-spreads, market quotes)
116
- - **Format**: Monthly ZIP files with microsecond-precision CSV
117
-
118
- **Complete Guide**: [`docs/EXNESS_DATA_SOURCES.md`](docs/EXNESS_DATA_SOURCES.md)
119
-
120
- ### Research Patterns (v1.0.0)
121
-
122
- - **Lifecycle**: Explore (pandas/Polars) → Validate → Graduate (DuckDB) → Query (SQL)
123
- - **ASOF Performance**: pandas/Polars 0.04s, DuckDB 0.89s at 880K ticks (24x difference)
124
- - **Tool Selection**: pandas/Polars for tick-level temporal matching, DuckDB for materialized results
125
- - **Hybrid Pattern**: ASOF operations stay in pandas, validated findings materialize to DuckDB tables
126
- - **Single Source of Truth**: DuckDB stores validated research outcomes with COMMENT ON documentation
127
-
128
- **Complete Specification**: [`docs/RESEARCH_PATTERNS.md`](docs/RESEARCH_PATTERNS.md)
129
-
130
- ---
131
-
132
- ## Development Commands
133
-
134
- ### Setup
135
-
136
- ```bash
137
- # Install with development dependencies
138
- uv sync --dev
139
-
140
- # Or with pip
141
- pip install -e ".[dev]"
142
- ```
143
-
144
- ### Testing
145
-
146
- ```bash
147
- # Run all tests
148
- uv run pytest
149
-
150
- # Run with coverage
151
- uv run pytest --cov=exness_data_preprocess --cov-report=html
152
-
153
- # Run specific test file
154
- uv run pytest tests/test_basic.py -v
155
- ```
156
-
157
- ### Code Quality
158
-
159
- ```bash
160
- # Format code
161
- uv run ruff format .
162
-
163
- # Lint and auto-fix
164
- uv run ruff check --fix .
165
-
166
- # Type checking
167
- uv run mypy src/
168
- ```
169
-
170
- ### Module Introspection
171
-
172
- ```bash
173
- # Show current line counts (always accurate)
174
- make module-stats
175
-
176
- # Show cyclomatic complexity (requires radon)
177
- make module-complexity
178
-
179
- # Show dependency tree (requires pipdeptree)
180
- make module-deps
181
- ```
182
-
183
- ### Building and Publishing
184
-
185
- ```bash
186
- # Build package
187
- uv build
188
-
189
- # Test installation locally
190
- uv tool install --editable .
191
-
192
- # Publish to PyPI (requires PYPI_TOKEN)
193
- doppler run --project claude-config --config dev -- uv publish --token "$PYPI_TOKEN"
194
- ```
195
-
196
- **Complete Development Guide**: [`README.md`](README.md) (Installation section)
197
-
198
- ---
199
-
200
- ## References
201
-
202
- - **Exness Data**: https://ticks.ex2archive.com/
203
- - **DuckDB**: https://duckdb.org/
204
- - **Apache Parquet**: https://parquet.apache.org/
205
- - **Zstd Compression**: https://facebook.github.io/zstd/
206
-
207
- ---
208
-
209
- **Version**: 2.0.0 (Architecture) + 1.7.0 (Implementation) + 1.0.0 (Research Patterns)
210
- **Last Updated**: 2025-10-18
211
- **Architecture**: Unified Single-File DuckDB Storage with Incremental Updates
212
- **Implementation**: Facade Pattern with 7 Specialized Modules + Performance Optimizations (~16x speedup)
213
- **Research**: Hybrid Materialization (pandas/Polars exploration, DuckDB validated results)