function [Y] = load_spy_data() % LOAD_SPY_DATA - Loads the weekly closing prices for the SPY ETF % % Written by: % -- % John L. Weatherwax 2009-04-21 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- fid = fopen('./weekly_spy_prices.csv'); C = textscan(fid,'%d/%d/%d %f %f %f %f %f %f','delimiter',',','headerlines',1); fclose(fid); % extract just the adjusted closing prices: Y = C{9}; % send out the list in earliest time to latest time: Y = flipud(Y);