Rapid Prototyping Trading Strategies in MATLAB

I first used MATLAB at university back in 2001 (I know I am getting old). Over the years I have had a love hate relationship with MATLAB. Python is far superior however MATLAB is still widely used in the industry.

Now that MathWorks has changed it’s pricing MATLAB is affordable for the home user. I have used Octave for and I even tried Excel. None of these solutions have even come close to MATLAB. Given the widespread use in industry and the speed and flexibility I will test trading ideas in MATLAB.

“MATLAB is a high-level language and interactive environment that enables you to perform computationally intensive tasks faster than with traditional programming languages such as C, C++, and Fortran.” – MathWorks.com

Back in 2010 I first read Ernest Chan’s Book How to Build Your Own Algorithmic Trading Business. I found the book interesting however I didn’t implement any of the ideas from the book. I have got the book of the shelf and I am going to work through it. Along with his to other more recent books.

How to Build Your Own Algorithmic Trading Business

How to Build Your Own Algorithmic Trading Business

MATLAB & Solarized Colour Scheme

MTALAB 2018b is much more Linux friendly then previous versions. The menu items are now all well laid out in menu bar. Below is a basic screenshot showing the setup I use. For all my programming work I use a solarized colour theme with Monaco as the font face. When you spend at least 8 hours a day looking at a computer screen I have found these colour schemes to be easier on the eyes.

Matlab 2018a Workspace layout

My Matlab 2018a Workspace layout.

Clean up MATLAB Environment

I am always looking to save time so I wrote a quick clean-up script that removes all variables, clears history and clears the command window. It is trivial but I have posted it below as it might be helpful to someone.

% simple script to clean up workspace  
% remove vars

% clear command window

% remove command history 


No Responses

Leave a Reply