I have a list of stocks that I would be interested in investing in, however, I would like to loops through to find which are the top performers.
My pseudo code would be something like this:
stocks = [sid(####),sid(####),sid(####),sid(####),sid(####),sid(####)]
for x in stocks
find stock value for 4 days ago, 3 days ago, 2 days ago
if value 4 days ago < value 3 days ago < value 2 days ago
then place stock in new vector
I know matlab and VBA pretty well - coding logic isn't the challenge for me but understanding the syntax is. I would appreciate any help at all: how to find stock prices and then how if the logic is true place stock number in new vector?
Thanks!