Package com.wombat.mamda
Class MamdaFundamentalListener
- java.lang.Object
-
- com.wombat.mamda.MamdaFundamentalListener
-
- All Implemented Interfaces:
MamdaBasicRecap,MamdaFundamentals,MamdaMsgListener
public class MamdaFundamentalListener extends java.lang.Object implements MamdaMsgListener, MamdaFundamentals
MamdaFundamentalListener is a class that specializes in handling fundamental equity pricing/analysis attributes, indicators and ratios. Developers provide their own implementation of the MamdaFundamentalHandler interface and will be delivered notifications for updates in the fundamental data. An obvious application for this MAMDA class is any kind of pricing analysis application. Note: The MamdaFundamentalListener class caches equity pricing/analysis attributes, indicators and ratios. Among other reasons, caching of these fields makes it possible to provide complete fundamental callbacks, even when the publisher (e.g., feed handler) is only publishing deltas containing modified fields.
-
-
Constructor Summary
Constructors Constructor Description MamdaFundamentalListener()Create a specialized fundamental field listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHandler(MamdaFundamentalHandler handler)Add a specialized fundamentals handler.com.wombat.mama.MamaDateTimegetActivityTime()Activity time.shortgetActivityTimeFieldState()java.lang.StringgetCorporateActionType()Corporate Action Type.shortgetCorporateActionTypeFieldState()java.lang.StringgetDividendCurrency()Currency of dividend.shortgetDividendCurrencyFieldState()java.lang.StringgetDividendExDate()The date on or after which a security is traded without a previously declared dividend or distribution.shortgetDividendExDateFieldState()java.lang.StringgetDividendFrequency()Frequency of the dividend payments.shortgetDividendFrequencyFieldState()java.lang.StringgetDividendPayDate()Date on which corporate action distribution will be paid or effective.shortgetDividendPayDateFieldState()doublegetDividendPrice()Dividend price.shortgetDividendPriceFieldState()java.lang.StringgetDividendRecordDate()This is the date on which all shareholders are considered a "holder of record" and ensured the right of a dividend or distribution.shortgetDividendRecordDateFieldState()doublegetEarningsPerShare()Earnings per share, including common stock, preferred stock, unexercised stock options, unexercised warrants, and some convertible debt.shortgetEarningsPerShareFieldState()doublegetHistoricalVolatility()Volatility estimated from historical datashortgetHistoricalVolatilityFieldState()com.wombat.mama.MamaDateTimegetLineTime()Get the line time of the update.shortgetLineTimeFieldState()java.lang.StringgetMarketSector()A distinct subset of a market, society, industry, or economy, whose components share similar characteristicsshortgetMarketSectorFieldState()java.lang.StringgetMarketSectorNative()Feed-specific market sector code in native feed format.shortgetMarketSectorNativeFieldState()java.lang.StringgetMarketSegment()Market subgroup.shortgetMarketSegmentFieldState()java.lang.StringgetMarketSegmentNative()Feed-specific market segment code in native feed format.shortgetMarketSegmentNativeFieldState()java.lang.StringgetPartId()Get the participant identifier.shortgetPartIdFieldState()doublegetPriceEarningsRatio()The most common measure of how expensive a stock is.shortgetPriceEarningsRatioFieldState()doublegetRiskFreeRate()Theoretical interest rate at which an investment may earn interest without incurring any riskshortgetRiskFreeRateFieldState()com.wombat.mama.MamaDateTimegetSendTime()Get the send time of the update.shortgetSendTimeFieldState()longgetSharesAuthorized()Authorized shares.shortgetSharesAuthorizedFieldState()longgetSharesFloat()The number of shares of a security that are outstanding and available for trading by the public.shortgetSharesFloatFieldState()longgetSharesOut()Shares outstanding.shortgetSharesOutFieldState()com.wombat.mama.MamaDateTimegetSrcTime()Source time.shortgetSrcTimeFieldState()java.lang.StringgetSymbol()Get the string symbol for the instrument.shortgetSymbolFieldState()doublegetVolatility()The relative rate at which the price of a security moves up and down.shortgetVolatilityFieldState()doublegetYield()Yield, for cash instruments where prices are publishedshortgetYieldFieldState()voidonMsg(MamdaSubscription subscription, com.wombat.mama.MamaMsg msg, short msgType)Implementation of MamdaListener interface.
-
-
-
Method Detail
-
addHandler
public void addHandler(MamdaFundamentalHandler handler)
Add a specialized fundamentals handler.
-
getSrcTime
public com.wombat.mama.MamaDateTime getSrcTime()
Description copied from interface:MamdaBasicRecapSource time. Typically, the exchange generated feed- Specified by:
getSrcTimein interfaceMamdaBasicRecap
-
getActivityTime
public com.wombat.mama.MamaDateTime getActivityTime()
Description copied from interface:MamdaBasicRecapActivity time. A feed handler generated time stamp representing when the data item was last updated.- Specified by:
getActivityTimein interfaceMamdaBasicRecap
-
getSendTime
public com.wombat.mama.MamaDateTime getSendTime()
Description copied from interface:MamdaBasicRecapGet the send time of the update.- Specified by:
getSendTimein interfaceMamdaBasicRecap- Returns:
- Send time. A feed handler (or similar publisher) time stamp representing the time that such publisher sent the current message. The difference between the line time and send time is the latency within the feed handler itself. Also, if clocks are properly synchronized then the difference between the send time and current time is the latency within the market data distribution framework (i.e. MAMA and the underlying middleware).
-
getLineTime
public com.wombat.mama.MamaDateTime getLineTime()
Description copied from interface:MamdaBasicRecapGet the line time of the update.- Specified by:
getLineTimein interfaceMamdaBasicRecap- Returns:
- Line time. A feed handler (or similar publisher) time stamp representing the time that such publisher received the update message pertaining to the event. If clocks are properly synchronized and the source time (see above) is accurate enough, then the difference between the source time and line time is the latency between the data source and the feed handler.
-
getPartId
public java.lang.String getPartId()
Description copied from interface:MamdaBasicRecapGet the participant identifier.- Specified by:
getPartIdin interfaceMamdaBasicRecap- Returns:
- Participant ID. This may be an exchange identifier, a market maker ID, etc., or NULL (if this is not related to any specific participant).
-
getSymbol
public java.lang.String getSymbol()
Description copied from interface:MamdaBasicRecapGet the string symbol for the instrument.- Specified by:
getSymbolin interfaceMamdaBasicRecap- Returns:
- Symbol. This is the "well-known" symbol for the security, including any symbology mapping performed by the publisher.
-
getCorporateActionType
public java.lang.String getCorporateActionType()
Description copied from interface:MamdaFundamentalsCorporate Action Type.- Specified by:
getCorporateActionTypein interfaceMamdaFundamentals
-
getDividendPrice
public double getDividendPrice()
Description copied from interface:MamdaFundamentalsDividend price.- Specified by:
getDividendPricein interfaceMamdaFundamentals
-
getDividendFrequency
public java.lang.String getDividendFrequency()
Description copied from interface:MamdaFundamentalsFrequency of the dividend payments.- : No dividend payments are made.
- 1M : Monthly
- 3M : Quarterly
- 6M : Semi-Annually
- 1Y : Annually
- SP : Payment frequency is special.
- NA : Irregular payment frequency.
- ER : Invalid dividend frequency period.
- Specified by:
getDividendFrequencyin interfaceMamdaFundamentals
-
getDividendExDate
public java.lang.String getDividendExDate()
Description copied from interface:MamdaFundamentalsThe date on or after which a security is traded without a previously declared dividend or distribution.- Specified by:
getDividendExDatein interfaceMamdaFundamentals
-
getDividendPayDate
public java.lang.String getDividendPayDate()
Description copied from interface:MamdaFundamentalsDate on which corporate action distribution will be paid or effective.- Specified by:
getDividendPayDatein interfaceMamdaFundamentals
-
getDividendRecordDate
public java.lang.String getDividendRecordDate()
Description copied from interface:MamdaFundamentalsThis is the date on which all shareholders are considered a "holder of record" and ensured the right of a dividend or distribution.- Specified by:
getDividendRecordDatein interfaceMamdaFundamentals
-
getDividendCurrency
public java.lang.String getDividendCurrency()
Description copied from interface:MamdaFundamentalsCurrency of dividend.- Specified by:
getDividendCurrencyin interfaceMamdaFundamentals
-
getSharesOut
public long getSharesOut()
Description copied from interface:MamdaFundamentalsShares outstanding. The number of authorized shares in a company that are held by investors, including employees and executives of that company. (Un-issued shares and treasury shares are not included in this figure).- Specified by:
getSharesOutin interfaceMamdaFundamentals
-
getSharesFloat
public long getSharesFloat()
Description copied from interface:MamdaFundamentalsThe number of shares of a security that are outstanding and available for trading by the public.- Specified by:
getSharesFloatin interfaceMamdaFundamentals
-
getSharesAuthorized
public long getSharesAuthorized()
Description copied from interface:MamdaFundamentalsAuthorized shares. The number of shares that a corporation is permitted to issue.- Specified by:
getSharesAuthorizedin interfaceMamdaFundamentals
-
getEarningsPerShare
public double getEarningsPerShare()
Description copied from interface:MamdaFundamentalsEarnings per share, including common stock, preferred stock, unexercised stock options, unexercised warrants, and some convertible debt. In companies with a large amount of convertibles, warrants and stock options, diluted earnings per share are usually a more accurate measure of the company's real earning power than earnings per share.- Specified by:
getEarningsPerSharein interfaceMamdaFundamentals
-
getVolatility
public double getVolatility()
Description copied from interface:MamdaFundamentalsThe relative rate at which the price of a security moves up and down.- Specified by:
getVolatilityin interfaceMamdaFundamentals
-
getPriceEarningsRatio
public double getPriceEarningsRatio()
Description copied from interface:MamdaFundamentalsThe most common measure of how expensive a stock is. The P/E ratio is equal to a stock's market capitalization divided by its after-tax earnings over a 12-month period, usually the trailing period but occasionally the current or forward period.- Specified by:
getPriceEarningsRatioin interfaceMamdaFundamentals
-
getYield
public double getYield()
Description copied from interface:MamdaFundamentalsYield, for cash instruments where prices are published- Specified by:
getYieldin interfaceMamdaFundamentals
-
getMarketSegmentNative
public java.lang.String getMarketSegmentNative()
Description copied from interface:MamdaFundamentalsFeed-specific market segment code in native feed format.- Specified by:
getMarketSegmentNativein interfaceMamdaFundamentals
-
getMarketSectorNative
public java.lang.String getMarketSectorNative()
Description copied from interface:MamdaFundamentalsFeed-specific market sector code in native feed format.- Specified by:
getMarketSectorNativein interfaceMamdaFundamentals
-
getMarketSegment
public java.lang.String getMarketSegment()
Description copied from interface:MamdaFundamentalsMarket subgroup.- Specified by:
getMarketSegmentin interfaceMamdaFundamentals
-
getMarketSector
public java.lang.String getMarketSector()
Description copied from interface:MamdaFundamentalsA distinct subset of a market, society, industry, or economy, whose components share similar characteristics- Specified by:
getMarketSectorin interfaceMamdaFundamentals
-
getHistoricalVolatility
public double getHistoricalVolatility()
Description copied from interface:MamdaFundamentalsVolatility estimated from historical data- Specified by:
getHistoricalVolatilityin interfaceMamdaFundamentals
-
getRiskFreeRate
public double getRiskFreeRate()
Description copied from interface:MamdaFundamentalsTheoretical interest rate at which an investment may earn interest without incurring any risk- Specified by:
getRiskFreeRatein interfaceMamdaFundamentals
-
getSrcTimeFieldState
public short getSrcTimeFieldState()
- Specified by:
getSrcTimeFieldStatein interfaceMamdaBasicRecap- Returns:
- source time Field State
-
getActivityTimeFieldState
public short getActivityTimeFieldState()
- Specified by:
getActivityTimeFieldStatein interfaceMamdaBasicRecap- Returns:
- activity time Field State
-
getSendTimeFieldState
public short getSendTimeFieldState()
- Specified by:
getSendTimeFieldStatein interfaceMamdaBasicRecap- Returns:
- send time Field State
-
getLineTimeFieldState
public short getLineTimeFieldState()
- Specified by:
getLineTimeFieldStatein interfaceMamdaBasicRecap- Returns:
- line time Field State
-
getPartIdFieldState
public short getPartIdFieldState()
- Specified by:
getPartIdFieldStatein interfaceMamdaBasicRecap- Returns:
- participant ID Field State
-
getSymbolFieldState
public short getSymbolFieldState()
- Specified by:
getSymbolFieldStatein interfaceMamdaBasicRecap- Returns:
- symbol Field State
-
getCorporateActionTypeFieldState
public short getCorporateActionTypeFieldState()
- Specified by:
getCorporateActionTypeFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getDividendPriceFieldState
public short getDividendPriceFieldState()
- Specified by:
getDividendPriceFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getDividendFrequencyFieldState
public short getDividendFrequencyFieldState()
- Specified by:
getDividendFrequencyFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getDividendExDateFieldState
public short getDividendExDateFieldState()
- Specified by:
getDividendExDateFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getDividendPayDateFieldState
public short getDividendPayDateFieldState()
- Specified by:
getDividendPayDateFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getDividendRecordDateFieldState
public short getDividendRecordDateFieldState()
- Specified by:
getDividendRecordDateFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getDividendCurrencyFieldState
public short getDividendCurrencyFieldState()
- Specified by:
getDividendCurrencyFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getSharesOutFieldState
public short getSharesOutFieldState()
- Specified by:
getSharesOutFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getSharesFloatFieldState
public short getSharesFloatFieldState()
- Specified by:
getSharesFloatFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getSharesAuthorizedFieldState
public short getSharesAuthorizedFieldState()
- Specified by:
getSharesAuthorizedFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getEarningsPerShareFieldState
public short getEarningsPerShareFieldState()
- Specified by:
getEarningsPerShareFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getVolatilityFieldState
public short getVolatilityFieldState()
- Specified by:
getVolatilityFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getPriceEarningsRatioFieldState
public short getPriceEarningsRatioFieldState()
- Specified by:
getPriceEarningsRatioFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getYieldFieldState
public short getYieldFieldState()
- Specified by:
getYieldFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getMarketSegmentNativeFieldState
public short getMarketSegmentNativeFieldState()
- Specified by:
getMarketSegmentNativeFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getMarketSectorNativeFieldState
public short getMarketSectorNativeFieldState()
- Specified by:
getMarketSectorNativeFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getMarketSegmentFieldState
public short getMarketSegmentFieldState()
- Specified by:
getMarketSegmentFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getMarketSectorFieldState
public short getMarketSectorFieldState()
- Specified by:
getMarketSectorFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getHistoricalVolatilityFieldState
public short getHistoricalVolatilityFieldState()
- Specified by:
getHistoricalVolatilityFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
getRiskFreeRateFieldState
public short getRiskFreeRateFieldState()
- Specified by:
getRiskFreeRateFieldStatein interfaceMamdaFundamentals- Returns:
- Field State
-
onMsg
public void onMsg(MamdaSubscription subscription, com.wombat.mama.MamaMsg msg, short msgType)
Implementation of MamdaListener interface.- Specified by:
onMsgin interfaceMamdaMsgListener- Parameters:
subscription- The MamdaSubscription to which this listener was registered.msg- The MamaMsg received by the underlying MAMA API and which resulted in this callback being invoked.msgType- The message type. e.g. INITIAL, RECAP, UPDATE etc.
-
-