NAGNews 112 | 21 February 2013

Posted on
21 Feb 2013

In this issue

New NAG Library for Java

NAG is delighted to announce the NAG Library for Java which provides Java developers with the latest tried and tested NAG Library routines.

The NAG Library for Java is a collection of over 1,700 mathematical and statistical routines and has been developed to make light
work of complex computation. NAG routines are trusted for their accuracy and flexibility and are regularly updated.

Numerical facilities

  • Optimization, both Local and Global
  • Linear, quadratic, integer and nonlinear programming and least squares problems
  • Ordinary and partial differential equations, and mesh generation
  • Solution of dense, banded and sparse linear equations and eigenvalue problems
  • Solution of linear and nonlinear least squares problems
  • Curve and surface fitting and interpolation
  • Special functions
  • Numerical integration and integral equations
  • Roots of nonlinear equations (including polynomials)
  • Option Pricing
  • Wavelet Transforms

Statistical facilities

  • Random number generation
  • Simple calculations on statistical data
  • Correlation and regression analysis
  • Multivariate methods
  • Analysis of variance and contingency table analysis
  • Time series analysis
  • Nonparametric statistics

How do I get to use the NAG Library for Java?

If your organisation or University has a licence for the NAG Library you might be eligible to use the new NAG Library for Java immediately without additional cost,
click here to find out if this applies to you.
Alternatively you could try the Library over a period of 30 days - visit our website.

NAG Student Prize - receive a pass to Global Derivatives, Amsterdam

Would you like to win a pass to the prestigious finance event Global Derivatives 2013 plus a contribution to travel costs?

If you're a student (BSc, MSc, PhD etc) studying mathematical finance or similar you can enter the NAG 'direct award' prize by
sending through details of your project. To be considered for the prize your work should include the use of NAG software in some
way. Your submission might be related to your MSc or PhD project or thesis or a completely independent technical article.

The prize includes a contribution to travel and accommodation. If you cannot make the Global Derivatives 2013 conference don't
worry, NAG does contribute or sponsor student attendance at other mathematical finance events.
Previous winners and their work can be viewed here.

How to improve the Scalability and Efficiency of Navier-Stokes Codes

NAG's ongoing Computational Science and Engineering (CSE) support of the UK's national supercomputing facility, HECToR, has
resulted in the vast improvements of many scientific codes. Recently an HPC expert from the University of Southampton, working
under NAG's HECToR support service has greatly improved the scalability and efficiency of two key codes which are used to solve
the Navier-Stokes equations using pseudospectral methods.

The Navier-Stokes equations describe the motion of fluid. Commonly used to model weather, water flow in a pipe and air flow around
a wing, they lend themselves to use in engineering and design of power stations, aircraft and automobiles and for the study of
environmental data. The improved codes in this case study are used in an application designed to study a specialised computational
fluid dynamics model.

To learn more click here.

The Nearest Correlation Matrix

This is an excerpt from a recent blog post by Professor Nick Higham, University of Manchester.

A correlation matrix is a symmetric matrix with unit diagonal and nonnegative eigenvalues. In 2000 I was approached by a London
fund management company who wanted to find the nearest correlation matrix (NCM) in the Frobenius norm to an almost correlation
matrix: a symmetric matrix having a significant number of (small) negative eigenvalues. This problem arises when the data from
which the correlations are constructed is asynchronous or incomplete, or when models are stress-tested by artificially adjusting
individual correlations. Solving the NCM problem (or obtaining a true correlation matrix some other way) is important in order to
avoid subsequent calculations breaking down due to negative variances or volatilities, for example.


The convexity properties of the problem mean that there is a unique nearest correlation matrix, which is hence a global minimizer.
In the 1990s several algorithms had been proposed for computing it, but none was guaranteed to work. Prompted by the approach from
the company, I investigated the problem. I proved some results characterizing the solution and derived an alternating projections
algorithm for computing it. The algorithm repeatedly projects onto the set of matrices with unit diagonal and the cone of symmetric
positive semidefinite matrices. It is guaranteed to converge to the minimum, but does so at a linear rate. An important feature of
the algorithm is that other projections can be added on. Thus, for example, if we want to leave the trailing principal submatrix
of order three unchanged, we simply restore it at the end of each iteration.

Read the full blog post here.

New Partner - Barry Analytics

We are delighted to announce our new partner, BarryAnalytics. BarryAnalytics is an Advanced Analytics Consultancy founded by Dr
Barry Leventhal, an eminent marketing statistician who has worked in the information industry for more than 30 years. Barry has
consulted on advanced analytics for major companies in telecommunications, retail, financial services and other industry sectors.
BarryAnalytics specialise in helping companies to generate greater business value from their data, either via deeper analytics or
by improving their analytic processes and / or environments.

NAG and Barry have written a new white paper 'Embedding Advanced Analytics into Business Applications' which will be published in
the next edition of NAGnews (2 May 2013).


Events & Training Courses

  • Survival Analysis for Junior Researchers
    25th-26th March 2013
    The University of Liverpool is hosting the second annual event, aimed at researchers with an interest in the statistical analysis
    of survival time data. This is an ideal opportunity for statisticians and PhD or post-graduate students to present and discuss
    their work with like-minded researchers. We are pleased to be able to support this event and will be present on the 25th March
    at our exhibition stand. Please come and visit our booth if you are attending on the 25th.
  • INFORMS Conference on Business Analytics and Operations Research
    7th-9th April 2013, San Antonio, Texas.
    NAG will be exhibiting once again at the premier conference on Business Analytics and Operations Research. If you are visiting,
    please do come along to our booth, we look forward to meeting you.
  • IMA Conference on Mathematics in Finance
    8th-9th April 2013. Heriot-Watt University, Edinburgh.
    Learned Society, The Institute of Mathematics and its Applications (IMA), organises conferences throughout Great Britain to help
    further promote the understanding of Mathematics and its Applications. NAG are delighted to be supporting the IMA once again, and
    will be exhibiting at the event.
  • British Applied Mathematics Conference (BAMC)
    9th-12th April 2013. University of Leeds.
    Come along to our exhibition booth, at The British Applied Mathematics Colloquium, the largest annual gathering of applied
    mathematical researchers in the UK.
  • Global Derivatives Trading & Risk Management
    15th-19th April 2013. Amsterdam.
    The world’s largest derivatives conference, with the most comprehensive programme in the market. The 2012 event attracted
    over 450 senior quants, risk managers, traders and academics from all over the world. We are regular exhibitors at this event,
    and are delighted to be attending again this year. We hope to see you there.  To obtain a 25% discount on your delegate
    registration, visit, and
    quote VIP Code: FKN2353NAGEM.

Training Courses Provided by NAG's HECToR Team*

These HPC training courses are provided free of charge to HECToR users and UK academics whose work is covered by the remit of one
of the participating research councils (EPSRC, NERC and BBSRC). The courses are also open to non-eligible people but will require
payment of a course fee. Please see the eligibility page for more

Recent blog posts

Keep up to date with NAG's recent blog posts here:

Matrix Functions in Parallel
Last year I wrote a blog post about NAG's work on parallelising the computation of the matrix square root. More recently, as part
of our Matrix Functions Knowledge Transfer Partnership with the University of Manchester, we've been investigating parallel
implementations of the Schur-Parlett algorithm.

NAGNews - Past Issues

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