bquant 0.0.22__tar.gz → 0.0.23__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 (414) hide show
  1. {bquant-0.0.22 → bquant-0.0.23}/CHANGELOG.md +15 -0
  2. {bquant-0.0.22/bquant.egg-info → bquant-0.0.23}/PKG-INFO +2 -2
  3. {bquant-0.0.22 → bquant-0.0.23}/README.md +1 -1
  4. {bquant-0.0.22 → bquant-0.0.23}/bquant/__init__.py +1 -1
  5. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/evaluation/__init__.py +6 -0
  6. bquant-0.0.23/bquant/analysis/evaluation/costs.py +183 -0
  7. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/processor.py +27 -4
  8. {bquant-0.0.22 → bquant-0.0.23/bquant.egg-info}/PKG-INFO +2 -2
  9. {bquant-0.0.22 → bquant-0.0.23}/bquant.egg-info/SOURCES.txt +4 -0
  10. {bquant-0.0.22 → bquant-0.0.23}/docs/api/analysis/evaluation.md +47 -0
  11. {bquant-0.0.22 → bquant-0.0.23}/docs/api/data/processor.md +22 -0
  12. {bquant-0.0.22 → bquant-0.0.23}/docs/versioning.md +5 -5
  13. {bquant-0.0.22 → bquant-0.0.23}/pyproject.toml +1 -1
  14. bquant-0.0.23/tests/fixtures/evaluation/costs/expected.json +2377 -0
  15. bquant-0.0.23/tests/unit/test_costs_and_wilder_atr_reproduce_the_reference.py +170 -0
  16. {bquant-0.0.22 → bquant-0.0.23}/LICENSE +0 -0
  17. {bquant-0.0.22 → bquant-0.0.23}/MANIFEST.in +0 -0
  18. {bquant-0.0.22 → bquant-0.0.23}/bquant/__main__.py +0 -0
  19. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/__init__.py +0 -0
  20. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/candlestick/__init__.py +0 -0
  21. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/chart/__init__.py +0 -0
  22. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/evaluation/baseline.py +0 -0
  23. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/evaluation/bootstrap.py +0 -0
  24. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/evaluation/criterion.py +0 -0
  25. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/evaluation/procedure.py +0 -0
  26. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/evaluation/quarters.py +0 -0
  27. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/evaluation/trades.py +0 -0
  28. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/statistical/__init__.py +0 -0
  29. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/statistical/hypothesis_testing.py +0 -0
  30. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/statistical/regression.py +0 -0
  31. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/technical/__init__.py +0 -0
  32. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/timeseries/__init__.py +0 -0
  33. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/validation/__init__.py +0 -0
  34. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/validation/suite.py +0 -0
  35. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/__init__.py +0 -0
  36. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/analyzer.py +0 -0
  37. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/cache.py +0 -0
  38. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/detection/__init__.py +0 -0
  39. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/detection/base.py +0 -0
  40. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/detection/combined.py +0 -0
  41. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/detection/line_crossing.py +0 -0
  42. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/detection/preloaded.py +0 -0
  43. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/detection/registry.py +0 -0
  44. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/detection/threshold.py +0 -0
  45. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/detection/zero_crossing.py +0 -0
  46. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/models.py +0 -0
  47. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/pipeline.py +0 -0
  48. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/presets.py +0 -0
  49. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/sequence_analysis.py +0 -0
  50. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/__init__.py +0 -0
  51. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/base.py +0 -0
  52. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/divergence/__init__.py +0 -0
  53. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/divergence/classic.py +0 -0
  54. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/factory.py +0 -0
  55. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/registry.py +0 -0
  56. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/shape/__init__.py +0 -0
  57. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/shape/statistical.py +0 -0
  58. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/swing/__init__.py +0 -0
  59. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/swing/find_peaks.py +0 -0
  60. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/swing/pivot_points.py +0 -0
  61. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/swing/presets.py +0 -0
  62. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/swing/thresholds.py +0 -0
  63. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/swing/zigzag.py +0 -0
  64. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/volatility/__init__.py +0 -0
  65. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/volatility/combined.py +0 -0
  66. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/volume/__init__.py +0 -0
  67. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/strategies/volume/standard.py +0 -0
  68. {bquant-0.0.22 → bquant-0.0.23}/bquant/analysis/zones/zone_features.py +0 -0
  69. {bquant-0.0.22 → bquant-0.0.23}/bquant/cli.py +0 -0
  70. {bquant-0.0.22 → bquant-0.0.23}/bquant/core/__init__.py +0 -0
  71. {bquant-0.0.22 → bquant-0.0.23}/bquant/core/cache.py +0 -0
  72. {bquant-0.0.22 → bquant-0.0.23}/bquant/core/config.py +0 -0
  73. {bquant-0.0.22 → bquant-0.0.23}/bquant/core/exceptions.py +0 -0
  74. {bquant-0.0.22 → bquant-0.0.23}/bquant/core/logging_config.py +0 -0
  75. {bquant-0.0.22 → bquant-0.0.23}/bquant/core/nb.py +0 -0
  76. {bquant-0.0.22 → bquant-0.0.23}/bquant/core/numpy_fix.py +0 -0
  77. {bquant-0.0.22 → bquant-0.0.23}/bquant/core/performance.py +0 -0
  78. {bquant-0.0.22 → bquant-0.0.23}/bquant/core/utils.py +0 -0
  79. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/__init__.py +0 -0
  80. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/loader.py +0 -0
  81. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/samples/__init__.py +0 -0
  82. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/samples/datasets.py +0 -0
  83. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/samples/embedded/__init__.py +0 -0
  84. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/samples/embedded/mt_xauusd_m15.py +0 -0
  85. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/samples/embedded/tv_xauusd_1h.py +0 -0
  86. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/samples/generator.py +0 -0
  87. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/samples/utils.py +0 -0
  88. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/schemas.py +0 -0
  89. {bquant-0.0.22 → bquant-0.0.23}/bquant/data/validator.py +0 -0
  90. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/__init__.py +0 -0
  91. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/base.py +0 -0
  92. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/calculators.py +0 -0
  93. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/custom/__init__.py +0 -0
  94. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/custom/bollinger.py +0 -0
  95. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/custom/ema.py +0 -0
  96. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/custom/macd.py +0 -0
  97. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/custom/rsi.py +0 -0
  98. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/custom/sma.py +0 -0
  99. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/library/__init__.py +0 -0
  100. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/library/manager.py +0 -0
  101. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/library/pandas_ta.py +0 -0
  102. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/library/talib.py +0 -0
  103. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/output_schema.py +0 -0
  104. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/preloaded/__init__.py +0 -0
  105. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/preloaded/macd.py +0 -0
  106. {bquant-0.0.22 → bquant-0.0.23}/bquant/indicators/schema.py +0 -0
  107. {bquant-0.0.22 → bquant-0.0.23}/bquant/visualization/__init__.py +0 -0
  108. {bquant-0.0.22 → bquant-0.0.23}/bquant/visualization/charts.py +0 -0
  109. {bquant-0.0.22 → bquant-0.0.23}/bquant/visualization/export.py +0 -0
  110. {bquant-0.0.22 → bquant-0.0.23}/bquant/visualization/statistical.py +0 -0
  111. {bquant-0.0.22 → bquant-0.0.23}/bquant/visualization/themes.py +0 -0
  112. {bquant-0.0.22 → bquant-0.0.23}/bquant/visualization/utils.py +0 -0
  113. {bquant-0.0.22 → bquant-0.0.23}/bquant/visualization/zones.py +0 -0
  114. {bquant-0.0.22 → bquant-0.0.23}/bquant.egg-info/dependency_links.txt +0 -0
  115. {bquant-0.0.22 → bquant-0.0.23}/bquant.egg-info/entry_points.txt +0 -0
  116. {bquant-0.0.22 → bquant-0.0.23}/bquant.egg-info/requires.txt +0 -0
  117. {bquant-0.0.22 → bquant-0.0.23}/bquant.egg-info/top_level.txt +0 -0
  118. {bquant-0.0.22 → bquant-0.0.23}/docs/README.md +0 -0
  119. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/analytics/zones/macd_zone_consistency_case_study.md.txt +0 -0
  120. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/analytics/zones/swing.md.txt +0 -0
  121. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/analytics/zones/swing_strategy_comparison_case_study.md.txt +0 -0
  122. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/README.md.txt +0 -0
  123. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/analysis/README.md.txt +0 -0
  124. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/analysis/base.md.txt +0 -0
  125. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/analysis/pipeline.md.txt +0 -0
  126. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/analysis/statistical.md.txt +0 -0
  127. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/analysis/strategies.md.txt +0 -0
  128. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/analysis/zones/models.md.txt +0 -0
  129. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/analysis/zones/pipeline.md.txt +0 -0
  130. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/analysis/zones/strategies.md.txt +0 -0
  131. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/analysis/zones.md.txt +0 -0
  132. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/core/README.md.txt +0 -0
  133. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/core/config.md.txt +0 -0
  134. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/core/exceptions.md.txt +0 -0
  135. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/core/logging.md.txt +0 -0
  136. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/core/nb.md.txt +0 -0
  137. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/core/performance.md.txt +0 -0
  138. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/core/utils.md.txt +0 -0
  139. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/data/README.md.txt +0 -0
  140. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/data/loader.md.txt +0 -0
  141. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/data/processor.md.txt +0 -0
  142. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/data/samples.md.txt +0 -0
  143. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/data/schemas.md.txt +0 -0
  144. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/data/validator.md.txt +0 -0
  145. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/extension_guide.md.txt +0 -0
  146. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/indicators/README.md.txt +0 -0
  147. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/indicators/base.md.txt +0 -0
  148. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/indicators/factory.md.txt +0 -0
  149. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/indicators/library_manager.md.txt +0 -0
  150. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/indicators/macd.md.txt +0 -0
  151. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/indicators/preloaded.md.txt +0 -0
  152. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/visualization/README.md.txt +0 -0
  153. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/api/visualization/zones.md.txt +0 -0
  154. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/developer_guide/README.md.txt +0 -0
  155. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/developer_guide/analytical_philosophy.md.txt +0 -0
  156. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/developer_guide/statistical_analysis_workflow.md.txt +0 -0
  157. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/developer_guide/zone_analyzer_deep_dive.md.txt +0 -0
  158. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/developer_guide/zone_detection_strategies.md.txt +0 -0
  159. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/examples/README.md.txt +0 -0
  160. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/index.rst.txt +0 -0
  161. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/migration/MIGRATION_v2.md.txt +0 -0
  162. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/migration/global_swings_migration.md.txt +0 -0
  163. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/tutorials/README.md.txt +0 -0
  164. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/tutorials/combined_rules_detection.md.txt +0 -0
  165. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/tutorials/macd_basic_pipeline.md.txt +0 -0
  166. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/tutorials/preloaded_zones_workflow.md.txt +0 -0
  167. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/tutorials/rsi_strategy_switching.md.txt +0 -0
  168. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/user_guide/README.md.txt +0 -0
  169. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/user_guide/best_practices.md.txt +0 -0
  170. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/user_guide/caching.md.txt +0 -0
  171. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/user_guide/core_concepts.md.txt +0 -0
  172. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/user_guide/quick_start.md.txt +0 -0
  173. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/user_guide/swing_analysis_results.md.txt +0 -0
  174. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/user_guide/swing_strategies.md.txt +0 -0
  175. {bquant-0.0.22 → bquant-0.0.23}/docs/_build/html/_sources/user_guide/zone_analysis.md.txt +0 -0
  176. {bquant-0.0.22 → bquant-0.0.23}/docs/analytics/zones/swing_strategy_comparison_case_study.md +0 -0
  177. {bquant-0.0.22 → bquant-0.0.23}/docs/analytics/zones/swing_zone_scale_threshold_study.md +0 -0
  178. {bquant-0.0.22 → bquant-0.0.23}/docs/api/README.md +0 -0
  179. {bquant-0.0.22 → bquant-0.0.23}/docs/api/analysis/README.md +0 -0
  180. {bquant-0.0.22 → bquant-0.0.23}/docs/api/analysis/base.md +0 -0
  181. {bquant-0.0.22 → bquant-0.0.23}/docs/api/analysis/pipeline.md +0 -0
  182. {bquant-0.0.22 → bquant-0.0.23}/docs/api/analysis/statistical.md +0 -0
  183. {bquant-0.0.22 → bquant-0.0.23}/docs/api/analysis/strategies.md +0 -0
  184. {bquant-0.0.22 → bquant-0.0.23}/docs/api/analysis/zones/global_swings_models.md +0 -0
  185. {bquant-0.0.22 → bquant-0.0.23}/docs/api/analysis/zones/global_swings_pipeline.md +0 -0
  186. {bquant-0.0.22 → bquant-0.0.23}/docs/api/analysis/zones/global_swings_strategies.md +0 -0
  187. {bquant-0.0.22 → bquant-0.0.23}/docs/api/analysis/zones.md +0 -0
  188. {bquant-0.0.22 → bquant-0.0.23}/docs/api/core/README.md +0 -0
  189. {bquant-0.0.22 → bquant-0.0.23}/docs/api/core/config.md +0 -0
  190. {bquant-0.0.22 → bquant-0.0.23}/docs/api/core/exceptions.md +0 -0
  191. {bquant-0.0.22 → bquant-0.0.23}/docs/api/core/logging.md +0 -0
  192. {bquant-0.0.22 → bquant-0.0.23}/docs/api/core/nb.md +0 -0
  193. {bquant-0.0.22 → bquant-0.0.23}/docs/api/core/performance.md +0 -0
  194. {bquant-0.0.22 → bquant-0.0.23}/docs/api/core/utils.md +0 -0
  195. {bquant-0.0.22 → bquant-0.0.23}/docs/api/data/README.md +0 -0
  196. {bquant-0.0.22 → bquant-0.0.23}/docs/api/data/loader.md +0 -0
  197. {bquant-0.0.22 → bquant-0.0.23}/docs/api/data/samples.md +0 -0
  198. {bquant-0.0.22 → bquant-0.0.23}/docs/api/data/schemas.md +0 -0
  199. {bquant-0.0.22 → bquant-0.0.23}/docs/api/data/validator.md +0 -0
  200. {bquant-0.0.22 → bquant-0.0.23}/docs/api/extension_guide.md +0 -0
  201. {bquant-0.0.22 → bquant-0.0.23}/docs/api/indicators/README.md +0 -0
  202. {bquant-0.0.22 → bquant-0.0.23}/docs/api/indicators/base.md +0 -0
  203. {bquant-0.0.22 → bquant-0.0.23}/docs/api/indicators/custom.md +0 -0
  204. {bquant-0.0.22 → bquant-0.0.23}/docs/api/indicators/factory.md +0 -0
  205. {bquant-0.0.22 → bquant-0.0.23}/docs/api/indicators/library_manager.md +0 -0
  206. {bquant-0.0.22 → bquant-0.0.23}/docs/api/indicators/macd.md +0 -0
  207. {bquant-0.0.22 → bquant-0.0.23}/docs/api/indicators/preloaded.md +0 -0
  208. {bquant-0.0.22 → bquant-0.0.23}/docs/api/visualization/README.md +0 -0
  209. {bquant-0.0.22 → bquant-0.0.23}/docs/api/visualization/zones.md +0 -0
  210. {bquant-0.0.22 → bquant-0.0.23}/docs/developer_guide/README.md +0 -0
  211. {bquant-0.0.22 → bquant-0.0.23}/docs/developer_guide/analytical_philosophy.md +0 -0
  212. {bquant-0.0.22 → bquant-0.0.23}/docs/developer_guide/statistical_analysis_workflow.md +0 -0
  213. {bquant-0.0.22 → bquant-0.0.23}/docs/developer_guide/zone_analyzer_deep_dive.md +0 -0
  214. {bquant-0.0.22 → bquant-0.0.23}/docs/developer_guide/zone_detection_strategies.md +0 -0
  215. {bquant-0.0.22 → bquant-0.0.23}/docs/examples/README.md +0 -0
  216. {bquant-0.0.22 → bquant-0.0.23}/docs/index.rst +0 -0
  217. {bquant-0.0.22 → bquant-0.0.23}/docs/migration/global_swings_migration.md +0 -0
  218. {bquant-0.0.22 → bquant-0.0.23}/docs/tutorials/README.md +0 -0
  219. {bquant-0.0.22 → bquant-0.0.23}/docs/tutorials/combined_rules_detection.md +0 -0
  220. {bquant-0.0.22 → bquant-0.0.23}/docs/tutorials/macd_basic_pipeline.md +0 -0
  221. {bquant-0.0.22 → bquant-0.0.23}/docs/tutorials/preloaded_zones_workflow.md +0 -0
  222. {bquant-0.0.22 → bquant-0.0.23}/docs/tutorials/rsi_strategy_switching.md +0 -0
  223. {bquant-0.0.22 → bquant-0.0.23}/docs/user_guide/README.md +0 -0
  224. {bquant-0.0.22 → bquant-0.0.23}/docs/user_guide/best_practices.md +0 -0
  225. {bquant-0.0.22 → bquant-0.0.23}/docs/user_guide/caching.md +0 -0
  226. {bquant-0.0.22 → bquant-0.0.23}/docs/user_guide/cli.md +0 -0
  227. {bquant-0.0.22 → bquant-0.0.23}/docs/user_guide/core_concepts.md +0 -0
  228. {bquant-0.0.22 → bquant-0.0.23}/docs/user_guide/quick_start.md +0 -0
  229. {bquant-0.0.22 → bquant-0.0.23}/docs/user_guide/swing_strategies.md +0 -0
  230. {bquant-0.0.22 → bquant-0.0.23}/docs/user_guide/zone_analysis.md +0 -0
  231. {bquant-0.0.22 → bquant-0.0.23}/docs/user_guide/zone_analysis_result.md +0 -0
  232. {bquant-0.0.22 → bquant-0.0.23}/examples/01_basic_indicators.py +0 -0
  233. {bquant-0.0.22 → bquant-0.0.23}/examples/02_macd_zone_analysis.py +0 -0
  234. {bquant-0.0.22 → bquant-0.0.23}/examples/02a_universal_zones.py +0 -0
  235. {bquant-0.0.22 → bquant-0.0.23}/examples/03_data_processing.py +0 -0
  236. {bquant-0.0.22 → bquant-0.0.23}/examples/04_comprehensive_analysis.py +0 -0
  237. {bquant-0.0.22 → bquant-0.0.23}/examples/05_strategies_demo.py +0 -0
  238. {bquant-0.0.22 → bquant-0.0.23}/examples/06_regression_demo.py +0 -0
  239. {bquant-0.0.22 → bquant-0.0.23}/examples/07_validation_demo.py +0 -0
  240. {bquant-0.0.22 → bquant-0.0.23}/examples/08_macd_swing_analysis.py +0 -0
  241. {bquant-0.0.22 → bquant-0.0.23}/examples/09_zones_visualization_demo.py +0 -0
  242. {bquant-0.0.22 → bquant-0.0.23}/examples/README.md +0 -0
  243. {bquant-0.0.22 → bquant-0.0.23}/examples/zone_analysis_global_swings.py +0 -0
  244. {bquant-0.0.22 → bquant-0.0.23}/scripts/README.md +0 -0
  245. {bquant-0.0.22 → bquant-0.0.23}/scripts/analysis/README.md +0 -0
  246. {bquant-0.0.22 → bquant-0.0.23}/scripts/analysis/batch_analysis.py +0 -0
  247. {bquant-0.0.22 → bquant-0.0.23}/scripts/analysis/run_hypothesis_tests.py +0 -0
  248. {bquant-0.0.22 → bquant-0.0.23}/scripts/analysis/run_macd_analysis.py +0 -0
  249. {bquant-0.0.22 → bquant-0.0.23}/scripts/data/data_loader.py +0 -0
  250. {bquant-0.0.22 → bquant-0.0.23}/scripts/data/extract_samples.py +0 -0
  251. {bquant-0.0.22 → bquant-0.0.23}/scripts/data/generate_samples.py +0 -0
  252. {bquant-0.0.22 → bquant-0.0.23}/scripts/data_processing/README.md +0 -0
  253. {bquant-0.0.22 → bquant-0.0.23}/scripts/deployment/README.md +0 -0
  254. {bquant-0.0.22 → bquant-0.0.23}/scripts/publishing/README.md +0 -0
  255. {bquant-0.0.22 → bquant-0.0.23}/setup.cfg +0 -0
  256. {bquant-0.0.22 → bquant-0.0.23}/tests/analysis/test_statistical_levers_change_the_answer.py +0 -0
  257. {bquant-0.0.22 → bquant-0.0.23}/tests/analysis/zones/test_pipeline_cache.py +0 -0
  258. {bquant-0.0.22 → bquant-0.0.23}/tests/analysis/zones/test_swing_presets.py +0 -0
  259. {bquant-0.0.22 → bquant-0.0.23}/tests/analysis/zones/test_swing_thresholds.py +0 -0
  260. {bquant-0.0.22 → bquant-0.0.23}/tests/conftest.py +0 -0
  261. {bquant-0.0.22 → bquant-0.0.23}/tests/fixtures/__init__.py +0 -0
  262. {bquant-0.0.22 → bquant-0.0.23}/tests/fixtures/evaluation/baseline/expected.json +0 -0
  263. {bquant-0.0.22 → bquant-0.0.23}/tests/fixtures/evaluation/expected.json +0 -0
  264. {bquant-0.0.22 → bquant-0.0.23}/tests/fixtures/swing_coverage.py +0 -0
  265. {bquant-0.0.22 → bquant-0.0.23}/tests/fixtures/swing_mocks.py +0 -0
  266. {bquant-0.0.22 → bquant-0.0.23}/tests/integration/__init__.py +0 -0
  267. {bquant-0.0.22 → bquant-0.0.23}/tests/integration/test_cache_serves_what_was_asked.py +0 -0
  268. {bquant-0.0.22 → bquant-0.0.23}/tests/integration/test_data_pipeline.py +0 -0
  269. {bquant-0.0.22 → bquant-0.0.23}/tests/integration/test_docs_examples_run.py +0 -0
  270. {bquant-0.0.22 → bquant-0.0.23}/tests/integration/test_full_pipeline.py +0 -0
  271. {bquant-0.0.22 → bquant-0.0.23}/tests/integration/test_pipeline_global_swings.py +0 -0
  272. {bquant-0.0.22 → bquant-0.0.23}/tests/integration/test_scripts_integration.py +0 -0
  273. {bquant-0.0.22 → bquant-0.0.23}/tests/integration/test_the_hypothesis_script_reports_what_ran.py +0 -0
  274. {bquant-0.0.22 → bquant-0.0.23}/tests/integration/test_truly_universal_zones.py +0 -0
  275. {bquant-0.0.22 → bquant-0.0.23}/tests/integration/test_visualization_pipeline.py +0 -0
  276. {bquant-0.0.22 → bquant-0.0.23}/tests/integration/test_zone_analysis_e2e.py +0 -0
  277. {bquant-0.0.22 → bquant-0.0.23}/tests/performance/test_swing_performance.py +0 -0
  278. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/__init__.py +0 -0
  279. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_a_bar_on_the_level_keeps_the_previous_side.py +0 -0
  280. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_a_declared_rule_must_move_the_result.py +0 -0
  281. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_a_loaded_file_has_a_time_axis.py +0 -0
  282. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_a_strategy_written_to_the_protocol_works.py +0 -0
  283. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_a_stub_says_so.py +0 -0
  284. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_a_swing_strategy_that_finds_nothing_says_so.py +0 -0
  285. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_all_indicator_types.py +0 -0
  286. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_an_absent_metric_is_not_a_zero.py +0 -0
  287. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_analysis_structure.py +0 -0
  288. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_architecture_validation.py +0 -0
  289. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_builtin_migration.py +0 -0
  290. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_cache_key_covers_what_the_result_reads.py +0 -0
  291. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_cache_key_sees_the_analysis.py +0 -0
  292. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_cache_versioning.py +0 -0
  293. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_changelog_marks_what_it_breaks.py +0 -0
  294. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_classic_divergence_strategy.py +0 -0
  295. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_clean_interpolates_numbers_only.py +0 -0
  296. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_cli_says_what_it_does.py +0 -0
  297. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_combined_volatility_strategy.py +0 -0
  298. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_compatibility_validation.py +0 -0
  299. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_config_refuses_with_the_project_hierarchy.py +0 -0
  300. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_consumers_address_by_role.py +0 -0
  301. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_contracts_are_checked.py +0 -0
  302. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_core_modules.py +0 -0
  303. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_data_contracts_agree_between_layers.py +0 -0
  304. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_data_levers_change_the_answer.py +0 -0
  305. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_data_modules.py +0 -0
  306. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_detect_zones_rejects_unknown_rules.py +0 -0
  307. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_divergence_strategy_universal.py +0 -0
  308. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_docs_call_signatures.py +0 -0
  309. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_docs_parity.py +0 -0
  310. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_every_builder_lever_is_observable.py +0 -0
  311. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_factory_names_the_missing_library.py +0 -0
  312. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_features_and_statistics_measure_what_they_name.py +0 -0
  313. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_find_peaks_swing_strategy.py +0 -0
  314. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_global_state_has_a_contract.py +0 -0
  315. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_hygiene_holds.py +0 -0
  316. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_imports_migration.py +0 -0
  317. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_indicator_column_schema.py +0 -0
  318. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_indicator_factory.py +0 -0
  319. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_indicator_identity_renderable.py +0 -0
  320. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_indicator_implementations_agree.py +0 -0
  321. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_indicator_output_columns.py +0 -0
  322. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_indicators_base.py +0 -0
  323. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_indicators_do_not_publish_an_unfilled_window.py +0 -0
  324. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_install_footprint.py +0 -0
  325. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_invariants_hold_on_generated_data.py +0 -0
  326. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_layers_point_one_way.py +0 -0
  327. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_library_indicators.py +0 -0
  328. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_library_registration_does_not_freeze_on_an_early_pass.py +0 -0
  329. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_min_duration_is_a_reporting_filter.py +0 -0
  330. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_module_entry_point.py +0 -0
  331. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_no_removed_pandas_api.py +0 -0
  332. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_no_shadowed_definitions.py +0 -0
  333. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_no_silent_skips_on_bquant_imports.py +0 -0
  334. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_one_mechanism_one_implementation.py +0 -0
  335. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_optimized_indicators_measure_what_they_claim.py +0 -0
  336. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_pandas_ta_dynamic_loader.py +0 -0
  337. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_per_zone_swings_share_the_global_detector.py +0 -0
  338. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_performance.py +0 -0
  339. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_persistence_keeps_what_the_result_holds.py +0 -0
  340. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_pivot_points_swing_strategy.py +0 -0
  341. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_preloaded_columns_are_the_columns_requested.py +0 -0
  342. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_preloaded_helper_resolves_the_sample_clock.py +0 -0
  343. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_preloaded_indicators.py +0 -0
  344. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_preparation_does_not_return_an_empty_frame.py +0 -0
  345. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_public_name_collisions.py +0 -0
  346. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_public_surface_is_documented.py +0 -0
  347. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_sample_data.py +0 -0
  348. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_sample_generator.py +0 -0
  349. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_schema_validation_forms_a_verdict.py +0 -0
  350. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_scripts_parity.py +0 -0
  351. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_shape_strategy_universal.py +0 -0
  352. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_standard_volume_strategy.py +0 -0
  353. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_statistical_hypothesis.py +0 -0
  354. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_statistical_shape_strategy.py +0 -0
  355. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_status_claims_match_the_registry.py +0 -0
  356. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_strategy_infrastructure.py +0 -0
  357. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_swing_context_memory.py +0 -0
  358. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_swing_edge_cases.py +0 -0
  359. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_swing_global_calculation.py +0 -0
  360. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_swing_replay_causal.py +0 -0
  361. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_aggregate_speaks_the_indicator_vocabulary.py +0 -0
  362. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_amplitude_floor_is_the_zone_scale.py +0 -0
  363. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_analysis_input_has_a_contract.py +0 -0
  364. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_cache_key_sees_the_package_version.py +0 -0
  365. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_data_layer_does_not_lean_on_a_deprecated_keyword.py +0 -0
  366. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_declared_period_is_the_period_shipped.py +0 -0
  367. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_empty_swing_context_names_its_reason.py +0 -0
  368. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_error_context_carries_details_not_prose.py +0 -0
  369. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_factory_builds_what_it_lists.py +0 -0
  370. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_library_catalogue_answers_the_same_before_and_after_loading.py +0 -0
  371. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_monitor_decorator_works_written_either_way.py +0 -0
  372. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_package_has_one_version.py +0 -0
  373. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_random_baseline_tells_exits_apart.py +0 -0
  374. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_reference_fixture_reproduces_in_the_package.py +0 -0
  375. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_sequence_test_needs_a_declared_vocabulary.py +0 -0
  376. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_theme_argument_is_honoured_or_refused.py +0 -0
  377. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_trade_frame_edges_are_decided_not_implied.py +0 -0
  378. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_the_zigzag_threshold_is_the_percent_the_library_reads.py +0 -0
  379. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_time_metrics.py +0 -0
  380. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_timeframe_means_what_it_says.py +0 -0
  381. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_two_kinds_of_zone.py +0 -0
  382. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_universal_zone_analyzer.py +0 -0
  383. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_validation_knows_what_it_compares.py +0 -0
  384. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_validation_reads_the_metric_it_was_asked_for.py +0 -0
  385. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_validation_suite.py +0 -0
  386. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_visualization.py +0 -0
  387. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_visualization_does_not_pay_for_what_it_does_not_use.py +0 -0
  388. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_volume_strategy_universal.py +0 -0
  389. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zigzag_swing_strategy.py +0 -0
  390. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_analysis_builder.py +0 -0
  391. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_boundaries_carry_time.py +0 -0
  392. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_detection_strategies.py +0 -0
  393. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_features_analyzer_context.py +0 -0
  394. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_features_directional_metrics.py +0 -0
  395. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_features_divergence_integration.py +0 -0
  396. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_features_shape_integration.py +0 -0
  397. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_features_swing_integration.py +0 -0
  398. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_features_volatility_integration.py +0 -0
  399. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_features_volume_integration.py +0 -0
  400. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_models.py +0 -0
  401. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_pipeline.py +0 -0
  402. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_presets.py +0 -0
  403. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_regression_analyzer.py +0 -0
  404. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_regression_wiring.py +0 -0
  405. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_sequence_adjacency.py +0 -0
  406. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_type_vocabulary.py +0 -0
  407. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zone_visualization_polarity.py +0 -0
  408. {bquant-0.0.22 → bquant-0.0.23}/tests/unit/test_zones_analysis.py +0 -0
  409. {bquant-0.0.22 → bquant-0.0.23}/tests/visualization/test_infrastructure.py +0 -0
  410. {bquant-0.0.22 → bquant-0.0.23}/tests/visualization/test_levers_change_the_figure.py +0 -0
  411. {bquant-0.0.22 → bquant-0.0.23}/tests/visualization/test_swing_overlay.py +0 -0
  412. {bquant-0.0.22 → bquant-0.0.23}/tests/visualization/test_zone_metrics_aggregation.py +0 -0
  413. {bquant-0.0.22 → bquant-0.0.23}/tests/visualization/test_zone_metrics_display.py +0 -0
  414. {bquant-0.0.22 → bquant-0.0.23}/tests/visualization/test_zones_visualization.py +0 -0
