cal.setTime(endDate);
cal.add(Calendar.YEAR, -option.intValue());
cal.set(Calendar.DAY_OF_MONTH, 1);
cal.add(Calendar.DATE, -1);
SecurityPerformanceSnapshot sps = null;
ReportingPeriod.FromXtoY period = new ReportingPeriod.FromXtoY(cal.getTime(), endDate);
if (clientSnapshot != null)
sps = SecurityPerformanceSnapshot.create(client, period);
else
sps = SecurityPerformanceSnapshot.create(client, portfolioSnapshot.getSource(), period);
StatementOfAssetsContentProvider contentProvider = (StatementOfAssetsContentProvider) assets
.getContentProvider();
for (Element e : contentProvider.elements)
{
if (e.isSecurity())
{
for (SecurityPerformanceRecord r : sps.getRecords())
{
if (r.getSecurity().equals(e.getSecurity()))
{
e.setPerformance(option, r);
break;