Issue 90, 8 July 2010


Using the NAG Toolbox for MATLAB Part 5

The NAG Toolbox for MATLAB makes the full functionality of the NAG Library available from within MATLAB. We have been exploring its capabilities over the course of a series of articles (the previous article is here which has presented examples that highlight the use of specific NAG routines withing MATLAB applications. We now turn our attention to part of the S chapter of the Library, which contains routines for the calculation of approximations to special functions in mathematics and physics.

In the Library's latest release, this chapter has been supplemented by new routines which determine prices for so-called financial options, and we describe a new application that uses these routines to calculate and display option prices in MATLAB (a preliminary description of this application has already appeared in the NAG Blog. Our application (which is available for download /IndustryArticles/ might be of interest for teaching purposes, or for those readers who are simply curious about the behaviour of option pricing function.

The complete article may be read here.

Masters Student wins NAG Financial Mathematics Prize

We're delighted to announce the winner of the NAG Financial Mathematics Prize (Spring/Summer 2010) is Nicoletta Gabrielli. As an MSc student of the University of Rome Nicoletta presented her work using the NAG Toolbox for MATLAB at a financial mathematics seminar in Rome in 2009. Subsequently her supervisor, Professor Peter Laurence encouraged her to submit her work to NAG for the Financial Mathematics prize.

In her presentation she showed how the NAG Toolbox for MATLAB could be used for option pricing, plotting of volatility surfaces, simulate trajectories of random processes and compare results obtained through different methods. You can view Nicoletta's work here.

Her work won her a pass to the recent financial engineering conference Global Derivatives in Paris.

Future implementation of K factor analysis

At the next Mark of the NAG Library and the NAG Toolbox for MATLAB we will be extending the functionality in the area of computing the nearest correlation matrix. A correlation matrix is characterized by being a real, symmetric, square matrix with ones on the diagonal and positive semi-definite (having nonnegative eigenvalues.) It is required to find the nearest correlation matrix when the matrix fails to be semi-definite due to inconsistent data.

There will be two new routines.

Weighted Norm and Positive Definite Correlation Matrix

In NAG's current routine we implement Qi & Sun's Newton algorithm with improvements by Borsdorf and Higham. We are extending this algorithm to use a weighted norm and/or give a positive definite (positive eigenvalues) correlation matrix, using the original work by Qi & Sun.

Currently we find a true correlation matrix X that is closest to the approximate input matrix, G, in the Frobenius norm, that is we find the minimum ||G − X||F . Using a weighted norm we find the minimum ||sqrt(W)(G − X)sqrt(W)||F , for some matrix of weights W.

Now here is where we would like your input! What should W look like? Perhaps it should be diagonal, allowing whole rows and columns of G to be trusted more than others? What range of values would you use in such a weighted problem? Please email us with your thoughts.

Correlation Matrix with Factor Structure

A correlation matrix with factor structure is one where the off-diagonal elements agree with some matrix of rank k. That is, it can be written C = diag(I − XXT) + XXT , where X is an n by k is a matrix, and k is generally much smaller than n. These correlation matrices arise in factor models of asset returns, collateralized debit obligations and multivariate time series.

We implement the spectral projected gradient method of Birgin, Martinez and Raydan as suggested by Borsdorf and Higham.

Supercomputing: What you should know about power and performance efficiency: Expert Q&A

An HPC 'Industry Insights' Q&A session, including thoughts from NAG's VP HPC Business Andrew Jones was recently published in Scientific Computing:

"This Q&A session takes a look at an area of HPC that is weighing on many people's minds as datacenter environments face increasing pressure to expand capabilities while controlling costs. We've gathered industry experts to share their unique perspectives and to take a look at what we can expect to see coming up on the horizon in the next few years. Vice presidents, chief technology officers, computer scientists and engineers have come together to provide a range of high-level viewpoints that will, hopefully, get you started with your own specific challenges."

Read more here.

How we report known software issues to our users

Despite the rigorous testing and validation carried out at NAG it is impossible to guarantee that there are no errors in the distributed software products. During the lifespan of a specific product, some variant of a problem formulation or data upon which the routine operates may reveal a previously unknown error. This error will, of course, be corrected when the product is updated but, until that time, there is a possibility that other users may be adversely affected by the same issue. At NAG we believe that it is essential that details of the problem, and the conditions under which it can arise, are made available to users in order that they can take corrective action and continue to have their customary confidence in the results.

For each product NAG maintains a list of known issues that may be present in the software available to our users. This list contains a number of important details relating to the error that enables users to establish whether their application might be susceptible to the problem. To achieve this there is a brief description of how the error might manifest itself in terms of a user application. There is also a brief description of specific parameter settings that might force the error condition together with an assessment of the severity of the error. Finally, details of any possible workarounds are given; these can be used as an interim measure until the software is corrected by NAG.

Details of known deficiencies in current implementations of our numerical library based products can be accessed using the links below.

NAG Fortran Library
NAG C Library

Congratulations to Jack Dongarra

We'd like to congratulate Jack Dongarra on being the first recipient of the SIAM Special Interest Group on Supercomputing Award for Career Achievement. The award was presented at the SIAM Conference on Parallel Processing for Scientific Computing and is the first of two sets of prizes awarded annually by SIAG/SC. Jack was acknowledged for the significance of his development of dense linear algebra libraries and standardized benchmarks for high performance computing, in addition to the value of his leadership in the field. Well done Jack!

Recent Blog Posts

NAG Toolbox for MATLAB Documentation: Features in Development - David Carlisle
NAG at ISC 2010 - Mike Dewar
To people who provide technical support - David Cassell
Why is writing good numerical software so hard? - Mick Pont
Revealing the future of technical computing: part 1 - Andrew Jones
The meaning of recognition - Jeremy Walton
Technical computing futures part 2: GPU and manycore success - Andrew Jones
My first experiences calling the NAG Library for SMP & multicore - Sorin Serban
The power within graphics cards - Marcin Krzysztofik
Fantasy Football - a classic portfolio optimization problem - John Holden

Out & About with NAG

  • Risk Quant Congress USA
    12-14 July 2010, New York
    Mike Modica, Rick Guido and Jeremy Walton of NAG will be exhibiting at this key event for the finance industry
  • Fourth Annual Risk Management Conference 'The Risk Management Paradigm in the Post-Crisis Era'
    July 15-17, 2010 Shangri-La Hotel, Singapore
    John Holden of NAG and software distributor IOCS Asia Pte Ltd will be exhibiting at this event
  • HECToR (High End Computing Terascale Resource) Training Courses
    Presented by the NAG HECToR Team
    A full list of forthcoming HECToR Training Courses can be viewed on the official HECToR website here.

For more information on any of the above events visit NAG's ‘Out & About’ webpage

New NAG product implementations

The NAG Library for SMP & Multicore, Mark 22 is now available for the following platforms:

  • Intel EM64T Linux 64-bit using the Intel Fortran v11.1 Compiler

The NAG Toolbox for MATLAB, Mark 22 is now also available for the following platform:

  • Windows 64-bit (MATLAB R2009a and later)

For full details of these and all other available implementations, visit the NAG site. Comprehensive technical details of each implementation are given in the relevant Installation and User Notes at

Managing your subscription

Please feel free to forward this newsletter to colleagues or to post it to your company's Intranet sites.

To subscribe, unsubscribe or learn more about managing your subscription, please see:

NAGNews - Past Issues

We provide an online archive of past issues of NAGNews. For editions prior to these, please contact us.