@@ -9,6 +9,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.0.23] - 2026-11-04
13
+
14
+ **Издержки сделки и ATR Уайлдера** — заказ лаборатории стратегий, нужен двум потребителям.
15
+ - `bquant.analysis.evaluation.rollover_nights(entry_time, exit_time, *, triple_weekday=2)` считает ночи
16
+ свопа по календарю сервера. Ночи после субботы и воскресенья не начисляются, ночь после
17
+ `triple_weekday` идёт за три, неделя — 7 ночей.
18
+ - `CostModel(...).round_trip(spread_points, entry_idx, side, nights)` считает издержки круга в
19
+ пунктах: спред бара входа или фиксированный, нижняя граница спреда, комиссия, своп со знаком
20
+ MetaTrader. `CostModel.from_symbol_spec` читает своп из спецификации символа MT5.
21
+ - `calculate_atr(df, period, method='wilder')` — сглаживание Уайлдера. Без `method` ATR прежний,
22
+ скользящее среднее.
23
+ - Отказ, а не молчаливая подмена: модель со свопом без `nights`, `triple_weekday` в выходной,
24
+ спецификация со своп не в пунктах или без дня тройной ночи. Фикстура лаборатории
25
+ воспроизводится до `1e-9`.
26
+
12
27
  ## [0.0.22] - 2026-11-04
