View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Algorithmic Trading with MATLAB - 2009 update

5.0 | 7 ratings Rate this file 18 Downloads (last 30 days) File Size: 3.19 MB File ID: #24320 Version:
image thumbnail

Algorithmic Trading with MATLAB - 2009 update


Ameya Deoras (view profile)


01 Jun 2009 (Updated )

M-file scripts and Simulink models from webinar on 28 May 2009

| Watch this File

File Information

These are the files and some of the data that I used in my recent webinar on Algorithmic Trading. Data has been shortened for size reasons. Included are:
Nearest Neighbour model
Trailing stop-loss code
an illustration of Takens Theorem
Also included are Simulink models showing:
Moving Average crossover model
Simple tracking of the FTSE 100 - intro to basket trading
A bollinger band model using Stateflow
A simple market making system based on a paper by Sanmay Das

Required Products Financial Toolbox
DSP System Toolbox
MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (19)
14 Dec 2013 Hamed

Hamed (view profile)

Comment only
29 Aug 2013 Fuad

Fuad (view profile)

Would be great to have a look at the webinar for this. I'm struggling to find a working link... Has anyone else managed to find it?

Comment only
24 Jun 2012 Grigory

Does anyone have a working link to the webinar? The one Aly provided in 2009 is no longer working.

Comment only
14 Feb 2012 Qipeng

Qipeng (view profile)

I recently came across your webinar on Algorithmic Trading in 2009 and it is a great one. However for the " simple market making system based on a paper by Sanmay Das" part, I am wondering which paper you are refering to and it seems that this system is not about market making but a directional bet system. Finally, would you please provide more resource on the code "callnnpiter" such as relevant papers? I really appreciate it and thank you in advance!

Comment only
03 Jan 2011 Adam

Adam (view profile)

I tried the 'callnnpiter' with parfor ...loop and for ... loop, and got quite different results. I then checked the nnpiter.m. and found it rely on the order of the loop (So parfor cannot be used). Is this a bug?

15 Oct 2010 Deniz Graf

i'm playin around with the nnpiter function .. can anybody explain why the results vary from run to run (number of trades) and why i get completly different results if i change the parfor loop into a for loop?

Comment only
15 Oct 2010 Deniz Graf

sorry .. was just reading the comments and came to the stars, then it made a submission .. of course 5 stars, great work and sorry

15 Oct 2010 Deniz Graf

30 Aug 2010 Niall

Niall (view profile)

29 Jul 2010 Ankur Dani

In strategyAnalysis.m , what does its parameters (t,p,pos,th,data(:,4)) stand for? Its giving me errors for undefined parameters?
Is there any other way to run this code as the above variables does nt seem to be present in the variable window.
Can these parameters be externally set n how do we set them ?

20 Nov 2009 Roji

Roji (view profile)

Now I see... it does not use transaction costs: we sholud use:

pnl = ([0;x(2:end).*sig2(1:end-1)]);

instead of:

pnl = ([0;x(2:end).*sig2(1:end-1)-abs(diff(sig2))*0.000028]);

Wasn't it?

Thanks a lot

Comment only
19 Nov 2009 Roji

Roji (view profile)

18 Nov 2009 Roji

Roji (view profile)

Dear Aly,

Thanks for this great work. Though, my fault, running callnnpiter with GBPdata1sShort, results are different as in the webinar. The PnL graph shows different (cummulative losses instead of continuous profits). Does someone know why?

Comment only
21 Oct 2009 fan

fan (view profile)

thanks aly, your are really kind and selflessness to share all this to us. i wonder if you could tell us your new contact way/

my email is

Comment only
25 Sep 2009 ted p teng

ted p teng (view profile)

14 Aug 2009 Nick

Nick (view profile)

does itwork properly and what's the return you make with this?

Comment only
21 Jul 2009 Daronne Bonneau

Hi Aly,

Can Matlab connect to TTAPI (trading technologies) ?


Comment only
02 Jul 2009 Aly Kassam

hi Rob

the webinar is available here:

I hope you enjoy it, and thanks for the comments.


Comment only
01 Jul 2009 Rob

Rob (view profile)

Please post the Webinar video. Your last one was great.

Comment only
01 Sep 2016

Updated license

Contact us