bquant 0.0.2__tar.gz → 0.0.3__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.
- {bquant-0.0.2 → bquant-0.0.3}/CHANGELOG.md +20 -0
- {bquant-0.0.2/bquant.egg-info → bquant-0.0.3}/PKG-INFO +1 -1
- {bquant-0.0.2 → bquant-0.0.3}/bquant/__init__.py +1 -1
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/pipeline.py +3 -1
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/swing/find_peaks.py +61 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/swing/pivot_points.py +23 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/swing/zigzag.py +19 -7
- {bquant-0.0.2 → bquant-0.0.3/bquant.egg-info}/PKG-INFO +1 -1
- {bquant-0.0.2 → bquant-0.0.3}/bquant.egg-info/SOURCES.txt +5 -10
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/analysis/README.md +3 -3
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/analysis/pipeline.md +19 -3
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/analysis/strategies.md +33 -26
- bquant-0.0.2/docs/api/analysis/zones/pipeline.md → bquant-0.0.3/docs/api/analysis/zones/global_swings_pipeline.md +6 -2
- bquant-0.0.2/docs/api/analysis/zones/strategies.md → bquant-0.0.3/docs/api/analysis/zones/global_swings_strategies.md +5 -1
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/analysis/zones.md +9 -13
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/core/logging.md +1 -1
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/core/nb.md +2 -2
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/data/README.md +2 -2
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/data/loader.md +2 -2
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/extension_guide.md +4 -4
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/visualization/README.md +11 -7
- {bquant-0.0.2 → bquant-0.0.3}/docs/developer_guide/zone_analyzer_deep_dive.md +2 -2
- {bquant-0.0.2 → bquant-0.0.3}/docs/index.rst +28 -6
- {bquant-0.0.2 → bquant-0.0.3}/docs/migration/MIGRATION_v2.md +2 -2
- {bquant-0.0.2 → bquant-0.0.3}/docs/migration/global_swings_migration.md +1 -1
- {bquant-0.0.2 → bquant-0.0.3}/docs/user_guide/README.md +1 -1
- {bquant-0.0.2 → bquant-0.0.3}/docs/user_guide/quick_start.md +1 -1
- bquant-0.0.3/docs/user_guide/swing_strategies.md +146 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/user_guide/zone_analysis.md +2 -2
- {bquant-0.0.2 → bquant-0.0.3}/pyproject.toml +1 -1
- bquant-0.0.3/tests/fixtures/swing_coverage.py +85 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/integration/test_pipeline_global_swings.py +1 -1
- bquant-0.0.3/tests/unit/test_docs_parity.py +131 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_pandas_ta_dynamic_loader.py +9 -2
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_swing_global_calculation.py +36 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zigzag_swing_strategy.py +33 -0
- bquant-0.0.2/docs/BUILD_ISSUES.md +0 -260
- bquant-0.0.2/docs/analytics/zones/layerA_ii_representations_case_study.md +0 -68
- bquant-0.0.2/docs/analytics/zones/layerA_zone_structure_case_study.md +0 -73
- bquant-0.0.2/docs/analytics/zones/macd_zone_consistency_case_study.md +0 -64
- bquant-0.0.2/docs/analytics/zones/s1_swing_anatomy_case_study.md +0 -127
- bquant-0.0.2/docs/analytics/zones/swing.md +0 -64
- bquant-0.0.2/docs/user_guide/swing_analysis_results.md +0 -340
- bquant-0.0.2/docs/user_guide/swing_strategies.md +0 -139
- {bquant-0.0.2 → bquant-0.0.3}/LICENSE +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/MANIFEST.in +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/candlestick/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/chart/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/statistical/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/statistical/hypothesis_testing.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/statistical/regression.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/technical/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/timeseries/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/validation/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/validation/suite.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/analyzer.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/cache.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/detection/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/detection/base.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/detection/combined.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/detection/line_crossing.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/detection/preloaded.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/detection/registry.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/detection/threshold.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/detection/zero_crossing.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/models.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/presets.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/sequence_analysis.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/base.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/divergence/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/divergence/classic.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/registry.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/shape/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/shape/statistical.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/swing/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/swing/thresholds.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/volatility/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/volatility/combined.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/volume/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/strategies/volume/standard.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/analysis/zones/zone_features.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/cli.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/core/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/core/cache.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/core/config.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/core/exceptions.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/core/logging_config.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/core/nb.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/core/numpy_fix.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/core/performance.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/core/utils.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/loader.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/processor.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/samples/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/samples/datasets.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/samples/embedded/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/samples/embedded/mt_xauusd_m15.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/samples/embedded/tv_xauusd_1h.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/samples/generator.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/samples/utils.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/schemas.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/data/validator.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/base.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/calculators.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/custom/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/custom/bollinger.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/custom/ema.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/custom/macd.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/custom/rsi.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/custom/sma.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/library/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/library/manager.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/library/pandas_ta.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/library/talib.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/macd.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/preloaded/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/indicators/preloaded/macd.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/ml/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/visualization/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/visualization/charts.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/visualization/export.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/visualization/statistical.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/visualization/themes.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/visualization/utils.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant/visualization/zones.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant.egg-info/dependency_links.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant.egg-info/entry_points.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant.egg-info/requires.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/bquant.egg-info/top_level.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/analytics/zones/macd_zone_consistency_case_study.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/analytics/zones/swing.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/analytics/zones/swing_strategy_comparison_case_study.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/README.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/analysis/README.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/analysis/base.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/analysis/pipeline.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/analysis/statistical.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/analysis/strategies.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/analysis/zones/models.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/analysis/zones/pipeline.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/analysis/zones/strategies.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/analysis/zones.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/core/README.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/core/config.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/core/exceptions.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/core/logging.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/core/nb.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/core/performance.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/core/utils.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/data/README.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/data/loader.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/data/processor.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/data/samples.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/data/schemas.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/data/validator.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/extension_guide.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/indicators/README.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/indicators/base.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/indicators/factory.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/indicators/library_manager.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/indicators/macd.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/indicators/preloaded.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/visualization/README.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/api/visualization/zones.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/developer_guide/README.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/developer_guide/analytical_philosophy.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/developer_guide/statistical_analysis_workflow.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/developer_guide/zone_analyzer_deep_dive.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/developer_guide/zone_detection_strategies.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/examples/README.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/index.rst.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/migration/MIGRATION_v2.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/migration/global_swings_migration.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/tutorials/README.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/tutorials/combined_rules_detection.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/tutorials/macd_basic_pipeline.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/tutorials/preloaded_zones_workflow.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/tutorials/rsi_strategy_switching.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/user_guide/README.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/user_guide/best_practices.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/user_guide/caching.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/user_guide/core_concepts.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/user_guide/quick_start.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/user_guide/swing_analysis_results.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/user_guide/swing_strategies.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/_build/html/_sources/user_guide/zone_analysis.md.txt +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/analytics/zones/swing_strategy_comparison_case_study.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/analysis/base.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/analysis/statistical.md +0 -0
- /bquant-0.0.2/docs/api/analysis/zones/models.md → /bquant-0.0.3/docs/api/analysis/zones/global_swings_models.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/core/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/core/config.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/core/exceptions.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/core/performance.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/core/utils.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/data/processor.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/data/samples.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/data/schemas.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/data/validator.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/indicators/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/indicators/base.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/indicators/factory.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/indicators/library_manager.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/indicators/macd.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/indicators/preloaded.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/api/visualization/zones.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/developer_guide/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/developer_guide/analytical_philosophy.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/developer_guide/statistical_analysis_workflow.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/developer_guide/zone_detection_strategies.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/examples/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/tutorials/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/tutorials/combined_rules_detection.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/tutorials/macd_basic_pipeline.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/tutorials/preloaded_zones_workflow.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/tutorials/rsi_strategy_switching.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/user_guide/best_practices.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/user_guide/caching.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/user_guide/core_concepts.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/docs/user_guide/zone_analysis_result.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/01_basic_indicators.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/02_macd_zone_analysis.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/02a_universal_zones.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/03_data_processing.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/04_comprehensive_analysis.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/05_strategies_demo.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/06_regression_demo.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/07_validation_demo.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/08_macd_swing_analysis.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/09_zones_visualization_demo.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/examples/zone_analysis_global_swings.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/scripts/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/scripts/analysis/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/scripts/analysis/batch_analysis.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/scripts/analysis/run_macd_analysis.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/scripts/analysis/test_hypotheses.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/scripts/data/data_loader.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/scripts/data/extract_samples.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/scripts/data/generate_samples.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/scripts/data_processing/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/scripts/deployment/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/scripts/publishing/README.md +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/setup.cfg +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/analysis/zones/test_pipeline_cache.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/analysis/zones/test_swing_presets.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/analysis/zones/test_swing_thresholds.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/conftest.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/fixtures/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/fixtures/swing_mocks.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/integration/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/integration/test_backward_compatibility.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/integration/test_data_pipeline.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/integration/test_full_pipeline.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/integration/test_scripts_integration.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/integration/test_truly_universal_zones.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/integration/test_visualization_pipeline.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/integration/test_zone_analysis_e2e.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/performance/test_swing_performance.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/__init__.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_all_indicator_types.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_analysis_structure.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_architecture_validation.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_builtin_migration.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_cache_versioning.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_classic_divergence_strategy.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_combined_volatility_strategy.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_compatibility_validation.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_core_modules.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_data_modules.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_divergence_strategy_universal.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_find_peaks_swing_strategy.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_imports_migration.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_indicator_factory.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_indicators_base.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_library_indicators.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_macd_analyzer.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_macd_backward_compatibility.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_performance.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_pivot_points_swing_strategy.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_preloaded_indicators.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_sample_data.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_sample_generator.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_shape_strategy_universal.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_standard_volume_strategy.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_statistical_hypothesis.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_statistical_shape_strategy.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_strategy_infrastructure.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_swing_context_memory.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_swing_edge_cases.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_time_metrics.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_universal_zone_analyzer.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_validation_suite.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_visualization.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_volume_strategy_universal.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_analysis_builder.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_detection_strategies.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_features_analyzer_context.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_features_divergence_integration.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_features_shape_integration.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_features_swing_integration.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_features_volatility_integration.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_features_volume_integration.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_models.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_pipeline.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_presets.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zone_regression_analyzer.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/unit/test_zones_analysis.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/visualization/test_infrastructure.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/visualization/test_swing_overlay.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/visualization/test_zone_metrics_aggregation.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/visualization/test_zone_metrics_display.py +0 -0
- {bquant-0.0.2 → bquant-0.0.3}/tests/visualization/test_zones_visualization.py +0 -0
|
@@ -9,6 +9,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.0.3] - 2026-07-24
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- **`confirmation_index` для стратегий `find_peaks` и `pivot_points`** — маркер причинной
|
|
16
|
+
доступности свинга теперь заполняется всеми свинг-стратегиями, а не только ZigZag (0.0.2).
|
|
17
|
+
Для `pivot_points` это точное fractal-подтверждение (`index + right_bars`); для `find_peaks` —
|
|
18
|
+
causal leak-free (`max(index + distance, бар prominence-ретрейса справа)`). Позволяет строить
|
|
19
|
+
look-ahead-free потребителей на любой свинг-стратегии. (PR #108)
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- **`CACHE_SCHEMA_VERSION` повышена 2 → 3** — `find_peaks`/`pivot_points` теперь заполняют
|
|
23
|
+
`confirmation_index`, что меняет семантику кэшируемого вывода; старые кэши инвалидируются.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
- **ZigZag: мягкая деградация при отсутствии pandas-ta `zigzag`.** В глобальном режиме
|
|
27
|
+
(`swing_scope='global'`) стратегия теперь возвращает пустой `SwingContext` с понятным
|
|
28
|
+
предупреждением вместо исключения, когда опциональный индикатор pandas-ta `zigzag`
|
|
29
|
+
недоступен — как уже делал per-zone режим. Пайплайн больше не логирует ошибку/traceback
|
|
30
|
+
на этом пути.
|
|
31
|
+
|
|
12
32
|
## [0.0.2] - 2026-07-20
|
|
13
33
|
|
|
14
34
|
### Added
|
|
@@ -47,7 +47,9 @@ _SWING_CLASS_TO_NAME = {
|
|
|
47
47
|
# SwingPoint/ZoneInfo fields, changed swing computation, etc.), so that on-disk
|
|
48
48
|
# caches computed under an older schema are not silently served.
|
|
49
49
|
# v2 (2026-07): SwingPoint.confirmation_index added (causal availability).
|
|
50
|
-
|
|
50
|
+
# v3 (2026-07): confirmation_index now populated by find_peaks & pivot_points
|
|
51
|
+
# (previously only zigzag; changes cached swing output).
|
|
52
|
+
CACHE_SCHEMA_VERSION = 3
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
@dataclass
|
|
@@ -53,6 +53,10 @@ class FindPeaksSwingStrategy:
|
|
|
53
53
|
swing_points: List[SwingPoint] = []
|
|
54
54
|
indices: List[int] = []
|
|
55
55
|
|
|
56
|
+
high_arr = full_data['high'].to_numpy(dtype=float)
|
|
57
|
+
low_arr = full_data['low'].to_numpy(dtype=float)
|
|
58
|
+
full_len = len(full_data)
|
|
59
|
+
|
|
56
60
|
for point_id, point in enumerate(extrema):
|
|
57
61
|
timestamp = point['timestamp']
|
|
58
62
|
ts = (
|
|
@@ -74,6 +78,16 @@ class FindPeaksSwingStrategy:
|
|
|
74
78
|
0, int(next_point['index']) - index_position
|
|
75
79
|
)
|
|
76
80
|
|
|
81
|
+
confirmation_index = self._confirmation_index(
|
|
82
|
+
index_position,
|
|
83
|
+
float(price),
|
|
84
|
+
point['type'],
|
|
85
|
+
prominence_value,
|
|
86
|
+
high_arr,
|
|
87
|
+
low_arr,
|
|
88
|
+
full_len,
|
|
89
|
+
)
|
|
90
|
+
|
|
77
91
|
swing_points.append(
|
|
78
92
|
SwingPoint(
|
|
79
93
|
point_id=point_id,
|
|
@@ -85,6 +99,7 @@ class FindPeaksSwingStrategy:
|
|
|
85
99
|
duration_to_next=duration_to_next,
|
|
86
100
|
strategy_name='find_peaks',
|
|
87
101
|
strategy_params=self._build_strategy_params(prominence_value),
|
|
102
|
+
confirmation_index=confirmation_index,
|
|
88
103
|
)
|
|
89
104
|
)
|
|
90
105
|
indices.append(index_position)
|
|
@@ -387,6 +402,52 @@ class FindPeaksSwingStrategy:
|
|
|
387
402
|
|
|
388
403
|
return metrics
|
|
389
404
|
|
|
405
|
+
def _confirmation_index(
|
|
406
|
+
self,
|
|
407
|
+
index: int,
|
|
408
|
+
price: float,
|
|
409
|
+
swing_type: str,
|
|
410
|
+
prominence: float,
|
|
411
|
+
high_arr: np.ndarray,
|
|
412
|
+
low_arr: np.ndarray,
|
|
413
|
+
full_len: int,
|
|
414
|
+
) -> Optional[int]:
|
|
415
|
+
"""Bar by which this find_peaks extremum is causally confirmed.
|
|
416
|
+
|
|
417
|
+
A find_peaks extremum survives the global pass only if it clears BOTH the
|
|
418
|
+
``distance`` (minimum separation) and ``prominence`` filters. It becomes
|
|
419
|
+
causally known at the later of two events:
|
|
420
|
+
|
|
421
|
+
* **distance stabilisation** — ``index + distance``: once that many
|
|
422
|
+
right-hand bars are observed, no nearer higher peak (resp. lower trough)
|
|
423
|
+
can still displace it via the distance filter (had one existed within
|
|
424
|
+
``distance``, the extremum would have been dropped, so its absence is
|
|
425
|
+
confirmed here);
|
|
426
|
+
* **prominence retrace** — the first bar after ``index`` at which the right
|
|
427
|
+
base falls ``prominence`` away from the pivot (peak: ``high <= price -
|
|
428
|
+
prominence``; trough: ``low >= price + prominence``). scipy's prominence
|
|
429
|
+
requires *both* bases below ``price - prominence``, so this right-side
|
|
430
|
+
retrace is a necessary condition and, for a kept extremum, occurs before
|
|
431
|
+
any higher opposing bar.
|
|
432
|
+
|
|
433
|
+
Returns ``max`` of the two (both are necessary), or ``None`` if the pivot
|
|
434
|
+
cannot yet be confirmed within the available data (retrace not reached, or
|
|
435
|
+
the distance window extends past the end — a still-forming tail swing).
|
|
436
|
+
This is the ``find_peaks`` realisation of the generic
|
|
437
|
+
:attr:`SwingPoint.confirmation_index` contract.
|
|
438
|
+
"""
|
|
439
|
+
if swing_type == 'peak':
|
|
440
|
+
seg = high_arr[index + 1:]
|
|
441
|
+
hits = np.nonzero(seg <= price - prominence)[0]
|
|
442
|
+
else:
|
|
443
|
+
seg = low_arr[index + 1:]
|
|
444
|
+
hits = np.nonzero(seg >= price + prominence)[0]
|
|
445
|
+
if not len(hits):
|
|
446
|
+
return None
|
|
447
|
+
prominence_bar = index + 1 + int(hits[0])
|
|
448
|
+
conf = max(index + self.distance, prominence_bar)
|
|
449
|
+
return conf if conf < full_len else None
|
|
450
|
+
|
|
390
451
|
def _empty_metrics(self) -> SwingMetrics:
|
|
391
452
|
return self._aggregate_metrics(
|
|
392
453
|
[],
|
|
@@ -92,6 +92,10 @@ class PivotPointsSwingStrategy:
|
|
|
92
92
|
0, int(next_point['index']) - index_position
|
|
93
93
|
)
|
|
94
94
|
|
|
95
|
+
confirmation_index = self._confirmation_index(
|
|
96
|
+
index_position, len(full_data)
|
|
97
|
+
)
|
|
98
|
+
|
|
95
99
|
swing_points.append(
|
|
96
100
|
SwingPoint(
|
|
97
101
|
point_id=point_id,
|
|
@@ -103,6 +107,7 @@ class PivotPointsSwingStrategy:
|
|
|
103
107
|
duration_to_next=duration_to_next,
|
|
104
108
|
strategy_name='pivot_points',
|
|
105
109
|
strategy_params=self._strategy_params(),
|
|
110
|
+
confirmation_index=confirmation_index,
|
|
106
111
|
)
|
|
107
112
|
)
|
|
108
113
|
indices.append(index_position)
|
|
@@ -391,6 +396,24 @@ class PivotPointsSwingStrategy:
|
|
|
391
396
|
|
|
392
397
|
return metrics
|
|
393
398
|
|
|
399
|
+
def _confirmation_index(
|
|
400
|
+
self, index: int, full_data_length: int
|
|
401
|
+
) -> Optional[int]:
|
|
402
|
+
"""Bar by which this pivot is causally confirmed.
|
|
403
|
+
|
|
404
|
+
A classic N-bar pivot is defined by ``right_bars`` bars to its right that
|
|
405
|
+
are all lower (pivot high) or higher (pivot low). The pattern therefore
|
|
406
|
+
becomes complete — and the pivot causally known — exactly at
|
|
407
|
+
``index + right_bars``: the bar at which the last required right-side bar
|
|
408
|
+
is observed. This is the ``pivot_points`` realisation of the generic
|
|
409
|
+
:attr:`SwingPoint.confirmation_index` contract (a fractal swing confirms
|
|
410
|
+
after its fixed right-hand look-ahead window). Because pivots are only
|
|
411
|
+
detected for ``index <= len - right_bars - 1``, the confirmation bar always
|
|
412
|
+
lies inside the data; the guard returns ``None`` only defensively.
|
|
413
|
+
"""
|
|
414
|
+
conf = index + self.right_bars
|
|
415
|
+
return conf if conf < full_data_length else None
|
|
416
|
+
|
|
394
417
|
def _empty_metrics(self) -> SwingMetrics:
|
|
395
418
|
return self._aggregate_metrics([], [])
|
|
396
419
|
|
|
@@ -60,13 +60,25 @@ class ZigZagSwingStrategy:
|
|
|
60
60
|
|
|
61
61
|
from .....indicators import LibraryManager
|
|
62
62
|
|
|
63
|
-
zigzag
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
# ZigZag relies on the optional pandas-ta 'zigzag' indicator. If pandas-ta
|
|
64
|
+
# is unavailable (skipped/not installed) or ships no zigzag, degrade to an
|
|
65
|
+
# empty context with a clean warning instead of crashing the pipeline —
|
|
66
|
+
# this mirrors the per-zone calculate() fallback below.
|
|
67
|
+
try:
|
|
68
|
+
zigzag = LibraryManager.create_indicator(
|
|
69
|
+
'pandas_ta',
|
|
70
|
+
'zigzag',
|
|
71
|
+
legs=self.legs,
|
|
72
|
+
deviation=self.deviation,
|
|
73
|
+
)
|
|
74
|
+
result = zigzag.calculate(full_data)
|
|
75
|
+
except Exception as exc:
|
|
76
|
+
logger.warning(
|
|
77
|
+
"ZigZag global: pandas-ta 'zigzag' unavailable (%s). "
|
|
78
|
+
"Returning empty SwingContext.",
|
|
79
|
+
exc,
|
|
80
|
+
)
|
|
81
|
+
return self._empty_context(len(full_data))
|
|
70
82
|
|
|
71
83
|
if result.data.shape[1] < 2:
|
|
72
84
|
logger.warning(
|
|
@@ -187,7 +187,6 @@ bquant/visualization/statistical.py
|
|
|
187
187
|
bquant/visualization/themes.py
|
|
188
188
|
bquant/visualization/utils.py
|
|
189
189
|
bquant/visualization/zones.py
|
|
190
|
-
docs/BUILD_ISSUES.md
|
|
191
190
|
docs/README.md
|
|
192
191
|
docs/index.rst
|
|
193
192
|
docs/_build/html/_sources/index.rst.txt
|
|
@@ -247,11 +246,6 @@ docs/_build/html/_sources/user_guide/quick_start.md.txt
|
|
|
247
246
|
docs/_build/html/_sources/user_guide/swing_analysis_results.md.txt
|
|
248
247
|
docs/_build/html/_sources/user_guide/swing_strategies.md.txt
|
|
249
248
|
docs/_build/html/_sources/user_guide/zone_analysis.md.txt
|
|
250
|
-
docs/analytics/zones/layerA_ii_representations_case_study.md
|
|
251
|
-
docs/analytics/zones/layerA_zone_structure_case_study.md
|
|
252
|
-
docs/analytics/zones/macd_zone_consistency_case_study.md
|
|
253
|
-
docs/analytics/zones/s1_swing_anatomy_case_study.md
|
|
254
|
-
docs/analytics/zones/swing.md
|
|
255
249
|
docs/analytics/zones/swing_strategy_comparison_case_study.md
|
|
256
250
|
docs/api/README.md
|
|
257
251
|
docs/api/extension_guide.md
|
|
@@ -261,9 +255,9 @@ docs/api/analysis/pipeline.md
|
|
|
261
255
|
docs/api/analysis/statistical.md
|
|
262
256
|
docs/api/analysis/strategies.md
|
|
263
257
|
docs/api/analysis/zones.md
|
|
264
|
-
docs/api/analysis/zones/
|
|
265
|
-
docs/api/analysis/zones/
|
|
266
|
-
docs/api/analysis/zones/
|
|
258
|
+
docs/api/analysis/zones/global_swings_models.md
|
|
259
|
+
docs/api/analysis/zones/global_swings_pipeline.md
|
|
260
|
+
docs/api/analysis/zones/global_swings_strategies.md
|
|
267
261
|
docs/api/core/README.md
|
|
268
262
|
docs/api/core/config.md
|
|
269
263
|
docs/api/core/exceptions.md
|
|
@@ -303,7 +297,6 @@ docs/user_guide/best_practices.md
|
|
|
303
297
|
docs/user_guide/caching.md
|
|
304
298
|
docs/user_guide/core_concepts.md
|
|
305
299
|
docs/user_guide/quick_start.md
|
|
306
|
-
docs/user_guide/swing_analysis_results.md
|
|
307
300
|
docs/user_guide/swing_strategies.md
|
|
308
301
|
docs/user_guide/zone_analysis.md
|
|
309
302
|
docs/user_guide/zone_analysis_result.md
|
|
@@ -335,6 +328,7 @@ tests/analysis/zones/test_pipeline_cache.py
|
|
|
335
328
|
tests/analysis/zones/test_swing_presets.py
|
|
336
329
|
tests/analysis/zones/test_swing_thresholds.py
|
|
337
330
|
tests/fixtures/__init__.py
|
|
331
|
+
tests/fixtures/swing_coverage.py
|
|
338
332
|
tests/fixtures/swing_mocks.py
|
|
339
333
|
tests/integration/__init__.py
|
|
340
334
|
tests/integration/test_backward_compatibility.py
|
|
@@ -358,6 +352,7 @@ tests/unit/test_compatibility_validation.py
|
|
|
358
352
|
tests/unit/test_core_modules.py
|
|
359
353
|
tests/unit/test_data_modules.py
|
|
360
354
|
tests/unit/test_divergence_strategy_universal.py
|
|
355
|
+
tests/unit/test_docs_parity.py
|
|
361
356
|
tests/unit/test_find_peaks_swing_strategy.py
|
|
362
357
|
tests/unit/test_imports_migration.py
|
|
363
358
|
tests/unit/test_indicator_factory.py
|
|
@@ -56,9 +56,9 @@ Analysis модули содержат инструменты для стати
|
|
|
56
56
|
- **115 тестов, 100% pass rate** - доказательство универсальности
|
|
57
57
|
|
|
58
58
|
**Документация по глобальным свингам:**
|
|
59
|
-
- [Модели](zones/
|
|
60
|
-
- [Пайплайн](zones/
|
|
61
|
-
- [Стратегии](zones/
|
|
59
|
+
- [Модели](zones/global_swings_models.md) — `SwingPoint`, `SwingContext`, расширения `ZoneInfo`
|
|
60
|
+
- [Пайплайн](zones/global_swings_pipeline.md) — `_calculate_global_swings`, `_inject_swing_context`, `with_swing_scope()`
|
|
61
|
+
- [Стратегии](zones/global_swings_strategies.md) — протокол `SwingCalculationStrategy`, ZigZag/FindPeaks/PivotPoints
|
|
62
62
|
|
|
63
63
|
### 🎨 [bquant.analysis.zones.strategies](strategies.md) - Strategy Pattern (New)
|
|
64
64
|
|
|
@@ -135,6 +135,22 @@ result = (
|
|
|
135
135
|
.with_cache(enable=False)
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
+
#### `.with_swing_scope(scope)`
|
|
139
|
+
Режим расчёта свингов.
|
|
140
|
+
|
|
141
|
+
**Параметры:**
|
|
142
|
+
- `scope='global'` (по умолчанию) — свинги считаются один раз по всему датасету, затем
|
|
143
|
+
агрегируются в каждую зону (`calculate_global` + `aggregate_for_zone`).
|
|
144
|
+
- `scope='per_zone'` — свинги считаются локально внутри каждой зоны (совместимость).
|
|
145
|
+
|
|
146
|
+
**Пример:**
|
|
147
|
+
```python
|
|
148
|
+
.with_strategies(swing='zigzag').with_swing_scope('global')
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
> 📖 Внутренняя механика (`_calculate_global_swings`, `_inject_swing_context`, фолбэки) —
|
|
152
|
+
> в [Глобальные свинги: пайплайн](zones/global_swings_pipeline.md).
|
|
153
|
+
|
|
138
154
|
#### `.build()`
|
|
139
155
|
Запуск анализа и получение результата.
|
|
140
156
|
|
|
@@ -352,9 +368,9 @@ zone_features = result.zones[0].features.get('zone_type')
|
|
|
352
368
|
|
|
353
369
|
### 🎯 Learning Path
|
|
354
370
|
- **[Examples](../../examples/README.md)** - Готовые примеры использования
|
|
355
|
-
- **[Deep Dive Tutorial](
|
|
356
|
-
- **[Advanced Features](
|
|
357
|
-
- **[Migration Guide](
|
|
371
|
+
- **[Deep Dive Tutorial](../../../research/notebooks/03_zones_universal.py)** - Comprehensive analysis
|
|
372
|
+
- **[Advanced Features](../../../research/notebooks/03_analysis_new_features.py)** - Swing, divergence, regression
|
|
373
|
+
- **[Migration Guide](../../../examples/02_macd_zone_analysis.py)** - Переход с legacy API
|
|
358
374
|
|
|
359
375
|
### 🏗️ Developer Resources
|
|
360
376
|
- **[Architecture Patterns](../../developer_guide/README.md)** - Design Patterns, Extension Points
|
|
@@ -51,11 +51,19 @@ ZoneFeaturesAnalyzer
|
|
|
51
51
|
|
|
52
52
|
```python
|
|
53
53
|
class SwingCalculationStrategy(Protocol):
|
|
54
|
-
|
|
55
|
-
def
|
|
56
|
-
def
|
|
54
|
+
# Глобальный режим (по умолчанию)
|
|
55
|
+
def calculate_global(self, full_data: pd.DataFrame) -> SwingContext: ...
|
|
56
|
+
def aggregate_for_zone(self, zone: ZoneInfo, context: SwingContext) -> SwingMetrics: ...
|
|
57
|
+
# Легаси per-zone режим (совместимость)
|
|
58
|
+
def calculate(self, zone_data: pd.DataFrame) -> SwingMetrics: ...
|
|
59
|
+
def get_metadata(self) -> Dict[str, Any]: ...
|
|
60
|
+
def config_hash(self) -> Dict[str, Any]: ...
|
|
57
61
|
```
|
|
58
62
|
|
|
63
|
+
> 📖 Полный разбор глобального контракта (`calculate_global`/`aggregate_for_zone`) и
|
|
64
|
+
> реализаций ZigZag/FindPeaks/PivotPoints — в
|
|
65
|
+
> [Глобальные свинги: стратегии](zones/global_swings_strategies.md).
|
|
66
|
+
|
|
59
67
|
### SwingMetrics Dataclass (23 поля)
|
|
60
68
|
|
|
61
69
|
Полный результат анализа свингов в зоне.
|
|
@@ -113,11 +121,10 @@ class SwingCalculationStrategy(Protocol):
|
|
|
113
121
|
|
|
114
122
|
```python
|
|
115
123
|
class ShapeCalculationStrategy(Protocol):
|
|
116
|
-
def calculate(self,
|
|
117
|
-
#
|
|
118
|
-
#
|
|
119
|
-
def
|
|
120
|
-
def get_metadata(self) -> dict: ...
|
|
124
|
+
def calculate(self, zone_data: pd.DataFrame, indicator_col: str) -> ShapeMetrics: ...
|
|
125
|
+
# ^^^^^^^^^^^^^^^^^^
|
|
126
|
+
# v2.1: обязателен (без авто-детекта)
|
|
127
|
+
def get_metadata(self) -> Dict[str, Any]: ...
|
|
121
128
|
```
|
|
122
129
|
|
|
123
130
|
**Универсальное использование v2.1:**
|
|
@@ -173,14 +180,13 @@ shape = strategy.calculate(zone_data, indicator_col='MY_CUSTOM_OSC')
|
|
|
173
180
|
|
|
174
181
|
```python
|
|
175
182
|
class DivergenceCalculationStrategy(Protocol):
|
|
176
|
-
def calculate_divergence(self,
|
|
177
|
-
|
|
178
|
-
indicator_col:
|
|
179
|
-
indicator_line_col:
|
|
180
|
-
#
|
|
181
|
-
# v2.1:
|
|
182
|
-
def
|
|
183
|
-
def get_metadata(self) -> dict: ...
|
|
183
|
+
def calculate_divergence(self,
|
|
184
|
+
zone_data: pd.DataFrame,
|
|
185
|
+
indicator_col: str,
|
|
186
|
+
indicator_line_col: str = None) -> DivergenceMetrics: ...
|
|
187
|
+
# ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
|
|
188
|
+
# обязателен v2.1: 2-линейные индикаторы (MACD + signal)
|
|
189
|
+
def get_metadata(self) -> Dict[str, Any]: ...
|
|
184
190
|
```
|
|
185
191
|
|
|
186
192
|
**Универсальные примеры v2.1:**
|
|
@@ -225,9 +231,8 @@ div = strategy.calculate_divergence(data, indicator_col='AO_5_34')
|
|
|
225
231
|
|
|
226
232
|
```python
|
|
227
233
|
class VolatilityCalculationStrategy(Protocol):
|
|
228
|
-
def calculate_volatility(self,
|
|
229
|
-
def
|
|
230
|
-
def get_metadata(self) -> dict: ...
|
|
234
|
+
def calculate_volatility(self, zone_data: pd.DataFrame) -> VolatilityMetrics: ...
|
|
235
|
+
def get_metadata(self) -> Dict[str, Any]: ...
|
|
231
236
|
```
|
|
232
237
|
|
|
233
238
|
### VolatilityMetrics Dataclass (10 полей)
|
|
@@ -262,9 +267,11 @@ class VolatilityCalculationStrategy(Protocol):
|
|
|
262
267
|
|
|
263
268
|
```python
|
|
264
269
|
class VolumeCalculationStrategy(Protocol):
|
|
265
|
-
def calculate_volume(self,
|
|
266
|
-
|
|
267
|
-
|
|
270
|
+
def calculate_volume(self, zone_data: pd.DataFrame,
|
|
271
|
+
baseline_volume: Optional[float] = None,
|
|
272
|
+
indicator_col: Optional[str] = None) -> VolumeMetrics: ...
|
|
273
|
+
# v2.1: indicator_col для универсальной корреляции объём↔индикатор
|
|
274
|
+
def get_metadata(self) -> Dict[str, Any]: ...
|
|
268
275
|
```
|
|
269
276
|
|
|
270
277
|
### VolumeMetrics Dataclass (4 поля)
|
|
@@ -816,9 +823,9 @@ if zone.features:
|
|
|
816
823
|
|
|
817
824
|
### 🎯 Learning Path
|
|
818
825
|
- **[Examples](../../examples/README.md)** - Готовые примеры использования
|
|
819
|
-
- **[Deep Dive Tutorial](
|
|
820
|
-
- **[Advanced Features](
|
|
821
|
-
- **[Migration Guide](
|
|
826
|
+
- **[Deep Dive Tutorial](../../../research/notebooks/03_zones_universal.py)** - Подробный разбор
|
|
827
|
+
- **[Advanced Features](../../../research/notebooks/03_analysis_new_features.py)** - Свинги, дивергенции, регрессия
|
|
828
|
+
- **[Migration Guide](../../../examples/02_macd_zone_analysis.py)** - Переход с legacy API
|
|
822
829
|
|
|
823
830
|
### 🏗️ Developer Resources
|
|
824
831
|
- **[Architecture Patterns](../../developer_guide/README.md)** - Паттерны проектирования, точки расширения
|
|
@@ -829,5 +836,5 @@ if zone.features:
|
|
|
829
836
|
### 🔧 Technical Resources
|
|
830
837
|
- **Implementations:** `bquant/analysis/zones/strategies/`
|
|
831
838
|
- **Tests:** `tests/unit/test_*_strategy.py`
|
|
832
|
-
- **Technical docs:** `devref/gaps/swing_detection_approaches.md`
|
|
839
|
+
- **Technical docs:** `devref/archive/gaps/swing_detection_approaches.md`
|
|
833
840
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Глобальные свинги: внутренняя механика пайплайна
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Узкий справочник.** Эта страница покрывает только шаги `ZoneAnalysisPipeline`,
|
|
4
|
+
> относящиеся к **глобальному расчёту свингов** (`swing_scope="global"`). Полный справочник
|
|
5
|
+
> публичного builder-API — в [Universal Pipeline](../pipeline.md).
|
|
6
|
+
|
|
7
|
+
Этот документ фиксирует ключевые изменения API, связанные с глобальным расчётом свингов.
|
|
4
8
|
|
|
5
9
|
## Обзор рабочего процесса
|
|
6
10
|
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Глобальные свинги: протокол `SwingCalculationStrategy`
|
|
2
|
+
|
|
3
|
+
> **Узкий справочник.** Эта страница покрывает контракт свинг-стратегий в режиме
|
|
4
|
+
> **глобального расчёта** (`calculate_global`/`aggregate_for_zone`). Обзор всех метрик-стратегий
|
|
5
|
+
> (swing/shape/divergence/volatility/volume) — в [Strategy Pattern](../strategies.md).
|
|
2
6
|
|
|
3
7
|
Раздел описывает контракт `SwingCalculationStrategy` и обновлённые реализации ZigZag, FindPeaks и PivotPoints после перехода на глобальный расчёт свингов.
|
|
4
8
|
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
>
|
|
24
24
|
> **Справочник API:**
|
|
25
25
|
> - [Универсальные Стратегии](strategies.md) - аналитические стратегии для ЛЮБОГО индикатора
|
|
26
|
-
> - [Руководство по Расширению](
|
|
27
|
-
> - [Модели глобальных свингов](zones/
|
|
28
|
-
> - [Пайплайн с поддержкой global scope](zones/
|
|
29
|
-
> - [Стратегии свингов v2](zones/
|
|
26
|
+
> - [Руководство по Расширению](../../developer_guide/zone_detection_strategies.md) - создание пользовательских стратегий
|
|
27
|
+
> - [Модели глобальных свингов](zones/global_swings_models.md) — `SwingPoint`, `SwingContext`, `ZoneInfo.get_zone_swings()`
|
|
28
|
+
> - [Пайплайн с поддержкой global scope](zones/global_swings_pipeline.md) — `_calculate_global_swings`, `_inject_swing_context`
|
|
29
|
+
> - [Стратегии свингов v2](zones/global_swings_strategies.md) — протокол `SwingCalculationStrategy` и ZigZag/FindPeaks/PivotPoints
|
|
30
30
|
|
|
31
31
|
## Обзор
|
|
32
32
|
|
|
@@ -178,7 +178,7 @@ print(first_zone.indicator_context['detection_indicator']) # → 'FICTIONAL_IND
|
|
|
178
178
|
**Документация:**
|
|
179
179
|
- **Универсальная Архитектура:** См. выше (🟢 v2.1 - стабильно)
|
|
180
180
|
- **Паттерн Стратегия:** См. [strategies.md](strategies.md) (🟢 стабильный API)
|
|
181
|
-
- **Руководство по Расширению:** См. [developer guide](
|
|
181
|
+
- **Руководство по Расширению:** См. [developer guide](../../developer_guide/zone_detection_strategies.md) (пользовательские стратегии)
|
|
182
182
|
|
|
183
183
|
### Использование Аналитических Стратегий (v2.1)
|
|
184
184
|
|
|
@@ -273,14 +273,10 @@ result = (
|
|
|
273
273
|
#### `analyze_zones(df) -> ZoneAnalysisBuilder`
|
|
274
274
|
Точка входа для Universal Pipeline. Возвращает fluent builder для настройки анализа.
|
|
275
275
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
- `.with_strategies(**strategies)` - настройка аналитических стратегий
|
|
281
|
-
- `.analyze(**options)` - настройка анализа
|
|
282
|
-
- `.with_cache(enable=True, ttl=3600)` - настройка кэширования
|
|
283
|
-
- `.build()` - запуск анализа
|
|
276
|
+
> 📖 **Полный справочник по методам билдера** (`.with_indicator()`, `.detect_zones()`,
|
|
277
|
+
> `.with_strategies()`, `.analyze()`, `.with_cache()`, `.with_swing_scope()`, `.build()`) —
|
|
278
|
+
> в канонической странице [Universal Pipeline](pipeline.md). Ниже — только модели данных
|
|
279
|
+
> результата.
|
|
284
280
|
|
|
285
281
|
#### `ZoneAnalysisResult`
|
|
286
282
|
Результат анализа с полным набором данных:
|
|
@@ -485,7 +485,7 @@ setup_logging(
|
|
|
485
485
|
|
|
486
486
|
## 📚 См. также
|
|
487
487
|
|
|
488
|
-
- [NotebookSimulator API](nb.md
|
|
488
|
+
- [NotebookSimulator API](nb.md#логирование) - интеграция с логированием
|
|
489
489
|
- [Data Modules](../data/README.md) - логирование в модулях данных
|
|
490
490
|
- [Developer Guide](../../developer_guide/README.md) - руководство разработчика
|
|
491
491
|
- [Best Practices](../../user_guide/best_practices.md) - лучшие практики работы с BQuant
|
|
@@ -351,7 +351,7 @@ nb.finish()
|
|
|
351
351
|
6. **Тестируйте в разных режимах** - с `--trap` и `--no-trap`
|
|
352
352
|
7. **Не создавайте функцию main()** - размещайте код в корне модуля
|
|
353
353
|
|
|
354
|
-
### Логирование
|
|
354
|
+
### Логирование
|
|
355
355
|
|
|
356
356
|
**Интеграция с системой логирования:**
|
|
357
357
|
|
|
@@ -368,7 +368,7 @@ logging.getLogger('bquant.indicators').setLevel(logging.WARNING)
|
|
|
368
368
|
nb = NotebookSimulator("My Analysis")
|
|
369
369
|
```
|
|
370
370
|
|
|
371
|
-
**См. подробности:** [Управление логированием](logging.md
|
|
371
|
+
**См. подробности:** [Управление логированием](logging.md#-модульная-настройка)
|
|
372
372
|
|
|
373
373
|
### Ограничения
|
|
374
374
|
|
|
@@ -192,7 +192,7 @@ generator = SampleDataGenerator()
|
|
|
192
192
|
# generator.generate_all() # создаст embedded-файлы согласно конфигурации
|
|
193
193
|
```
|
|
194
194
|
|
|
195
|
-
## Логирование
|
|
195
|
+
## Логирование
|
|
196
196
|
|
|
197
197
|
Data модули используют контекстное логирование с техническими деталями загрузки и обработки данных. При использовании с NotebookSimulator может возникать дублирование сообщений.
|
|
198
198
|
|
|
@@ -204,7 +204,7 @@ import logging
|
|
|
204
204
|
logging.getLogger('bquant.data').setLevel(logging.WARNING)
|
|
205
205
|
```
|
|
206
206
|
|
|
207
|
-
**См. подробности:** [Управление логированием](../core/logging.md
|
|
207
|
+
**См. подробности:** [Управление логированием](../core/logging.md#-модульная-настройка)
|
|
208
208
|
|
|
209
209
|
## 🔗 Связанные разделы
|
|
210
210
|
|
|
@@ -48,7 +48,7 @@ datasets = load_all_data_files()
|
|
|
48
48
|
print(list(datasets.keys()))
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
## Логирование
|
|
51
|
+
## Логирование
|
|
52
52
|
|
|
53
53
|
Модуль использует контекстное логирование с детальными техническими сообщениями:
|
|
54
54
|
|
|
@@ -71,7 +71,7 @@ logging.getLogger('bquant.data.loader').setLevel(logging.WARNING)
|
|
|
71
71
|
logging.getLogger('bquant.data').setLevel(logging.WARNING)
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
**См. подробности:** [Управление логированием](../core/logging.md
|
|
74
|
+
**См. подробности:** [Управление логированием](../core/logging.md#-модульная-настройка)
|
|
75
75
|
|
|
76
76
|
## Замечания
|
|
77
77
|
|
|
@@ -1228,10 +1228,10 @@ class CustomIndicator(BaseIndicator):
|
|
|
1228
1228
|
|
|
1229
1229
|
## 📚 Дополнительные ресурсы
|
|
1230
1230
|
|
|
1231
|
-
- **[Core Modules](
|
|
1232
|
-
- **[Indicators](
|
|
1233
|
-
- **[Analysis](
|
|
1234
|
-
- **[Visualization](
|
|
1231
|
+
- **[Core Modules](core/README.md)** - Базовые модули для расширения
|
|
1232
|
+
- **[Indicators](indicators/README.md)** - Примеры индикаторов
|
|
1233
|
+
- **[Analysis](analysis/README.md)** - Примеры анализаторов
|
|
1234
|
+
- **[Visualization](visualization/README.md)** - Примеры визуализаций
|
|
1235
1235
|
|
|
1236
1236
|
---
|
|
1237
1237
|
|