Examples Using NAG and Excel
All the example spreadsheets below use 32-bit NAG Libraries and can be used with 32-bit versions of Microsoft Excel only. 64-bit versions of some examples can be made available upon request. Please contact us via support@nag.co.uk for more information.
Most of the examples here are based on the Mark 24 NAG Library. You will need to update the name of the DLL in the Declare statements to use them with newer Library releases. If you need help with this conversion, please contact us.
- How to use the scaled Wiener increments produced using a Brownian bridge generator to compute numerical solutions to stochastic differential equations (SDEs) driven by (free or non-free) Wiener processes
- How to compute the Nearest Correlation Matrix (NCM), in the Frobenius norm, or weighted Frobenius norm, and optionally with bounds on the eigenvalues, or with k-factor structure, and how to find eigenvalues for both symmetric and asymmetric matrices
- How to compute the Nearest Correlation Matrix (NCM), in the Frobenius norm, or weighted Frobenius norm, or element-wise weightings and optionally with bounds on the eigenvalues, or with k-factor structure, and how to find eigenvalues for both symmetric and asymmetric matrices
- How to find the global optimum of a multivariate function using the multi-level coordinate search algorithm
- How to solve a nonlinear least-squares problem using the sequential quadratic programming (SQP) method
- How to find a minimum of a function, subject to fixed upper and lower bounds (no derivatives required) using the BOBYQA algorithm
- How to obtain Kaplan–Meier estimates for censored data
- How to perform GARCH time series identification, estimation and forecasting
- How to perform ARIMA time series identification, estimation and forecasting
- How to implement Local Volatility model using Dupire formula and a collection of NAG interpolation routines and a PDE solver
The NAG Survival Analysis spreadsheet contains functions to:
- Compute Kaplan–Meier estimates of survival probabilities (with plots)
- Compute rank statistics for comparing survival curves
- Fit Cox's proportional hazard model
All functions can be called via Excel's function wizard and the spreadsheet is supplied with a NAG menu with utilities for expanding the results and extracting formatted data.
The spreadsheet works with the 32-bit NAG Fortran Library FLDLL244ML with Excel 2003, 2007, and 2010 (32-bit).
The zip file contains the Excel spreadsheet and a README file.
If you wish to use the Add-Ins in 64-bit Excel please contact support@nag.co.uk.
- Using the NAG Library for .NET in Excel
This archive contains a demo which uses methods from the NAG Library for .NET in an Excel spreadsheet to fit a bicubic spline surface to a set of points in three-dimensional space. More information about the demo can be found in this README (a copy of which is also contained in the archive).