double delta_theta = 0.0, delta_rho = 0.0;
for (int i = 0; i < a.cashFlow.size(); i++) {
final CashFlow cashflow = a.cashFlow.get(i);
final Date d = cashflow.date();
if (d.gt(settlementDate)) {
delta_theta -= cashflow.amount()
* process.riskFreeRate().currentLink().zeroRate(d, rfdc, Compounding.Continuous, Frequency.Annual).rate()
* process.riskFreeRate().currentLink().discount(d);
delta_rho += cashflow.amount() * process.time(d) * process.riskFreeRate().currentLink().discount(t);
}
}