Category archives for Programming

Speed-up of MATLAB: Just-in-time compiler JIT

Sometimes, MATLAB seems to be slow and inefficient. MATLAB is great for prototyping and interactive analysis, but sometimes execution speed is crucial. The MathWorks proposes to vectorized your code. Recently, I found that this is not always the best solution for higher speed. A better solution comes from the sparsely documented JIT Compiler which was already introduced […]

Historical performance lies! Beware of survivor bias.

Often you find studies how well a specific fund or trading strategy has performed. You must be aware of the fact that basically all studies based on historical data lie – or at least do not tell the full story. There are two highly underestimated effects: Survivor bias and fat tails. Both effects make poor […]

Financial Modelling (with Matlab Source): A great new book

Book Cover

Joerg Kienitz and Daniel Wetterau present “Financial Modelling: Theory, Implementation and Practice with MATLAB Source”, a great resource on state-of-the-art models in financial mathematics. The authors try to bridge the gap between current research topics and an implementation which can be applied in the real world. That means the authors are neither afraid of practical […]

GPU Computing News: Jacket is aquired by The MathWorks

Graphics Card

After benchmarking the GPU performance of Accelereyes Jacket and Matlab PCT, I found that Jacket pushes the limit to best performance much harder than PCT. Now, according to the Accelereyes Blog, The MathWorks took over Jacket. New Jacket licenses are not available any more. Consequently, for a moment, the only available options left for GPU […]

UI Revolution in MATLAB 8 (R2012b): Is It Worth an Update?

Screenshot of Matlab 8 (R2012b)

Finally, after at least 13 years of slow GUI evolution from MATLAB 5, The MathWorks decides to break with the past and offer a graphical revolution for MATLAB 8. MATLAB 8 – R2012b comes with a fresh ribbon style GUI known from MS Office. Another interesting change is the publishing of so-called Apps. After Apple and […]

Is Windows 8 good for Business Users, esp. Quants?

Being member of the MSDN, I just installed and tested the new Windows 8, Office 2013 and Visual Studio 2012. The step in MS Windows evolution is actually quite big and in the following, you find my first impression.

MATLAB GPU toolbox: PCT, GPUMat and Jacket revisted

In my last benchmark of the MATLAB GPU toolboxes, I compared PCT from The MathWorks, Jacket from Accelereyes and GPUMat from GPYou. I now updated theses results with new hardware and new some more optimized code. Previously, we used a GeForce GTX 275. Now, we also use the GeForce GTX 520 Ti. On this hardware, […]

SeeMore: A Struct Viewer for the MATLAB console

Everything to String? How the simple MATLAB script “seemore” can cure the curse of the console. For about 50 years programmers had learned to love their monospaced console output. For log files, debugging output or even regular results hardly anything could seriously challenge the text console as the primary output of choice. However, a new feature […]

Matlab GPU toolbox: Benchmarking Accelereyes vs. MathWorks vs. GP-YOU?

Graphics Card

There is a great option for speed-up of your Matlab code: Use your graphics card. If you have an Nvidia graphics card, there is a whole universe of optimized code for these cards. The underlying technology is called CUDA and many of the required functions for a transparent usage from Matlab already exist. There are […]

How Can I Price an Option with a PDE Method in Matlab?

Values of European Put Option computed using a PDE solver

In this article, we build a very simple PDE solver for the Black-Scholes Equation. Using the Finite Volume Discretization Method, we derive the equations required for an efficient implementation in Matlab. The implicit Euler time-stepping of the solver guarantees a stable behavior and convergence. All posts in this series: Basics of a PDE solver in Matlab Pricing American options with […]

How can I implement Monte-Carlo Simulations in MS Excel?

Monte-Carlo simulation is a very import tool for assessing all kinds of risks and chances. It it widely used in project management, option pricing and business valuation. Often, the input data and the reporting should be placed in MS Excel. This article presents the different options available for combining Monte-Carlo simulation and MS Excel.

The Cost of Redundancy

The Cost of Redundancy Expensive resources spent on computer grids are often wasted. An example from the financial industry teaches how repeated and redundant calculations can eat up all the computing power. Theta Proxy, a simple and yet generic solution, has the potential to save millions in server costs. Nowadays much of the computation time […]

Theta Proxy promises speed-up of MS Excel UDFs — How fast is it?

Car in Plasma

Theta Proxy XL is a new product from my company Thetaris. It promises speed-ups of several orders of magnitude. Here, I present some benchmark results. These will help you to decide when to apply Theta Proxy XL and when to stay with plain MS Excel. Test Case 1: European Option VBA Monte-Carlo Code (2 free […]

What is a Good Design for a Pricing Library? Use a Payoff Description Language

3d lamp with jigsaw puzzle isolated on the white background

A good library design requires a separation of the functionality into modules with an appropriate API. The size of the modules is determined by the application. While for a simple trading application a good API might contain everything from fitting the stochastic processes to pricing an option under a single function, this is completely insufficient for assessing model […]

How can I create a Matlab Class for generating a Stochastic Process for ThetaML?

Since version 2008a, the Matlab m-language is extended to include some object orientation. This object-oriented programming style allows reuse, inheritance, encapsulation, and reference behavior. Example The following m-code is a generic abstract class for implementing classes which generate processes accessible in ThetaML. The object following class generates a Geometric Brownian Motion. This process can be accessed in […]

How can I visualize my model data in an interactive webpage?

A brilliant website is the perfect example for user friendly interactive data visualization: Gapminder. This website presents statistical data about the countries of the world and how it changes in time. A user-friendly AJAX user interface allows you to get gain new insights exploring this data. They have done a great job. Google bought this […]

How do I connect Java with MS Excel? Try Webservices with SOAP!

It is possible to connect Java and MS Excel using various technologies. Some of theses technologies include COM and DCOM wrappers like Groovy Scriptom,  or J-Interop. Or other direct addin solutions like XLLoop. In this article, we want to follow a different paths: Webservices with SOAP. This connection type is designed for the internet with […]

What shall I choose for implementing an Excel plugin and UDF?

This question often arises, when you need to provide pricing functions for end-users and connect them to data sources, especially real-time data feeds. The answer heavily depends on your existing code you would like to include.