Name | |
---|---|
MamdaOptionChain(String symbol) | |
void | setSymbol(String symbol) |
String | getSymbol() |
void | setUnderlyingQuoteListener(MamdaQuoteListener quoteListener) |
void | setUnderlyingTradeListener(MamdaTradeListener tradeListener) |
MamdaQuoteListener | getUnderlyingQuoteListener() |
MamdaTradeListener | getUnderlyingTradeListener() |
MamdaOptionContract | getContract(String contractSymbol) |
SortedSet | getExchanges() |
SortedSet | getStrikePrices() |
void | addContract(String contractSymbol, MamdaOptionContract contract) |
void | removeContract(String contractSymbol) |
double | getAtTheMoney(short compareType) |
boolean | getIsPriceWithinPercentOfMoney(double price, double percentage, short compareType) |
SortedSet | getStrikesWithinPercent(double percentage, short compareType) |
SortedSet | getStrikesWithinRangeSize(int rangeLength, short compareType) |
Iterator | callIterator() |
Iterator | putIterator() |
MamdaOptionExpirationDateSet | getAllExpirations() |
void | dump() |
class com::wombat::mamda::options::MamdaOptionChain;
MamdaOptionChain is a specialized class to represent market data option chains. The class has capabilities to store the current state of an entire option chain, or a subset of the chain.
inline MamdaOptionChain(
String symbol
)
Parameters:
MamdaOptionChain Constructor.
inline void setSymbol(
String symbol
)
Parameters:
Set the underlying symbol for the option chain.
inline String getSymbol()
Return: String The underlying symbol for the option chain.
Get the underlying symbol for the option chain.
inline void setUnderlyingQuoteListener(
MamdaQuoteListener quoteListener
)
Parameters:
Set the underlying quote listener information. MamdaOptionChain does not use this class itself, but related classes might (e.g., MamdaOptionChainView).
inline void setUnderlyingTradeListener(
MamdaTradeListener tradeListener
)
Parameters:
Set the underlying trade listener information. MamdaOptionChain uses this class to implement the atTheMoney() method. Related classes might (e.g., MamdaOptionChainView) use it for other reasons.
inline MamdaQuoteListener getUnderlyingQuoteListener()
Return: MamdaQuoteListener The quote listener for the chain.
Make the underlying quote listener available externally.
inline MamdaTradeListener getUnderlyingTradeListener()
Return: MamdaTradeListener The trade listener for the chain.
Make the underlying trade listener available externally.
inline MamdaOptionContract getContract(
String contractSymbol
)
Parameters:
Return: MamdaOptionContract The contract object representing the option.
Find an option contract by OPRA symbol.
inline SortedSet getExchanges()
Return: SortedSet Set of regional exchange identifiers.
Return the superset of regional exchange identifiers for any option in this chain. Each element in the set is a String object.
inline SortedSet getStrikePrices()
Return: SortedSet Set of strike prices for the chain.
Return the superset of strike prices for this chain. Each element in the set is a Double object.
inline void addContract(
String contractSymbol,
MamdaOptionContract contract
)
Parameters:
Add an option contract. This method would not normally be invoked by a user application. Rather, MamdaOptionChainListener would be most likely to call this method.
inline void removeContract(
String contractSymbol
)
Remove an option contract. This method would not normally be invoked by a user application. Rather, MamdaOptionChainListener would be most likely to call this method.
inline double getAtTheMoney(
short compareType
)
Parameters:
[MamdaOptionAtTheMoneyCompareType](classcom_1_1wombat_1_1mamda_1_1options_1_1MamdaOptionAtTheMoneyCompareType.html)
)See: MamdaOptionAtTheMoneyCompareType
Return: double The price of the underlying.
Get the price of the option underlying. Determine the underlying price (“at the money”), based on the mode of calculation.
inline boolean getIsPriceWithinPercentOfMoney(
double price,
double percentage,
short compareType
)
Parameters:
[MamdaOptionAtTheMoneyCompareType](classcom_1_1wombat_1_1mamda_1_1options_1_1MamdaOptionAtTheMoneyCompareType.html)
)See: MamdaOptionAtTheMoneyCompareType
Return: boolean Whether the proce is within % of the money.
Return whether the price within a % of the money. Determine whether some price (e.g. a strike price) is within a given percentage range of the underlying (at the money) price.
inline SortedSet getStrikesWithinPercent(
double percentage,
short compareType
)
Parameters:
See: MamdaOptionAtTheMoneyCompareType
Return: SortedSet Set of strike prices.
Determine the set of strike prices that are included in a given percentage range of the underlying price. If there are no strikes within the percentage range, then both strike prices are set to zero.
inline SortedSet getStrikesWithinRangeSize(
int rangeLength,
short compareType
)
Parameters:
See: MamdaOptionAtTheMoneyCompareType
Return: SortedSet Resulting set of strike prices.
Determine the set of strike prices that are included in a given fixed size range of strikes surrounding the underlying price. If rangeLen is odd, then the strike price nearest to the underlying price is treated as a higher strike price. If rangeLen is even and the underlying price is exactly equal to a strike price, then that strike price is treated as a higher strike price.
inline Iterator callIterator()
Return: Iterator The iterator of call options.
Return an iterator over all call option contracts. The type of object that Iterator.next() returns is [MamdaOptionContract](classcom_1_1wombat_1_1mamda_1_1options_1_1MamdaOptionContract.html)
.
inline Iterator putIterator()
Return: Iterator The iterator of put options.
Return an iterator over all put option contracts. The type of object that Iterator.next() returns is MamdaOptionContract.
inline MamdaOptionExpirationDateSet getAllExpirations()
Return: MamdaOptionExpirationDateSet Set of expiration dates.
Return a set of MamdaOptionExpirationDateSet.
inline void dump()
Print the contents of the chain to standard out.
Updated on 2023-03-31 at 15:30:37 +0100