Tag Archives: NAG

Do you use NAG in Java for quant analaytics? Check out a comparison of the Java Native Interface (JNI) vs. Java Native Access (JNA)

Do you use NAG in Java for quant analaytics? Check out a comparison of the Java Native Interface (JNI) vs. Java Native Access (JNA)

An Affair with the JNA blog.nag.com

I was recently speaking to a colleague about my first couple projects here at NAG. The first project was learning to call the Library from Python using c-types (thanks to Mike Croucher’s blog which helped immensely). Next, was…

 

Great post Brian and thanks for the name-check. I plan to look at NAG/Python via Cython in the near future.

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Using NAG with Excel for quant development and quant analysis

Using NAG with Excel for quant development and quant analysis

Many of our users call NAG from Microsoft Excel®. We have updated examples to link to the latest library versions and added new examples (including Nearest Correlation Matrix (NCM) with the k-factor structure) of some of the latest routines.

There are also examples to help new users learn how to make the best use of NAG from Excel. Take a look at all the examples at http://www.nag.co.uk/numeric/nagandexcel.asp

Learn how to maximize Excel’s potential with the NAG Library One of the major benefits of the NAG Library is its inherent flexibility; it can be used by programmers developing in traditional languages, or by users of modern…

 

==

Hi all Excel users!

I have recently posted a short piece on nonlinear least-squares optimization in Excel on our Blog: http://blog.nag.com/2012/02/how-to-solve-nlls-problem-using-sqp.html

Has anyone tried solving this type of problem in Excel? Has anyone stumbled upon RtlMoveMemory and got annoyed with using it?

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Quant Analytics New Paper: Solving Partial Differential Equations with the NAG Library

Quant Analytics New Paper: Solving Partial Differential Equations with the NAG Library

Partial Differential Equations (PDEs) are used in many important areas in science and financial mathematics, and a lot of work has been put into developing reliable methods to solve them.

Many of these methods are available in the NAG Library, and following a helpful dialogue with a NAG user at the Institute of Biomathematics and Biometry at the Helmholtz Zentrum, we have highlighted a few of them in a white paper which presents the results from the solution of a variety of PDE problems.

For the paper, go to http://www.nag.co.uk/doc/techrep/pdf/tr1_12.pdf

 

==-

Personally, I think this paper is a marvelous piece of work, but my opinion couldn’t be viewed as objective because I’m the author of it. 😉 Perhaps I could mention though that it’s also been put up on the Physics World site athttp://physicsworld.com/cws/channel/whitepapers.

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Quant development: What can NAG quant analytics library do for you in 2012!

Quant development: What can NAG quant analytics library do for you in 2012!

Happy New Year to you all.

It’s fantastic to see so many new members to the group. The official Numerical Algorithms Group on Linkedin has over 600 members and is growing daily.

I’d like to ask members of the group a question. If NAG could do one thing for you in 2012 what would it be (product or service related requests please :-))? We’ll try to respond to each request.

 

==

Expand the coverage of your GPU product. One possible ‘quick-win’ would be to implement GPU matrix-matrix multiply and then use this as a drop-in replacement for the standard CPU dgemm in various routines. This is the approach taken by Maple for example.

 

Thank you Mike. NAG have done some experimental work in this area. I’ll see if I can get an update and find out what information we can share.

 

Keep up the excellent online documentation. That documentation is a very valuable resource.

Thanks for that. That’s good to hear.

 

==

good suggestion, and one which we have been actively investigating. Our plans are to make GPU accelerated versions of our CPU libraries available for experimentation and evaluation.
These libraries will make run-time decisions about where all level 3 BLAS operations take place, whether on the CPU or on the GPU (using CUBLAS), based on auto-tuning data. We are also looking into using a selection of important routines from MAGMA in this manner, thus providing some GPU-accelerated LAPACK functionality.
This will enable existing users of the NAG libraries to re-link their applications and make use of GPUs for appropriate problem sizes without changing source code.
We are currently putting CUBLAS and MAGMA through our stringent tests in order to ensure the same quality of results are returned to the user wherever the computation takes place.

 

