public interface SecurityQuantity
This is used to represent the total quantity of a Security.
This is the base interface for Position and trades in securities, such as SecurityTrade.
Implementations of this interface must be immutable beans.
| Modifier and Type | Method and Description |
|---|---|
double |
getQuantity()
Gets the quantity of the security.
|
SecurityId |
getSecurityId()
Gets the security identifier.
|
SecurityId getSecurityId()
This identifier uniquely identifies the security within the system.
double getQuantity()
This returns the net quantity of the underlying security. It can be negative if the security is effectively being sold.
For a trade, the quantity is positive if the security is being bought and negative if being sold. For a position, the quantity is positive if the net position is long and negative if the net position is short.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.