public long calculateStandardDeviationSquaredFemtos() {
        long totalFemtos = 0L;
        for (AssetClassAllocation a : assetClassAllocationList) {
            for (AssetClassAllocation b : assetClassAllocationList) {
                if (a == b) {
                    totalFemtos += a.getQuantifiedStandardDeviationRiskMicros() * b.getQuantifiedStandardDeviationRiskMicros()
                            * 1000L;
                } else {
                    // Matches twice: once for (A, B) and once for (B, A)
                    long correlationMillis = a.getAssetClass().getCorrelationMillisMap().get(b.getAssetClass());
                    totalFemtos += a.getQuantifiedStandardDeviationRiskMicros() * b.getQuantifiedStandardDeviationRiskMicros()
                            * correlationMillis;
                }
            }
        }
        return totalFemtos;
    }
public long calculateStandardDeviationSquaredFemtos() {
        long totalFemtos = 0L;
        for (AssetClassAllocation a : assetClassAllocationList) {
            for (AssetClassAllocation b : assetClassAllocationList) {
                if (a == b) {
                    totalFemtos += a.getQuantifiedStandardDeviationRiskMicros() * b.getQuantifiedStandardDeviationRiskMicros()
                            * 1000L;
                } else {
                    
                    long correlationMillis = a.getAssetClass().getCorrelationMillisMap().get(b.getAssetClass());
                    totalFemtos += a.getQuantifiedStandardDeviationRiskMicros() * b.getQuantifiedStandardDeviationRiskMicros()
                            * correlationMillis;
                }
            }
        }
        return totalFemtos;
    }
public long calculateStandardDeviationSquaredFemtos ( ) { long totalFemtos = 0L ; for ( AssetClassAllocation a : assetClassAllocationList ) { for ( AssetClassAllocation b : assetClassAllocationList ) { if ( a == b ) { totalFemtos += a . getQuantifiedStandardDeviationRiskMicros ( ) * b . getQuantifiedStandardDeviationRiskMicros ( ) * 1000L ; } else { // Matches twice: once for (A, B) and once for (B, A) long correlationMillis = a . getAssetClass ( ) . getCorrelationMillisMap ( ) . get ( b . getAssetClass ( ) ) ; totalFemtos += a . getQuantifiedStandardDeviationRiskMicros ( ) * b . getQuantifiedStandardDeviationRiskMicros ( ) * correlationMillis ; } } } return totalFemtos ; }
Not incremental.
Not incremental .