org.ojalgo.finance.portfolio
Class SimpleAsset
java.lang.Object
org.ojalgo.finance.portfolio.FinancePortfolio
org.ojalgo.finance.portfolio.SimpleAsset
public final class SimpleAsset
- extends FinancePortfolio
|
Method Summary |
double |
getMeanReturn()
The mean/expected return of this instrument. |
double |
getVolatility()
Volatility refers to the standard deviation of
the change in value of an asset with a specific
time horizon. |
BigDecimal |
getWeight()
Assuming there is precisely 1 weight - this class is used to
describe 1 asset (portfolio member). |
List<BigDecimal> |
getWeights()
This method returns a list of the weights of the Portfolio's
contained assets. |
SimpleAsset
public SimpleAsset(FinancePortfolio aPortfolio,
Number aWeight)
SimpleAsset
public SimpleAsset(Number aWeight)
SimpleAsset
public SimpleAsset(Number aMeanReturn,
Number aVolatility)
SimpleAsset
public SimpleAsset(Number aMeanReturn,
Number aVolatility,
Number aWeight)
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. Calling FinancePortfolio.shift(Number) with an appropriate
argument will transform between absolute and excess return.
- Specified by:
getMeanReturn in class FinancePortfolio
getVolatility
public double getVolatility()
- Description copied from class:
FinancePortfolio
- Volatility refers to the standard deviation of
the change in value of an asset with a specific
time horizon. It is often used to quantify the risk of the
asset over that time period.
Subclasses must override either FinancePortfolio.getReturnVariance() or FinancePortfolio.getVolatility().
- Overrides:
getVolatility in class FinancePortfolio
getWeight
public BigDecimal getWeight()
- Assuming there is precisely 1 weight - this class is used to
describe 1 asset (portfolio member).
getWeights
public List<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