/// <summary> /// Calculate the Global Minimum Variance Portfolio using the universe of assets and constraints defined in <paramref name="portfolio"/> /// </summary> /// <param name="portfolio">The portfolio definition</param> /// <param name="riskFreeRate">The risk-free rate specified as a fractional decimal value e.g. 0.05 for 5%</param> /// <returns>The Global Minimum Variance portfolio as an instance that implements <typeparamref name="IPortfolio"/></returns> public static IPortfolio CalcMinimumVariance(IPortfolio portfolio, double riskFreeRate) { #if RDEP if (!_initialized) { Initialize(); } #endif return(portfolio.CalculateMinVariancePortfolio()); }