13
28
 
14
29
  **Режим выхода в случайном базисе.** `random_entry_baseline` принимает `modes={метка: хвост}`:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bquant
3
- Version: 0.0.22
3
+ Version: 0.0.23
4
4
  Summary: Quantitative research toolkit for financial markets
5
5
  Author-email: kogriv <kogriv@gmail.com>
6
6
  License: MIT
@@ -194,7 +194,7 @@ support it; `research/` and `scripts/` hold notebook-style studies and automatio
194
194
  ## Status
195
195
 
196
196
  Beta. The public API changes between releases without deprecation windows — renames are
197
- carried through in one change. **Pin an exact version:** `bquant>=0.0.22,<0.0.23`.
197
+ carried through in one change. **Pin an exact version:** `bquant>=0.0.23,<0.0.24`.
198
198
 
199
199
  Breaking changes ship in the patch number, and the dangerous ones do not raise: when a
200
200
  defect in a calculation is fixed, nothing fails to import — your numbers change, and the
@@ -131,7 +131,7 @@ support it; `research/` and `scripts/` hold notebook-style studies and automatio
131
131
  ## Status
132
132
 
133
133
  Beta. The public API changes between releases without deprecation windows — renames are
134
- carried through in one change. **Pin an exact version:** `bquant>=0.0.22,<0.0.23`.
134
+ carried through in one change. **Pin an exact version:** `bquant>=0.0.23,<0.0.24`.
135
135
 
