Package com.wombat.mamda.options
Class MamdaOptionContract
- java.lang.Object
-
- com.wombat.mamda.options.MamdaOptionContract
-
public class MamdaOptionContract extends java.lang.ObjectA class that represents a single option contract. Instances of this object are typically created by the MamdaOptionChainListener. Applications may attach a custom object to each instance of MamdaOptionContract. Note: User applications can be notified of creation of MamdaOptionContract instances via the MamdaOptionChainListener.onOptionContractCreate() method. Note: It is possible to provide individual MamdaTradeHandler and MamdaQuoteHandler handlers for trades and quotes, even though the MamdaOptionChainHandler also provides a general callback interface for updates to individual contracts.
-
-
Field Summary
Fields Modifier and Type Field Description static charEXERCISE_STYLE_AMERICANstatic charEXERCISE_STYLE_CAPPEDstatic charEXERCISE_STYLE_EUROPEANstatic charEXERCISE_STYLE_UNKNOWNstatic charPC_CALLstatic charPC_PUTstatic charPC_UNKNOWN
-
Constructor Summary
Constructors Constructor Description MamdaOptionContract(java.lang.String symbol, java.lang.String exchange, java.util.Date expireDate, double strikePrice, char putCall)Constructor from expiration date, strike price, and put/call indicator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFundamentalHandler(MamdaFundamentalHandler handler)Add a MamdaFundamentalHandler for handling fundamental updates to this option contract.voidaddQuoteHandler(MamdaQuoteHandler handler)Add a MamdaQuoteHandler for handling quote updates to this option contract.voidaddTradeHandler(MamdaTradeHandler handler)Add a MamdaTradeHandler for handling trade updates to this option contract.java.lang.ObjectgetCustomObject()Return the custom object.java.lang.StringgetExchange()Return the exchange.chargetExerciseStyle()Return the exercise style.java.util.DategetExpireDate()Return the expiration date.java.lang.StringgetExpireDateStr()Return the expiration date as a commonly formatted string (MMMyy).MamdaFundamentalListenergetFundamentalListener()Return the current fundamental listener.MamdaFundamentalsgetFundamentalsInfo()Return the current fundamental fields.booleangetInView()Return whether this contract is in the "view" within the option chain.longgetOpenInterest()Return the open interest.chargetPutCall()Return the put/call indicator.MamdaQuoteRecapgetQuoteInfo()Return the current quote fields.MamdaQuoteListenergetQuoteListener()Return the current quote listener.doublegetStrikePrice()Return the strike price.java.lang.StringgetSymbol()Return the OPRA contract symbol.MamdaTradeRecapgetTradeInfo()Return the current trade fields.MamdaTradeListenergetTradeListener()Return the trade listener.voidsetCustomObject(java.lang.Object object)Add a custom object to this option contract.voidsetExerciseStyle(char exerciseStyle)Set the exercise style.voidsetInView(boolean inView)Set whether this contract is in the "view" within the option chain.voidsetOpenInterest(long openInterest)Set the open interest size.
-
-
-
Field Detail
-
PC_UNKNOWN
public static final char PC_UNKNOWN
- See Also:
- Constant Field Values
-
PC_CALL
public static final char PC_CALL
- See Also:
- Constant Field Values
-
PC_PUT
public static final char PC_PUT
- See Also:
- Constant Field Values
-
EXERCISE_STYLE_AMERICAN
public static final char EXERCISE_STYLE_AMERICAN
- See Also:
- Constant Field Values
-
EXERCISE_STYLE_EUROPEAN
public static final char EXERCISE_STYLE_EUROPEAN
- See Also:
- Constant Field Values
-
EXERCISE_STYLE_CAPPED
public static final char EXERCISE_STYLE_CAPPED
- See Also:
- Constant Field Values
-
EXERCISE_STYLE_UNKNOWN
public static final char EXERCISE_STYLE_UNKNOWN
- See Also:
- Constant Field Values
-
-
Method Detail
-
setOpenInterest
public void setOpenInterest(long openInterest)
Set the open interest size.
-
setExerciseStyle
public void setExerciseStyle(char exerciseStyle)
Set the exercise style.
-
getSymbol
public java.lang.String getSymbol()
Return the OPRA contract symbol.
-
getExchange
public java.lang.String getExchange()
Return the exchange.
-
getExpireDate
public java.util.Date getExpireDate()
Return the expiration date.
-
getExpireDateStr
public java.lang.String getExpireDateStr()
Return the expiration date as a commonly formatted string (MMMyy).
-
getStrikePrice
public double getStrikePrice()
Return the strike price.
-
getPutCall
public char getPutCall()
Return the put/call indicator.
-
getOpenInterest
public long getOpenInterest()
Return the open interest.
-
getExerciseStyle
public char getExerciseStyle()
Return the exercise style.
-
addTradeHandler
public void addTradeHandler(MamdaTradeHandler handler)
Add a MamdaTradeHandler for handling trade updates to this option contract.
-
addQuoteHandler
public void addQuoteHandler(MamdaQuoteHandler handler)
Add a MamdaQuoteHandler for handling quote updates to this option contract.
-
addFundamentalHandler
public void addFundamentalHandler(MamdaFundamentalHandler handler)
Add a MamdaFundamentalHandler for handling fundamental updates to this option contract.
-
setCustomObject
public void setCustomObject(java.lang.Object object)
Add a custom object to this option contract. Such an object might contain customer per-contract data.
-
getTradeInfo
public MamdaTradeRecap getTradeInfo()
Return the current trade fields.
-
getQuoteInfo
public MamdaQuoteRecap getQuoteInfo()
Return the current quote fields.
-
getFundamentalsInfo
public MamdaFundamentals getFundamentalsInfo()
Return the current fundamental fields.
-
getCustomObject
public java.lang.Object getCustomObject()
Return the custom object.
-
getTradeListener
public MamdaTradeListener getTradeListener()
Return the trade listener.
-
getQuoteListener
public MamdaQuoteListener getQuoteListener()
Return the current quote listener.
-
getFundamentalListener
public MamdaFundamentalListener getFundamentalListener()
Return the current fundamental listener.
-
setInView
public void setInView(boolean inView)
Set whether this contract is in the "view" within the option chain.- See Also:
MamdaOptionChain
-
getInView
public boolean getInView()
Return whether this contract is in the "view" within the option chain.- See Also:
MamdaOptionChain
-
-