Package com.opengamma.strata.product
Interface SecurityQuantity
-
- All Known Subinterfaces:
EtdPosition
,EtdTrade
,Position
,ResolvableSecurityPosition
,ResolvableSecurityTrade
,SecuritizedProductPortfolioItem<P>
,SecuritizedProductPosition<P>
,SecuritizedProductTrade<P>
,SecurityQuantityTrade
- All Known Implementing Classes:
BillPosition
,BillTrade
,BondFutureOptionPosition
,BondFutureOptionTrade
,BondFuturePosition
,BondFutureTrade
,CapitalIndexedBondPosition
,CapitalIndexedBondTrade
,DsfPosition
,DsfTrade
,EtdFuturePosition
,EtdFutureTrade
,EtdOptionPosition
,EtdOptionTrade
,FixedCouponBondPosition
,FixedCouponBondTrade
,GenericSecurityPosition
,GenericSecurityTrade
,IborFutureOptionPosition
,IborFutureOptionTrade
,IborFuturePosition
,IborFutureTrade
,OvernightFuturePosition
,OvernightFutureTrade
,SecurityPosition
,SecurityTrade
public interface SecurityQuantity
A quantity of a security.This is used to represent the total quantity of a
Security
. This is the base interface forPosition
and trades in securities, such asSecurityTrade
.Implementations of this interface must be immutable beans.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getQuantity()
Gets the quantity of the security.SecurityId
getSecurityId()
Gets the security identifier.
-
-
-
Method Detail
-
getSecurityId
SecurityId getSecurityId()
Gets the security identifier.This identifier uniquely identifies the security within the system.
- Returns:
- the security identifier
-
getQuantity
double getQuantity()
Gets the quantity of the security.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.
- Returns:
- the net quantity of the security that is held
-
-