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 […]
Tag archives for Matlab
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 […]
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 […]
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 […]
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, […]
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 […]
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 […]
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.
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 […]
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 […]
Often, it is required to run multiple similar simulation models, e.g. for computation of Greeks like Delta, Gamma, Vega, etc. Another reason for multiple calls is that one wants to estimate the accuracy of a pricing. Using the Matlab Parallel Toolbox, this can be accelerated substantially.
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 […]
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 […]
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 […]
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.