com.wombat.mamda.options
public class MamdaOptionChainView extends java.lang.Object implements MamdaOptionChainHandler
Constructor and Description |
---|
MamdaOptionChainView(MamdaOptionChain chain)
Create a view on the given option chain.
|
Modifier and Type | Method and Description |
---|---|
java.util.Iterator |
expirationIterator()
Return an Iterator over the set of expiration dates within the
view.
|
java.lang.String |
getSymbol()
Return the symbol for the option chain.
|
boolean |
isVisible(MamdaOptionContract contract)
Return whether an option contract falls within this view's
parameters.
|
void |
onOptionChainRecap(MamdaSubscription subscription,
MamdaOptionChainListener listener,
com.wombat.mama.MamaMsg msg,
MamdaOptionChain chain)
Handler option chain recaps and initial values.
|
void |
onOptionContractCreate(MamdaSubscription subscription,
MamdaOptionChainListener listener,
com.wombat.mama.MamaMsg msg,
MamdaOptionContract contract,
MamdaOptionChain chain)
Handler for option chain structural updates.
|
void |
onOptionSeriesUpdate(MamdaSubscription subscription,
MamdaOptionChainListener listener,
com.wombat.mama.MamaMsg msg,
MamdaOptionSeriesUpdate event,
MamdaOptionChain chain)
Handler for option chain structural updates.
|
void |
setAtTheMoneyType(short atTheMoneyType)
Set how the underlying price ("at the money") is determined
(@see MamdaOptionAtTheMoneyCompareType).
|
void |
setExpirationRangeDays(int expirationDays)
Set the range of expiration dates to be included in the view by
the maximum number of days until expiration.
|
void |
setJitterMargin(double percentMargin)
Set a "jitter margin" to avoid having the range jump between
different strike prices when the underlying price hovers right
on the edge of a range boundary.
|
void |
setNumberOfExpirations(int numExpirations)
Set the number of expiration dates to be included in the view.
|
void |
setStrikeRangeNumber(int number)
Set the number of strike prices to be included in the view.
|
void |
setStrikeRangePercent(double percentMargin)
Set the range of strike prices to be included in the view by
percentage variation from the underlying price.
|
public MamdaOptionChainView(MamdaOptionChain chain)
public java.lang.String getSymbol()
public void setAtTheMoneyType(short atTheMoneyType)
public void setStrikeRangePercent(double percentMargin)
public void setStrikeRangeNumber(int number)
public void setExpirationRangeDays(int expirationDays)
public void setNumberOfExpirations(int numExpirations)
public void setJitterMargin(double percentMargin)
public boolean isVisible(MamdaOptionContract contract)
public java.util.Iterator expirationIterator()
public void onOptionChainRecap(MamdaSubscription subscription, MamdaOptionChainListener listener, com.wombat.mama.MamaMsg msg, MamdaOptionChain chain)
onOptionChainRecap
in interface MamdaOptionChainHandler
subscription
- The subscription which received the udpate.listener
- The listener which invoked the callback.msg
- The MamaMsg that triggered this invocation.chain
- The full option chain.public void onOptionContractCreate(MamdaSubscription subscription, MamdaOptionChainListener listener, com.wombat.mama.MamaMsg msg, MamdaOptionContract contract, MamdaOptionChain chain)
onOptionContractCreate
in interface MamdaOptionChainHandler
subscription
- The subscription which received the update.listener
- The listener which invoked the callback.msg
- The MamaMsg that triggered this invocation.contract
- The newly created option contract.chain
- The full option chain.public void onOptionSeriesUpdate(MamdaSubscription subscription, MamdaOptionChainListener listener, com.wombat.mama.MamaMsg msg, MamdaOptionSeriesUpdate event, MamdaOptionChain chain)
onOptionSeriesUpdate
in interface MamdaOptionChainHandler
subscription
- The subscription which received the update.listener
- The listener which invoked the callback.msg
- The MamaMsg that triggered this invocation.event
- Access to details from the option series update
event.chain
- The full option chain.MamdaOptionChainHandler.onOptionContractCreate(com.wombat.mamda.MamdaSubscription, com.wombat.mamda.options.MamdaOptionChainListener, com.wombat.mama.MamaMsg, com.wombat.mamda.options.MamdaOptionContract, com.wombat.mamda.options.MamdaOptionChain)
Copyright 2007 Wombat Financial Software, Inc.