Numerical Methods and Optimization in Finance
Overview
Functions, examples and data from the first and the second edition of "Numerical Methods and Optimization in Finance" by M. Gilli, D. Maringer and E. Schumann (2019, ISBN:978-0128150658). The package provides implementations of optimisation heuristics (Differential Evolution, Genetic Algorithms, Particle Swarm Optimisation, Simulated Annealing and Threshold Accepting), and other optimisation tools, such as grid search and greedy search. There are also functions for the valuation of financial instruments such as bonds and options, for portfolio selection and functions that help with stochastic simulations.
- 'Ritter' has been adapted to new file format and allows to pass parameters to 'download.file'
- 'trackingPortfolio' keeps column names of the input data
- new function 'PBO', for computing probability of backtest overfitting, as descrived in Bailey et al. (2017; https://doi.org/10.21314/JCF.2016.322 )
From NEWS in the release
Install
Health
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names: NMOF/inst/doc/portfolio.R (.Dim: 1, .Dimnames: 1) NMOF/man/minvar.Rd (.Dim: 1, .Dimnames: 1) '.Dim' should be changed to 'dim'. '.Dimnames' should be changed to 'dimnames'.
- NOTE8 OK, 5 NOTE2026-09-08
- ERROR8 OK, 4 NOTE, 1 ERROR2026-09-07
- NOTE10 OK, 3 NOTE2026-07-16
- OK14 OK2026-03-10
Documentation
- Help pages
- 54 (1 internal)includes a package overview page
- Examples that run
- 94%50 run in a plain check (4 of them under a condition) · 1 only when donttest examples are enabled (R CMD check --as-cran) · 2 never run
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 100%
- An Overview of the NMOF Package PDF
- Asset selection with Local Search PDF
- Examples for the qTable function PDF
- Fitting the Nelson--Siegel--Svensson model with Differential Evolution PDF
- Functions for portfolio selection PDF
- Portfolio Optimisation with Threshold Accepting PDF
- Repairing solutions PDF
- Robust Regression with Particle Swarm Optimisation and Differential Evolution PDF
- Solving the N-Queens Problem with Local Search PDF
- Vectorised objective functions PDF
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 14
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Forks over time
Issues over time
Commits over time
Checks run against github.com/enricoschumann/nmof on 2026-10-11.
No development-tooling practices detected in the upstream repository.
Dependencies
Installing NMOF adds no packages beyond those that come with R.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 2.11-0Latest
- RR 4.5.0 released · 2025-04-11
- 2.10-12024-11-03 · diff ↗
- 2.10-0
- RR 4.4.0 released · 2024-04-24
- 2.8-0
- RR 4.3.0 released · 2023-04-21
- 2.7-12022-10-20 · diff ↗
- 2.7-0
- 2.5-12022-05-13 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 2.5-0
- RR 4.1.0 released · 2021-05-18
- 2.4-12021-04-10 · diff ↗
- 2.4-02021-04-01 · diff ↗
Show 31 earlier eventsHide 31 earlier events
- 2.3-12021-01-19 · diff ↗
- 2.2-2
- RR 4.0.0 released · 2020-04-24
- 2.1-02020-04-06 · diff ↗
- 2.0-1
- RR 3.6.0 released · 2019-04-26
- 1.6-0
- 1.4-32018-06-26 · diff ↗
- 1.4-1
- RR 3.5.0 released · 2018-04-23
- 1.2-22017-10-20 · diff ↗ ·
added 7 exports
CPPI, SA.info, SAopt, bundFuture, bundFutureImpliedRate, divRatio, minvar - RR 3.4.0 released · 2017-04-21
- 0.40-0
- RR 3.3.0 released · 2016-05-03
- 0.36-2
- 0.34-22015-05-07 · diff ↗
- RR 3.2.0 released · 2015-04-16
- 0.34-12015-02-03 · diff ↗
- 0.34-0
- RR 3.1.0 released · 2014-04-10
- 0.28-22013-09-06 · diff ↗
- 0.28-0
- RR 3.0.0 released · 2013-04-03
- 0.27-02012-11-29 · diff ↗ ·
added 3 exports
vanillaOptionAmerican, vanillaOptionEuropean, vanillaOptionImpliedVol - 0.25-4
- RR 2.15.0 released · 2012-03-30
- 0.23-12012-03-04 · diff ↗
- 0.22-0
- RR 2.14.0 released · 2011-10-31
- 0.20-02011-10-20
- RR 2.13.0 released · 2011-04-13
Package metadata
- First published
- 2011-10-20
- Total releases
- 30 / 15 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5
- Bundled data
- 745 KB / 3 files
- Download size
- 1.9 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("NMOF")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-19, which the citation names so these numbers can be found later. More on citing and the projects behind them.