Package: NMOF 2.12-0

NMOF: Numerical Methods and Optimization in Finance

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.

Authors:Enrico Schumann [aut, cre]

NMOF_2.12-0.tar.gz
NMOF_2.12-0.zip(r-4.7)NMOF_2.12-0.zip(r-4.6)NMOF_2.12-0.zip(r-4.5)
NMOF_2.12-0.tgz(r-4.6-any)NMOF_2.12-0.tgz(r-4.5-any)
NMOF_2.12-0.tar.gz(r-4.7-any)NMOF_2.12-0.tar.gz(r-4.6-any)
NMOF_2.12-0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
NMOF/json (API)

# Install 'NMOF' in R:
install.packages('NMOF', repos = c('https://enricoschumann.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/enricoschumann/nmof/issues

Datasets:

On CRAN:

Conda:

black-scholesdifferential-evolutiongenetic-algorithmgrid-searchheuristicsimplied-volatilitylocal-searchoptimizationparticle-swarm-optimizationsimulated-annealingthreshold-accepting

9.23 score 38 stars 4 packages 125 scripts 919 downloads 1 mentions 75 exports 0 dependencies

Last updated from:2c0f50185b. Checks:7 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64NOTE125
source / vignettesOK264
linux-release-x86_64NOTE122
macos-release-arm64NOTE116
macos-oldrel-arm64NOTE105
windows-develNOTE89
windows-releaseNOTE94
windows-oldrelNOTE92
wasm-releaseOK99

Exports:approxBondReturnbarrierOptionEuropeanbracketingbundFuturebundFutureImpliedRatecallCFcallHestoncfcallMertoncfBatescfBSMcfHestoncfMertoncfVGchangeIntervalcolSubsetconvexityCPPIDEoptdivRatiodrawdowndurationEuropeanCallEuropeanCallBEFrenchGAoptgbbgbmgreedySearchgridSearchLS.infoLSoptMAmaxSharpeminCVaRminMADminvarmvFrontiermvPortfolioNSNSfNSSNSSfPBOpmPSoptputCallParityqTablerandomReturnsrepairMatrixresampleCrestartOptRitterSA.infoSAoptShillershowChapterNamesshowExampleTA.infoTAopttfAckleytfEggholdertfGriewanktfRastrigintfRosenbrocktfSchwefeltfTrefethentrackingPortfoliovanillaBondvanillaOptionAmericanvanillaOptionEuropeanvanillaOptionImpliedVolxtContractValuextTickValuexwGaussytm

Dependencies:

Solving the N-Queens Problem with Local Search
The problem | Representing a solution | Evaluating a solution | Changing a solution | Solving the model

Last update: 2023-11-01
Started: 2017-10-24

An Overview of the NMOF Package
The book and the package | What's in the package | Other resources

Last update: 2023-10-20
Started: 2013-12-27

Fitting the Nelson--Siegel--Svensson model with Differential Evolution
Introduction | Fitting the NS model to given zero rates | Fitting the NSS model to given zero rates | Fitting the NSS model to given bond prices | Fitting the NSS model to given yields-to-maturity

Last update: 2023-10-20
Started: 2013-09-04

Functions for portfolio selection
Minimum-variance portfolios | Mean–variance efficient portfolios and frontiers | Return-based tracking portfolios | Minimum-Expected-Shortfall portfolios | Minimum Mean–Absolute-Deviation portfolios

Last update: 2023-03-01
Started: 2020-07-29

Examples for the qTable function

Last update: 2021-10-20
Started: 2013-04-29

Repairing solutions
Introduction | Upper and lower limits

Last update: 2021-10-20
Started: 2013-09-04

Asset selection with Local Search
Introduction | The model | Setting up the algorithm | Solving the model

Last update: 2019-10-07
Started: 2013-09-04

Robust Regression with Particle Swarm Optimisation and Differential Evolution

Last update: 2019-06-27
Started: 2013-09-04

Portfolio Optimisation with Threshold Accepting

Last update: 2017-10-24
Started: 2013-09-04

Vectorised objective functions
Introduction | Examples for vectorised computations

Last update: 2017-10-24
Started: 2013-09-04

Readme and manuals

Help Manual

Help pageTopics
Numerical Methods and Optimization in FinanceNMOF-package NMOF
Approximate Total Return of BondapproxBondReturn
Zero-Bracketingbracketing
German Government Bond DatabundData
Theoretical Valuation of Euro Bund FuturebundFuture bundFutureImpliedRate
Price a Plain-Vanilla Call with the Characteristic FunctioncallCF cfBates cfBSM cfHeston cfMerton cfVG
Price of a European Call under the Heston ModelcallHestoncf
Price of a European Call under Merton's Jump-Diffusion ModelcallMerton
Full-rank Column SubsetcolSubset
Constant-Proportion Portfolio InsuranceCPPI
Optimisation with Differential EvolutionDEopt
Diversification RatiodivRatio
Drawdowndrawdown
Computing Prices of European Calls with a Binomial TreeEuropeanCall EuropeanCallBE
Download Datasets from Kenneth French's Data LibraryFrench
Mutual Fund ReturnsfundData
Optimisation with a Genetic AlgorithmGAopt
Greedy SearchgreedySearch
Grid SearchgridSearch
Local-Search InformationLS.info
Stochastic Local SearchLSopt
Simple Moving AverageMA
Maximum-Sharpe-Ratio/Tangency PortfoliomaxSharpe
Option Pricing via Monte-Carlo Simulationgbb gbm mc
Minimum Conditional-Value-at-Risk (CVaR) PortfoliosminCVaR
Compute Minimum Mean-Absolute-Deviation PortfoliosminMAD
Minimum-Variance Portfoliosminvar
Computing Mean-Variance Efficient PortfoliosmvFrontier mvPortfolio
Zero Rates for Nelson-Siegel-Svensson ModelNS NSS
Factor Loadings for Nelson-Siegel and Nelson-Siegel-SvenssonNSf NSSf
Option DataoptionData
Probability of Backtest OverfittingPBO
Partial Momentspm
Particle Swarm OptimisationPSopt
Put-Call ParityputCallParity
Prepare LaTeX Table with Quartile PlotsqTable
Create a Random ReturnsrandomReturns
Repair an Indefinite Correlation MatrixrepairMatrix
Resample with Specified Rank CorrelationresampleC
Restart an Optimisation AlgorithmrestartOpt
Download Jay Ritter's IPO DataRitter
Simulated-Annealing InformationSA.info
Optimisation with Simulated AnnealingSAopt
Download Robert Shiller's DataShiller
Display Code ExamplesshowChapterNames showExample
Threshold-Accepting InformationTA.info
Optimisation with Threshold AcceptingTAopt
Classical Test Functions for Unconstrained OptimisationtestFunctions tfAckley tfEggholder tfGriewank tfRastrigin tfRosenbrock tfSchwefel tfTrefethen
Compute a Tracking PortfoliotrackingPortfolio
Pricing Plain-Vanilla Bondsconvexity duration vanillaBond ytm
Pricing Plain-Vanilla (European and American) and Barrier Options (European)barrierOptionEuropean vanillaOptionAmerican vanillaOptionEuropean vanillaOptionImpliedVol
Contract Value of Australian Government Bond FuturextContractValue xtTickValue
Integration of Gauss-typechangeInterval xwGauss