How horororong/quant-marcap-runner works
quant-marcap-runner supports point-in-time KRX market-cap analysis and portfolio backtests. The principal workflow is to define a strategy, run it through the DSL runner and execution engine, then produce canonical performance metrics and reports. Separate branches cover factor registration, DART financial-data collection, and independent financial review. The README identifies the current backtest template as canonical; source excerpts and the index show some module relationships, but not every runtime detail, so unsampled links are omitted.
Main entry points: strategy_dsl_runner.py DSL runner · strategy_dsl.py Strategy DSL · backfill_dart_legacy_2000_2014.py DART backfill · factor_registry.py Factor registry
Components 25
Strategy workflow
- Strategy DSL
scripts/strategy_dsl.py - DSL runner
scripts/strategy_dsl_runner.py - DSL execution
scripts/strategy_dsl_run.py - Decile analysis
scripts/strategy_dsl_deciles.py - Execution contract
scripts/execution_contract.py
Market data and factors
- KRX data
scripts/krx_backtest_data.py - History audit
scripts/krx_history_audit.py - Factor registry
scripts/factor_registry.py - Technical factors
scripts/krx_technical_factor_adapter.py - DART value factors
scripts/dart_value_factor_adapter.py
Backtest and reporting
- Backtest engine
scripts/quant_backtest_template_PROJECT_v2-16_CURRENT.py - Canonical metrics
scripts/quant_backtest_template_CURRENT.py - Backtest postprocess
scripts/quant_backtest_postprocess.py - Report dashboard
scripts/quant_report_dashboard.py
Financial data and review
- DART backfill
scripts/backfill_dart_legacy_2000_2014.py - Legacy financial parser
scripts/legacy_native_financials.py - Financial fields
scripts/legacy_financial_fields.py - CSV publication
scripts/csv_storage.py - Review views
scripts/financial_review_views.py - Review gate
scripts/financial_review_gate.py - Validation batch
scripts/financial_validation_batch.py - Financial rollout
scripts/financial_rollout.py
Other components
- Analyst
- OpenDART
- KRX market data
Connections 27
- Analyst → Strategy DSL: defines
scripts/strategy_dsl.py - Strategy DSL → DSL runner: runs
scripts/strategy_dsl_runner.py - DSL runner → Strategy DSL: validates
scripts/strategy_dsl_runner.py - DSL runner → DSL execution: dispatches
scripts/strategy_dsl_runner.py - DSL runner → Decile analysis: uses
scripts/strategy_dsl_runner.py - DSL runner → Factor registry: uses
scripts/strategy_dsl_runner.py - DSL runner → History audit: uses
scripts/strategy_dsl_runner.py - DSL runner → Execution contract: uses
scripts/strategy_dsl_runner.py - DSL execution → Backtest engine: executes
- Strategy DSL → Factor registry: resolves factors
scripts/strategy_dsl.py - Strategy DSL → Execution contract: uses
scripts/strategy_dsl.py - Factor registry → Technical factors: registers
scripts/factor_registry.py - Factor registry → DART value factors: registers
scripts/factor_registry.py - KRX data → KRX market data: loads
- Backtest engine → Execution contract: follows
scripts/quant_backtest_template_PROJECT_v2-16_CURRENT.py - Backtest engine → Canonical metrics: delegates metrics
scripts/quant_backtest_template_PROJECT_v2-16_CURRENT.py - Backtest postprocess → Canonical metrics: uses
scripts/quant_backtest_postprocess.py - Backtest postprocess → Report dashboard: uses
scripts/quant_backtest_postprocess.py - DART backfill → OpenDART: fetches
- DART backfill → Financial fields: uses
scripts/backfill_dart_legacy_2000_2014.py - DART backfill → Legacy financial parser: uses
scripts/backfill_dart_legacy_2000_2014.py - DART backfill → CSV publication: publishes via
scripts/backfill_dart_legacy_2000_2014.py - Legacy financial parser → Financial fields: uses
scripts/legacy_native_financials.py - Review views → Review gate: uses
scripts/financial_review_views.py - Review views → Validation batch: uses
scripts/financial_review_views.py - Validation batch → Financial rollout: uses
scripts/financial_validation_batch.py - Review gate → Financial fields: checks source literals