1. double sigmaPortfolioFundU = Math.Pow(omPortfolioFundStDevU[0, 0], .5);
1.1. Matrix omPortfolioFundStDevU = omFWUT * (pCorr.RiskAdjustedCorrelation * omFWU);
1.1.1. Matrix omFWU = new Matrix(dFundWeightsUp, dFundWeightsUp.Length);
1.1.1.1. double[] dFundWeightsUp = FundWeightsUp(portfolio, pCorr, Xposition, effectiveDate);
1.1.1.1.1. double[] dFundWeightsUp = portfolio.PositionsList.Where(t => t.SourceID == SystemConstants.SRC_HFHIERARCHY_01 && t.EffectiveDate == effectiveDate).OrderBy(t => t.Security.SecurityID).Select(t => t.PortfolioWeight).ToArray();
1.1.1.1.2. Correlation pCorr = new Correlation(portfolio, portfolio.AnalyticsStartDate, effectiveDateEndPeriod);
1.1.2. Matrix omFWUT = Matrix.Transpose(omFWU);
1.1.3. Matrix RiskAdjustedCorrelation = Matrix.MultipleRowColumn(Matrix.MultipleRowColumn(CorrelationMatrix, FundStDev, 1), FundStDev, 2);
1.1.3.1. CorrelationMatrix = new Matrix(_CorrelationImplementation._correlationMatrix);
1.1.3.1.1. _CorrelationImplementation = sCorrelation;
1.1.3.2. FundStDev, fundStDev[x] = double.IsNaN(stDevAnnualized) ? 0 : stDevAnnualized;
1.1.3.2.1. double stDevAnnualized = perfList.StDevPAnnualized();
2. double pCorr.SigmaPortfolio = Math.Pow(PortfolioStDev[0, 0], .5);
2.1. Matrix PortfolioStDev = FundActualWeightTransposedMatrix * (RiskAdjustedCorrelation * FundActualWeightMatrix);
2.1.1. Matrix FundActualWeightMatrix = new Matrix(FundActualWeights, FundActualWeights.Length);
2.1.1.1. AbstractPosition position = portfolio.PositionsList.SingleOrDefault(t => t.Security != null && t.SourceID == SystemConstants.SRC_HFHIERARCHY_01 && t.Security.SecurityID == securityID && t.RollupCodeValue == null && t.EffectiveDate == effectiveDate); fundActualWeights[x] = position.PortfolioWeight;
2.1.2. Matrix FundActualWeightTransposedMatrix = new Matrix(FundActualWeights, FundActualWeights.Length); FundActualWeightTransposedMatrix.Transpose();
2.1.3. Matrix RiskAdjustedCorrelation = Matrix.MultipleRowColumn(Matrix.MultipleRowColumn(CorrelationMatrix, FundStDev, 1), FundStDev, 2);