136
136
  Breaking changes ship in the patch number, and the dangerous ones do not raise: when a
137
137
  defect in a calculation is fixed, nothing fails to import — your numbers change, and the
@@ -5,7 +5,7 @@ A comprehensive toolkit for quantitative analysis of financial data,
5
5
  starting with MACD analysis and expandable to all aspects of market research.
6
6
  """
7
7
 
8
- __version__ = "0.0.22"
8
+ __version__ = "0.0.23"
9
9
  __author__ = "kogriv"
10
10
  __email__ = "kogriv@gmail.com"
11
11
 
@@ -13,6 +13,10 @@ four questions a single backtest number cannot:
13
13
  and is a run's result spread over **quarters** or made in one stretch
14
14
  (:func:`quarterly_summary`).
15
15
 
16
+ What a round trip costs — spread, commission and swap over the nights held — is
17
+ :class:`CostModel` with :func:`rollover_nights`; the outcome functions the baseline
18
+ averages are where it usually goes.
19
+
16
20
  The package holds no registry of variants, no notion of zones or bars, and no data: the
17
21
  number of tests corrected for comes from the caller, as does the outcome function the
18
22
  baseline averages.
@@ -20,6 +24,7 @@ baseline averages.
20
24
 
21
25
  from .baseline import attach_random_baseline, random_entry_baseline
22
26
  from .bootstrap import BlockBootstrap
27
+ from .costs import CostModel, rollover_nights
23
28
  from .criterion import (
24
29
  BeatsRandom,
25
30
  Criterion,
@@ -47,6 +52,7 @@ from .trades import month_key, month_label, months_between, validate_trades
47
52
  __all__ = [
48
53
  "validate_trades", "month_key", "month_label", "months_between",
49
54
  "BlockBootstrap",
55
+ "CostModel", "rollover_nights",
50
56
  "random_entry_baseline", "attach_random_baseline",
51
57
  "trial_stats", "benjamini_hochberg",
52
58
  "Rule", "MinTrades", "NetPositive", "YearsStable", "BeatsRandom", "MinEffect",
@@ -0,0 +1,183 @@
1
+ """What a round trip costs: the spread, the commission, and the swap over the nights held.
2
+
3
+ Everything is in **points of the symbol** (price = points × point); a positive number is
4
+ an expense. Dividing by ATR, or by anything else, is the caller's business.
5
+
6
+ Two pieces:
7
+
8
+ * :func:`rollover_nights` — how many swap nights a trade held, by the server calendar:
9
+ a midnight ``m`` with ``entry < m <= exit`` is charged when the day it closes is a
10
+ weekday (Monday … Friday); the midnight after ``triple_weekday`` counts three times,
11
+ so a full week is seven nights, as in MetaTrader.
12
+ * :class:`CostModel` — the cost of one round trip given the spread of the entry bar,
13
+ the side and the nights.
14
+
15
+ Bars from MetaTrader are bid prices: a buy opens at ask and a sell closes at ask, so a
16
+ round trip pays **one** spread. The spread recorded for a historical bar is what the
17
+ server stored for it (often the smallest of the bar), not an average — hence the floor
18
+ ``min_spread_points`` and the ``"fixed"`` mode for a stress test.
19
+ """
20
+
21
+ from __future__ import annotations
22
+
23
+ from dataclasses import dataclass
24
+ from typing import Any, Mapping, Optional
25
+
26
+ import numpy as np
27
+ import pandas as pd
28
+
29
+ _DAY_NS = 86_400 * 10**9
30
+ _SPREAD_MODES = ("bar", "fixed")
31
+
32
+
33
+ def _check_triple_weekday(value: Any) -> int:
34
+ if not isinstance(value, (int, np.integer)) or isinstance(value, bool) or not 0 <= int(value) <= 4:
35
+ raise ValueError(
36
+ f"triple_weekday must be a weekday 0 (Monday) … 4 (Friday), got {value!r}: the nights "
37
+ "after Saturday and Sunday are not charged, so a triple night there would never count"
38
+ )
39
+ return int(value)
40
+
41
+
42
+ def _wall_clock_ns(times: Any, name: str) -> np.ndarray:
43
+ values = times if isinstance(times, (pd.Series, pd.Index)) else np.atleast_1d(times)
44
+ index = pd.DatetimeIndex(pd.to_datetime(values))
45
+ if index.tz is not None:
46
+ index = index.tz_localize(None) # keep the wall clock of the zone given: pass server time
47
+ if index.hasnans:
48
+ raise ValueError(f"{name} has missing times")
49
+ return index.as_unit("ns").asi8
50
+
51
+
52
+ def rollover_nights(entry_time: Any, exit_time: Any, *, triple_weekday: int = 2) -> np.ndarray:
53
+ """Swap nights between each entry and exit, as an integer array.
54
+
55
+ ``entry_time`` and ``exit_time`` are paired times (scalars, arrays, Series or an
56
+ index) on the **broker's server clock**. A time with a timezone is read by its own
57
+ wall clock — convert it to the server zone first. The exit is the moment the
58
+ position closes: the close of the last bar (its open time plus one bar) or the open
59
+ of the next one.
60
+
61
+ ``triple_weekday`` is the day whose closing midnight counts three times, 0 = Monday;
62
+ most brokers use 2 (Wednesday, the night into Thursday). A symbol specification from
63
+ MetaTrader numbers the day from Sunday = 0: ``triple_weekday = (swap_rollover3day - 1) % 7``
64
+ — :meth:`CostModel.from_symbol_spec` does that.
65
+ """
66
+ triple = _check_triple_weekday(triple_weekday)
67
+ entry = _wall_clock_ns(entry_time, "entry_time")
68
+ exit_ = _wall_clock_ns(exit_time, "exit_time")
69
+ if entry.shape != exit_.shape:
70
+ raise ValueError(f"entry_time and exit_time differ in length: {entry.size} and {exit_.size}")
71
+ if (exit_ < entry).any():
72
+ first = int(np.flatnonzero(exit_ < entry)[0])
73
+ raise ValueError(f"exit before entry at position {first}")
74
+ # Midnights are counted by day number since 1970-01-01 (a Thursday). The midnight that
75
+ # opens day D closes day D - 1, whose weekday (Monday = 0) is (D + 2) % 7.
76
+ first_day = entry // _DAY_NS # midnights strictly after entry start at first_day + 1
77
+ last_day = exit_ // _DAY_NS # ... and end at last_day (a midnight equal to exit counts)
78
+ nights = np.zeros(entry.shape, dtype=np.int64)
79
+ for closed in range(5): # Monday … Friday
80
+ residue = (closed - 2) % 7 # day numbers D with (D + 2) % 7 == closed, i.e. D % 7 == residue
81
+ count = (last_day - residue) // 7 - (first_day - residue) // 7
82
+ nights += count * (3 if closed == triple else 1)
83
+ return nights
84
+
85
+
86
+ @dataclass(frozen=True)
87
+ class CostModel:
88
+ """The cost of a round trip, in points.
89
+
90
+ ``spread``: ``"bar"`` takes the spread of the entry bar (never below
91
+ ``min_spread_points``; a missing value is 0), ``"fixed"`` takes
92
+ ``fixed_spread_points``. ``commission_points`` is per round trip (entry and exit).
93
+ ``swap_long_points`` / ``swap_short_points`` are per night with MetaTrader's sign —
94
+ a negative swap is paid, so it **adds** to the cost; ``triple_weekday`` is the day
95
+ whose night counts three times (0 = Monday).
96
+
97
+ ``cost = spread + commission - swap(side) * nights``.
98
+ """
99
+
100
+ spread: str = "bar"
101
+ fixed_spread_points: float = 0.0
102
+ min_spread_points: float = 0.0
103
+ commission_points: float = 0.0
104
+ swap_long_points: float = 0.0
105
+ swap_short_points: float = 0.0
106
+ triple_weekday: int = 2
107
+
108
+ def __post_init__(self) -> None:
109
+ if self.spread not in _SPREAD_MODES:
110
+ raise ValueError(f"spread must be one of {_SPREAD_MODES}, got {self.spread!r}")
111
+ for name in ("fixed_spread_points", "min_spread_points", "commission_points",
112
+ "swap_long_points", "swap_short_points"):
113
+ value = getattr(self, name)
114
+ if isinstance(value, bool) or not isinstance(value, (int, float, np.integer, np.floating)) or not np.isfinite(value):
115
+ raise ValueError(f"{name} must be a finite number, got {value!r}")
116
+ _check_triple_weekday(self.triple_weekday)
117
+
118
+ @property
119
+ def uses_swap(self) -> bool:
120
+ """Whether the model charges swap, and so needs the nights."""
121
+ return bool(self.swap_long_points or self.swap_short_points)
122
+
123
+ def round_trip(self, spread_points: Optional[Any], entry_idx: Any, side: Any,
124
+ nights: Optional[Any] = None) -> np.ndarray:
125
+ """Cost of each round trip in points.
126
+
127
+ ``spread_points`` is the spread of every bar (indexed by ``entry_idx``; it may be
128
+ ``None`` in the ``"fixed"`` mode), ``entry_idx`` the entry bars, ``side`` +1 or -1
129
+ per trade, ``nights`` the swap nights per trade (:func:`rollover_nights`) —
130
+ required when the model charges swap, and ignored when it does not.
131
+ """
132
+ entry = np.atleast_1d(np.asarray(entry_idx))
133
+ if not np.issubdtype(entry.dtype, np.integer):
134
+ raise ValueError(f"entry_idx must be integer bar positions, got dtype {entry.dtype}")
135
+ sides = np.broadcast_to(np.asarray(side), entry.shape)
136
+ if not np.isin(sides, (1, -1)).all():
137
+ raise ValueError("side must be +1 or -1 for every trade")
138
+ if self.spread == "bar":
139
+ if spread_points is None:
140
+ raise ValueError("the 'bar' spread mode needs spread_points, the spread of every bar")
141
+ bar = np.nan_to_num(np.asarray(spread_points, dtype=float)[entry], nan=0.0)
142
+ spread = np.maximum(bar, self.min_spread_points)
143
+ else:
144
+ spread = np.full(entry.shape, float(self.fixed_spread_points))
145
+ cost = spread + self.commission_points
146
+ if self.uses_swap:
147
+ if nights is None:
148
+ raise ValueError(
149
+ "this model charges swap, so round_trip needs nights (see rollover_nights); "
150
+ "without them the swap would silently drop out of the cost"
151
+ )
152
+ held = np.broadcast_to(np.asarray(nights), entry.shape)
153
+ if not np.issubdtype(held.dtype, np.integer) or (held < 0).any():
154
+ raise ValueError("nights must be non-negative whole numbers")
155
+ per_night = np.where(sides > 0, self.swap_long_points, self.swap_short_points)
156
+ cost = cost - per_night * held
157
+ return cost
158
+
159
+ @classmethod
160
+ def from_symbol_spec(cls, spec: Mapping[str, Any], **costs: Any) -> "CostModel":
161
+ """A model whose swap comes from a MetaTrader symbol specification.
162
+
163
+ ``spec`` needs ``swap_mode`` (only 1 — swap in points — is accepted),
164
+ ``swap_long``, ``swap_short`` and ``swap_rollover3day`` (Sunday = 0). The other
165
+ fields of the model (``spread``, ``fixed_spread_points``, ``min_spread_points``,
166
+ ``commission_points``) come as keywords.
167
+ """
168
+ if spec.get("swap_mode") != 1:
169
+ raise ValueError(
170
+ f"swap_mode is {spec.get('swap_mode')!r}: only 1 (swap in points) can be read as points"
171
+ )
172
+ missing = [key for key in ("swap_long", "swap_short", "swap_rollover3day") if key not in spec]
173
+ if missing:
174
+ raise ValueError(f"the symbol specification has no {', '.join(missing)}")
175
+ swap_fields = {"swap_long_points", "swap_short_points", "triple_weekday"} & set(costs)
176
+ if swap_fields:
177
+ raise ValueError(f"{sorted(swap_fields)} come from the specification, not as keywords")
178
+ return cls(
179
+ swap_long_points=float(spec["swap_long"]),
180
+ swap_short_points=float(spec["swap_short"]),
181
+ triple_weekday=(int(spec["swap_rollover3day"]) - 1) % 7,
182
+ **costs,
183
+ )
@@ -278,18 +278,41 @@ def calculate_true_range(df: pd.DataFrame) -> pd.Series:
278
278
  return candidates.max(axis=1, skipna=True)
279
279
 
280
280
 
281
- def calculate_atr(df: pd.DataFrame, period: int = 14) -> pd.Series:
282
- """Average True Range: the rolling mean of :func:`calculate_true_range` over ``period`` bars.
281
+ def calculate_atr(df: pd.DataFrame, period: int = 14, method: str = "sma") -> pd.Series:
282
+ """Average True Range of :func:`calculate_true_range` over ``period`` bars.
283
283
 
284
284
  The one ATR the package computes. The pipeline adds it to the analysed
285
285
  frame as ``atr`` when the caller did not bring one (G60): until then the
286
286
  branch waiting for it was unreachable, and ``atr_normalized_return`` was
287
287
  ``None`` in every zone of the flagship path. The first ``period - 1``
288
- values are ``NaN`` — the window is not full.
288
+ values are ``NaN`` in both methods — the window is not full.
289
+
290
+ ``method`` picks the average:
291
+
292
+ * ``"sma"`` (the default) — the rolling mean of the last ``period`` true ranges;
293
+ * ``"wilder"`` — Wilder's smoothing: the first value (bar ``period - 1``) is the
294
+ mean of the first ``period`` true ranges, each later one
295
+ ``atr[i] = atr[i-1] + (tr[i] - atr[i-1]) / period``. This is the ATR of most
296
+ trading terminals; it remembers the whole history, so two frames that start on
297
+ different bars give different values on the same bar.
289
298
  """
