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.
Name | |
---|---|
MamdaOptionChain(string symbol) MamdaOptionChain Constructor. |
|
void | setSymbol(string symbol) Set the underlying symbol for the option chain. |
string | getSymbol() Get the underlying symbol for the option chain. |
void | setUnderlyingQuoteListener(MamdaQuoteListener quoteListener) Set the underlying quote listener information. MamdaOptionChain does not use this class itself, but related classes might (e.g., MamdaOptionChainView). |
void | setUnderlyingTradeListener(MamdaTradeListener tradeListener) 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. |
MamdaQuoteListener | getUnderlyingQuoteListener() Make the underlying quote listener available externally. |
MamdaTradeListener | getUnderlyingTradeListener() Make the underlying trade listener available externally. |
MamdaOptionContract | getContract(String contractSymbol) Find an option contract by OPRA symbol. |
SortedSet | getExchanges() Return the superset of regional exchange identifiers for any option in this chain. Each element in the set is a String object. |
SortedSet | getStrikePrices() Return the superset of strike prices for this chain. Each element in the set is a Double object. |
void | addContract(string contractSymbol, MamdaOptionContract contract) 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. |
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. |
double | getAtTheMoney(MamdaOptionAtTheMoneyCompareType compareType) Get the price of the option underlying. Determine the underlying price (“at the money”), based on the mode of calculation. |
bool | getIsPriceWithinPercentOfMoney(double price, double percentage, MamdaOptionAtTheMoneyCompareType compareType) Return whether the price is 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. |
SortedSet | getStrikesWithinPercent(double percentage, MamdaOptionAtTheMoneyCompareType compareType) 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. MamdaOptionAtTheMoneyCompareType |
SortedSet | getStrikesWithinRangeSize(int rangeLength, MamdaOptionAtTheMoneyCompareType compareType) 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. MamdaOptionAtTheMoneyCompareType |
Iterator | callIterator() Return an iterator over all call option contracts. The type of object that Iterator.next() returns is |
Iterator | putIterator() Return an iterator over all put option contracts. The type of object that Iterator.next() returns is MamdaOptionContract. |
MamdaOptionExpirationDateSet | getAllExpirations() Return a set of MamdaOptionExpirationDateSet. |
void | dump() Print the contents of the chain to standard out. |
MamdaOptionChain(
string symbol
)
MamdaOptionChain Constructor.
Parameters:
void setSymbol(
string symbol
)
Set the underlying symbol for the option chain.
Parameters:
string getSymbol()
Get the underlying symbol for the option chain.
Return: The underlying symbol for the option chain.
void setUnderlyingQuoteListener(
MamdaQuoteListener quoteListener
)
Set the underlying quote listener information. MamdaOptionChain does not use this class itself, but related classes might (e.g., MamdaOptionChainView).
Parameters:
void setUnderlyingTradeListener(
MamdaTradeListener tradeListener
)
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.
Parameters:
MamdaQuoteListener getUnderlyingQuoteListener()
Make the underlying quote listener available externally.
Return: The quote listener for the chain.
MamdaTradeListener getUnderlyingTradeListener()
Make the underlying trade listener available externally.
Return: The trade listener for the chain.
MamdaOptionContract getContract(
String contractSymbol
)
Find an option contract by OPRA symbol.
Parameters:
Return: MamdaOptionContract The contract object representing the option.
SortedSet getExchanges()
Return the superset of regional exchange identifiers for any option in this chain. Each element in the set is a String object.
Return: Set of regional exchange identifiers.
SortedSet getStrikePrices()
Return the superset of strike prices for this chain. Each element in the set is a Double object.
Return: Set of strike prices for the chain.
void addContract(
string contractSymbol,
MamdaOptionContract contract
)
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.
Parameters:
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.
Parameters:
double getAtTheMoney(
MamdaOptionAtTheMoneyCompareType compareType
)
Get the price of the option underlying. Determine the underlying price (“at the money”), based on the mode of calculation.
Parameters:
Return: The price of the underlying.
bool getIsPriceWithinPercentOfMoney(
double price,
double percentage,
MamdaOptionAtTheMoneyCompareType compareType
)
Return whether the price is 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.
Parameters:
Return: Whether the price is within % of the money.
SortedSet getStrikesWithinPercent(
double percentage,
MamdaOptionAtTheMoneyCompareType compareType
)
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. MamdaOptionAtTheMoneyCompareType
Parameters:
Return: Set of strike prices.
SortedSet getStrikesWithinRangeSize(
int rangeLength,
MamdaOptionAtTheMoneyCompareType compareType
)
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. MamdaOptionAtTheMoneyCompareType
Parameters:
Return: Resulting set of strike prices.
Iterator callIterator()
Return an iterator over all call option contracts. The type of object that Iterator.next() returns is
Return: The iterator of call options.
[MamdaOptionContract](classWombat_1_1MamdaOptionContract.html)
.
Iterator putIterator()
Return an iterator over all put option contracts. The type of object that Iterator.next() returns is MamdaOptionContract.
Return:
MamdaOptionExpirationDateSet getAllExpirations()
Return a set of MamdaOptionExpirationDateSet.
Return: Set of expiration dates.
void dump()
Print the contents of the chain to standard out.
Updated on 2023-03-31 at 15:30:16 +0100