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 void
addHandler(MamdaFundamentalHandler handler)
Add a specialized fundamentals handler.com.wombat.mama.MamaDateTime
getActivityTime()
Activity time.short
getActivityTimeFieldState()
java.lang.String
getCorporateActionType()
Corporate Action Type.short
getCorporateActionTypeFieldState()
java.lang.String
getDividendCurrency()
Currency of dividend.short
getDividendCurrencyFieldState()
java.lang.String
getDividendExDate()
The date on or after which a security is traded without a previously declared dividend or distribution.short
getDividendExDateFieldState()
java.lang.String
getDividendFrequency()
Frequency of the dividend payments.short
getDividendFrequencyFieldState()
java.lang.String
getDividendPayDate()
Date on which corporate action distribution will be paid or effective.short
getDividendPayDateFieldState()
double
getDividendPrice()
Dividend price.short
getDividendPriceFieldState()
java.lang.String
getDividendRecordDate()
This is the date on which all shareholders are considered a "holder of record" and ensured the right of a dividend or distribution.short
getDividendRecordDateFieldState()
double
getEarningsPerShare()
Earnings per share, including common stock, preferred stock, unexercised stock options, unexercised warrants, and some convertible debt.short
getEarningsPerShareFieldState()
double
getHistoricalVolatility()
Volatility estimated from historical datashort
getHistoricalVolatilityFieldState()
com.wombat.mama.MamaDateTime
getLineTime()
Get the line time of the update.short
getLineTimeFieldState()
java.lang.String
getMarketSector()
A distinct subset of a market, society, industry, or economy, whose components share similar characteristicsshort
getMarketSectorFieldState()
java.lang.String
getMarketSectorNative()
Feed-specific market sector code in native feed format.short
getMarketSectorNativeFieldState()
java.lang.String
getMarketSegment()
Market subgroup.short
getMarketSegmentFieldState()
java.lang.String
getMarketSegmentNative()
Feed-specific market segment code in native feed format.short
getMarketSegmentNativeFieldState()
java.lang.String
getPartId()
Get the participant identifier.short
getPartIdFieldState()
double
getPriceEarningsRatio()
The most common measure of how expensive a stock is.short
getPriceEarningsRatioFieldState()
double
getRiskFreeRate()
Theoretical interest rate at which an investment may earn interest without incurring any riskshort
getRiskFreeRateFieldState()
com.wombat.mama.MamaDateTime
getSendTime()
Get the send time of the update.short
getSendTimeFieldState()
long
getSharesAuthorized()
Authorized shares.short
getSharesAuthorizedFieldState()
long
getSharesFloat()
The number of shares of a security that are outstanding and available for trading by the public.short
getSharesFloatFieldState()
long
getSharesOut()
Shares outstanding.short
getSharesOutFieldState()
com.wombat.mama.MamaDateTime
getSrcTime()
Source time.short
getSrcTimeFieldState()
java.lang.String
getSymbol()
Get the string symbol for the instrument.short
getSymbolFieldState()
double
getVolatility()
The relative rate at which the price of a security moves up and down.short
getVolatilityFieldState()
double
getYield()
Yield, for cash instruments where prices are publishedshort
getYieldFieldState()
void
onMsg(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:MamdaBasicRecap
Source time. Typically, the exchange generated feed- Specified by:
getSrcTime
in interfaceMamdaBasicRecap
-
getActivityTime
public com.wombat.mama.MamaDateTime getActivityTime()
Description copied from interface:MamdaBasicRecap
Activity time. A feed handler generated time stamp representing when the data item was last updated.- Specified by:
getActivityTime
in interfaceMamdaBasicRecap
-
getSendTime
public com.wombat.mama.MamaDateTime getSendTime()
Description copied from interface:MamdaBasicRecap
Get the send time of the update.- Specified by:
getSendTime
in 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:MamdaBasicRecap
Get the line time of the update.- Specified by:
getLineTime
in 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:MamdaBasicRecap
Get the participant identifier.- Specified by:
getPartId
in 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:MamdaBasicRecap
Get the string symbol for the instrument.- Specified by:
getSymbol
in 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:MamdaFundamentals
Corporate Action Type.- Specified by:
getCorporateActionType
in interfaceMamdaFundamentals
-
getDividendPrice
public double getDividendPrice()
Description copied from interface:MamdaFundamentals
Dividend price.- Specified by:
getDividendPrice
in interfaceMamdaFundamentals
-
getDividendFrequency
public java.lang.String getDividendFrequency()
Description copied from interface:MamdaFundamentals
Frequency 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:
getDividendFrequency
in interfaceMamdaFundamentals
-
getDividendExDate
public java.lang.String getDividendExDate()
Description copied from interface:MamdaFundamentals
The date on or after which a security is traded without a previously declared dividend or distribution.- Specified by:
getDividendExDate
in interfaceMamdaFundamentals
-
getDividendPayDate
public java.lang.String getDividendPayDate()
Description copied from interface:MamdaFundamentals
Date on which corporate action distribution will be paid or effective.- Specified by:
getDividendPayDate
in interfaceMamdaFundamentals
-
getDividendRecordDate
public java.lang.String getDividendRecordDate()
Description copied from interface:MamdaFundamentals
This is the date on which all shareholders are considered a "holder of record" and ensured the right of a dividend or distribution.- Specified by:
getDividendRecordDate
in interfaceMamdaFundamentals
-
getDividendCurrency
public java.lang.String getDividendCurrency()
Description copied from interface:MamdaFundamentals
Currency of dividend.- Specified by:
getDividendCurrency
in interfaceMamdaFundamentals
-
getSharesOut
public long getSharesOut()
Description copied from interface:MamdaFundamentals
Shares 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:
getSharesOut
in interfaceMamdaFundamentals
-
getSharesFloat
public long getSharesFloat()
Description copied from interface:MamdaFundamentals
The number of shares of a security that are outstanding and available for trading by the public.- Specified by:
getSharesFloat
in interfaceMamdaFundamentals
-
getSharesAuthorized
public long getSharesAuthorized()
Description copied from interface:MamdaFundamentals
Authorized shares. The number of shares that a corporation is permitted to issue.- Specified by:
getSharesAuthorized
in interfaceMamdaFundamentals
-
getEarningsPerShare
public double getEarningsPerShare()
Description copied from interface:MamdaFundamentals
Earnings 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:
getEarningsPerShare
in interfaceMamdaFundamentals
-
getVolatility
public double getVolatility()
Description copied from interface:MamdaFundamentals
The relative rate at which the price of a security moves up and down.- Specified by:
getVolatility
in interfaceMamdaFundamentals
-
getPriceEarningsRatio
public double getPriceEarningsRatio()
Description copied from interface:MamdaFundamentals
The 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:
getPriceEarningsRatio
in interfaceMamdaFundamentals
-
getYield
public double getYield()
Description copied from interface:MamdaFundamentals
Yield, for cash instruments where prices are published- Specified by:
getYield
in interfaceMamdaFundamentals
-
getMarketSegmentNative
public java.lang.String getMarketSegmentNative()
Description copied from interface:MamdaFundamentals
Feed-specific market segment code in native feed format.- Specified by:
getMarketSegmentNative
in interfaceMamdaFundamentals
-
getMarketSectorNative
public java.lang.String getMarketSectorNative()
Description copied from interface:MamdaFundamentals
Feed-specific market sector code in native feed format.- Specified by:
getMarketSectorNative
in interfaceMamdaFundamentals
-
getMarketSegment
public java.lang.String getMarketSegment()
Description copied from interface:MamdaFundamentals
Market subgroup.- Specified by:
getMarketSegment
in interfaceMamdaFundamentals
-
getMarketSector
public java.lang.String getMarketSector()
Description copied from interface:MamdaFundamentals
A distinct subset of a market, society, industry, or economy, whose components share similar characteristics- Specified by:
getMarketSector
in interfaceMamdaFundamentals
-
getHistoricalVolatility
public double getHistoricalVolatility()
Description copied from interface:MamdaFundamentals
Volatility estimated from historical data- Specified by:
getHistoricalVolatility
in interfaceMamdaFundamentals
-
getRiskFreeRate
public double getRiskFreeRate()
Description copied from interface:MamdaFundamentals
Theoretical interest rate at which an investment may earn interest without incurring any risk- Specified by:
getRiskFreeRate
in interfaceMamdaFundamentals
-
getSrcTimeFieldState
public short getSrcTimeFieldState()
- Specified by:
getSrcTimeFieldState
in interfaceMamdaBasicRecap
- Returns:
- source time Field State
-
getActivityTimeFieldState
public short getActivityTimeFieldState()
- Specified by:
getActivityTimeFieldState
in interfaceMamdaBasicRecap
- Returns:
- activity time Field State
-
getSendTimeFieldState
public short getSendTimeFieldState()
- Specified by:
getSendTimeFieldState
in interfaceMamdaBasicRecap
- Returns:
- send time Field State
-
getLineTimeFieldState
public short getLineTimeFieldState()
- Specified by:
getLineTimeFieldState
in interfaceMamdaBasicRecap
- Returns:
- line time Field State
-
getPartIdFieldState
public short getPartIdFieldState()
- Specified by:
getPartIdFieldState
in interfaceMamdaBasicRecap
- Returns:
- participant ID Field State
-
getSymbolFieldState
public short getSymbolFieldState()
- Specified by:
getSymbolFieldState
in interfaceMamdaBasicRecap
- Returns:
- symbol Field State
-
getCorporateActionTypeFieldState
public short getCorporateActionTypeFieldState()
- Specified by:
getCorporateActionTypeFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getDividendPriceFieldState
public short getDividendPriceFieldState()
- Specified by:
getDividendPriceFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getDividendFrequencyFieldState
public short getDividendFrequencyFieldState()
- Specified by:
getDividendFrequencyFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getDividendExDateFieldState
public short getDividendExDateFieldState()
- Specified by:
getDividendExDateFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getDividendPayDateFieldState
public short getDividendPayDateFieldState()
- Specified by:
getDividendPayDateFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getDividendRecordDateFieldState
public short getDividendRecordDateFieldState()
- Specified by:
getDividendRecordDateFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getDividendCurrencyFieldState
public short getDividendCurrencyFieldState()
- Specified by:
getDividendCurrencyFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getSharesOutFieldState
public short getSharesOutFieldState()
- Specified by:
getSharesOutFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getSharesFloatFieldState
public short getSharesFloatFieldState()
- Specified by:
getSharesFloatFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getSharesAuthorizedFieldState
public short getSharesAuthorizedFieldState()
- Specified by:
getSharesAuthorizedFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getEarningsPerShareFieldState
public short getEarningsPerShareFieldState()
- Specified by:
getEarningsPerShareFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getVolatilityFieldState
public short getVolatilityFieldState()
- Specified by:
getVolatilityFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getPriceEarningsRatioFieldState
public short getPriceEarningsRatioFieldState()
- Specified by:
getPriceEarningsRatioFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getYieldFieldState
public short getYieldFieldState()
- Specified by:
getYieldFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getMarketSegmentNativeFieldState
public short getMarketSegmentNativeFieldState()
- Specified by:
getMarketSegmentNativeFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getMarketSectorNativeFieldState
public short getMarketSectorNativeFieldState()
- Specified by:
getMarketSectorNativeFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getMarketSegmentFieldState
public short getMarketSegmentFieldState()
- Specified by:
getMarketSegmentFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getMarketSectorFieldState
public short getMarketSectorFieldState()
- Specified by:
getMarketSectorFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getHistoricalVolatilityFieldState
public short getHistoricalVolatilityFieldState()
- Specified by:
getHistoricalVolatilityFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
getRiskFreeRateFieldState
public short getRiskFreeRateFieldState()
- Specified by:
getRiskFreeRateFieldState
in interfaceMamdaFundamentals
- Returns:
- Field State
-
onMsg
public void onMsg(MamdaSubscription subscription, com.wombat.mama.MamaMsg msg, short msgType)
Implementation of MamdaListener interface.- Specified by:
onMsg
in 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.
-
-