290
299
  if not isinstance(period, int) or isinstance(period, bool) or period <= 0:
291
300
  raise ValueError(f"ATR period must be a positive integer, got {period!r}")
292
- return calculate_true_range(df).rolling(window=period).mean()
301
+ if method not in _ATR_METHODS:
302
+ raise ValueError(f"ATR method must be one of {_ATR_METHODS}, got {method!r}")
303
+ tr = calculate_true_range(df)
304
+ if method == "sma":
305
+ return tr.rolling(window=period).mean()
306
+ values = tr.to_numpy(dtype=float)
307
+ out = np.full(len(values), np.nan)
308
+ if len(values) >= period:
309
+ out[period - 1] = values[:period].mean()
310
+ for i in range(period, len(values)):
311
+ out[i] = out[i - 1] + (values[i] - out[i - 1]) / period
312
+ return pd.Series(out, index=tr.index)
313
+
314
+
315
+ _ATR_METHODS = ("sma", "wilder")
293
316
 
294
317
 
295
318
  def calculate_derived_indicators(df: pd.DataFrame) -> pd.DataFrame:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bquant
3
- Version: 0.0.22
3
+ Version: 0.0.23
4
4
  Summary: Quantitative research toolkit for financial markets
5
5
  Author-email: kogriv <kogriv@gmail.com>
