Quantlib Index
Function index for the read-only quantlib_call tool. Load this skill before using quantlib_call so list and describe discovery rounds are unnecessary.
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install vibe-trading-quantlib-indexManual setup by platform
Claude Code
~/.claude/skills/vibe-trading-quantlib-index/SKILL.md
Instructions
quantlib_call function index
Use quantlib_call(action="call", module="...", function="...", kwargs={...}) with a short module name below. The tool is pure computation and does not fetch network data or write files. Use action="describe" only when the function signature or docstring is missing from this index. action="list" is a fallback for a module added after this skill was published.
attribution
BrinsonResult(sectors: 'tuple[SectorEffect, ...]', portfolio_return: 'float', benchmark_return: 'float', active_return: 'float', allocation: 'float', selection: 'float', interaction: 'float') -> None— Single-period attribution for a whole portfolio.LinkedAttribution(sectors: 'tuple[LinkedSectorEffect, ...]', portfolio_return: 'float', benchmark_return: 'float', active_return: 'float', allocation: 'float', selection: 'float', interaction: 'float', scaling_factors: 'tuple[float, ...]') -> None— Multi-period attribution produced by Carino linking.LinkedSectorEffect(sector: 'str', allocation: 'float', selection: 'float', interaction: 'float') -> None— One sector's Carino-linked effects across every period.SectorEffect(sector: 'str', portfolio_weight: 'float', benchmark_weight: 'float', portfolio_return: 'float', benchmark_return: 'float', allocation: 'float', selection: 'float', interaction: 'float') -> None— One sector's single-period Brinson-Fachler decomposition.brinson_fachler(portfolio_weights: 'Mapping[str, float]', benchmark_weights: 'Mapping[str, float]', portfolio_returns: 'Mapping[str, float]', benchmark_returns: 'Mapping[str, float]', weight_sum_tolerance: 'float' = 1e-09) -> 'BrinsonResult'— Decompose one period's active return into allocation, selection and interaction.carino_factor(portfolio_return: 'float', benchmark_return: 'float') -> 'float'— Return the Carino logarithmic scaling factor for one return pair.carino_link(periods: 'Sequence[BrinsonResult]') -> 'LinkedAttribution'— Link single-period Brinson results into a residual-free multi-period attribution.
combination
combine_factors(panels: 'Mapping[str, pd.DataFrame]', returns: 'pd.DataFrame | None' = None, *, method: 'str' = 'equal', weights: 'Mapping[str, float] | pd.DataFrame | None' = None, window: 'int | None' = None, rebalance: 'int' = 1, standardize: 'bool' = True, min_assets: 'int' = 5, min_periods: 'int' = 20, insufficient: 'str' = 'skip') -> 'CombinationResult'— Combine factor panels into one composite score.
copula
clayton_copula_cdf(u: 'float | np.ndarray', v: 'float | np.ndarray', theta: 'float') -> 'float | np.ndarray'— Evaluate bivariate Clayton copula CDF: C(u, v) = (u^{-theta} + v^{-theta} - 1)^{-1/theta}.clayton_tail_dependence(theta: 'float') -> 'dict[str, float]'— Calculate upper and lower tail dependence coefficients for Clayton copula.fit_copula_from_tau(tau: 'float', family: "Literal['clayton', 'gumbel', 'gaussian']") -> 'dict[str, float]'— Calibrate copula parameter from Kendall's rank correlation tau.frank_copula_cdf(u: 'float | np.ndarray', v: 'float | np.ndarray', theta: 'float') -> 'float | np.ndarray'— Evaluate bivariate Frank copula CDF: C(u, v) = -1/theta * ln(1 + (exp(-thetau) - 1)(exp(-theta*v) - 1)/(exp(-theta) - 1)).gaussian_copula_cdf(u: 'float', v: 'float', rho: 'float') -> 'float'— Evaluate bivariate Gaussian copula CDF.gumbel_copula_cdf(u: 'float | np.ndarray', v: 'float | np.ndarray', theta: 'float') -> 'float | np.ndarray'— Evaluate bivariate Gumbel copula CDF: C(u, v) = exp(-((-ln u)^theta + (-ln v)^theta)^{1/theta}).gumbel_tail_dependence(theta: 'float') -> 'dict[str, float]'— Calculate upper and lower tail dependence coefficients for Gumbel copula.pseudo_observations(data: 'np.ndarray') -> 'np.ndarray'— Transform empirical data to uniform [0, 1] pseudo-observations via rank transformation.
credit
AltmanModelSpec(coefficients: 'tuple[float, float, float, float, float]', safe_threshold: 'float', distress_threshold: 'float', uses_x5: 'bool', equity_basis: 'str') -> None— Coefficients and cut-offs of one Altman Z-Score variant.AltmanZScore(z_score: 'float', model: 'str', zone: 'str', label_zh: 'str', components: 'Mapping[str, float | None]', safe_threshold: 'float', distress_threshold: 'float') -> None— Outcome of an Altman Z-Score evaluation.MertonResult(asset_value: 'float', asset_vol: 'float', d1: 'float', d2: 'float', distance_to_default: 'float', default_probability: 'float', debt_value: 'float', credit_spread: 'float') -> None— Solved Merton structural model for one issuer.altman_z_score(*, working_capital: 'float', retained_earnings: 'float', ebit: 'float', equity_value: 'float', total_liabilities: 'float', total_assets: 'float', revenue: 'float | None' = None, model: 'str' = 'original') -> 'AltmanZScore'— Score a firm's distress risk with one of the three Altman variants.cds_price(spread_bps: 'float', recovery_rate: 'float' = 0.4, tenor_years: 'float' = 5.0, risk_free_rate: 'float' = 0.03, coupon_bps: 'float' = 100.0, notional: 'float' = 10000000.0, payment_frequency: 'int' = 4) -> 'dict'— Flat-hazard single-name Credit Default Swap (CDS) valuation engine.credit_spread_analysis(bond_yields: 'pd.Series', risk_free_yields: 'pd.Series', window: 'int' = 252, lookback_periods: 'int' = 21, signal_z: 'float' = 1.5, input_unit: 'str' = 'percent') -> 'pd.DataFrame'— Time-series view of an issuer's spread: level, z-score and percentile.credit_spread_dv01(spread_duration: 'float', price: 'float' = 100.0, face: 'float' = 100.0, par_amount: 'float' = 1000000.0) -> 'float'— Calculate Credit Spread DV01 (CS01 / Spread DV01) - dollar value of a 1 bp widening in credit spread.distance_to_default(asset_value: 'float', asset_vol: 'float', default_point: 'float', horizon: 'float', drift: 'float' = 0.0) -> 'float'— Merton distance to default, in standard deviations of log asset value.edf_reference_band(dd: 'float') -> 'tuple[float, float]'— Look up the indicative EDF range for a distance to default.expected_loss(ead: 'float', pd: 'float', lgd: 'float') -> 'float'— Compute regulatory Expected Loss (EL = EAD * PD * LGD).hazard_rate_to_survival_probability(hazard_rate: 'float', tenor_years: 'float') -> 'float'— Convert a constant hazard rate lambda to cumulative survival probability Q(T) = exp(-lambda * T).kmv_default_point(short_term_debt: 'float', long_term_debt: 'float', long_term_weight: 'float' = 0.5) -> 'float'— KMV default point: all short-term debt plus part of the long-term book.kmv_distance_to_default(asset_value: 'float', asset_vol: 'float', default_point: 'float') -> 'float'— KMV's linear distance to default,(V - DP) / (V * sigma_V).merton_asset_solve(equity_value: 'float', equity_vol: 'float', debt_face: 'float', risk_free: 'float', horizon: 'float', tolerance: 'float' = 1e-08) -> 'tuple[float, float]'— Back out asset value and asset volatility from observable equity.merton_model(equity_value: 'float', equity_vol: 'float', debt_face: 'float', risk_free: 'float', horizon: 'float', asset_drift: 'float | None' = None) -> 'MertonResult'— Estimate default probability and credit spread from equity market data.spread_term_structure(issuers: 'Mapping[str, Mapping[float, float]]', risk_free_curve: 'Mapping[float, float] | pd.Series', input_unit: 'str' = 'decimal', decimals: 'int | None' = 1) -> 'pd.DataFrame'— Cross-sectional spread grid: one row per issuer, one column per tenor.survival_probability_to_hazard_rate(survival_prob: 'float', tenor_years: 'float') -> 'float'— Convert a survival probability Q(T) to implied constant hazard rate lambda = -ln(Q(T)) / T.vasicek_credit_var(ead: 'float', pd: 'float', lgd: 'float', asset_correlation: 'float', confidence: 'float' = 0.999) -> 'dict'— Vasicek single-factor asymptotic credit risk portfolio model (Basel II/III capital framework).
crossvalidation
LeakageReport(overlapping: 'np.ndarray', shared: 'np.ndarray', embargo_violations: 'np.ndarray', clean: 'bool') -> None— Result of auditing a split for contamination.Split(train: 'np.ndarray', test: 'np.ndarray', purged: 'int', embargoed: 'int', test_bounds: 'tuple[int, int]') -> None— One train/test partition of the sample.combinatorial_purged_splits(n_samples: 'int', label_end_times: 'pd.Series | Sequence[int] | np.ndarray | None' = None, n_groups: 'int' = 6, n_test_groups: 'int' = 2, embargo_fraction: 'float' = 0.01) -> 'Iterator[Split]'— Every combination ofn_test_groupsblocks held out at once.detect_boundary_leakage(split: 'Split', label_end_times: 'pd.Series | Sequence[int] | np.ndarray | None' = None, n_samples: 'int | None' = None, embargo_size: 'int' = 0) -> 'LeakageReport'— Audit a split for the three ways training can see the test period.group_purged_kfold_splits(groups: 'Sequence[object] | pd.Series | np.ndarray', n_folds: 'int' = 5, embargo_fraction: 'float' = 0.01, *, label_end_times: 'pd.Series | Sequence[int] | np.ndarray | None' = None) -> 'Iterator[Split]'— Purged and embargoed K-fold cross-validation for panel and multi-asset datasets.purged_kfold_splits(n_samples: 'int', label_end_times: 'pd.Series | Sequence[int] | np.ndarray | None' = None, n_folds: 'int' = 5, embargo_fraction: 'float' = 0.01) -> 'Iterator[Split]'— K contiguous test blocks, each with training purged and embargoed.purged_walk_forward_splits(n_samples: 'int', label_end_times: 'pd.Series | Sequence[int] | np.ndarray | None' = None, n_folds: 'int' = 5, embargo_fraction: 'float' = 0.01, expanding: 'bool' = True) -> 'Iterator[Split]'— Walk-forward splits that only ever train on the past.
eventstudy
EventOutcome(symbol: 'str', event_date: 'object', abnormal_returns: 'pd.Series', car: 'float', car_std_error: 'float', standardised_car: 'float', fit: 'MarketModelFit') -> None— One event's abnormal returns and cumulative reaction.EventStudyResult(event_window: 'tuple[int, int]', events: 'tuple[EventOutcome, ...]', dropped: 'tuple[tuple[str, object, str], ...]', aar: 'pd.Series', caar: 'pd.Series', caar_total: 'float', t_statistic: 'float', t_p_value: 'float', patell_z: 'float', patell_p_value: 'float', bmp_z: 'float', bmp_p_value: 'float', shared_event_dates: 'tuple[object, ...]', corrado_rank_z: 'float', corrado_rank_p_value: 'float', cowan_sign_z: 'float', cowan_sign_p_value: 'float', positive_car_fraction: 'float') -> None— Aggregate reaction across every event that could be measured.MarketModelFit(alpha: 'float', beta: 'float', residual_std: 'float', observations: 'int', market_mean: 'float', market_sum_squares: 'float', model: 'str') -> None— Normal-return model fitted on one asset's estimation window.estimate_market_model(asset_returns: 'pd.Series | np.ndarray | Sequence[float]', market_returns: 'pd.Series | np.ndarray | Sequence[float]', model: 'str' = 'market') -> 'MarketModelFit'— Fit a normal-return model on an estimation window.event_study(returns: 'pd.DataFrame', market_returns: 'pd.Series', events: 'Sequence[tuple[str, object]]', event_window: 'tuple[int, int]' = (-5, 5), estimation_window: 'int' = 120, estimation_gap: 'int' = 10, model: 'str' = 'market') -> 'EventStudyResult'— Measure the abnormal return around a set of dated events.
factormodel
FactorICResult(ic_mean: 'float', ic_std: 'float', ic_ir: 'float', ic_t_stat: 'float', ic_p_value: 'float', ic_skewness: 'float', ic_kurtosis: 'float', positive_ic_fraction: 'float', n_periods: 'int', ic_series: 'pd.Series') -> None— Summary of cross-sectional Information Coefficient (IC) time-series dynamics.FactorReturnFit(date: 'object', factor_returns: 'pd.Series', t_statistics: 'pd.Series', residuals: 'pd.Series', r_squared: 'float', observations: 'int') -> None— One date's cross-sectional regression of returns on exposures.FactorRiskDecomposition(total_variance: 'float', total_volatility: 'float', factor_variance: 'float', factor_volatility: 'float', specific_variance: 'float', specific_volatility: 'float', factor_variance_fraction: 'float', specific_variance_fraction: 'float', portfolio_exposures: 'pd.Series', factor_marginal_contributions: 'pd.Series', factor_risk_contributions: 'pd.Series', factor_pcr: 'pd.Series', asset_marginal_contributions: 'pd.Series', asset_risk_contributions: 'pd.Series', asset_pcr: 'pd.Series', specific_risk_contributions: 'pd.Series', specific_pcr: 'pd.Series', unmatched_weight: 'float' = 0.0) -> None— Portfolio risk decomposition into factor and asset-specific components.StyleDrift(mean_exposure: 'pd.Series', std_exposure: 'pd.Series', first_exposure: 'pd.Series', last_exposure: 'pd.Series', total_change: 'pd.Series', max_abs_change: 'pd.Series') -> None— How much a portfolio's exposures moved over the observed history.build_style_exposures(characteristics: 'pd.DataFrame', market_caps: 'pd.Series | None' = None, definitions: 'Mapping[str, Mapping[str, int]]' = {'size': {'log_market_cap': -1}, 'value': {'book_to_price': 1, 'earnings_to_price': 1}, 'growth': {'sales_growth': 1, 'earnings_growth': 1}, 'momentum': {'return_12m_ex_1m': 1}, 'quality': {'return_on_equity': 1, 'gross_profitability': 1}, 'low_volatility': {'realised_volatility': -1}, 'leverage': {'debt_to_equity': 1}, 'liquidity': {'turnover': 1}}, winsorise: 'float' = 0.025) -> 'tuple[pd.DataFrame, dict[str, int]]'— Assemble a style exposure matrix from raw characteristics.cross_sectional_factor_returns(returns: 'pd.Series', exposures: 'pd.DataFrame', market_caps: 'pd.Series | None' = None, date: 'object' = None) -> 'FactorReturnFit'— Regress one date's asset returns on their exposures.factor_ic_analysis(factor_panel: 'pd.DataFrame', forward_returns: 'pd.DataFrame', method: 'str' = 'spearman', min_cross_section: 'int' = 10) -> 'FactorICResult'— Evaluate cross-sectional Information Coefficient (IC) time-series dynamics.factor_return_attribution(portfolio_exposures: 'pd.Series', factor_returns: 'pd.Series', portfolio_return: 'float') -> 'pd.Series'— Split a portfolio return into factor contributions plus a specific residual.factor_risk_decomposition(portfolio_weights: 'pd.Series | Mapping[str, float]', exposures: 'pd.DataFrame', factor_cov: 'pd.DataFrame', specific_variances: 'pd.Series | Mapping[str, float] | None' = None) -> 'FactorRiskDecomposition'— Decompose portfolio risk into systematic factor and idiosyncratic components.portfolio_style_exposure(holdings: 'pd.Series', exposures: 'pd.DataFrame', benchmark: 'pd.Series | None' = None) -> 'pd.Series'— Aggregate asset exposures into a portfolio exposure.standardise_exposures(values: 'pd.Series', market_caps: 'pd.Series | None' = None, winsorise: 'float' = 0.025) -> 'pd.Series'— Turn a raw characteristic into a cross-sectional exposure.style_drift(exposure_history: 'pd.DataFrame') -> 'StyleDrift'— Summarise how a portfolio's exposures moved over time.
fixedincome
CurveFit(model: 'str', params: 'tuple[float, ...]', rmse: 'float' = nan) -> None— Result of :func:fit_yield_curve; call it to evaluate the fitted curve.accrued_interest(face: 'float', coupon_rate: 'float', freq: 'int', last_coupon: '_dt.date', settlement: '_dt.date', next_coupon: '_dt.date', day_count: 'str' = 'ACT/365F') -> 'float'— Interest earned by the seller between the last coupon and settlement.bond_cashflows(face: 'float', coupon_rate: 'float', n_periods: 'int', freq: 'int' = 1) -> 'tuple[np.ndarray, np.ndarray]'— Coupon schedule of a bullet bond, in periods and amounts.bond_price(face: 'float', coupon_rate: 'float', ytm: 'float', n_periods: 'int', freq: 'int' = 1, compounding: 'str' = 'discrete') -> 'float'— Present value of a bullet bond settling on a coupon date.convexity(face: 'float', coupon_rate: 'float', ytm: 'float', n_periods: 'int', freq: 'int' = 1, compounding: 'str' = 'discrete') -> 'float'— Second-order price sensitivity to yield,(d2P/dy2)/P.dv01(face: 'float', coupon_rate: 'float', ytm: 'float', n_periods: 'int', freq: 'int' = 1, par_amount: 'float' = 1000000.0, compounding: 'str' = 'discrete') -> 'float'— Cash value of one basis point on a stated par position.effective_duration(reprice: 'Callable[[float], float]', yield_level: 'float', bump: 'float' = 0.0001) -> 'float'— Duration by symmetric repricing, valid for bonds with embedded options.fit_yield_curve(maturities: 'Sequence[float] | np.ndarray', yields: 'Sequence[float] | np.ndarray', model: 'str' = 'svensson', decay_bounds: 'tuple[float, float]' = (0.05, 30.0), grid_points: 'int' = 48) -> 'CurveFit'— Fit a Nelson-Siegel or Svensson curve to observed zero rates.key_rate_duration(face: 'float', coupon_rate: 'float', ytm: 'float', n_periods: 'int', freq: 'int' = 1, key_rates: 'Sequence[float]' = (0.5, 1.0, 2.0, 3.0, 5.0, 7.0, 10.0, 20.0, 30.0), compounding: 'str' = 'discrete') -> 'dict[float, float]'— Decompose bond yield sensitivity into Key Rate Durations (KRD) across benchmark tenors.macaulay_duration(face: 'float', coupon_rate: 'float', ytm: 'float', n_periods: 'int', freq: 'int' = 1, compounding: 'str' = 'discrete') -> 'float'— Present-value-weighted average time to the bond's cash flows.modified_duration(face: 'float', coupon_rate: 'float', ytm: 'float', n_periods: 'int', freq: 'int' = 1, compounding: 'str' = 'discrete') -> 'float'— Semi-elasticity of price to yield,-(dP/dy)/P.nelson_siegel(tau: 'float | Sequence[float] | np.ndarray', beta0: 'float', beta1: 'float', beta2: 'float', lambda1: 'float') -> 'float | np.ndarray'— Compute Nelson-Siegel zero rates for given maturities and parameters.svensson(tau: 'float | Sequence[float] | np.ndarray', beta0: 'float', beta1: 'float', beta2: 'float', beta3: 'float', lambda1: 'float', lambda2: 'float') -> 'float | np.ndarray'— Compute Svensson zero rates for given maturities and parameters.year_fraction(start: '_dt.date', end: '_dt.date', day_count: 'str' = 'ACT/365F') -> 'float'— Accrual factor between two dates under a named day-count convention.ytm_solve(price: 'float', face: 'float', coupon_rate: 'float', n_periods: 'int', freq: 'int' = 1, compounding: 'str' = 'discrete', bracket: 'tuple[float, float]' = (-0.5, 10.0)) -> 'float'— Invert :func:bond_pricefor the yield that reproduces a market price.
fundmath
AmericanWaterfallResult(deals: 'Mapping[str, WaterfallResult]', lp_total: 'float', gp_total: 'float', distributable: 'float') -> None— Deal-by-deal waterfall outcome, aggregated across every investment.ClawbackResult(carry_received: 'float', carry_entitled: 'float', clawback_amount: 'float', tax_adjusted: 'bool', gp_tax_rate: 'float | None') -> None— Outcome of a GP clawback test at fund termination.FundMultiples(paid_in: 'float', distributed: 'float', residual_value: 'float', dpi: 'float', rvpi: 'float', tvpi: 'float', moic: 'float', invested_capital: 'float') -> None— The standard LP reporting multiples, computed from one series.NoSignChangeError(signature unavailable)— Raised when the flows never change sign, so no finite IRR exists.PMEPlusResult(scaling_factor: 'float', irr: 'float') -> None— Outcome of a Kaplan-Schoar PME+ (Rouvinez) benchmark.WaterfallResult(distributable: 'float', contributed_capital: 'float', preferred_amount: 'float', tiers: 'tuple[WaterfallTier, ...]', lp_total: 'float', gp_total: 'float', unreturned_capital: 'float', unpaid_preferred: 'float') -> None— Outcome of a European whole-of-fund distribution waterfall.WaterfallTier(name: 'str', amount: 'float', lp_amount: 'float', gp_amount: 'float') -> None— One tier of a distribution waterfall and how it split.XIRRConvergenceError(signature unavailable)— Raised when the flows do change sign but no root could be verified.XIRRError(signature unavailable)— Base class for every reason an irregular-date IRR has no usable answer.american_waterfall(deals: 'Mapping[str, CashFlowSeries]', *, preferred_rate: 'float', carry_rate: 'float', catch_up_rate: 'float' = 1.0, as_of: 'Mapping[str, _dt.date | _dt.datetime | str] | None' = None, compounding: 'str' = 'compound', days_per_year: 'float' = 365.0, include_residual: 'bool' = False, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription'), distribution_kinds: 'Iterable[str]' = ('distribution', 'dividend', 'redemption', 'proceeds')) -> 'AmericanWaterfallResult'— Run a deal-by-deal (American) waterfall.direct_alpha(series: 'CashFlowSeries', index_levels: 'pd.Series', *, valuations: 'str' = 'terminal', days_per_year: 'float' = 365.0, guess: 'float' = 0.1, rate_bounds: 'tuple[float, float]' = (-0.9999, 1000000.0), grid_points: 'int' = 512, residual_tolerance: 'float' = 1e-10) -> 'float'— Direct Alpha -- an annualized excess return over a public index.distributed_capital(series: 'CashFlowSeries', *, distribution_kinds: 'Iterable[str]' = ('distribution', 'dividend', 'redemption', 'proceeds')) -> 'float'— Total capital returned by the fund, as a positive magnitude.dpi(series: 'CashFlowSeries', *, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription'), distribution_kinds: 'Iterable[str]' = ('distribution', 'dividend', 'redemption', 'proceeds')) -> 'float'— Distributions to paid-in: realised cash returned per unit drawn.european_waterfall(series: 'CashFlowSeries', *, preferred_rate: 'float', carry_rate: 'float', catch_up_rate: 'float' = 1.0, as_of: '_dt.date | _dt.datetime | str | None' = None, compounding: 'str' = 'compound', days_per_year: 'float' = 365.0, include_residual: 'bool' = False, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription'), distribution_kinds: 'Iterable[str]' = ('distribution', 'dividend', 'redemption', 'proceeds')) -> 'WaterfallResult'— Run a European whole-of-fund waterfall over an actual cash-flow series.fund_multiples(series: 'CashFlowSeries', *, invested_capital: 'float | None' = None, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription'), distribution_kinds: 'Iterable[str]' = ('distribution', 'dividend', 'redemption', 'proceeds')) -> 'FundMultiples'— Compute DPI, RVPI, TVPI and MOIC in one pass over a series.gp_clawback(deals: 'Mapping[str, CashFlowSeries]', *, preferred_rate: 'float', carry_rate: 'float', catch_up_rate: 'float' = 1.0, termination_date: '_dt.date | _dt.datetime | str | None' = None, compounding: 'str' = 'compound', days_per_year: 'float' = 365.0, include_unrealized_in_entitlement: 'bool' = False, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription'), distribution_kinds: 'Iterable[str]' = ('distribution', 'dividend', 'redemption', 'proceeds'), gp_tax_rate: 'float | None' = None) -> 'ClawbackResult'— Test whether a deal-by-deal GP owes money back at fund termination.ks_pme(series: 'CashFlowSeries', index_levels: 'pd.Series', *, as_of: '_dt.date | _dt.datetime | str | None' = None, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription'), distribution_kinds: 'Iterable[str]' = ('distribution', 'dividend', 'redemption', 'proceeds')) -> 'float'— Kaplan-Schoar public market equivalent.moic(series: 'CashFlowSeries', *, invested_capital: 'float | None' = None, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription'), distribution_kinds: 'Iterable[str]' = ('distribution', 'dividend', 'redemption', 'proceeds')) -> 'float'— Multiple on invested capital: total value over the capital put to work.npv(series: 'CashFlowSeries', rate: 'float', *, valuations: 'str' = 'terminal', days_per_year: 'float' = 365.0) -> 'float'— Net present value of a dated cash-flow series at a given annual rate.paid_in_capital(series: 'CashFlowSeries', *, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription')) -> 'float'— Total capital drawn into the fund, as a positive magnitude.pme_plus(series: 'CashFlowSeries', index_levels: 'pd.Series', *, as_of: '_dt.date | _dt.datetime | str | None' = None, days_per_year: 'float' = 365.0, guess: 'float' = 0.1, rate_bounds: 'tuple[float, float]' = (-0.9999, 1000000.0), grid_points: 'int' = 512, residual_tolerance: 'float' = 1e-10, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription'), distribution_kinds: 'Iterable[str]' = ('distribution', 'dividend', 'redemption', 'proceeds')) -> 'PMEPlusResult'— Kaplan-Schoar "PME+" (Rouvinez) -- a comparable IRR, not a multiple.preferred_return_amount(series: 'CashFlowSeries', *, rate: 'float', as_of: '_dt.date | _dt.datetime | str | None' = None, compounding: 'str' = 'compound', days_per_year: 'float' = 365.0, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription')) -> 'float'— Preferred return owed to LPs, accrued per contribution from its own date.residual_value(series: 'CashFlowSeries') -> 'float'— Unrealised NAV of the fund at its most recent mark.rvpi(series: 'CashFlowSeries', *, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription')) -> 'float'— Residual value to paid-in: unrealised NAV per unit drawn.tvpi(series: 'CashFlowSeries', *, contribution_kinds: 'Iterable[str]' = ('contribution', 'capital_call', 'subscription'), distribution_kinds: 'Iterable[str]' = ('distribution', 'dividend', 'redemption', 'proceeds')) -> 'float'— Total value to paid-in: realised plus unrealised value per unit drawn.waterfall_split(distributable: 'float', contributed_capital: 'float', preferred_amount: 'float', *, carry_rate: 'float', catch_up_rate: 'float' = 1.0) -> 'WaterfallResult'— Split a distributable amount through the four European waterfall tiers.xirr(series: 'CashFlowSeries', *, valuations: 'str' = 'terminal', days_per_year: 'float' = 365.0, guess: 'float' = 0.1, rate_bounds: 'tuple[float, float]' = (-0.9999, 1000000.0), grid_points: 'int' = 512, residual_tolerance: 'float' = 1e-10) -> 'float'— Money-weighted return of an irregularly dated cash-flow series.xirr_all(series: 'CashFlowSeries', *, valuations: 'str' = 'terminal', days_per_year: 'float' = 365.0, rate_bounds: 'tuple[float, float]' = (-0.9999, 1000000.0), grid_points: 'int' = 512, residual_tolerance: 'float' = 1e-10) -> 'tuple[float, ...]'— Every irregular-date IRR of a series inside the scanned rate window.
impact
delayed_execution(signal_series: 'pd.Series', delay_bars: 'int' = 1) -> 'pd.Series'— Shift a signal forward to model the lag between decision and fill.fixed_slippage(price: 'float', direction: 'int', bps: 'float' = 5.0) -> 'float'— Apply a constant basis-point slippage to a fill price.linear_impact(price: 'float', direction: 'int', volume_traded: 'float', adv: 'float', impact_coeff: 'float' = 0.1) -> 'float'— Apply market impact proportional to the participation rate.sqrt_impact(price: 'float', direction: 'int', volume_traded: 'float', adv: 'float', volatility: 'float', eta: 'float' = 0.5) -> 'float'— Apply square-root market impact, the best empirically supported form.
microstructure
amihud_illiquidity(returns: 'Sequence[float] | np.ndarray | pd.Series', dollar_volumes: 'Sequence[float] | np.ndarray | pd.Series') -> 'float'— Calculate Amihud's (2002) illiquidity ratio: mean(|R_t| / DollarVolume_t).kyles_lambda(price_changes: 'Sequence[float] | np.ndarray | pd.Series', signed_order_flow: 'Sequence[float] | np.ndarray | pd.Series') -> 'float'— Estimate Kyle's (1985) price impact coefficient lambda from linear regression.roll_effective_spread(prices: 'Sequence[float] | np.ndarray | pd.Series') -> 'float'— Calculate Roll's (1984) effective spread estimator from serial price changes.vpin(buy_volume: 'Sequence[float] | np.ndarray', sell_volume: 'Sequence[float] | np.ndarray', bucket_size: 'float', n_buckets: 'int' = 50) -> 'np.ndarray'— Compute Volume-Synchronized Probability of Toxicity (VPIN - Easley et al. 2012).
multipletesting
CSCVResult(pbo: 'float', logits: 'np.ndarray', n_splits: 'int', n_strategies: 'int', n_observations: 'int', dropped_observations: 'int', in_sample_sharpes: 'np.ndarray', out_of_sample_sharpes: 'np.ndarray', performance_degradation: 'float') -> None— Combinatorially-symmetric cross-validation overfitting diagnostic.DeflatedSharpeResult(observed_sharpe: 'float', expected_maximum_sharpe: 'float', deflated_sharpe_ratio: 'float', n_trials: 'int', n_observations: 'int', trial_sharpe_std: 'float', skew: 'float', kurtosis: 'float', survives: 'bool', confidence: 'float') -> None— Outcome of deflating an observed Sharpe for the number of trials.FDRResult(rejected: 'np.ndarray', adjusted_p_values: 'np.ndarray', n_rejected: 'int', threshold: 'float', fdr: 'float') -> None— Benjamini-Hochberg false-discovery-rate control over many hypotheses.benjamini_hochberg(p_values: 'Sequence[float] | np.ndarray', fdr: 'float' = 0.05) -> 'FDRResult'— Control the false discovery rate across many simultaneous tests.deflated_sharpe_ratio(observed_sharpe: 'float', n_trials: 'int', n_observations: 'int', trial_sharpe_std: 'float', skew: 'float' = 0.0, kurtosis: 'float' = 3.0, confidence: 'float' = 0.95) -> 'DeflatedSharpeResult'— Deflate an observed Sharpe by the number of strategies searched.expected_maximum_sharpe(n_trials: 'int', trial_sharpe_std: 'float') -> 'float'— Sharpe the best ofn_trialsreaches by luck alone.probabilistic_sharpe_ratio(observed_sharpe: 'float', n_observations: 'int', benchmark_sharpe: 'float' = 0.0, skew: 'float' = 0.0, kurtosis: 'float' = 3.0) -> 'float'— Confidence that a strategy's true Sharpe exceeds a benchmark.probability_of_backtest_overfitting(performance: 'pd.DataFrame | np.ndarray', n_splits: 'int' = 16, ddof: 'int' = 1) -> 'CSCVResult'— Combinatorially-symmetric cross-validation (CSCV) overfitting diagnostic.sharpe_ratio(returns: 'pd.Series | np.ndarray | Sequence[float]', risk_free: 'float' = 0.0, ddof: 'int' = 1) -> 'float'— Per-observation Sharpe ratio.
neutralization
neutralize_factor(factor: 'pd.DataFrame', controls: 'Mapping[str, pd.DataFrame] | None' = None, *, categorical_controls: 'Mapping[str, pd.DataFrame] | None' = None, method: 'str' = 'ols', weights: 'pd.DataFrame | None' = None, control_selection: 'str' = 'explicit', min_coverage: 'float' = 0.8, min_observations: 'int' = 10, min_residual_dof: 'int' = 2, standardize: 'bool' = True, mask: 'pd.DataFrame | None' = None, rcond: 'float' = 1e-10) -> 'NeutralizationResult'— Remove specified exposures separately at every input observation time.pca_factors(factors: 'Mapping[str, pd.DataFrame]', *, n_components: 'int | float' = 0.95, min_observations: 'int' = 10, standardize: 'bool' = True, mask: 'pd.DataFrame | None' = None) -> 'FactorPCAResult'— Compress factor columns using PCA fitted independently at each time.
options
barrier_greeks(S: 'float', K: 'float', H: 'float', T: 'float', r: 'float', sigma: 'float', barrier_type: 'str', option_type: 'str' = 'call', q: 'float' = 0.0, rebate: 'float' = 0.0) -> 'dict[str, float]'— Compute sensitivity Greeks for single-barrier options via central finite differences.barrier_option_price(S: 'float', K: 'float', H: 'float', T: 'float', r: 'float', sigma: 'float', barrier_type: 'str', option_type: 'str' = 'call', q: 'float' = 0.0, rebate: 'float' = 0.0) -> 'float'— Analytical Black-Scholes pricing for single-barrier options (Reiner-Rubinstein 1991).bs_greeks(S: 'float', K: 'float', T: 'float', r: 'float', sigma: 'float', option_type: 'str' = 'call', q: 'float' = 0.0) -> 'Dict[str, float]'— Compute the five Black-Scholes-Merton Greeks.bs_price(S: 'float', K: 'float', T: 'float', r: 'float', sigma: 'float', option_type: 'str' = 'call', q: 'float' = 0.0) -> 'float'— Price a European option with the Black-Scholes-Merton formula.implied_volatility(market_price: 'float', S: 'float', K: 'float', T: 'float', r: 'float', option_type: 'str' = 'call', q: 'float' = 0.0, tol: 'float' = 1e-06, max_iter: 'int' = 200) -> 'float'— Invert Black-Scholes for volatility, Newton first then bisection.normalise_barrier_type(barrier_type: 'str') -> 'str'— Fold a barrier-type string to one of :data:BARRIER_TYPES.normalise_option_type(option_type: 'str') -> 'str'— Fold an option-type string to"call"or"put".
performance
ModifiedDietzReturn(total_return: 'float', start_date: 'date', end_date: 'date', start_value: 'float', end_value: 'float', net_external_flow: 'float', weighted_external_flow: 'float', average_capital: 'float', flow_weights: 'tuple[tuple[date, float, float], ...]', annualized_return: 'float | None') -> None— Day-weighted money-weighted approximation over a single period.MoneyWeightedReturn(annualized_return: 'float', period_return: 'float', start_date: 'date', end_date: 'date', start_value: 'float', end_value: 'float', net_external_flow: 'float', years: 'float', iterations: 'int') -> None— Internal rate of return of the client's own cash.SubPeriodReturn(start: 'date', end: 'date', start_value: 'float', end_value: 'float', external_flow: 'float', period_return: 'float') -> None— One interval between two consecutive valuations.TimeWeightedReturn(total_return: 'float', sub_periods: 'tuple[SubPeriodReturn, ...]', start_date: 'date', end_date: 'date', start_value: 'float', end_value: 'float', net_external_flow: 'float', flow_timing: 'str', annualized_return: 'float | None') -> None— Chain-linked true time-weighted return over the whole window.UnsolvableRateError(signature unavailable)— Raised when a cash-flow stream admits no single internal rate of return.external_flows(flows: 'CashFlowSeries | Iterable[CashFlow] | None', *, external_kinds: 'Iterable[str] | None' = None, internal_kinds: 'Iterable[str] | None' = None) -> 'tuple[tuple[date, float], ...]'— Select the boundary-crossing flows and restate them portfolio-side.modified_dietz_return(valuations: 'Mapping[date | datetime | str, float] | Sequence[tuple[date | datetime | str, float]]', flows: 'CashFlowSeries | Iterable[CashFlow] | None' = None, *, external_kinds: 'Iterable[str] | None' = None, internal_kinds: 'Iterable[str] | None' = None) -> 'ModifiedDietzReturn'— Compute the day-weighted Modified Dietz return over one period.money_weighted_return(valuations: 'Mapping[date | datetime | str, float] | Sequence[tuple[date | datetime | str, float]]', flows: 'CashFlowSeries | Iterable[CashFlow] | None' = None, *, external_kinds: 'Iterable[str] | None' = None, internal_kinds: 'Iterable[str] | None' = None) -> 'MoneyWeightedReturn'— Compute the client's money-weighted return (XIRR) over the window.time_weighted_return(valuations: 'Mapping[date | datetime | str, float] | Sequence[tuple[date | datetime | str, float]]', flows: 'CashFlowSeries | Iterable[CashFlow] | None' = None, *, flow_timing: 'str' = 'end', external_kinds: 'Iterable[str] | None' = None, internal_kinds: 'Iterable[str] | None' = None) -> 'TimeWeightedReturn'— Chain-link the true time-weighted return across a valuation series.xirr(dated_amounts: 'Sequence[tuple[date | datetime | str, float]]') -> 'float'— Annual internal rate of return of irregularly dated amounts.
portfolio
correlation_distance(corr: pandas.core.frame.DataFrame | numpy.ndarray) -> numpy.ndarray— Calculate distance matrix d_{i,j} = sqrt(0.5 * (1 - rho_{i,j})).hierarchical_risk_parity(cov: pandas.core.frame.DataFrame | numpy.ndarray, corr: pandas.core.frame.DataFrame | numpy.ndarray | None = None, method: str = 'single') -> pandas.core.series.Series | numpy.ndarray— Allocate portfolio weights using Hierarchical Risk Parity (López de Prado 2016).inverse_variance_weights(cov: pandas.core.frame.DataFrame | numpy.ndarray) -> numpy.ndarray— Calculate inverse-variance weights w_i = (1/sigma_i^2) / sum(1/sigma_k^2).quasi_diagonalize(linkage_matrix: numpy.ndarray) -> list[int]— Quasi-diagonalize the clusters: sort cluster indices by hierarchical tree structure.
risk
analyze_mc_results(paths: 'np.ndarray', confidence: 'float' = 0.95) -> 'dict'— Summarise the terminal distribution of a simulated price matrix.drawdown_distribution_analysis(equity: 'pd.Series | np.ndarray | Sequence[float]') -> 'dict'— Decompose an equity curve into discrete drawdown episodes and aggregate risk metrics.drawdown_series(equity: 'pd.Series | np.ndarray | Sequence[float]') -> 'pd.Series'— Compute continuous percentage drawdown from running peak as a positive loss fraction.fit_gpd_tail(returns: 'pd.Series | np.ndarray | Sequence[float]', threshold_pct: 'float' = 5.0) -> 'dict'— Fit the loss tail with a generalised Pareto distribution (POT method).historical_cvar(returns: 'pd.Series | np.ndarray | Sequence[float]', confidence: 'float' = 0.95, horizon: 'int' = 1) -> 'float'— Conditional VaR (expected shortfall) from the empirical distribution.historical_var(returns: 'pd.Series | np.ndarray | Sequence[float]', confidence: 'float' = 0.95, horizon: 'int' = 1) -> 'float'— Value at Risk from the empirical distribution of past returns.max_drawdown_analysis(equity: 'pd.Series | np.ndarray | Sequence[float]') -> 'dict'— Locate the worst peak-to-trough decline of an equity curve and its recovery.monte_carlo_gbm(s0: 'float', mu: 'float', sigma: 'float', n_steps: 'int' = 252, n_paths: 'int' = 10000, *, seed: 'int | None' = None, steps_per_year: 'int' = 252) -> 'np.ndarray'— Simulate price paths under geometric Brownian motion.monte_carlo_summary(s0: 'float', mu: 'float', sigma: 'float', n_steps: 'int' = 252, n_paths: 'int' = 10000, *, seed: 'int', steps_per_year: 'int' = 252, confidence: 'float' = 0.95) -> 'dict'— Simulate GBM and return risk statistics without transferring the path matrix.pain_index(equity: 'pd.Series | np.ndarray | Sequence[float]') -> 'float'— Calculate the Pain Index measuring mean absolute drawdown depth and duration.parametric_var(returns: 'pd.Series | np.ndarray | Sequence[float]', confidence: 'float' = 0.95, horizon: 'int' = 1) -> 'float'— Value at Risk under a fitted normal distribution.ulcer_index(equity: 'pd.Series | np.ndarray | Sequence[float]') -> 'float'— Calculate Peter Martin's Ulcer Index measuring downside drawdown volatility.
timeseries
adf_test(series: 'pd.Series', significance: 'float' = 0.05) -> 'dict'— Augmented Dickey-Fuller unit-root (stationarity) test.autocorrelation_test(residuals: 'pd.Series', lags: 'int' = 10, significance: 'float' = 0.05) -> 'dict'— Test residuals for serial correlation (Durbin-Watson and Ljung-Box).bootstrap_sharpe(returns: 'pd.Series', n_bootstrap: 'int' = 10000, confidence: 'float' = 0.95, periods_per_year: 'int' = 252, seed: 'int | None' = None, ddof: 'int' = 1) -> 'dict'— Bootstrap a confidence interval for an annualised Sharpe ratio.bootstrap_statistic(data: 'np.ndarray', statistic_func: 'Callable[[np.ndarray], float]', n_bootstrap: 'int' = 10000, confidence: 'float' = 0.95, seed: 'int | None' = None) -> 'dict'— Percentile-bootstrap confidence interval for an arbitrary statistic.cointegration_test(y: 'pd.Series', x: 'pd.Series', significance: 'float' = 0.05) -> 'dict'— Engle-Granger two-step cointegration test.compute_half_life(spread: 'pd.Series') -> 'float'— Estimate mean-reversion half-life of a spread by delta regression.find_hedge_ratio(y: 'pd.Series', x: 'pd.Series') -> 'dict'— Fit the pair-trading hedge ratioy = α + β·x + ε.fit_garch(returns: 'pd.Series', horizon: 'int' = 5) -> 'dict'— Fit a GARCH(1,1) model and forecast forward volatility.fit_markov_regime(returns: 'pd.Series', n_regimes: 'int' = 2, switching_variance: 'bool' = True) -> 'dict'— Fit a Markov regime-switching model and label the current regime.fit_ornstein_uhlenbeck(series: 'pd.Series', dt: 'float' = 1.0) -> 'dict'— Fit an Ornstein-Uhlenbeck (OU) mean-reverting process by exact discrete MLE.granger_test(data: 'pd.DataFrame', x_col: 'str', y_col: 'str', max_lag: 'int' = 5) -> 'dict'— Test whetherxGranger-causesy.heteroscedasticity_test(model_result: 'Any', significance: 'float' = 0.05) -> 'dict'— Test regression residuals for heteroskedasticity (White and Breusch-Pagan).vif_test(X: 'pd.DataFrame', severe_threshold: 'float' = 10.0, watch_threshold: 'float' = 5.0) -> 'pd.DataFrame'— Score each regressor's variance inflation factor for multicollinearity.
units
compare_rates(left: 'float', right: 'float', input_unit: 'str' = 'decimal', left_label: 'str' = 'left', right_label: 'str' = 'right') -> 'dict'— Compare named rates and return their direction and signed difference.
valuation.artifact
ArtifactDiff(model_name: 'str', baseline_generated_at: 'datetime', updated_generated_at: 'datetime', baseline_input_hash: 'str', updated_input_hash: 'str', input_hash_changed: 'bool', baseline_model_version: 'str', updated_model_version: 'str', model_version_changed: 'bool', changed_inputs: 'tuple[FieldChange, ...]', added_input_paths: 'tuple[str, ...]', removed_input_paths: 'tuple[str, ...]', changed_outputs: 'tuple[FieldChange, ...]', added_output_paths: 'tuple[str, ...]', removed_output_paths: 'tuple[str, ...]') -> None— The difference between two :class:ModelArtifactinstances of the same model.AssumptionRecord(path: 'str', assumption: 'Assumption') -> None— One :class:~.contracts.Assumptionfound inside a result object, located.FieldChange(path: 'str', old: 'Any', new: 'Any', delta: 'float | None') -> None— One field that differs between two artifacts' inputs or outputs.ModelArtifact(model_name: 'str', model_version: 'str', schema_version: 'str', generated_at: 'datetime', input_hash: 'str', inputs: 'Mapping[str, Any]', outputs: 'Mapping[str, Any]', assumptions: 'tuple[AssumptionRecord, ...]', result: 'Any', excluded: 'tuple[str, ...]', warnings: 'tuple[str, ...]') -> None— A reproducible, diffable snapshot of one completed valuation run.build_comps_artifact(*, target: 'TargetCompany', peers: 'Sequence[PeerCompany]', calendarisation_policy: 'str', result: 'CompsResult', generated_at: 'datetime') -> 'ModelArtifact'— Wrap a completed :func:~.comps.run_compscall into a versioned artifact.build_dcf_artifact(*, inputs: 'Mapping[str, Any]', result: 'DCFResult', generated_at: 'datetime', capital_structure_basis: 'str', discounting_convention: 'str', terminal_value_method: 'str', gdp_growth_ceiling: 'float' = 0.04) -> 'ModelArtifact'— Wrap a completed :func:~.dcf.run_dcfcall into a versioned artifact.build_three_statement_artifact(*, opening: 'Mapping[str, float]', drivers: 'Mapping[str, Sequence[float]]', result: 'ThreeStatementProjection', generated_at: 'datetime', circularity_tolerance: 'float' = 1e-10, max_circularity_iterations: 'int' = 100, balance_tolerance: 'float' = 1e-09) -> 'ModelArtifact'— Wrap a completed :func:~.threestatement.project_three_statementcall into an artifact.compute_input_hash(payload: 'Any') -> 'str'— Hash an arbitrary payload the same waybuild_*_artifacthashes inputs.diff_artifacts(baseline: 'ModelArtifact', updated: 'ModelArtifact') -> 'ArtifactDiff'— Diff two artifacts of the same model: which fields changed, by how much.
valuation.comps
CalendarisedMetric(policy: 'str', value: 'float', fiscal_year_end_month: 'int', weights: 'tuple[float, float] | None') -> None— One flow metric after fiscal-calendar alignment.CompsResult(target_name: 'str', calendarisation_policy: 'str', eps_basis: 'str', peer_multiples: 'tuple[PeerMultiples, ...]', distributions: 'Mapping[str, MultipleDistribution]', implied_valuations: 'Mapping[str, ImpliedValuation]', warnings: 'tuple[str, ...]') -> None— Full output of one comparable-companies run: one target against N peers.EVBridgeResult(direction: 'str', equity_value: 'float', enterprise_value: 'float', total_debt: 'float', cash_and_equivalents: 'float', minority_interest: 'float | None', preferred_stock: 'float | None', investments_in_associates: 'float | None', omitted_components: 'tuple[str, ...]') -> None— Enterprise-value bridge for one company, walked in one direction.ExcludedMultiple(peer_name: 'str', multiple_name: 'str', denominator_value: 'float', numerator_value: 'float' = 0.0, reason: 'str' = 'non_positive_denominator') -> None— One peer dropped from one multiple's statistics.FlowMetricPeriods(fiscal_year_end_month: 'int', last_full_fiscal_year: 'float', current_year_to_date: 'float | None' = None, prior_year_to_date: 'float | None' = None, next_full_fiscal_year: 'float | None' = None) -> None— Raw fiscal-period figures for one flow metric (EBITDA, EBIT, Sales, ...).ImpliedValuation(multiple_name: 'str', is_ev_multiple: 'bool', target_metric_value: 'float', implied_ev_by_quantile: 'Mapping[str, float] | None', implied_equity_value_by_quantile: 'Mapping[str, float] | None', warning: 'str | None') -> None— The target's implied value range from one multiple's peer distribution.MultipleDistribution(name: 'str', included: 'Mapping[str, float]', excluded: 'tuple[ExcludedMultiple, ...]', minimum: 'float | None', p25: 'float | None', median: 'float | None', p75: 'float | None', maximum: 'float | None', warning: 'str | None') -> None— Cross-sectional distribution of one multiple across the included peers.PeerCompany(name: 'str', market_cap: 'float', total_debt: 'float', cash_and_equivalents: 'float', ebitda: 'FlowMetricPeriods', ebit: 'FlowMetricPeriods', revenue: 'FlowMetricPeriods', diluted_eps: 'FlowMetricPeriods', price_per_share: 'float', book_value_of_equity: 'float', eps_basis: 'str', minority_interest: 'float | None' = None, preferred_stock: 'float | None' = None, investments_in_associates: 'float | None' = None) -> None— One comparable company's raw inputs for the EV bridge and multiple matrix.PeerMultiples(name: 'str', ev_bridge: 'EVBridgeResult', calendarised_ebitda: 'CalendarisedMetric', calendarised_ebit: 'CalendarisedMetric', calendarised_revenue: 'CalendarisedMetric', calendarised_diluted_eps: 'CalendarisedMetric', ev_ebitda: 'float | None', ev_ebit: 'float | None', ev_sales: 'float | None', pe: 'float | None', pb: 'float | None', exclusions: 'tuple[ExcludedMultiple, ...]') -> None— One peer's EV bridge, calendarised metrics, and full multiple set.TargetCompany(name: 'str', total_debt: 'float', cash_and_equivalents: 'float', ebitda: 'FlowMetricPeriods', ebit: 'FlowMetricPeriods', revenue: 'FlowMetricPeriods', diluted_eps: 'FlowMetricPeriods', diluted_shares_outstanding: 'float', book_value_of_equity: 'float', eps_basis: 'str', minority_interest: 'float | None' = None, preferred_stock: 'float | None' = None, investments_in_associates: 'float | None' = None) -> None— The company being valued: its own fundamentals and capital structure.calendarise_metric(periods: 'FlowMetricPeriods', policy: 'str', *, metric_name: 'str', company_name: 'str') -> 'CalendarisedMetric'— Align one company's flow metric onto a comparable twelve-month footing.enterprise_value(*, market_cap: 'float', total_debt: 'float', cash_and_equivalents: 'float', minority_interest: 'float | None' = None, preferred_stock: 'float | None' = None, investments_in_associates: 'float | None' = None) -> 'EVBridgeResult'— Bridge a known equity market value to enterprise value.equity_value_from_enterprise_value(*, enterprise_value: 'float', total_debt: 'float', cash_and_equivalents: 'float', minority_interest: 'float | None' = None, preferred_stock: 'float | None' = None, investments_in_associates: 'float | None' = None) -> 'EVBridgeResult'— Walk the EV bridge backward: a known EV to an implied equity value.implied_valuation(multiple_name: 'str', distribution: 'MultipleDistribution', target: 'TargetCompany', calendarised_target: 'Mapping[str, CalendarisedMetric]') -> 'ImpliedValuation'— Project one multiple's peer distribution onto the target's own metric.multiple_distribution(name: 'str', peer_multiples: 'Sequence[PeerMultiples]') -> 'MultipleDistribution'— Build one multiple's cross-sectional distribution across a peer set.peer_multiple_set(peer: 'PeerCompany', policy: 'str') -> 'PeerMultiples'— Build one peer's EV bridge, calendarised metrics and full multiple set.run_comps(target: 'TargetCompany', peers: 'Sequence[PeerCompany]', *, calendarisation_policy: 'str') -> 'CompsResult'— Run a full comparable-companies valuation: EV bridge, multiples, implied range.
valuation.contracts
Assumption(name: 'str', value: 'Any', basis: 'str', source: 'str | None' = None) -> None— A caller-supplied judgement, carried through to the result.MissingInputError(missing: 'Iterable[str]', model: 'str') -> 'None'— Raised when a model cannot run because inputs are absent.ValuationError(signature unavailable)— Base class for every refusal a valuation model makes.normalize_currency(value: 'str', *, field_name: 'str' = 'currency') -> 'str'— Normalize a currency code to its canonical uppercase form.require_inputs(supplied: 'Mapping[str, Any]', required: 'Iterable[str]', model: 'str') -> 'None'— Refuse to run unless every required input is present and usable.require_positive(value: 'float', name: 'str', model: 'str') -> 'float'— Check a value that is meaningless at or below zero.
valuation.dcf
DCFResult(wacc_build: 'WACCResult', fcff_bridge: 'tuple[FCFFYear, ...]', discounted_fcff: 'tuple[DiscountedCashFlow, ...]', pv_of_explicit_fcff: 'float', terminal_value: 'TerminalValueResult', terminal_value_method: 'str', discounting_convention: 'str', terminal_discount_factor: 'float', pv_of_terminal_value: 'float', enterprise_value: 'float', net_debt_bridge: 'NetDebtBridgeResult', equity_value: 'float', value_per_share: 'float') -> None— The full DCF: every bridge, both terminal values, and the final price.DiscountedCashFlow(year: 'int', fcff: 'float', wacc_rate: 'float', time_period: 'float', discount_factor: 'float', present_value: 'float') -> None— One projection year's FCFF, discounted to present value.FCFFYear(year: 'int', ebit: 'float', tax_rate: 'float', nopat: 'float', depreciation_amortization: 'float', capex: 'float', delta_nwc: 'float', fcff: 'float') -> None— One projection year's bridge from EBIT to free cash flow to the firm.NetDebtBridgeResult(enterprise_value: 'float', total_debt: 'float', cash_and_equivalents: 'float', minority_interest: 'float', preferred_equity: 'float', associate_investments: 'float', equity_value: 'float', diluted_shares: 'float', value_per_share: 'float') -> None— The bridge from enterprise value to value per share.TerminalValueResult(wacc_rate: 'float', terminal_growth: 'Assumption', perpetuity_terminal_value: 'float', terminal_year_ebitda: 'float', exit_multiple: 'Assumption', exit_terminal_value: 'float', implied_ev_ebitda_multiple: 'float', implied_perpetuity_growth: 'float', gdp_growth_ceiling: 'float', growth_exceeds_gdp_ceiling: 'bool') -> None— Both terminal-value estimates, each cross-checked against the other.WACCResult(risk_free_rate: 'float', beta: 'float', equity_risk_premium: 'float', size_premium: 'float', country_risk_premium: 'float', cost_of_equity: 'float', pretax_cost_of_debt: 'float', tax_rate: 'float', cost_of_debt_after_tax: 'float', capital_structure_basis: 'str', equity_weight: 'float', debt_weight: 'float', wacc: 'float') -> None— The WACC build, with every component that fed it kept visible.discount_fcff(fcff_years: 'Sequence[FCFFYear]', *, wacc_rate: 'float', discounting_convention: 'str') -> 'tuple[DiscountedCashFlow, ...]'— Discount every projection year's FCFF to present value.equity_bridge(*, enterprise_value: 'float', total_debt: 'float', cash_and_equivalents: 'float', minority_interest: 'float', preferred_equity: 'float', associate_investments: 'float', diluted_shares: 'float') -> 'NetDebtBridgeResult'— Bridge enterprise value to equity value and value per share.fcff_bridge(*, ebit: 'Sequence[float]', tax_rate: 'float', depreciation_amortization: 'Sequence[float]', capex: 'Sequence[float]', delta_nwc: 'Sequence[float]') -> 'tuple[FCFFYear, ...]'— Build the EBIT -> FCFF bridge for every projection year.run_dcf(inputs: 'Mapping[str, Any]', *, capital_structure_basis: 'str', discounting_convention: 'str', terminal_value_method: 'str', gdp_growth_ceiling: 'float' = 0.04) -> 'DCFResult'— Run a complete DCF from a flat mapping of named inputs.sensitivity_grid(fcff_years: 'Sequence[FCFFYear]', *, wacc_values: 'Sequence[float]', growth_values: 'Sequence[float]', discounting_convention: 'str', total_debt: 'float', cash_and_equivalents: 'float', minority_interest: 'float', preferred_equity: 'float', associate_investments: 'float', diluted_shares: 'float') -> 'pd.DataFrame'— Value-per-share sensitivity to WACC and perpetuity terminal growth.terminal_value(*, final_year_fcff: 'float', terminal_year_ebitda: 'float', wacc_rate: 'float', terminal_growth: 'Assumption', exit_multiple: 'Assumption', gdp_growth_ceiling: 'float' = 0.04) -> 'TerminalValueResult'— Compute both terminal-value estimates and cross-validate them.wacc(*, risk_free_rate: 'float', beta: 'float', equity_risk_premium: 'float', pretax_cost_of_debt: 'float', tax_rate: 'float', capital_structure_basis: 'str', market_value_of_equity: 'float | None' = None, market_value_of_debt: 'float | None' = None, target_equity_weight: 'float | None' = None, target_debt_weight: 'float | None' = None, size_premium: 'float' = 0.0, country_risk_premium: 'float' = 0.0) -> 'WACCResult'— Build the weighted average cost of capital.
valuation.threestatement
BalanceSheet(period: 'int', cash: 'float', net_working_capital: 'float', ppe: 'float', revolver_balance: 'float', paid_in_capital: 'float', retained_earnings: 'float') -> None— One period's balance sheet. Every field is a rollforward, never an input.BalanceSheetError(period: 'int', assets: 'float', liabilities: 'float', equity: 'float', tolerance: 'float') -> 'None'— Raised when a balance sheet failsassets == liabilities + equity.CashFlowStatement(period: 'int', net_income: 'float', depreciation_amortization: 'float', change_in_net_working_capital: 'float', capex: 'float', dividends_paid: 'float', revolver_draw: 'float', revolver_repayment: 'float', financing_activities: 'float', net_change_in_cash: 'float') -> None— One period's cash flow statement, bridging net income to the cash change.ConvergenceError(period: 'int', iterations: 'int', last_delta: 'float', tolerance: 'float') -> 'None'— Raised when the interest/revolver circularity fails to converge.IncomeStatement(period: 'int', revenue: 'float', gross_profit: 'float', opex: 'float', ebitda: 'float', depreciation_amortization: 'float', ebit: 'float', interest_expense: 'float', pretax_income: 'float', tax_expense: 'float', net_income: 'float') -> None— One period's income statement, linked end to end.PeriodResult(period: 'int', income_statement: 'IncomeStatement', cash_flow_statement: 'CashFlowStatement', balance_sheet: 'BalanceSheet', converged: 'bool', iterations: 'int') -> None— One projected period's linked statements plus circularity diagnostics.ThreeStatementProjection(opening_balance_sheet: 'BalanceSheet', periods: 'tuple[PeriodResult, ...]') -> None— A full multi-period projection: the opening balance sheet plus every period.check_balance_sheet(balance_sheet: 'BalanceSheet', tolerance: 'float' = 1e-09) -> 'None'— Assert that a balance sheet balances, or raise naming the residual.project_three_statement(opening: 'Mapping[str, float]', drivers: 'Mapping[str, Sequence[float]]', circularity_tolerance: 'float' = 1e-10, max_circularity_iterations: 'int' = 100, balance_tolerance: 'float' = 1e-09) -> 'ThreeStatementProjection'— Project linked income, cash flow and balance-sheet statements forward.
var_backtest
ConditionalCoverageResult(statistic: 'float', p_value: 'float', rejected: 'bool', significance: 'float', kupiec: 'KupiecResult', independence: 'IndependenceResult') -> None— Outcome of the joint Christoffersen conditional-coverage test.IndependenceResult(transitions: 'tuple[int, int, int, int]', prob_breach_after_calm: 'float', prob_breach_after_breach: 'float', statistic: 'float', p_value: 'float', rejected: 'bool', significance: 'float', identified: 'bool') -> None— Outcome of the Christoffersen independence test.KupiecResult(observations: 'int', violations: 'int', expected_violations: 'float', violation_rate: 'float', expected_rate: 'float', statistic: 'float', p_value: 'float', rejected: 'bool', significance: 'float') -> None— Outcome of the Kupiec proportion-of-failures test.TrafficLightResult(zone: 'str', violations: 'int', observations: 'int', cumulative_probability: 'float', scaling_factor: 'float | None', scaling_factor_basis: 'str') -> None— Basel supervisory zone for an observed exception count.VarBacktestReport(confidence: 'float', observations: 'int', violations: 'int', dropped_observations: 'int', kupiec: 'KupiecResult', independence: 'IndependenceResult', conditional_coverage: 'ConditionalCoverageResult', traffic_light: 'TrafficLightResult', breach_dates: 'tuple[object, ...] | None') -> None— Every test in this module, run over one aligned return/VaR pair.basel_traffic_light(violations: 'int', observations: 'int', confidence: 'float' = 0.99) -> 'TrafficLightResult'— Place an exception count in the Basel supervisory zone.christoffersen_conditional_coverage(breaches: 'Sequence[bool] | np.ndarray', confidence: 'float' = 0.99, significance: 'float' = 0.05) -> 'ConditionalCoverageResult'— Test coverage and independence jointly.christoffersen_independence(breaches: 'Sequence[bool] | np.ndarray', significance: 'float' = 0.05) -> 'IndependenceResult'— Test whether breaches cluster in time.kupiec_pof(violations: 'int', observations: 'int', confidence: 'float' = 0.99, significance: 'float' = 0.05) -> 'KupiecResult'— Test whether the breach count matches the model's claimed level.var_backtest(returns: 'pd.Series | np.ndarray | Sequence[float]', var: 'pd.Series | np.ndarray | Sequence[float] | float', confidence: 'float' = 0.99, significance: 'float' = 0.05) -> 'VarBacktestReport'— Run every test in this module over one return/VaR pair.violation_indicator(returns: 'pd.Series | np.ndarray | Sequence[float]', var: 'pd.Series | np.ndarray | Sequence[float] | float') -> 'np.ndarray'— Flag the days on which the realised loss exceeded the VaR forecast.
volatility
diagnose_iv_surface(observations: 'Sequence[Mapping[str, Real]]', *, spot: 'Real', risk_free_rate: 'Real' = 0.0, dividend_yield: 'Real' = 0.0) -> 'dict[str, object]'— Check observed IV slices against European call-price inequalities.heston_characteristic_function(u: 'complex | float', S0: 'float', T: 'float', r: 'float', q: 'float', v0: 'float', kappa: 'float', theta: 'float', sigma_v: 'float', rho: 'float') -> 'complex'— Evaluate the Heston characteristic function phi(u) for log(S_T).heston_feller_condition(kappa: 'float', theta: 'float', sigma_v: 'float') -> 'dict[str, float | bool]'— Check Feller condition (2 * kappa * theta > sigma_v**2).heston_price(S0: 'float', K: 'float', T: 'float', r: 'float', v0: 'float', kappa: 'float', theta: 'float', sigma_v: 'float', rho: 'float', option_type: 'str' = 'call', q: 'float' = 0.0, integration_limit: 'float | None' = None) -> 'float'— Price a European option under the Heston stochastic volatility model.implied_volatility_surface(observations: 'Sequence[Mapping[str, Real]]', *, spot: 'Real', strikes: 'Sequence[Real] | None' = None, expiries: 'Sequence[Real] | None' = None) -> 'dict[str, object]'— Build a bounded strike-by-expiry grid from observed implied volatilities.
Security
Reviews (0)
Related skills
Browse all →More from Vibe-Trading
View source →More Build skills
Browse category →Frequently asked questions about quantlib-index
What does the quantlib-index skill do?
Function index for the read-only quantlib_call tool. Load this skill before using quantlib_call so list and describe discovery rounds are unnecessary. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the quantlib-index skill?
Run `npx @skills-hub-ai/cli install vibe-trading-quantlib-index` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/vibe-trading-quantlib-index/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does quantlib-index work with?
quantlib-index runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the quantlib-index skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use quantlib-index after installing it?
In Claude Code, type `/vibe-trading-quantlib-index` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the quantlib-index skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.