Class PortfolioConstruction.Book

java.lang.Object
com.quantfinlib.alpha.PortfolioConstruction.Book
Enclosing class:
PortfolioConstruction

public static final class PortfolioConstruction.Book extends Object
A constructed book with what it actually achieved.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Book(double[] weights, double gross, double net, boolean grossShortfall)
    Creates the value; array and collection arguments are copied.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
     
    double
    gross.
    boolean
    grossShortfall (true when gross fell below 90% of the target (too few names for the cap, or too few scored names)).
    int
     
    double
    net()
    net.
     
    double
    weights(int i)
    Element i of weights.
    double[]
    A fresh copy of weights.
    int
    Length of weights.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Book

      public Book(double[] weights, double gross, double net, boolean grossShortfall)
      Creates the value; array and collection arguments are copied.
      Parameters:
      gross - achieved Σ|w|
      net - achieved Σw
      grossShortfall - true when gross fell below 90% of the target (too few names for the cap, or too few scored names)
  • 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.
    • gross

      public double gross()
      gross.
    • net

      public double net()
      net.
    • grossShortfall

      public boolean grossShortfall()
      grossShortfall (true when gross fell below 90% of the target (too few names for the cap, or too few scored names)).
    • 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