==

That’s great, thanks. Sounds like there will be a lot of new technology to try out in 2012–I’m looking forward to it

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Copulas: a NAG Library Spotlight for quant analytics and quant development

Copulas: a NAG Library Spotlight for quant analytics and quant development

In statistics, a copula can be thought of as defining the correlation structure for a family of multivariate distributions. Each distribution in the family is constructed by “gluing” together two or more univariate distributions, with the copula supplying the “glue”. Copulas can be applied to a wide range of simulation problems.

In Mark 23 of the NAG Fortran Library there are eight copulas including the Gaussian, Clayton/Cook-Johnson, Frank and Student’s t copulas.

Further detail can be found at http://www.nag.co.uk/numeric/fl/newarticles23

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Our NAG Quantlib comparison for quant development

Our NAG Quantlib comparison for quant development
This has become one of most popular items on this site. As a result, we wanted to list the features and pros and cons of each quant library.
I like QuantLib for a number a reasons.
1. It is true open source where you can get the code for the cost of $0.
2. The front end QuantLibXL is a great way to learn how a typical front end Excel for an investment bank, hedge fund, or prop shop. This is a very typical front end for traders in these kinds of environments.
3. The backend of QuantLib is done in C++ which makes it one of the fastest possible with this language.
4. There are so many bridges to the library through popular languages like Java, Python, Matlab, or R.

As for NAG, I am perplexed why I would use this commercial product over something like QuantLib. According to them, they offer regular updates and professional support. I guess this gets into that classic open source versus commercial product. In this case, I support the open source way with QuantLib.
As for NAG, it does not mean they are a bad company. They do offer some interesting product including a data mining product, tool boxes for Matlab, a parallel library, and other stuff. Don’t ask me how much this stuff costs as I don’t know sadly.
QuantLib features:
• Numeric types
• Currencies and FX rates
• Date and time calculations
o Calendars
o Day counters
• Pricing engines
o Asian option engines
o Barrier option engines
o Basket option engines
o Cap/floor engines
o Cliquet option engines
o Forward option engines
o Quanto option engines
o Swaption engines
o Vanilla option engines
• Finite-differences framework
• Short-rate modelling framework
• Financial instruments
• Lattice methods
• Math tools
• Monte Carlo framework
• Design patterns
• Stochastic processes
• Term structures
• Utilities
• QuantLib macros
o Numeric limits
o Debugging macros
• Output manipulators

NAG for .NET features:
• Local and global optimization
• Statistics including:
o nearest correlation matrix
o regression analysis
o time series analysis
o copulas
• Pseudorandom number generators
• Quasi-random number generators
• Wavelet transforms
• Special functions
• Numerical integration (Quadrature)
• Roots of one or more transcendental equations
• Summation of Series
• Least-squares and eigenvalue problems
• Curve and surface fitting
• Linear equations
• Interpolation
“Easy to use in C#, Visual Basic, Visual C++ and F#”

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

F# .NET NAG numerical library with Integration, Interpolation,Approximation, RNG, Time Series Analysis, and Optimization

NAG has just released their latest numerical library; the NAG Library for .NET. This is the first release of the library and includes over 400 methods for key mathematical and statistical areas, including Wavelet Transforms, Integration, Interpolation and Approximation, Random Number Generators, Time Series Analysis, and Optimization. The Optimization chapter contains methods for solving LP-, QP-, LS- and NLP-problems without constraints or with constraints. A global optimizer is also included, solving problems without constraints but with bounds on the variables.
The example in the link below illustrates how to solve a LS optimization problem using the NAG Library for .NET from F#. The problem is stated as follows: min 1/2 || b – Ax || ^ 2, where A is a (10 x 9)-matrix and b is a (10 x 1)-vector. The variables (x1,…,x9) are bounded and there are 3 general constraints.

http://www.nag.co.uk/doc/TechRep/pdf/tr6_10.pdf

For further questions regarding the usage of the .NET library we – the technical team at NAG (support@nag.co.uk) – would be happy to give anyone help using the .NET Lib for the first time or just chat…

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!