Class PortfolioOptimizer.Allocation

java.lang.Object
com.quantfinlib.optimization.PortfolioOptimizer.Allocation
Enclosing class:
PortfolioOptimizer

public static final class PortfolioOptimizer.Allocation extends Object
An optimized allocation with its risk/return profile (same periodicity as the inputs).
  • Constructor Details

    • Allocation

      public Allocation(double[] weights, double expectedReturn, double volatility, double sharpe)
      Creates the value; array and collection arguments are copied.
  • Method Details

    • weights

      public double weights(int i)
      Element i of weights.
    • weightsLength

      public int weightsLength()
      Length of weights.
    • weightsCopy

      public double[] weightsCopy()
      A fresh copy of weights.
    • expectedReturn

      public double expectedReturn()
      expectedReturn.
    • volatility

      public double volatility()
      volatility.
    • sharpe

      public double sharpe()
      sharpe.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object