long valuation = security.getSecurityPrice(startDate.toDate()).getValue();
// calculate series
int index = 1;
DateMidnight date = startDate.plusDays(1);
while (date.compareTo(endDate) <= 0)
{
dates[index] = date.toDate();
long thisValuation = security.getSecurityPrice(date.toDate()).getValue();
long thisDelta = thisValuation - valuation;