public class MamdaOptionChain
extends java.lang.Object
Constructor and Description |
---|
MamdaOptionChain(java.lang.String symbol)
MamdaOptionChain Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addContract(java.lang.String contractSymbol,
MamdaOptionContract contract)
Add an option contract.
|
java.util.Iterator |
callIterator()
Return an iterator over all call option contracts.
|
void |
dump()
Print the contents of the chain to standard out.
|
MamdaOptionExpirationDateSet |
getAllExpirations()
Return a set of MamdaOptionExpirationDateSet.
|
double |
getAtTheMoney(short compareType)
Get the price of the option underlying.
|
MamdaOptionContract |
getContract(java.lang.String contractSymbol)
Find an option contract by OPRA symbol.
|
java.util.SortedSet |
getExchanges()
Return the superset of regional exchange identifiers for any
option in this chain.
|
boolean |
getIsPriceWithinPercentOfMoney(double price,
double percentage,
short compareType)
Return whether the price within a % of the money.
|
java.util.SortedSet |
getStrikePrices()
Return the superset of strike prices for this chain.
|
java.util.SortedSet |
getStrikesWithinPercent(double percentage,
short compareType)
Determine the set of strike prices that are included in a given
percentage range of the underlying price.
|
java.util.SortedSet |
getStrikesWithinRangeSize(int rangeLength,
short compareType)
Determine the set of strike prices that are included in a given
fixed size range of strikes surrounding the underlying price.
|
java.lang.String |
getSymbol()
Get the underlying symbol for the option chain.
|
MamdaQuoteListener |
getUnderlyingQuoteListener()
Make the underlying quote listener available externally.
|
MamdaTradeListener |
getUnderlyingTradeListener()
Make the underlying trade listener available externally.
|
java.util.Iterator |
putIterator()
Return an iterator over all put option contracts.
|
void |
removeContract(java.lang.String contractSymbol)
Remove an option contract.
|
void |
setSymbol(java.lang.String symbol)
Set the underlying symbol for the option chain.
|
void |
setUnderlyingQuoteListener(MamdaQuoteListener quoteListener)
Set the underlying quote listener information.
|
void |
setUnderlyingTradeListener(MamdaTradeListener tradeListener)
Set the underlying trade listener information.
|
public MamdaOptionChain(java.lang.String symbol)
symbol
- The underlying symbol.public void setSymbol(java.lang.String symbol)
symbol
- The underlying symbol.public java.lang.String getSymbol()
public void setUnderlyingQuoteListener(MamdaQuoteListener quoteListener)
quoteListener
- The quote listener for the chain.public void setUnderlyingTradeListener(MamdaTradeListener tradeListener)
tradeListener
- The trade listener for the chain.public MamdaQuoteListener getUnderlyingQuoteListener()
public MamdaTradeListener getUnderlyingTradeListener()
public MamdaOptionContract getContract(java.lang.String contractSymbol)
contractSymbol
- The option symbol.public java.util.SortedSet getExchanges()
public java.util.SortedSet getStrikePrices()
public void addContract(java.lang.String contractSymbol, MamdaOptionContract contract)
contractSymbol
- The option instrument symbol.contract
- The Mamda option contract representation.public void removeContract(java.lang.String contractSymbol)
public double getAtTheMoney(short compareType)
compareType
- The mode of calculation
(MamdaOptionAtTheMoneyCompareType
)MamdaOptionAtTheMoneyCompareType
public boolean getIsPriceWithinPercentOfMoney(double price, double percentage, short compareType)
price
- The strike price to check.percentage
- What % to check the strike price against.compareType
- What price we are checking against (see
MamdaOptionAtTheMoneyCompareType
)MamdaOptionAtTheMoneyCompareType
public java.util.SortedSet getStrikesWithinPercent(double percentage, short compareType)
percentage
- The percentage range of the underlying price.compareType
- Which underlying price to compare to.MamdaOptionAtTheMoneyCompareType
public java.util.SortedSet getStrikesWithinRangeSize(int rangeLength, short compareType)
rangeLength
- Number of strike prices to include in result.compareType
- What underlying price to use as a comparator.MamdaOptionAtTheMoneyCompareType
public java.util.Iterator callIterator()
MamdaOptionContract
.public java.util.Iterator putIterator()
public MamdaOptionExpirationDateSet getAllExpirations()
public void dump()
Copyright 2007 Wombat Financial Software, Inc.