Servidor MCP

Fair Value MCP Server

io.github.simonmak-ascent/fair-value
Datos y analítica Finanzas e inversión Público y accesible MCP 2025-11-25

Qué hace este MCP

Calculates financial valuations, discount rates, credit losses, fixed-income metrics, derivatives pricing, fair-value adjustments and report audits.

calculate_actuarial_pv
Actuarial present value
Actuarial present value engine. Discount expected cash flows with mortality, survival, and risk adjustment for insurance and benefit obligations, generalising IFRS 17 (fulfilment cash flows), IAS 19 (employee benefits), IFRS 2 (share-based payments), and IAS 37 (provisions). Use this for regulated actuarial obligations; for general scenario weighting use calculate_expected_value. Methods: ifrs17_gmm: cash_flows, discount_rate, risk_adjustment; ifrs17_paa: premiums, claims_cash, acquisition_cash_flows, coverage_periods; ifrs17_vfa: cash_flows, discount_rate, underlying_items_return, risk_adjustment; ias19_puc: projected_benefits, discount_rate, attribution_years; ias37_provision: outcomes, probabilities, discount_rate, periods. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'method': {'enum': ['ifrs17_gmm', 'ifrs17_paa', 'ifrs17_vfa', 'ias19_puc', 'ias37_provision'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'periods': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Number of periods n (>=1).'}, 'outcomes': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Outcome values aligned with probabilities.'}, 'premiums': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Premiums in reporting currency.'}, 'cash_flows': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Projected cash flows in reporting currency, indexed t=1..n.'}, 'claims_cash': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Expected claims in reporting currency.'}, 'discount_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Discount rate as a decimal (0.10 = 10%); pre-tax when method=viu_pre_tax.'}, 'probabilities': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Cumulative success probability per period in [0,1], aligned with cash_flows.'}, 'risk_adjustment': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Explicit risk adjustment for non-financial risk.'}, 'coverage_periods': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Coverage periods for the PAA (>=1).'}, 'attribution_years': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Years of service for attribution (>=1).'}, 'projected_benefits': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Projected benefits per service year.'}, 'acquisition_cash_flows': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Acquisition cash flows in reporting currency.'}, 'underlying_items_return': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Return on underlying items (decimal).'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_company_summary
Company profile and market inputs
Company-summary engine. Return a company profile with live market metrics (price, shares, beta, volatility, market capitalisation) to seed valuation inputs. Use this to seed inputs for the other calculate_* tools; it does not compute a valuation itself, and it omits missing fields rather than inventing them. Supplying a ticker performs a network fetch Methods: profile: ticker. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Acceso externo Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'method': {'type': 'string', 'const': 'profile', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'ticker': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': "Equity ticker, e.g. '9988.HK'."}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_convertible_bond
Convertible and exchangeable bond valuation
Convertible-bond engine. Value callable and puttable convertible or exchangeable bonds with credit risk using a Tsiveriotis-Fernandes lattice (equity discounted at the risk-free rate, debt at a credit spread), with conversion, issuer call, holder put, coupon schedule, and a straight-bond floor. Use this for HK-listed convertible and exchangeable bonds Methods: lattice_tsf/lattice_intensity/finite_difference/lsmc/quantlib: spot, face, coupon_rate, maturity, conversion_ratio, volatility, risk_free, credit_spread, call_schedule, put_schedule, rights_priority. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'face': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Bond face value.'}, 'spot': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Spot price of the underlying (or FX rate for garman_kohlhagen).'}, 'method': {'enum': ['lattice_tsf', 'lattice_intensity', 'finite_difference', 'lsmc', 'quantlib'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'maturity': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Time to expiry in years (0.5 = six months); > 0.'}, 'risk_free': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Continuously-compounded risk-free rate (decimal).'}, 'volatility': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Annualized volatility (decimal, 0.30 = 30%); > 0.'}, 'coupon_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Annual coupon rate (decimal).'}, 'put_schedule': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Investor put schedule [{date_years, price}]; pass [] when there is none.'}, 'call_schedule': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Issuer call schedule [{date_years, price}]; pass [] when there is none.'}, 'credit_spread': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Credit spread over the risk-free rate (decimal).'}, 'rights_priority': {'anyOf': [{'enum': ['holder', 'issuer'], 'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Which right prevails when call and put coincide.'}, 'conversion_ratio': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Shares received per bond on conversion.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_credit_loss
Credit loss and impairment
Credit-risk engine (IFRS 9 / HKFRS 9). Compute 12-month, lifetime, and staged expected credit loss, PD/LGD/EAD, provision matrices, hazard rates, and CVA/DVA. Use this for impairment, fair-value credit adjustment, and loan-loss provisioning; for the credit component of a specific convertible bond use calculate_convertible_bond. Methods: ecl_12m: ead, pd, lgd; ecl_lifetime: ead, pd_lifetime, lgd; ecl_staged: ead, pd_12m, pd_lifetime, lgd, stage; provision_matrix: receivables_ageing, loss_rates; pd_from_spread: credit_spread, recovery, tenor_years; cumulative_pd: annual_pd, years; hazard: hazard_rate, tenor_years; cva_dva: exposure_profile, pd, lgd, discount_rate. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'pd': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Probability of default over the horizon, in [0,1].'}, 'ead': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Exposure at default in currency units.'}, 'lgd': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Loss given default in [0,1] (1 - recovery rate).'}, 'stage': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'IFRS 9 stage (1, 2 or 3).'}, 'years': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Number of projection years n; equal len(cash_flows) when both are supplied.'}, 'method': {'enum': ['ecl_12m', 'ecl_lifetime', 'ecl_staged', 'provision_matrix', 'pd_from_spread', 'cumulative_pd', 'hazard', 'cva_dva'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'pd_12m': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': '12-month PD in [0,1].'}, 'recovery': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Recovery rate in [0,1].'}, 'annual_pd': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Annual PD in [0,1].'}, 'loss_rates': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Loss rate per ageing bucket.'}, 'hazard_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Default hazard rate as a decimal.'}, 'pd_lifetime': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Lifetime PD in [0,1].'}, 'tenor_years': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Tenor in years (>0).'}, 'credit_spread': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Credit spread over the risk-free rate (decimal).'}, 'discount_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Discount rate as a decimal (0.10 = 10%); pre-tax when method=viu_pre_tax.'}, 'exposure_profile': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Expected exposure per period.'}, 'receivables_ageing': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Ageing buckets [{bucket, amount}].'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_dcf
Discounted cash flow valuation
Discounted cash flow valuation engine. Choose a method and supply its exact inputs to value a business from projected free cash flows, dividends, residual income, or economic profit. Covers FCFF/FCFE DCF, NPV/IRR, terminal values, and multi-stage growth. Use this for going-concern cash-flow businesses; for asset-anchored or financial firms use calculate_residual, for peer-based pricing use calculate_market_multiple, and for pre-profit companies use calculate_loss_making_company. Methods: dcf/npv: cash_flows, discount_rate; annuity: payment, discount_rate, periods; growing_annuity: payment, discount_rate, growth_rate, periods; perpetuity: payment, discount_rate; terminal_gordon: final_cash_flow, discount_rate, perpetual_growth; terminal_multiple: final_cash_flow, exit_multiple; viu_pre_tax: cash_flows, pre_tax_discount_rate; rnpv: cash_flows, discount_rate, probabilities; lease_pv: lease_payments, incremental_borrowing_rate. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'method': {'enum': ['dcf', 'npv', 'annuity', 'growing_annuity', 'perpetuity', 'terminal_gordon', 'terminal_multiple', 'viu_pre_tax', 'rnpv', 'lease_pv'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'payment': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Level periodic payment in reporting currency.'}, 'periods': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Number of periods n (>=1).'}, 'cash_flows': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Projected cash flows in reporting currency, indexed t=1..n.'}, 'growth_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Periodic growth rate as a decimal (0.03 = 3%).'}, 'discount_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Discount rate as a decimal (0.10 = 10%); pre-tax when method=viu_pre_tax.'}, 'exit_multiple': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Exit multiple on the final flow, e.g. 8.0 for 8x.'}, 'probabilities': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Cumulative success probability per period in [0,1], aligned with cash_flows.'}, 'lease_payments': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Contractual lease payments in reporting currency, t=1..n.'}, 'final_cash_flow': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Final-period cash flow for the terminal value.'}, 'perpetual_growth': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Gordon growth rate (decimal); strictly below discount_rate.'}, 'pre_tax_discount_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Pre-tax discount rate (decimal), required by viu_pre_tax (IAS 36).'}, 'incremental_borrowing_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Lessee incremental borrowing rate (decimal), IFRS 16.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_discount_rate
Cost of capital and discount rates
Cost-of-capital engine. Compute WACC, cost of equity (CAPM), cost of debt, unlevered/relevered beta, and country or size premiums from an explicit capital structure and market inputs. Use this to derive the discount rate an income-approach valuation needs Methods: wacc: equity_weight, debt_weight, cost_equity, cost_debt, tax_rate; capm: risk_free, beta, market_return; startup_capm: risk_free, beta, market_risk_premium, size_premium, illiquidity_premium; build_up: risk_free, equity_risk_premium, size_premium, industry_premium, specific_premium; currency_adjusted: base_rate, currency_risk_premium, country_risk_premium; country_risk: sovereign_yield, us_risk_free; esg: base_rate, esg_risk_premium, esg_opportunity_discount; portfolio_beta: weights, betas; ibr: risk_free, credit_spread, tenor_years. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'beta': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Equity beta (market = 1.0).'}, 'betas': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Asset/segment betas aligned with weights.'}, 'method': {'enum': ['wacc', 'capm', 'startup_capm', 'build_up', 'currency_adjusted', 'country_risk', 'esg', 'portfolio_beta', 'ibr'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'weights': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Weights that must sum to 1.'}, 'tax_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Marginal corporate tax rate as a decimal.'}, 'base_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Base rate before currency/country/ESG adjustment (decimal).'}, 'cost_debt': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Pre-tax cost of debt as a decimal.'}, 'risk_free': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Continuously-compounded risk-free rate (decimal).'}, 'cost_equity': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Cost of equity as a decimal (0.12 = 12%).'}, 'debt_weight': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Market-value weight of debt (decimal); with equity_weight must sum to 1.'}, 'tenor_years': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Tenor in years (>0).'}, 'size_premium': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Small-size premium (decimal).'}, 'us_risk_free': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'US Treasury risk-free yield (decimal).'}, 'credit_spread': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Credit spread over the risk-free rate (decimal).'}, 'equity_weight': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Market-value weight of equity (decimal); with debt_weight must sum to 1.'}, 'market_return': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Expected market return (decimal).'}, 'sovereign_yield': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Sovereign bond yield (decimal).'}, 'esg_risk_premium': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'ESG risk premium added to the base rate (decimal).'}, 'industry_premium': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Industry risk premium (decimal).'}, 'specific_premium': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Company-specific risk premium (decimal).'}, 'equity_risk_premium': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Equity risk premium (decimal).'}, 'illiquidity_premium': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Illiquidity premium (decimal).'}, 'market_risk_premium': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Market risk premium (decimal).'}, 'country_risk_premium': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Country risk premium (decimal).'}, 'currency_risk_premium': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Currency risk premium (decimal).'}, 'esg_opportunity_discount': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'ESG opportunity discount subtracted from the base rate (decimal).'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_expected_value
Expected value and probability weighting
Expected-value engine. Compute expected values over discrete, continuous, simulated, or tree-structured uncertainty, plus football-field ranges and discounted provisions. Use this to probability-weight scenarios and ranges inside a valuation; for regulated provisions and insurance or benefit obligations use calculate_actuarial_pv, and for path-dependent payoffs use calculate_structured_product. Methods: discrete: outcomes, probabilities; continuous: distribution, mean, std, lower, upper; scenario: scenarios; monte_carlo: iterations, distributions, base_params; decision_tree: tree; football_field: estimates. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'std': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Distribution standard deviation (>0).'}, 'mean': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Distribution mean.'}, 'tree': {'anyOf': [{'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'default': None, 'description': 'Decision tree with chance/decision nodes.'}, 'lower': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Lower integration bound.'}, 'upper': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Upper integration bound.'}, 'method': {'enum': ['discrete', 'continuous', 'scenario', 'monte_carlo', 'decision_tree', 'football_field'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'outcomes': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Outcome values aligned with probabilities.'}, 'estimates': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Estimates [{method, central, low, high}] for a football field.'}, 'scenarios': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Scenarios [{probability, value}] with probabilities summing to 1.'}, 'iterations': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Monte-Carlo iterations (>=1000).'}, 'base_params': {'anyOf': [{'type': 'object', 'additionalProperties': True}, {'type': 'null'}], 'default': None, 'description': 'Base parameter values for simulation.'}, 'distribution': {'anyOf': [{'enum': ['normal', 'lognormal', 'uniform'], 'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Continuous distribution to integrate over.'}, 'distributions': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Input distributions [{parameter, type, mean, std}].'}, 'probabilities': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Cumulative success probability per period in [0,1], aligned with cash_flows.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_fair_value_adjustment
Fair value adjustments (IFRS 13)
Fair-value-adjustment engine (IFRS 13). Compute exit-price adjustments including credit, liquidity, control and marketability discounts, blockage, and the fair-value hierarchy level. Use this to move from an indicated value to the fair value recognised in the accounts Methods: dlom: base_value, restricted_period, volatility, risk_free; dloc: base_value, transaction_cost_pct; control_premium: base_value, control_premium_pct; minority_discount: base_value, minority_discount_pct; highest_best_use: base_value, alternative_use_values; hierarchy_level: inputs. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'inputs': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Inputs [{value, level}] used to determine the hierarchy level.'}, 'method': {'enum': ['dlom', 'dloc', 'control_premium', 'minority_discount', 'highest_best_use', 'hierarchy_level'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'risk_free': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Continuously-compounded risk-free rate (decimal).'}, 'base_value': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Base valuation before the adjustment.'}, 'volatility': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Annualized volatility (decimal, 0.30 = 30%); > 0.'}, 'restricted_period': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Restricted/marketability period in years (>=0).'}, 'control_premium_pct': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Control premium as a fraction of value.'}, 'transaction_cost_pct': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Transaction cost as a fraction of value.'}, 'minority_discount_pct': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Minority discount as a fraction of value.'}, 'alternative_use_values': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Financially feasible alternative-use values.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_fixed_income
Fixed income and term structure analytics
Fixed-income engine. Price plain coupon bonds, solve for yield to maturity, measure interest-rate sensitivity via Macaulay and modified duration and convexity, and build a HIBOR/HKD-style term structure: bootstrap a zero curve from par rates, infer forward rates, and discount cash flows on the curve. Use this for vanilla bonds, rate risk and discount curves; for convertibles use calculate_convertible_bond and for structured payoffs use calculate_structured_product. Methods: bond_price/duration/convexity: face, coupon_rate, years, ytm, frequency; bond_yield: face, coupon_rate, years, price, frequency; discount_factor: rate, years, frequency; zero_curve: par_rates, tenors, frequency; forward_rate: zero_rates, tenors, t1, t2; pv_curve: cash_flows, times, zero_rates, tenors. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'t1': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Forward period start in years (>=0).'}, 't2': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Forward period end in years (> t1).'}, 'ytm': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Yield to maturity (decimal, annualised).'}, 'face': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Bond face value.'}, 'rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'A single interest/zero rate (decimal).'}, 'price': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Dirty price of the instrument in reporting currency.'}, 'times': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Cash-flow times in years, aligned with cash_flows.'}, 'years': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Number of projection years n; equal len(cash_flows) when both are supplied.'}, 'method': {'enum': ['bond_price', 'bond_yield', 'duration', 'convexity', 'discount_factor', 'zero_curve', 'forward_rate', 'pv_curve'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'tenors': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Tenors in years, aligned with par_rates or zero_rates.'}, 'frequency': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Coupon payments per year (1=annual, 2=semi-annual).'}, 'par_rates': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Par (coupon) rates per tenor, aligned with tenors (decimal).'}, 'cash_flows': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Projected cash flows in reporting currency, indexed t=1..n.'}, 'zero_rates': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Zero (spot) rates per tenor, decimal, annual compounding.'}, 'coupon_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Annual coupon rate (decimal).'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_loss_making_company
Loss-making and pre-profit company valuation
Loss-making-company engine. Value currently unprofitable companies with margin-ramp DCF, revenue multiples, Merton structural equity, probability-weighted scenarios, the VC method, distressed waterfalls, bank residual income, and SPAC deals, each returning a central value plus a dispersion (sigma, percentiles, long-tail). Use this when earnings-based multiples break down Methods: margin_ramp_dcf: revenue, growth_rate, start_margin, target_margin, ramp_years, discount_rate, years, shares_outstanding, net_debt, range_method; revenue_multiple: revenue, ev_revenue_multiple, net_debt, shares_outstanding, range_method; merton_equity: firm_value, firm_volatility, debt, risk_free, maturity, range_method; scenario: scenarios, range_method; vc_method: terminal_value, target_return, investment, shares_outstanding, range_method; distressed_waterfall: enterprise_value, claims, range_method; bank_residual_income: book_value, net_income, cost_equity, growth_rate, range_method; spac_deal: trust_cash, shares_outstanding, redemption_price, range_method. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'debt': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Debt face value (default point) for the Merton equity model.'}, 'years': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Number of projection years n; equal len(cash_flows) when both are supplied.'}, 'claims': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Ordered claims [{name, amount, priority}] for a waterfall.'}, 'method': {'enum': ['margin_ramp_dcf', 'revenue_multiple', 'merton_equity', 'scenario', 'vc_method', 'distressed_waterfall', 'bank_residual_income', 'spac_deal'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'revenue': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Base-year revenue in reporting currency.'}, 'maturity': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Time to expiry in years (0.5 = six months); > 0.'}, 'net_debt': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Total debt minus cash and equivalents.'}, 'risk_free': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Continuously-compounded risk-free rate (decimal).'}, 'scenarios': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Scenarios [{probability, value}] with probabilities summing to 1.'}, 'book_value': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Book value of equity in reporting currency.'}, 'firm_value': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Firm/asset value for the Merton equity model.'}, 'investment': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Amount invested (VC method).'}, 'net_income': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Net income in reporting currency.'}, 'ramp_years': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Years to move from start_margin to target_margin (>=1).'}, 'trust_cash': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'SPAC trust cash available for redemption.'}, 'cost_equity': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Cost of equity as a decimal (0.12 = 12%).'}, 'growth_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Periodic growth rate as a decimal (0.03 = 3%).'}, 'range_method': {'anyOf': [{'enum': ['central', 'mean', 'median', 'downside', 'upside'], 'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Statistic returned as the headline value; the full dispersion is always included.'}, 'start_margin': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Opening operating margin (decimal, may be negative); margin_ramp.'}, 'discount_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Discount rate as a decimal (0.10 = 10%); pre-tax when method=viu_pre_tax.'}, 'target_margin': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Normalized margin reached after ramp_years; margin_ramp.'}, 'target_return': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'VC target return multiple.'}, 'terminal_value': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Exit/terminal value (VC method).'}, 'firm_volatility': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Asset volatility for the Merton equity model (decimal).'}, 'enterprise_value': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Enterprise value distributed across claims.'}, 'redemption_price': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'SPAC redemption price per share.'}, 'shares_outstanding': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Shares outstanding.'}, 'ev_revenue_multiple': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'EV/Revenue multiple.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_market_multiple
Market multiples and comparable pricing
Market-multiple engine. Apply peer multiples (P/E, P/B, EV/EBITDA, EV/Sales, PEG and more) or derive implied multiples to price a company on a comparable basis. Use this for market-approach pricing where peers exist; for intrinsic value use calculate_dcf Methods: ev_revenue: revenue, ev_revenue_multiple; ev_ebitda: ebitda, ev_ebitda_multiple; ev_arr: arr, ev_arr_multiple; ev_gmv: gmv, ev_gmv_multiple; pe: eps, pe_multiple; pb: book_value_per_share, pb_multiple; ps: sales_per_share, ps_multiple; cap_rate: net_operating_income, cap_rate; regression: intercept, growth_rate, growth_coefficient, market_maturity, maturity_coefficient; royalty_cap: revenue, royalty_rate, discount_rate; ddm: dividend_per_share, cost_equity, growth_rate. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'arr': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Annual recurring revenue in reporting currency.'}, 'eps': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Earnings per share.'}, 'gmv': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Gross merchandise value in reporting currency.'}, 'ebitda': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'EBITDA in reporting currency.'}, 'method': {'enum': ['ev_revenue', 'ev_ebitda', 'ev_arr', 'ev_gmv', 'pe', 'pb', 'ps', 'cap_rate', 'regression', 'royalty_cap', 'ddm'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'revenue': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Base-year revenue in reporting currency.'}, 'cap_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Capitalisation rate as a decimal (0.06 = 6%).'}, 'intercept': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Regression intercept (base multiple).'}, 'cost_equity': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Cost of equity as a decimal (0.12 = 12%).'}, 'growth_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Periodic growth rate as a decimal (0.03 = 3%).'}, 'pb_multiple': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Price/Book multiple.'}, 'pe_multiple': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Price/Earnings multiple.'}, 'ps_multiple': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Price/Sales multiple.'}, 'royalty_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Royalty rate as a decimal (0.05 = 5% of revenue).'}, 'discount_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Discount rate as a decimal (0.10 = 10%); pre-tax when method=viu_pre_tax.'}, 'ev_arr_multiple': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'EV/ARR multiple.'}, 'ev_gmv_multiple': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'EV/GMV multiple.'}, 'market_maturity': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Market maturity indicator.'}, 'sales_per_share': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Sales per share.'}, 'dividend_per_share': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Dividend per share in reporting currency.'}, 'ev_ebitda_multiple': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'EV/EBITDA multiple.'}, 'growth_coefficient': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Regression slope on growth.'}, 'ev_revenue_multiple': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'EV/Revenue multiple.'}, 'book_value_per_share': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Book value per share.'}, 'maturity_coefficient': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Regression slope on market maturity.'}, 'net_operating_income': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Stabilised net operating income in reporting currency.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_option
Option and warrant pricing
Option-pricing engine. Price European and American options and warrants (Black-Scholes, Black-76, CRR binomial, Garman-Kohlhagen FX, digital, range, share-based) and their greeks. Use this for contingent claims and option-based valuations; for equity-linked note structures use calculate_structured_product Methods: black_scholes: spot, strike, maturity, risk_free, volatility, option_type; black76: forward, strike, maturity, risk_free, volatility, option_type; binomial_american: spot, strike, maturity, risk_free, volatility, option_type, steps; garman_kohlhagen: spot, strike, maturity, domestic_rate, foreign_rate, volatility, option_type; barrier_first_passage: spot, strike, maturity, risk_free, volatility, option_type, barrier, barrier_type; asian_average: spot, strike, maturity, risk_free, volatility, option_type, average_type; digital: spot, strike, maturity, risk_free, volatility, cash_payout; range: spot, lower_strike, upper_strike, maturity, risk_free, volatility, payout; share_based: share_price, exercise_price, expected_life, volatility, risk_free, dividend_yield. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'spot': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Spot price of the underlying (or FX rate for garman_kohlhagen).'}, 'steps': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Lattice steps for binomial_american (>=50).'}, 'method': {'enum': ['black_scholes', 'black76', 'binomial_american', 'garman_kohlhagen', 'barrier_first_passage', 'asian_average', 'digital', 'range', 'share_based'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'payout': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Fixed payout when the range condition is met.'}, 'strike': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Strike or exercise price in the same currency as spot.'}, 'barrier': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Knock level for barrier_first_passage.'}, 'forward': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Forward/futures price of the underlying.'}, 'maturity': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Time to expiry in years (0.5 = six months); > 0.'}, 'risk_free': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Continuously-compounded risk-free rate (decimal).'}, 'volatility': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Annualized volatility (decimal, 0.30 = 30%); > 0.'}, 'cash_payout': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Fixed cash amount paid when the digital condition is met.'}, 'option_type': {'anyOf': [{'enum': ['call', 'put'], 'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Option right.'}, 'share_price': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Grant-date share price (IFRS 2).'}, 'average_type': {'anyOf': [{'enum': ['arithmetic', 'geometric'], 'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Averaging convention.'}, 'barrier_type': {'anyOf': [{'enum': ['knock_in', 'knock_out'], 'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Barrier direction.'}, 'foreign_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Foreign continuously-compounded rate (decimal).'}, 'lower_strike': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Lower strike of the range.'}, 'upper_strike': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Upper strike of the range.'}, 'domestic_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Domestic continuously-compounded rate (decimal).'}, 'expected_life': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Expected life of the award in years (IFRS 2).'}, 'dividend_yield': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Continuous dividend yield (decimal).'}, 'exercise_price': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Exercise price of the award (IFRS 2).'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_report_review
Valuation report review and standards audit
Report-review engine. Audit a valuation document against an IVS 2025 and IFRS/HKFRS checklist: methodology, assumptions, discount rate, standards basis, fair-value conclusion, valuation date, and fair-value hierarchy, each mapped to the governing standard. Macro-enabled files are refused Methods: audit: file_path; draft: report_type. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'method': {'enum': ['audit', 'draft'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'file_path': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Path to the report (.xlsx/.xls/.pdf/.docx/image).'}, 'report_type': {'anyOf': [{'enum': ['dcf', 'market', 'credit', 'report_review'], 'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Valuation report type to draft a structure for.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_residual
IFRS measurement, residual income and non-financial fair value
IFRS/HKFRS measurement engine. Compute goodwill and purchase-price allocation, impairment (IAS 36), inventory net realisable value, held-for-sale, debt waterfalls, cap tables, sum-of-the-parts and SPAC redemption; residual income and justified price-to-book; and non-financial asset fair value: investment property (IAS 40 / HKAS 40), PP&E revaluation via depreciated replacement cost (IAS 16) and biological assets at fair value less costs to sell (IAS 41). Use this for accounting-basis measurement of assets and equity; for going-concern cash flow use calculate_dcf and for peer multiples use calculate_market_multiple. Methods: goodwill: purchase_price, fair_value_net_identifiable_assets; ppa: purchase_price, tangible_assets_fv, identified_intangibles_fv; impairment_fvlcd: carrying_value, fair_value_less_costs_to_dispose; impairment_viu: carrying_value, value_in_use; inventory_nrv: carrying_value, net_realisable_value; held_for_sale: carrying_value, fair_value_less_costs_to_sell; debt_waterfall/cap_table: enterprise_value, claims; sotp: segments, net_debt, holding_discount; spac_redemption: trust_cash, shares_outstanding, redemption_price; investment_property: noi, cap_rate; ppe_revaluation: replacement_cost, accumulated_depreciation; biological_asset: expected_price, quantity, costs_to_sell; residual_income: book_value, net_income, cost_equity; justified_pb: roe, cost_equity, growth_rate. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'noi': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Net operating income of the property (IAS 40).'}, 'roe': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Return on equity (decimal).'}, 'claims': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Ordered claims [{name, amount, priority}] for a waterfall.'}, 'method': {'enum': ['goodwill', 'ppa', 'impairment_fvlcd', 'impairment_viu', 'inventory_nrv', 'held_for_sale', 'debt_waterfall', 'cap_table', 'sotp', 'spac_redemption', 'investment_property', 'ppe_revaluation', 'biological_asset', 'residual_income', 'justified_pb'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'cap_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Capitalisation rate as a decimal (0.06 = 6%).'}, 'net_debt': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Total debt minus cash and equivalents.'}, 'quantity': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Number of units (biological assets).'}, 'segments': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Segments [{name, value}] for a sum-of-the-parts.'}, 'book_value': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Book value of equity in reporting currency.'}, 'net_income': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Net income in reporting currency.'}, 'trust_cash': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'SPAC trust cash available for redemption.'}, 'cost_equity': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Cost of equity as a decimal (0.12 = 12%).'}, 'growth_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Periodic growth rate as a decimal (0.03 = 3%).'}, 'value_in_use': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Value in use in reporting currency.'}, 'costs_to_sell': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Incremental costs to sell / dispose (IAS 41).'}, 'carrying_value': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Carrying amount before the test.'}, 'expected_price': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Expected market price per biological-asset unit (IAS 41).'}, 'purchase_price': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Consideration transferred in reporting currency.'}, 'enterprise_value': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Enterprise value distributed across claims.'}, 'holding_discount': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Holding-company discount as a decimal.'}, 'redemption_price': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'SPAC redemption price per share.'}, 'replacement_cost': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Depreciated-replacement-cost gross value of PP&E (IAS 16).'}, 'shares_outstanding': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Shares outstanding.'}, 'tangible_assets_fv': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Fair value of tangible assets.'}, 'net_realisable_value': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Estimated NRV in reporting currency.'}, 'accumulated_depreciation': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Accumulated depreciation to deduct (IAS 16).'}, 'identified_intangibles_fv': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Fair value of separately identified intangibles.'}, 'fair_value_less_costs_to_sell': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'FV less costs to sell in reporting currency.'}, 'fair_value_less_costs_to_dispose': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'FVLCD in reporting currency.'}, 'fair_value_net_identifiable_assets': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Fair value of net identifiable assets.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_sector_metrics
Sector-specific operating metrics
Sector-metric engine. Compute the metrics that anchor valuation in specific industries: SaaS (ARR, NRR, magic number, Rule of 40), marketplaces (take rate, GMV multiple), lending (LTV/CAC), and crypto (NVT, Metcalfe). Use these as inputs to a multiple or DCF Methods: ltv: arpu, gross_margin, churn_rate; cac: sales_marketing_expense, new_customers; arr: subscription_values; nrr: starting_revenue, ending_revenue, expansion_revenue; magic_number: net_new_arr, sales_marketing_expense_prior; rule_of_40: growth_rate, profit_margin; take_rate: revenue, gmv; gmv_multiple: gmv, ev_gmv_multiple; retention: retained_customers, starting_customers; trl: market_size, market_share, margin, exit_multiple, trl_discount; break_even: fixed_costs, asp, variable_cost; gross_margin: asp, variable_cost; token: transaction_volume, price_per_tx, velocity, supply; nvt: market_cap, transaction_volume; metcalfe: n, coefficient. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'n': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Node/participant count n (>=0).'}, 'asp': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Average selling price per unit.'}, 'gmv': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Gross merchandise value in reporting currency.'}, 'arpu': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Average revenue per user per period.'}, 'margin': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Operating margin as a decimal.'}, 'method': {'enum': ['ltv', 'cac', 'arr', 'nrr', 'magic_number', 'rule_of_40', 'take_rate', 'gmv_multiple', 'retention', 'trl', 'break_even', 'gross_margin', 'token', 'nvt', 'metcalfe'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'supply': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Token supply.'}, 'revenue': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Base-year revenue in reporting currency.'}, 'velocity': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Token velocity.'}, 'churn_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Periodic churn rate as a decimal.'}, 'market_cap': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Market capitalisation.'}, 'coefficient': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Scaling coefficient (Metcalfe).'}, 'fixed_costs': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Period fixed costs.'}, 'growth_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Periodic growth rate as a decimal (0.03 = 3%).'}, 'market_size': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Total addressable market in reporting currency.'}, 'net_new_arr': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Net new ARR in the period.'}, 'gross_margin': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Gross margin as a decimal (0.80 = 80%).'}, 'market_share': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Achievable market share as a decimal.'}, 'price_per_tx': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Value per transaction.'}, 'trl_discount': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Technology-readiness risk discount as a decimal.'}, 'exit_multiple': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Exit multiple on the final flow, e.g. 8.0 for 8x.'}, 'new_customers': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Customers acquired in the period.'}, 'profit_margin': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Profit margin as a decimal.'}, 'variable_cost': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Variable cost per unit.'}, 'ending_revenue': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Revenue from the cohort at period end.'}, 'ev_gmv_multiple': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'EV/GMV multiple.'}, 'starting_revenue': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Revenue from the cohort at period start.'}, 'expansion_revenue': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Expansion revenue from the cohort.'}, 'retained_customers': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Customers retained at period end.'}, 'starting_customers': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Customers at period start.'}, 'transaction_volume': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Transaction volume for the period.'}, 'subscription_values': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Subscription revenue per customer.'}, 'sales_marketing_expense': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Sales and marketing spend for the period.'}, 'sales_marketing_expense_prior': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Prior-period sales and marketing spend.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
calculate_structured_product
Structured product and derivative pricing
Structured-product engine. Value HKEX-listed and OTC structures: CBBCs, derivative and inline warrants, equity-linked notes and investments, autocallables, accumulators and decumulators, credit-linked notes, TRS, and CFDs. Use this for equity-linked and credit-linked payoff structures; for a plain option or warrant use calculate_option. Methods: cbbc: notional, spot, strike, barrier, barrier_type, maturity, risk_free, volatility, option_type; cbbc_residual: notional, spot, call_price, entitlement, barrier, barrier_type, maturity, risk_free, volatility, option_type; derivative_warrant: notional, spot, strike, maturity, risk_free, volatility, average_type, option_type; inline_warrant: notional, spot, lower_strike, upper_strike, maturity, risk_free, volatility, payout; inline_warrant_avg: notional, spot, lower_strike, upper_strike, maturity, risk_free, volatility, payout, fixing_days; eli/eln: notional, spot, strike, maturity, risk_free, volatility, coupon_rate; autocallable: notional, spot, knock_out_level, observation_dates, coupon_rate_structured, maturity, risk_free, volatility; credit_linked_note: notional, credit_spread, recovery, maturity, risk_free, coupon_rate_structured; accumulator/decumulator: notional, spot, strike, knock_out_level, observation_dates, risk_free, volatility; trs: notional, spot, maturity, risk_free, dividend_yield; cfd: notional, spot, strike, maturity, risk_free. Read-only and deterministic: it performs no network I/O (except calculate_company_summary's ticker fetch), mutates no state, and returns the same result for the same inputs. Each method requires its exact inputs (no defaults), so a missing input, an unknown method, or an extra field returns an error envelope (code INVALID_ARGUMENT) instead of raising. The result envelope carries status, method, value, assumptions, formula_ref, data_timestamp, steps and error.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', 'required': ['method'], 'properties': {'spot': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Spot price of the underlying (or FX rate for garman_kohlhagen).'}, 'method': {'enum': ['cbbc', 'cbbc_residual', 'derivative_warrant', 'inline_warrant', 'inline_warrant_avg', 'eli', 'eln', 'autocallable', 'credit_linked_note', 'accumulator', 'decumulator', 'trs', 'cfd'], 'type': 'string', 'description': 'Formula to apply; each value lists its own required inputs in the description.'}, 'payout': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Fixed payout when the range condition is met.'}, 'strike': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Strike or exercise price in the same currency as spot.'}, 'barrier': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Knock level for barrier_first_passage.'}, 'maturity': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Time to expiry in years (0.5 = six months); > 0.'}, 'notional': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Contract notional/face amount in reporting currency.'}, 'recovery': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Recovery rate in [0,1].'}, 'risk_free': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Continuously-compounded risk-free rate (decimal).'}, 'call_price': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'CBBC call price (mandatory-call trigger level).'}, 'volatility': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Annualized volatility (decimal, 0.30 = 30%); > 0.'}, 'coupon_rate': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Annual coupon rate (decimal).'}, 'entitlement': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'CBBC entitlement: units of underlying per contract.'}, 'fixing_days': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Number of closing fixings averaged for settlement (>=1).'}, 'option_type': {'anyOf': [{'enum': ['call', 'put'], 'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Option right.'}, 'average_type': {'anyOf': [{'enum': ['arithmetic', 'geometric'], 'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Averaging convention.'}, 'barrier_type': {'anyOf': [{'enum': ['knock_in', 'knock_out'], 'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Barrier direction.'}, 'lower_strike': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Lower strike of the range.'}, 'upper_strike': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Upper strike of the range.'}, 'credit_spread': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Credit spread over the risk-free rate (decimal).'}, 'dividend_yield': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Continuous dividend yield (decimal).'}, 'knock_out_level': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Knock-out level for autocallables and accumulators.'}, 'observation_dates': {'anyOf': [{'type': 'array', 'items': {}}, {'type': 'null'}], 'default': None, 'description': 'Observation dates in years for path-dependent products.'}, 'coupon_rate_structured': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Conditional coupon rate (decimal).'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'required': ['status'], 'properties': {'error': {'type': ['object', 'null'], 'properties': {'code': {'type': 'string', 'description': 'Stable machine-readable error code.'}, 'message': {'type': 'string', 'description': 'Human-readable error message.'}}, 'description': "Error detail, present only when status='error'."}, 'steps': {'type': ['array', 'null'], 'description': 'Ordered computation steps, when the method reports them.'}, 'value': {'description': 'Primary result: a number for scalar methods, an object for valuation methods.'}, 'method': {'type': ['string', 'null'], 'description': 'Method or tool name that produced the result.'}, 'status': {'enum': ['ok', 'error'], 'type': 'string', 'description': "'ok' on success, 'error' on failure."}, 'ticker': {'type': ['string', 'null'], 'description': 'Ticker the result pertains to, when applicable.'}, 'assumptions': {'type': ['object', 'null'], 'description': 'Inputs and assumptions used, echoed for traceability.'}, 'formula_ref': {'type': ['string', 'null'], 'description': 'Formula or standards reference for the method.'}, 'data_timestamp': {'type': ['string', 'null'], 'description': 'ISO-8601 UTC timestamp of the underlying data, when fetched.'}}, 'description': 'Shared result envelope returned by every tool.'}
Añadido
calculate_structured_product
4 de October de 2026 a las 02:40
Añadido
calculate_sector_metrics
4 de October de 2026 a las 02:40
Añadido
calculate_residual
4 de October de 2026 a las 02:40
Añadido
calculate_report_review
4 de October de 2026 a las 02:40
Añadido
calculate_option
4 de October de 2026 a las 02:40
Añadido
calculate_market_multiple
4 de October de 2026 a las 02:40
Añadido
calculate_loss_making_company
4 de October de 2026 a las 02:40
Añadido
calculate_fixed_income
4 de October de 2026 a las 02:40
Añadido
calculate_fair_value_adjustment
4 de October de 2026 a las 02:40
Añadido
calculate_expected_value
4 de October de 2026 a las 02:40
Añadido
calculate_discount_rate
4 de October de 2026 a las 02:40
Añadido
calculate_dcf
4 de October de 2026 a las 02:40
Añadido
calculate_credit_loss
4 de October de 2026 a las 02:40
Añadido
calculate_convertible_bond
4 de October de 2026 a las 02:40
Añadido
calculate_company_summary
4 de October de 2026 a las 02:40
Añadido
calculate_actuarial_pv
4 de October de 2026 a las 02:40