Class SimpleAsset

  • All Implemented Interfaces:
    java.lang.Comparable<FinancePortfolio>

    public final class SimpleAsset
    extends FinancePortfolio
    SimpleAsset is used to describe 1 asset (portfolio member).
    • Field Detail

      • myMeanReturn

        private final double myMeanReturn
      • myVolatility

        private final double myVolatility
      • myWeight

        private final java.math.BigDecimal myWeight
    • Constructor Detail

      • SimpleAsset

        public SimpleAsset​(java.lang.Comparable<?> weight)
      • SimpleAsset

        public SimpleAsset​(java.lang.Comparable<?> meanReturn,
                           java.lang.Comparable<?> volatility)
      • SimpleAsset

        public SimpleAsset​(java.lang.Comparable<?> meanReturn,
                           java.lang.Comparable<?> volatility,
                           java.lang.Comparable<?> weight)
      • SimpleAsset

        public SimpleAsset​(FinancePortfolio portfolio,
                           java.lang.Comparable<?> weight)
      • SimpleAsset

        private SimpleAsset()
    • Method Detail

      • getMeanReturn

        public double getMeanReturn()
        Description copied from class: FinancePortfolio
        The mean/expected return of this instrument. May return either the absolute or excess return of the instrument. The context in which an instance is used should make it clear which. return.
        Specified by:
        getMeanReturn in class FinancePortfolio
      • getWeight

        public java.math.BigDecimal getWeight()
        Assuming there is precisely 1 weight - this class is used to describe 1 asset (portfolio member).
      • getWeights

        public java.util.List<java.math.BigDecimal> getWeights()
        Description copied from class: FinancePortfolio
        This method returns a list of the weights of the Portfolio's contained assets. An asset weight is NOT restricted to being a share/percentage - it can be anything. Most subclasses do however assume that the list of asset weights are shares/percentages that sum up to 100%. Calling FinancePortfolio.normalise() will transform any set of weights to that form.
        Specified by:
        getWeights in class FinancePortfolio