6
6
  License: MIT
@@ -194,7 +194,7 @@ support it; `research/` and `scripts/` hold notebook-style studies and automatio
194
194
  ## Status
195
195
 
196
196
  Beta. The public API changes between releases without deprecation windows — renames are
197
- carried through in one change. **Pin an exact version:** `bquant>=0.0.22,<0.0.23`.
197
+ carried through in one change. **Pin an exact version:** `bquant>=0.0.23,<0.0.24`.
198
198
 
199
199
  Breaking changes ship in the patch number, and the dangerous ones do not raise: when a
200
200
  defect in a calculation is fixed, nothing fails to import — your numbers change, and the
@@ -12,6 +12,7 @@ pyproject.toml
12
12
  ./bquant/analysis/evaluation/__init__.py
13
13
  ./bquant/analysis/evaluation/baseline.py
14
14
  ./bquant/analysis/evaluation/bootstrap.py
15
+ ./bquant/analysis/evaluation/costs.py
15
16
  ./bquant/analysis/evaluation/criterion.py
16
17
  ./bquant/analysis/evaluation/procedure.py
17
18
  ./bquant/analysis/evaluation/quarters.py
@@ -117,6 +118,7 @@ bquant/analysis/chart/__init__.py
117
118
  bquant/analysis/evaluation/__init__.py
