io.github.simonmak-ascent/fair-value
# Fair Value
[](https://pypi.org/project/fair-value/)
[](https://github.com/simonmak-ascent/fair-value/actions/workflows/ci.yml)
[](./LICENSE)
[](https://registry.modelcontextprotocol.io/v0/servers?search=fair-value)
[](https://glama.ai/mcp/servers/simonmak-ascent/fair-value)
Professional financial valuation system for OpenCode with IFRS/IVS compliance.
mcp-name: io.github.simonmak-ascent/fair-value
## Overview
This project provides comprehensive financial valuation capabilities including:
- DCF, NAV, and CCA valuations
- Fama-French 5-Factor cost of equity
- KMV credit risk model
- Derivatives pricing (Options, Swaps, CB)
- Excel model review and validation
- PDF/Word/Image document analysis
## Installation
```bash
pip install -r requirements.txt # dev workflow (unchanged)
# or, as a package:
pip install . # base library
pip install ".[mcp]" # + MCP server dependencies (A-004)
```
The console command `fair-value-mcp` runs the MCP server (stdio; add `--http` for Streamable HTTP).
Hosted (zero install): `https://fair-value.ascent-partners.com/` (Streamable HTTP).
## MCP Server
```bash
# run locally without installing (stdio)
uvx --from "fair-value[mcp]" fair-value-mcp
# or install and run
pip install "fair-value[mcp]"
fair-value-mcp # stdio
fair-value-mcp --http # Streamable HTTP
```
The server exposes the native valuation, cost-of-capital, derivatives, credit-risk, and report-review tools, and delegates the `startup-valuation` and `intangible-valuation` tool families, so it is a strict superset of both.
**Adoption target:** ≥ 100 PyPI downloads and ≥ 1 directory listing within 90 days of the first release (tracked via the PyPI stats API and the directory listing).
## Quick Start
```python
from valuation_engine import run_valuation, review_report, scan_directory
# Run DCF valuation
result = run_valuation('9988.HK', 'dcf')
# Review Excel model
review = review_report('/path/to/model.xlsx')
# Scan for valuation files
files = scan_directory('/path/to/reports/')
```
## Module Structure
```
src/
├── constants.py # Standards references
├── fetch_data.py # Data fetching (yfinance)
├── valuation/ # DCF, NAV, CCA
├── cost_of_capital/ # WACC, FF5, KMV
├── credit_risk/ # ECL calculations
├── derivatives/ # Options, Swaps, CB
├── report_review/ # Excel, PDF, Word, Image analysis
└── output/ # Report formatting
```
## Requirements
- Python 3.8+
- yfinance
- pandas, numpy, scipy
- QuantLib-Python
- openpyxl
- pdfplumber
- python-docx
## Documentation
See [SKILL.md](./SKILL.md) for the capability spec; the machine-readable method catalog is served by the MCP server at the `valuation://methods` resource, and a docs site is configured via `mkdocs.yml`.
## Standards Compliance
- IVS 2025
- IFRS 13 (Fair Value Measurement)
- IAS 36 (Impairment)
- HKFRS 9 (ECL)
## License
Released under the [MIT License](LICENSE).TDQS
Scored across 35 tools
The eight native tools (valuation_dcf, valuation_nav, valuation_cca, calculate_wacc, calculate_ecl, black_scholes_price, review_report, get_valuation_summary) are clearly distinct, but the ~27 delegated tools share template-identical descriptions differing only in name. An agent cannot reliably tell valuation_saas from valuation_marketplace, valuation_fintech, or valuation_capm, causing frequent misselection.
Nearly all tools use a consistent snake_case convention with a dominant 'valuation_' prefix, plus calculate_*, black_scholes_price, review_report, and get_valuation_summary. The pattern is predictable and readable despite a few verbless names. Consistency of style is good even though names alone do not disambiguate purpose.
35 tools far exceeds a reasonable scope for a valuation server, and the bulk are near-duplicate delegated endpoints. This is heavy and redundant rather than a well-earned surface. A much smaller set of distinct valuation methods would serve better.
Core valuation workflows are covered (DCF, NAV, CCA, WACC, ECL, options, report review, market data), which is solid for a read-only compute server. However, the delegated tools are opaque about their actual operations, so it is unclear whether the claimed corporate/startup/intangible coverage is real or just an error-envelope stub, leaving meaningful gaps in the effective surface.