label = categorical({'IBS';'ZEN';'RE';'LRS';'SEASONAL';'AAA';'COMBOCOMM';'A30';'BALANCE'});
temp = [ibs_perf; zen_perf; re_perf; lrs_perf; sea_perf; aaa_perf; com_perf; a30_perf; bal_perf];
bar(label,diag(temp),0.5,'stacked')
title('Strategies Performance Attribution','FontSize', 16)
set(gcf, 'Position', get(0, 'Screensize'));
grid on
grid minor
ylim([ylim2-0.1 ylim1+0.1])
lim = get(gca,'ytick');
a=[cellstr(num2str(get(gca,'ytick')'))];
pct = char(ones(size(a,1),1)*'%');
new_yticks = [char(a),pct];
set(gca,'yticklabel',new_yticks)
for i = 1:size(temp,1)
if temp(i,1) >= 0
text(label(i,1),temp(i,1),strcat(num2str(temp(i,1),'%0.2f'),'%'),...
'HorizontalAlignment','center',...
'VerticalAlignment','bottom')
else
text(label(i,1),temp(i,1),strcat(num2str(temp(i,1),'%0.2f'),'%'),...
'HorizontalAlignment','center',...
'VerticalAlignment','top')
end
end