Nag software For Finance


Published on

This presents all the math/stat software from NAG dedicated to financial modeling and quantitative analysis

Published in: Business
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Nag software For Finance

    1. 1. Numerical Excellence in Finance John Holden <ul><li>Banking on Monte Carlo and GPUs Paris, FRANCE </li></ul><ul><li>28 th January 2010 </li></ul>
    2. 2. Agenda <ul><li>NAG – An Introduction </li></ul><ul><li>NAG – Numerical Libraries </li></ul>
    3. 3. Introduction to NAG <ul><li>Founded in 1970 as a co-operative project in UK </li></ul><ul><li>Operates as a commercial, not-for-profit organization </li></ul><ul><li>Worldwide operations </li></ul><ul><ul><li>Oxford & Manchester, UK </li></ul></ul><ul><ul><li>Chicago, US </li></ul></ul><ul><ul><li>Tokyo, Japan </li></ul></ul><ul><ul><li>Taipei, Taiwan </li></ul></ul><ul><li>Over 3,000 customer sites worldwide </li></ul><ul><li>Staff of ~100 , over 50% technical, over 25 PhDs </li></ul><ul><li>£7m+ financial turnover </li></ul>10 Feb 2010
    4. 4. Portfolio <ul><li>Numerical Libraries </li></ul><ul><ul><li>Highly flexible for use in many computing languages, programming environments, hardware platforms and for high performance computing methods </li></ul></ul><ul><li>Connector Products for Excel, MATLAB and Maple and </li></ul><ul><ul><li>Giving users of the Excel and mathematical software packages MATLAB and Maple access to NAG’s library of highly optimized and often superior numerical routines and allowing easy integration </li></ul></ul><ul><li>NAG Fortran Compiler and GUI based Windows Compiler: Fortran Builder </li></ul><ul><li>Visualization and graphics software </li></ul><ul><ul><li>Build data visualization applications with NAG’s IRIS Explorer </li></ul></ul><ul><li>Consultancy services </li></ul>
    5. 5. Why bother? <ul><li>Numerical computation is difficult to do accurately </li></ul><ul><li>Problems of </li></ul><ul><ul><li>Overflow / underflow </li></ul></ul><ul><ul><ul><li>How does the computation behave for large / small numbers? </li></ul></ul></ul><ul><ul><li>Condition </li></ul></ul><ul><ul><ul><li>How is it affected by small changes in the input? </li></ul></ul></ul><ul><ul><li>Stability </li></ul></ul><ul><ul><ul><li>How sensitive is the computation to rounding errors? </li></ul></ul></ul><ul><li>Importance of </li></ul><ul><ul><li>error analysis </li></ul></ul><ul><ul><li>information about error bounds on solution </li></ul></ul>
    6. 6. NAG development philosophy <ul><li>First priority: accuracy </li></ul><ul><li>Second priority: performance </li></ul><ul><ul><li>How fast do you want the wrong answer? </li></ul></ul><ul><li>Algorithms chosen for </li></ul><ul><ul><li>usefulness </li></ul></ul><ul><ul><li>robustness </li></ul></ul><ul><ul><li>accuracy </li></ul></ul><ul><ul><li>stability </li></ul></ul><ul><ul><li>speed </li></ul></ul>
    7. 7. Why Use NAG Maths Libraries? <ul><li>Global reputation for quality – accuracy, reliability and robustness… </li></ul><ul><li>Extensively tested, supported and maintained code </li></ul><ul><li>Reduce development time </li></ul><ul><li>Concentrate on your key areas </li></ul><ul><li>Components </li></ul><ul><ul><li>Fit into your environment </li></ul></ul><ul><ul><li>Simple interfaces to your favourite packages </li></ul></ul><ul><li>Regular performance improvements! </li></ul>
    8. 8. NAG Library and Toolbox Contents <ul><li>NAG provides high-level maths and stats components </li></ul><ul><ul><li>Nonlinear equation solvers </li></ul></ul><ul><ul><li>Summation of series and transformations, FFTs </li></ul></ul><ul><ul><li>Quadrature </li></ul></ul><ul><ul><li>ODEs, PDEs and integral equations </li></ul></ul><ul><ul><li>Approximation and curve and surface fitting </li></ul></ul><ul><ul><li>Optimization and operations research </li></ul></ul><ul><ul><li>Dense l inear algebra , including LAPACK </li></ul></ul><ul><ul><li>Sparse linear systems and eigenproblems </li></ul></ul><ul><ul><li>Special functions </li></ul></ul><ul><ul><li>Random Number Generators </li></ul></ul><ul><ul><li>... </li></ul></ul>
    9. 9. Use of NAG Software in Finance <ul><li>Portfolio analysis / Index tracking / Risk management </li></ul><ul><ul><li>Optimisation, linear algebra, copulas… </li></ul></ul><ul><li>Derivative pricing </li></ul><ul><ul><li>PDEs, RNGs, multivariate normal, … </li></ul></ul><ul><li>Fixed Income/ Asset management / Portfolio Immunization </li></ul><ul><ul><li>Operations research </li></ul></ul><ul><li>Data analysis </li></ul><ul><ul><li>Time series, GARCH, principal component analysis, data smoothing, … </li></ul></ul><ul><li>Monte Carlo simulation </li></ul><ul><ul><li>RNGs </li></ul></ul><ul><li>…… </li></ul>
    10. 10. Don’t take our word for it…. <ul><li>Financial Maths Professors speed up their optimization </li></ul>
    11. 11. And more.. <ul><li>Senior Quant @ Tier 1 bank </li></ul><ul><li>“ concerning the ‘nearest correlation’ algo. </li></ul><ul><li>I have to say, it is very fast, it uses all the power of my pc and the result is very satisfactory.” </li></ul><ul><li> </li></ul><ul><li>“ I really like the NAG toolbox for MATLAB for the following reasons (among others): </li></ul><ul><li>It can speed up MATLAB calculations – see my article on MATLAB's interp1 function for example, and it has some functionality that can't currently be found in MATLAB.” </li></ul>
    12. 12. NAG Libraries Ease of Integration <ul><li>C++ (various) </li></ul><ul><li>C# / .NET </li></ul><ul><li>CUDA </li></ul><ul><li>Visual Basic </li></ul><ul><li>Java </li></ul><ul><li>Borland Delphi </li></ul><ul><li>Python </li></ul><ul><li>F# </li></ul><ul><li>… </li></ul><ul><li>and more </li></ul><ul><li>Excel </li></ul><ul><li>MATLAB </li></ul><ul><ul><li>SciLab, Octave </li></ul></ul><ul><li>Mathematica </li></ul><ul><li>Maple </li></ul><ul><li>PowerBuilder </li></ul><ul><li>R and S-Plus </li></ul><ul><li>SAS </li></ul><ul><li>… </li></ul><ul><li>… </li></ul><ul><li>and more </li></ul>
    13. 13. NAG and Excel.. <ul><li>Our libraries are easily accessible from Excel </li></ul><ul><ul><li>Calling DLLs using VBA </li></ul></ul><ul><ul><li>NAG provide VB Declaration Statements and Examples </li></ul></ul>
    14. 14. NAG and .NET <ul><li>NAG solutions for .NET </li></ul><ul><li>Call NAG C (or Fortran) DLL from C# </li></ul><ul><li>NAG Library for .NET (beta) </li></ul><ul><ul><li>“ a more natural solution” </li></ul></ul><ul><ul><li>DLL with C# wrappers </li></ul></ul><ul><ul><li>Integrated help </li></ul></ul><ul><li>NAG Library for .NET (Work-in-Progress) </li></ul><ul><ul><li>as above pure C# functions </li></ul></ul>
    15. 15. NAG Toolbox for MATLAB <ul><li>Contains essentially all NAG functionality </li></ul><ul><ul><li>not a subset </li></ul></ul><ul><li>Currently runs under Windows (32/64bit) or Linux (32/64-bit). </li></ul><ul><li>Installed under the usual MATLAB toolbox directory </li></ul><ul><li>Can be used with MATLAB compiler </li></ul><start MATLAB here G01AMF, demo>
    16. 16. Case study – e04uc vs fmincon <ul><li>A problem from a customer from a European bank. </li></ul><ul><li>The problem involves 48 variables and has 9 linear constraints. (No nonlinear constraints.) </li></ul><ul><li>No derivatives supplied. </li></ul><ul><li>fmincon required 1890 evaluations of the objective function and tool 87.6 seconds </li></ul><ul><li>e04uc required only 1129 evaluations and took 49.4 seconds </li></ul>
    17. 17. Subset of Eigenvalues and Eigenvectors <ul><li>Speedup </li></ul>Wednesday 10 February 2010 NAG Toolbox for MATLAB
    18. 18. Best Advice – Use the Decision Trees
    19. 19. NAG Library and Toolbox – recent additions <ul><li>Global optimization </li></ul><ul><li>ANOVA – Analysis of Variance </li></ul><ul><li>Nearest Correlation Matrix </li></ul><ul><li>Partial Least Squares Regression Analysis </li></ul><ul><li>Prediction intervals for fitted models </li></ul><ul><li>Option Pricing </li></ul><ul><li>Generalised Mixed Effect Regression </li></ul><ul><li>More Copulas </li></ul><ul><li>Extreme Value Theory Statistics </li></ul><ul><li>Fast quantile selection routine </li></ul><ul><li>Wavelets </li></ul><ul><li>Adoption of LAPACK 3.1 </li></ul><ul><li>New RNGs </li></ul><ul><ul><li>Scrambled Seq for QMC </li></ul></ul><ul><ul><li>Mersenne Twister </li></ul></ul><ul><ul><li>Sobol Sequence generator (50,000 dimensions) </li></ul></ul>
    20. 20. Other NAG software <ul><li>NAG’s High Performance libraries </li></ul><ul><ul><li>NAG SMP Library (for multi/many core/processor) </li></ul></ul><ul><ul><li>NAG Parallel Library (for clusters architectures - MPI) </li></ul></ul><ul><li>NAG Fortran Compiler </li></ul><ul><ul><li>Windows version with GUI & Debugger </li></ul></ul><ul><ul><li>Automatic Differentiation (AD) enabled </li></ul></ul><ul><ul><ul><li>In collaboration with RWTH Aachen University </li></ul></ul></ul><ul><li>Routines for SIMD architectures (GPUs etc) </li></ul><ul><ul><li>Early successes with Monte Carlo components on NVIDIA hardware </li></ul></ul><ul><ul><ul><li>In collaboration with Professor Mike Giles </li></ul></ul></ul>
    21. 21. Summary <ul><li>NAG for Quality, World-leading Numerical Software Components </li></ul><ul><ul><li>accurate, reliable, robust </li></ul></ul><ul><ul><li>extensively tested, supported and maintained code </li></ul></ul><ul><ul><li>updated for new architectures and new algorithms </li></ul></ul>
    22. 22. NAG Key Contacts <ul><li> </li></ul><ul><li>Technical Support and Help </li></ul><ul><li>[email_address] </li></ul><ul><li>Sales in France </li></ul><ul><li>[email_address] </li></ul><ul><li>Direct Dial +33 6 87 88 12 94 </li></ul><ul><li>NAGNews </li></ul>