Info

This question is closed. Reopen it to edit or answer.

pairs trading returns matlab

1 view (last 30 days)
alessandro caserta
alessandro caserta on 16 Oct 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
Good morning everyone
I can not understand how they are calculated returns in this part of the code.
s (i: i + N-1, 1) = -reg1.coeff (2). * s (i: i + N-1, 2);
return = sum ([0 0; s (1: end-1, : ). * diff (series2) - abs (diff (s)) * cost / 2], 2);
the prices of the series that I have to examine must be standardized ?
thank you so much for your time and cooperation regards
  1 Comment
Siddharth Sundar
Siddharth Sundar on 17 Oct 2014
Edited: Siddharth Sundar on 17 Oct 2014
Could you give some more information about where you get this piece of code from? If it is some code you are writing, it might be more helpful if you were to attach the complete code with its explanation here. You might also want to provide background information and some insight on what you are looking for in particular.
If you are referring to a File Exchange submission, you might want to contact the author directly as they will have a better idea about the code.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!