% Plot stock data estimated scores to see how the 
% different stock sectors were affected during each week. 

load stockreturns

[loadspm,spvarpm,rotatepm,stats,F] = factoran(stocks,3,'rotate','promax');

subplot(1,1,1); 
plot3(F(:,1),F(:,2),F(:,3),'b.');
line([-4 4 NaN 0 0 NaN 0 0], [0 0 NaN -4 4 NaN 0 0],...
       [0 0 NaN 0 0 NaN -4 4], 'Color','black');
xlabel('Financial Sector'); 
ylabel('Retail Sector'); 
zlabel('Technology Sector');
grid on; 
axis square;
view(-22.5, 8);