org.ojalgo.finance.portfolio
Class SimpleInstrument
java.lang.Object
org.ojalgo.finance.portfolio.MeanVarianceAsset
org.ojalgo.finance.portfolio.SimpleInstrument
- All Implemented Interfaces:
- FinancePortfolio
public final class SimpleInstrument
- extends MeanVarianceAsset
SimpleInstrument
public SimpleInstrument(BigDecimal aMeanReturn,
BigDecimal aReturnVariance)
SimpleInstrument
public SimpleInstrument(BigDecimal aMeanReturn,
BigDecimal aReturnVariance,
BigDecimal aWeight)
getMeanReturn
public BigDecimal getMeanReturn()
- Description copied from class:
MeanVarianceAsset
- The mean/expected return of this asset.
May return either the absolute or excess return of the asset.
The context in which an instance is used should make it clear
which.
- Specified by:
getMeanReturn
in interface FinancePortfolio
- Specified by:
getMeanReturn
in class MeanVarianceAsset
getReturnVariance
public BigDecimal getReturnVariance()
- Description copied from class:
MeanVarianceAsset
- The asset's return variance.
Subclasses must override either MeanVarianceAsset.getReturnVariance() or MeanVarianceAsset.getVolatility().
- Specified by:
getReturnVariance
in interface FinancePortfolio
- Overrides:
getReturnVariance
in class MeanVarianceAsset
getWeight
public final BigDecimal getWeight()
- Assuming there is precisely 1 weight - this class is used to
describe 1 instrument (portfolio member).
getWeights
public List<BigDecimal> getWeights()
- Description copied from class:
MeanVarianceAsset
- This method returns a list of the weights of the Portfolio's contained
assets.
- Specified by:
getWeights
in interface FinancePortfolio
- Specified by:
getWeights
in class MeanVarianceAsset