public class PortfolioUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static double |
getPortfolioReturns(Vector weights,
Vector mu)
Computes the expected portfolio return.
|
static double |
getPortfolioVariance(Vector weights,
Matrix sigma)
Computes the portfolio variance.
|
static double |
getSharpeRatio(Vector weights,
Vector mu,
Matrix sigma,
double benchmarkRate)
Computes the portfolio Sharpe ratio.
|
public static double getPortfolioReturns(Vector weights, Vector mu)
weights - the weights of assetsmu - the expected returns of assetspublic static double getPortfolioVariance(Vector weights, Matrix sigma)
weights - the weights of assetssigma - the covariances of assetspublic static double getSharpeRatio(Vector weights, Vector mu, Matrix sigma, double benchmarkRate)
weights - the weights of assetsmu - the expected returns of assetssigma - the covariances of assetsbenchmarkRate - the risk free/benchmark rateCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.