DoubleTimeSeries<?>[] series = TimeSeriesIntersector.intersect(assetReturn, marketReturn);
assetReturn = series[0];
marketReturn = series[1];
final CAPMBetaCalculator calculator = getBetaCalculator(constraints.getValues(ValuePropertyNames.COVARIANCE_CALCULATOR),
constraints.getValues(ValuePropertyNames.VARIANCE_CALCULATOR));
final double beta = calculator.evaluate(assetReturn, marketReturn);
return Sets.newHashSet(new ComputedValue(new ValueSpecification(ValueRequirementNames.CAPM_BETA, target.toSpecification(), resultProperties), beta));
}
@Override
public Set<ValueRequirement> getRequirements(final FunctionCompilationContext context, final ComputationTarget target, final ValueRequirement desiredValue) {