118
119
  bquant/analysis/evaluation/baseline.py
119
120
  bquant/analysis/evaluation/bootstrap.py
121
+ bquant/analysis/evaluation/costs.py
120
122
  bquant/analysis/evaluation/criterion.py
121
123
  bquant/analysis/evaluation/procedure.py
122
124
  bquant/analysis/evaluation/quarters.py
@@ -357,6 +359,7 @@ tests/fixtures/swing_coverage.py
357
359
  tests/fixtures/swing_mocks.py
358
360
  tests/fixtures/evaluation/expected.json
359
361
  tests/fixtures/evaluation/baseline/expected.json
362
+ tests/fixtures/evaluation/costs/expected.json
360
363
  tests/integration/__init__.py
361
364
  tests/integration/test_cache_serves_what_was_asked.py
362
365
  tests/integration/test_data_pipeline.py
@@ -394,6 +397,7 @@ tests/unit/test_config_refuses_with_the_project_hierarchy.py
394
397
  tests/unit/test_consumers_address_by_role.py
395
398
  tests/unit/test_contracts_are_checked.py
396
399
  tests/unit/test_core_modules.py
400
+ tests/unit/test_costs_and_wilder_atr_reproduce_the_reference.py
397
401
  tests/unit/test_data_contracts_agree_between_layers.py
398
402
  tests/unit/test_data_levers_change_the_answer.py
399
403
  tests/unit/test_data_modules.py
@@ -309,6 +309,53 @@ print(apply_rules(summary, default_quarter_rules()))
309
309
  стороной и подлежащие пересмотру новым объектом. `apply_rules(summary, rules)` даёт флаги и
310
310
  `pass`.
311
311
 
