Rank: 119037 based on 0 downloads (last 30 days) and 0 file submitted
photo

Justinas Barauskas

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Justinas Barauskas View all
Updated File Comments Rating
17 Mar 2012 Algorithmic Trading with MATLAB - 2010 Files from the November 18, 2010 webinar. Author: Stuart Kozola

Hi is just wanted a sharpe question :)

%%
% Develop a trading signal and performance measures. We'll assume 250
% trading days per year.
s = zeros(size(BundClose));
s(lead>lag) = 1; % Buy (long)
s(lead<lag) = -1; % Sell (short)
r = [0; s(1:end-1).*diff(BundClose)]; % Return
sh = sqrt(250)*sharpe(r,0); % Annual Sharpe Ratio

Hi Stuart,

if I am to use minute data(NOT DAILY as used in the example) does that mean i have to adjust the sharpe annual scaling as well?

i.e. sqrt(250*60*11)

17 Mar 2012 Trading strategy back tester This program shows the profit and lost of using different trading strategies on Singapore stocks. Author: Donny Lee

what do i need to change in the convert function so that the data imports correctly?

i have EURUSD data which has time in the separate column and different data separations...

2007.03.30 17:04 1.3376 1.3377 1.3375 1.3376 57
2007.03.30 17:05 1.33755 1.3376 1.3374 1.3375 65

where as dbs data looks like this:
02/11/2010 09:00 14.22 14.22 14.2 14.2 4000 56860

17 Mar 2012 Trading strategy back tester This program shows the profit and lost of using different trading strategies on Singapore stocks. Author: Donny Lee

DBS data is something like this:

02/11/2010 09:00 14.22 14.22 14.2 14.2 4000 56860

Contact us