Interface Security
- 
- All Known Subinterfaces:
- EtdSecurity,- LegalEntitySecurity,- RateIndexSecurity
 - All Known Implementing Classes:
- BillSecurity,- BondFutureOptionSecurity,- BondFutureSecurity,- CapitalIndexedBondSecurity,- DsfSecurity,- EtdFutureSecurity,- EtdOptionSecurity,- FixedCouponBondSecurity,- GenericSecurity,- IborFutureOptionSecurity,- IborFutureSecurity,- OvernightFutureSecurity
 
 public interface SecurityA security that can be traded.A security is one of the building blocks of finance, representing a fungible instrument that can be traded. This is intended to cover instruments such as listed equities, bonds and exchange traded derivatives (ETD). Within Strata, a financial instrument is a security if it is a standardized exchange-based contract that can be referenced by a SecurityId. The security can be looked up inReferenceDatausing the identifier.It is intended that Over-The-Counter (OTC) instruments, such as an interest rate swap, are embedded directly within the trade, rather than handled as one-off securities. Implementations of this interface must be immutable beans. 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PositioncreatePosition(PositionInfo positionInfo, double longQuantity, double shortQuantity, ReferenceData refData)Creates a position based on this security from a long and short quantity.PositioncreatePosition(PositionInfo positionInfo, double quantity, ReferenceData refData)Creates a position based on this security from a net quantity.SecuritizedProductcreateProduct(ReferenceData refData)Creates the product associated with this security.SecurityQuantityTradecreateTrade(TradeInfo tradeInfo, double quantity, double tradePrice, ReferenceData refData)Creates a trade based on this security.default CurrencygetCurrency()Gets the currency that the security is traded in.SecurityInfogetInfo()Gets the standard security information.default SecurityIdgetSecurityId()Gets the security identifier.ImmutableSet<SecurityId>getUnderlyingIds()Gets the set of underlying security identifiers.SecuritywithInfo(SecurityInfo info)Returns an instance with the specified info.
 
- 
- 
- 
Method Detail- 
getInfoSecurityInfo getInfo() Gets the standard security information.All securities contain this standard set of information. It includes the identifier, information about the price and an extensible data map. - Returns:
- the security information
 
 - 
getSecurityIddefault SecurityId getSecurityId() Gets the security identifier.This identifier uniquely identifies the security within the system. - Returns:
- the security identifier
 
 - 
getCurrencydefault Currency getCurrency() Gets the currency that the security is traded in.- Returns:
- the trading currency
 
 - 
getUnderlyingIdsImmutableSet<SecurityId> getUnderlyingIds() Gets the set of underlying security identifiers.The set must contain all the security identifiers that this security directly refers to. For example, a bond future will return the identifiers of the underlying basket of bonds, but a bond future option will only return the identifier of the underlying future, not the basket. - Returns:
- the underlying security identifiers
 
 - 
withInfoSecurity withInfo(SecurityInfo info) Returns an instance with the specified info.- Parameters:
- info- the new info
- Returns:
- the instance with the specified info
 
 - 
createProductSecuritizedProduct createProduct(ReferenceData refData) Creates the product associated with this security.The product of a security is distinct from the security. The product includes the financial details from this security, but excludes the additional information. The product also includes the products of any underlying securities. - Parameters:
- refData- the reference data used to find underlying securities
- Returns:
- the product
- Throws:
- UnsupportedOperationException- if the security does not contain information about the product model
 
 - 
createTradeSecurityQuantityTrade createTrade(TradeInfo tradeInfo, double quantity, double tradePrice, ReferenceData refData) Creates a trade based on this security.This creates a trade of a suitable type for this security. - Parameters:
- tradeInfo- the trade information
- quantity- the number of contracts in the trade
- tradePrice- the price agreed when the trade occurred
- refData- the reference data used to find underlying securities
- Returns:
- the trade
 
 - 
createPositionPosition createPosition(PositionInfo positionInfo, double quantity, ReferenceData refData) Creates a position based on this security from a net quantity.This creates a position of a suitable type for this security. - Parameters:
- positionInfo- the position information
- quantity- the number of contracts in the position
- refData- the reference data used to find underlying securities
- Returns:
- the position
 
 - 
createPositionPosition createPosition(PositionInfo positionInfo, double longQuantity, double shortQuantity, ReferenceData refData) Creates a position based on this security from a long and short quantity.This creates a position of a suitable type for this security. The long quantity and short quantity must be zero or positive, not negative. - Parameters:
- positionInfo- the position information
- longQuantity- the long quantity in the position
- shortQuantity- the short quantity in the position
- refData- the reference data used to find underlying securities
- Returns:
- the position
 
 
- 
 
-