Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
BQuant is a quantitative research toolkit for financial markets, starting with MACD zone analysis but designed for extensibility. The project follows a modular architecture with clear separation between data processing, indicators, analysis, and visualization.
bquant/core/)config.py: Universal configuration system with timeframe mapping for different data providersnb.py: NotebookSimulator class for creating notebook-style Python scripts with step-by-step executioncache.py: Two-level caching system (memory + disk) for performance optimizationperformance.py: Performance monitoring and optimization utilitieslogging_config.py: Centralized logging configurationexceptions.py: Custom exception hierarchy for different error typesbquant/data/)loader.py: CSV data loading with automatic format detection (OANDA, MetaTrader)processor.py: Data processing and indicator calculation pipelinesamples/: Embedded sample datasets for testing and examplesvalidator.py: Data validation and quality checksschemas.py: Data structure definitionsbquant/indicators/)macd.py: Advanced MACD analyzer with zone detection, clustering, and statistical analysiscalculators.py: Core indicator calculation functionsbase.py: Base classes for custom indicatorslibrary.py: Integration with pandas-ta and TA-Libbquant/analysis/)zones/: Zone analysis algorithms (sequence analysis, feature extraction)statistical/: Statistical analysis and hypothesis testingtechnical/: Technical analysis modules (mostly stubs for future implementation)bquant/visualization/)charts.py: Financial chart creation with Plotlyzones.py: Zone-specific visualization toolsthemes.py: Chart themes and stylingFor research scripts, use the NotebookSimulator class to create notebook-style execution with step-by-step execution, automatic CLI argument parsing, and rich logging.
Quick example:
from bquant.core.nb import NotebookSimulator nb = NotebookSimulator("My Analysis Description") nb.step("Data Loading") # your code here nb.wait() nb.finish()
📖 Full Documentation: See
docs/api/core/nb.md for complete API reference, examples, and best practices.
Use the centralized configuration system:
from bquant.core.config import get_data_path, get_indicator_params, PROJECT_ROOT # Get configured paths data_dir = get_data_path() # Get indicator parameters macd_params = get_indicator_params('macd')
Always use sample data for examples and tests:
from bquant.data.samples import get_sample_data, list_datasets # Load sample data data = get_sample_data('tv_xauusd_1h') # TradingView OANDA data data = get_sample_data('mt_xauusd_m15') # MetaTrader data # List available datasets datasets = list_datasets()
Use built-in performance monitoring for analysis functions:
from bquant.core.performance import performance_monitor, performance_context @performance_monitor def my_analysis_function(data): # your code here pass # Or use as context manager with performance_context("My Operation"): # time-intensive code pass
OANDA_SYMBOL, TIMEFRAME.csvSYMBOLTIMEFRAME.csv (e.g., XAUUSDH1.csv)The system uses universal timeframe mapping:
1m, 5m, 15m, 30m1h, 4h, 12h1d, 1w, 1MExpected OHLCV columns:
['time', 'open', 'high', 'low', 'close', 'volume']
Additional columns preserved but not required.
All examples and tests should use embedded sample data from
bquant.data.samples. Never hardcode paths to external CSV files.
tests/unit/: Fast tests for individual modulestests/integration/: Tests for module interactionstests/fixtures/: Shared test data and utilitiesInclude performance validation in tests, especially for indicator calculations and data processing.
bquant.core.exceptionserror_handling() context manager for research scriptsResearch scripts in
research/notebooks/ use the NotebookSimulator pattern. These are Python files that simulate Jupyter notebook behavior with automatic CLI argument parsing, step-by-step execution, rich logging, error handling, and automatic cleanup.
📖 Full Documentation: See
docs/api/core/nb.md for complete API reference, detailed examples, and advanced usage patterns.
BQuant uses a two-level changelog system:
changelogs/CHANGE_TRACE_LOG_YYYY-MM-DD.mdCHANGELOG.mdKey Rules:
[HH:MM:SS] [status] [type] [description]📖 Complete Documentation: See
changelogs/README.md for detailed format specifications, workflow, transfer criteria, and examples.