How edvinassvedas-dev/valdist works
valdist turns probabilistic valuation specs into simulated intrinsic-value distributions and decision/sensitivity summaries. The principal workflow is spec loading and validation, model construction and sampling, adapter-based valuation, then result reporting. Separate user-facing branches provide calibration, charts, and a read-only browser viewer with optional current-price repricing. The README documents all three built-in valuation families and these capabilities; some subsystem wiring is inferred only where the documented workflow is explicit, so uncertain links are omitted.
Main entry points: model.py Valuation Model · server.py Read-only Viewer · cli.py CLI Commands · loader.py Spec Loader
Components 24
Specification
- Valuation Spec
examples/vici.yaml - Spec Loader
valdist/spec/loader.py - Spec Schema
valdist/spec/schema.py - Spec Validation
valdist/spec/validate.py
Valuation Engine
- Valuation Model
valdist/core/model.py - Driver Marginals
valdist/core/marginals.py - Dependence Factors
valdist/core/factors.py - Monte Carlo Sampler
valdist/core/sampler.py - Adapter Registry
valdist/adapters/registry.py - Equity Adapter
valdist/adapters/equity.py - REIT Adapter
valdist/adapters/reit.py - Preferred Adapter
valdist/adapters/preferred.py
Analysis Outputs
- CLI Commands
valdist/cli.py - Simulation Result
valdist/core/results.py - Diagnostics
valdist/core/diagnostics.py - Text Report
valdist/report.py - Charts
valdist/plot.py - Coverage Backtest
valdist/calibrate/coverage.py - Realized Outcomes
examples/calibration/vici_2024q1.real
Browser Viewer
- Read-only Viewer
gui/server.py - Viewer Page
gui/index.html - Quote Fetcher
prices/fetch.py
Other components
- Analyst
- Market Quote Service
Connections 31
- Analyst → CLI Commands: runs commands
- Analyst → Valuation Spec: provides spec
- CLI Commands → Spec Loader: loads spec
- Spec Loader → Spec Schema: parses against
- CLI Commands → Spec Validation: validates inputs
- Spec Loader → Spec Validation: hydrates spec
- Spec Validation → Valuation Model: permits construction
- Valuation Model → Driver Marginals: fits drivers
- Valuation Model → Dependence Factors: builds dependence
- Valuation Model → Monte Carlo Sampler: generates draws
- Valuation Model → Adapter Registry: selects adapter
- Adapter Registry → Equity Adapter: dispatches equity
- Adapter Registry → REIT Adapter: dispatches REIT
- Adapter Registry → Preferred Adapter: dispatches preferred
- Valuation Model → Simulation Result: returns simulations
- Valuation Model → Diagnostics: collects warnings
- CLI Commands → Text Report: formats output
- CLI Commands → Charts: renders chart
- CLI Commands → Coverage Backtest: runs backtest
- Coverage Backtest → Spec Loader: loads specs
- Coverage Backtest → Realized Outcomes: reads outcomes
- Analyst → Read-only Viewer: opens viewer
- Read-only Viewer → Viewer Page: serves page
- Read-only Viewer → Spec Loader: loads analyses
- Read-only Viewer → Quote Fetcher: reads quotes
- Quote Fetcher → Market Quote Service: fetches quotes
- Quote Fetcher → Read-only Viewer: refreshes quotes
- Read-only Viewer → Valuation Model: runs repricing
- Simulation Result → Read-only Viewer: supplies summaries
- Simulation Result → Text Report: supplies metrics
- Simulation Result → Charts: supplies distributions