Tag archives for Matlab

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 […]

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 […]

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 Do Efficient PDE Solvers for Barrier Options Look Like?

Besides European and American Options, another challenge in option pricing is the valuation of Barrier Options. We will see that simply applying the algorithms from the previous posts does not converge well. Especially, pricing a long-term up-and-out barrier option is hard, due to the discontinuity of the payoff. 

How Can I Implement Early Exercise in a PDE Method pricing an American Put Option?

An American option is an option which the owner can exercise at any time during its lifetime. That means the option’s value cannot drop below the exercise value, i.e. the option value  of an American put option satisfies . (1) We use the above condition in the PDE solver (How Can I Price an Option with a PDE Method in Matlab?) to price an American […]

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 optimize my quantitative trading strategy, e.g. MACD signal?

In the previous post, we saw how to backtest a quantitative trading strategy. The result was, that we suspected that we should be able to find better constants for the MACD trading signal strategy. Now, we will use Matlab and Theta Suite in order to create an efficient optimization. Furthermore, we create a simple visualization […]

How can I backtest my quantitative trading strategy, e.g. MACD signal?

Many popular quantitative trading strategies are public for quite a while. Now, if you like to utilize such a strategy with real money, you must make sure that your strategy performs well. For simple strategies, MS Excel is perfect for this task. But, since we would like to use an optimization and a specific visualization […]

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 […]

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.

How do you get free historical market data?

This is a very important and usual task. Historical data is mainly required for risk management purposes, model validation and back-testing. For these tasks software systems like Theta Suite, Matlab, Java or Excel are the main work space. We need to import the data here.