Subpackages#

One hub per finance subpackage: its foundational history, runnable examples, and full API reference, all linked from a single page.

Foundations

financialkit.time_value

Compounding and equivalent rates, present value and NPV, annuities, IRR and MIRR, amortization and the APR, and day-count conventions.

financialkit.time_value
financialkit.fixed_income

Bond prices and yields, STRIPS, Macaulay, modified, Fisher-Weil and key rate durations, convexity, bootstrapped, spline, Nelson-Siegel and Svensson curves, immunization, and swaps.

financialkit.fixed_income

Derivatives

financialkit.options

Bachelier, Black-Scholes-Merton, Black-76 and Garman-Kohlhagen, parity and bounds, the Greeks and delta hedging, implied volatility and the smile, and binomial and trinomial trees.

financialkit.options
financialkit.exotic_options

Merton, Reiner-Rubinstein, double and discretely monitored barriers, binaries and one-touches, Kemna-Vorst and Turnbull-Wakeman Asians, lookbacks, variance swaps, Geske compounds, forward starts and choosers, Margrabe, Stulz and quanto options, and Longstaff-Schwartz.

financialkit.exotic_options
financialkit.stochastic_volatility

Cox’s CEV and Dupire local volatility, Hull-White and Heston stochastic volatility, Merton, variance gamma, Kou and Bates jumps, Carr-Madan FFT, Lewis and COS pricing, SABR, SVI and Lee’s moment formula, and full-truncation and QE simulation.

financialkit.stochastic_volatility

Numerical Methods

financialkit.monte_carlo

Crude Monte Carlo with error bars, stratification, importance sampling, antithetic, control and moment-matched variates, Latin hypercubes, Halton and Sobol QMC, likelihood-ratio and pathwise Greeks, and multilevel Monte Carlo.

financialkit.monte_carlo
financialkit.pde_methods

Explicit, implicit and Crank-Nicolson schemes with Rannacher smoothing, the Thomas algorithm, CFL and von Neumann stability, Richardson extrapolation and Tavella-Randall grids, the heat-equation transform and trinomial equivalence, barriers, American options by PSOR, Brennan-Schwartz and penalty, and Peaceman-Rachford ADI.

financialkit.pde_methods

Rates & Credit

financialkit.interest_rate_models

Merton, Vasicek, CIR and affine short rates, Ho-Lee, Hull-White, G2++ and Black-Derman-Toy fitted to the curve, Jamshidian bond options and swaptions, Black caps and swaptions, and HJM.

financialkit.interest_rate_models
financialkit.credit

Altman’s Z-score, Merton, Black-Cox and Leland structural models and the KMV distance to default, hazard curves and recovery conventions, CDS pricing and bootstrapping, CreditMetrics and generator matrices, Vasicek’s large pool, CreditRisk+, Li’s copula, the Basel IRB formula and CDO tranches.

financialkit.credit

Portfolios & Asset Pricing

financialkit.asset_pricing

Williams’s dividend discount model, Gordon growth, Modigliani-Miller and Shiller’s variance bound, the CAPM, Jensen’s alpha, the zero-beta CAPM and the GRS test, Fama-MacBeth, the APT, Fama-French and Carhart factors, Lucas’s tree, the consumption CAPM and the equity premium puzzle, state prices and the Hansen-Jagannathan bound.

financialkit.asset_pricing
financialkit.portfolio

Markowitz, Tobin and Merton frontiers, Kelly, Merton’s portfolio problem and CPPI, single-index and Ledoit-Wolf covariances, Black-Litterman and resampling, CVaR optimization, maximum diversification, risk parity and HRP, and the Sharpe, Sortino and information ratios.

financialkit.portfolio

Risk & Markets

financialkit.risk

Historical, parametric, Cornish-Fisher, Monte Carlo, hybrid and filtered VaR, safety first, expected shortfall and coherence, Euler allocation, extreme value theory, VaR backtests, copulas and tail dependence, and drawdowns.

financialkit.risk
financialkit.time_series

Fat tails and the Hill index, random-walk tests (runs, Ljung-Box, variance ratios), Yule-Walker and ARMA with AIC, Dickey-Fuller and Engle-Granger, the Hurst exponent, ARCH, GARCH, EGARCH, GJR and EWMA, and range and realized volatility.

financialkit.time_series
financialkit.market_microstructure

Quoted, effective and realized spreads, the Roll and Corwin-Schultz estimators, Lee-Ready classification, Garman, Ho-Stoll and Avellaneda-Stoikov dealers, Kyle and Glosten-Milgrom, Hasbrouck’s VAR, PIN and VPIN, square-root impact, Bertsimas-Lo and Almgren-Chriss execution, and Amihud illiquidity.

financialkit.market_microstructure