Project · Open source
excel-finance-vba.
An importable VBA library of financial maths for Excel. Drop the modules into a workbook and you get 140 worksheet functions covering time value of money, bonds, options, portfolio risk, corporate finance, derivatives, loans, Monte Carlo and statistics.
Spreadsheet maths fails quietly, so every formula was checked against independent Python references before release: closed-form solutions, textbook values and round-trip identities. The verification script and its results ship in the repo.
VBAExcelFinancial mathsVerified in PythonMIT
In a cell
fx=TVM_PV(1000, 0.05, 10)
| A | B | |
|---|---|---|
| 1 | £1,000 in 10 years, at 5%, worth today | |
| 2 | 8% bond on a 6% yield, 10 years | |
| 3 | At-the-money call, 1 year, 20% vol |
What's inside
excel-finance-vba/
- modules/10 modules · 140 functions
- modTVM.bas19 · Time value of money: NPV, XIRR, MIRR, annuities, payback
- modBonds.bas15 · Pricing, yield, duration, convexity, bootstrapped curves
- modOptions.bas11 · Black–Scholes–Merton, Greeks, binomial trees, Black-76
- modPortfolio.bas17 · Returns, risk, value at risk
- modCorpFin.bas36 · Cost of capital, DCF, ratios, leverage
- modDerivatives.bas6 · Forwards, FX, FRAs
- modLoans.bas7 · Amortisation schedules
- modMonteCarlo.bas7 · Seedable simulation
- modStats.bas17 · Statistics and the normal distribution
- modUtils.bas5 · Shared plumbing
- verification/
- spotcheck.pyevery formula against independent Python references
- RESULTS.mdthe results, shipped with the code
- docs/
- EXAMPLES.mdworked examples, cell by cell
- README.md
- LICENSEMIT