312
+ ## Издержки сделки
313
+
314
+ Издержки круга сделки — в **пунктах** символа, положительное — расход; делить на ATR или на что
315
+ угодно ещё — дело вызывающего. Обычно они живут в функции исхода, которую усредняет случайный базис.
316
+
317
+ `rollover_nights(entry_time, exit_time, *, triple_weekday=2)` считает ночи свопа по календарю
318
+ сервера брокера. Полночь `m`, где `вход < m ≤ выход`, начисляется, если день, который она
319
+ завершает, — пн…пт: ночи после субботы и воскресенья не начисляются. Полночь после дня
320
+ `triple_weekday` (0 — понедельник; у большинства брокеров 2, ночь на четверг) идёт за три,
321
+ поэтому неделя — это 7 ночей. Время выхода — момент закрытия позиции: закрытие последнего бара
322
+ (его время плюс бар) или открытие следующего. Время с поясом читается по его собственным часам,
323
+ поэтому сначала переведите его в пояс сервера.
324
+
325
+ `CostModel` считает `спред + комиссия − своп(сторона) · ночи`:
326
+
327
+ ```python
328
+ import numpy as np
329
+ import pandas as pd
330
+
331
+ from bquant.analysis.evaluation import CostModel, rollover_nights
332
+
333
+ entry = pd.to_datetime(['2022-01-04 10:00', '2022-01-05 15:00', '2022-01-07 12:00']) # Tue, Wed, Fri
334
+ exit_ = pd.to_datetime(['2022-01-04 18:00', '2022-01-06 09:00', '2022-01-10 08:00']) # same day, Thu, Mon
335
+ nights = rollover_nights(entry, exit_, triple_weekday=2) # the Wednesday night counts three
336
+ print(nights.tolist())
337
+
338
+ spec = {'swap_mode': 1, 'swap_long': -3.2, 'swap_short': 1.1, 'swap_rollover3day': 3} # MT5: Sunday = 0
339
+ model = CostModel.from_symbol_spec(spec, spread='bar', min_spread_points=15.0, commission_points=7.0)
340
+ spread = np.array([12.0, 25.0, np.nan]) # the spread of each entry bar; a missing one counts as 0
341
+ cost = model.round_trip(spread, entry_idx=[0, 1, 2], side=[1, 1, -1], nights=nights)
342
+ print(model.triple_weekday, cost.round(2).tolist())
343
+ # [0, 3, 1]
344
+ # 2 [22.0, 41.6, 20.9]
345
+ ```
346
+
347
+ Бары MetaTrader — это цены bid, поэтому за круг платится **один** спред. В режиме `spread='bar'`
348
+ это спред бара входа: не меньше `min_spread_points`, пустой считается нулём. Режим `'fixed'` берёт
349
+ `fixed_spread_points`, это стресс-вариант. Своп указан со знаком MetaTrader: отрицательный
350
+ платится и прибавляется к издержкам. `from_symbol_spec` читает своп из спецификации символа,
351
+ где день недели считается от воскресенья: `triple_weekday = (swap_rollover3day − 1) % 7`.
352
+
353
+ Отказы, а не подмены:
354
+ - модели со свопом нужны `nights`; без них своп выпал бы из издержек без следа;
355
+ - `swap_mode ≠ 1` (своп не в пунктах) и спецификация без `swap_rollover3day` отклоняются;
356
+ - `triple_weekday` вне 0…4 отклоняется: тройная ночь в выходной никогда бы не начислилась;
357
+ - выход раньше входа и `side` не ±1 тоже отклоняются.
358
+
312
359
  ## От зон к оценке — пример стыковки
313
360
 
314
361
  Пакет не превращает зоны в сделки: правила входа и выхода — решение торговой системы, а не
@@ -103,6 +103,28 @@ print([c for c in derived.columns if c not in data.columns])
103
103
  именем `true_range` лежал `high - low`, а в `add_technical_features()` — True Range: два
104
104
  числа под одной подписью, расходящиеся на каждом гэпе (G57).
105
105
 
106
+ `calculate_atr(df, period=14, method='sma')` усредняет True Range двумя способами. `'sma'`
107
+ (умолчание, его берёт пайплайн) — скользящее среднее последних `period` значений. `'wilder'` —
108
+ сглаживание Уайлдера, ATR большинства торговых терминалов: первое значение (бар `period − 1`) —
109
+ среднее первых `period` TR, дальше `atr[i] = atr[i−1] + (tr[i] − atr[i−1]) / period`. У обоих
110
+ первые `period − 1` значений — `NaN`:
111
+
112
+ ```python
113
+ from bquant.data import calculate_atr
114
+ from bquant.data.samples import get_sample_data
115
+
116
+ data = get_sample_data('tv_xauusd_1h')
117
+ sma = calculate_atr(data, period=14)
118
+ wilder = calculate_atr(data, period=14, method='wilder')
119
+ print(int(sma.isna().sum()), int(wilder.isna().sum()))
120
+ print(round(sma.iloc[-1], 4), round(wilder.iloc[-1], 4))
121
+ # 13 13
122
+ # 7.6679 8.7819
123
+ ```
124
+
125
+ Уайлдер помнит всю историю: два кадра, начатые с разных баров, дают на одном и том же баре
126
+ разный ATR, тогда как скользящее среднее после `period` баров совпадает.
127
+
106
128
  Ничего внешнего здесь не считается — только арифметика по OHLCV. Индикаторы живут в
107
129
  [`bquant.indicators`](../indicators/README.md).
108
130
 
@@ -76,13 +76,13 @@ grep -nE "Ломает:|\(breaking\)" CHANGELOG.md
76
76
 
77
77
  ```toml
78
78
  # pyproject.toml — так делают действующие потребители
79
- dependencies = ["bquant>=0.0.22,<0.0.23"]
79
+ dependencies = ["bquant>=0.0.23,<0.0.24"]
80
80
  ```
81
81
 
82
82
  Точный пин, а не диапазон. Верхняя граница — следующая патч-версия, потому что ломать может
83
83
  именно она.
84
84
 
85
- Чего **не** делать: `bquant>=0.0.22` без верхней границы. Это не «получать исправления», это
85
+ Чего **не** делать: `bquant>=0.0.23` без верхней границы. Это не «получать исправления», это
86
86
  «получить смену умолчания в тот день, когда вы о ней не знаете».
87
87
 
88
88
  В дистрибутив входит только пакет `bquant*`; `tests/`, `docs/` и `devref/` в колесо не
@@ -115,10 +115,10 @@ dependencies = ["bquant>=0.0.22,<0.0.23"]
115
115
 
116
116
  | | |
117
117
  |---|---|
118
- | Релизов всего | **20** (`0.0.3` … `0.0.22`) |
118
+ | Релизов всего | **21** (`0.0.3` … `0.0.23`) |
119
119
  | Первый | 2026-07-24 |
120
120
  | Последний | 2026-11-04 |
121
- | По месяцам | 2026-07 — 1, 2026-08 — 6, 2026-09 — **9**, 2026-10 — 2, 2026-11 — 2 |
121
+ | По месяцам | 2026-07 — 1, 2026-08 — 6, 2026-09 — **9**, 2026-10 — 2, 2026-11 — 3 |
122
122
 
123
123
  ```bash
124
124
  git log --grep "^release: bquant" --date=short --pretty="%ad %s"
@@ -140,7 +140,7 @@ git log --grep "^release: bquant" --date=short --pretty="%ad %s"
140
140
  молча перенаправляет, есть ровно та форма дефекта, которую проект в себе и чинит.
141
141
  * **LTS-веток нет.** Исправление выходит в следующей версии, назад не портируется.
142
142
  * **Прогонов на каждый пуш нет, и они не обещаются.** Условие релиза — гейт: чистый клон,
143
- два плеча `pandas` (свежий 3.x — на 0.0.22 это 3.1.0 — и 2.3.3), полный сьют, батарея примеров, контракт архитектуры и
143
+ два плеча `pandas` (свежий 3.x — на 0.0.23 это 3.1.0 — и 2.3.3), полный сьют, батарея примеров, контракт архитектуры и
144
144
  установочная проверка из нейтрального каталога. Он строже типичного CI, но проходит только
145
145
  перед выпуском.
146
146
  * **Что есть с 2026-09-12: недельный прогон на свежем разрешении зависимостей**
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "bquant"
7
- version = "0.0.22"
7
+ version = "0.0.23"
8
8
  description = "Quantitative research toolkit for financial markets"
9
9
  authors = [{name = "kogriv", email = "kogriv@gmail.com"}]
10
10
  readme = "README.md"