|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface QuoteSource
Provides a generic interface in which we can query stock quotes from multiple sources. The source could either be directly from files, a database, a unique internal format or from the internet.
Method Summary | |
---|---|
boolean |
containsDate(TradingDate date)
Returns whether the source contains any quotes for the given date. |
int |
getAdvanceDecline(TradingDate date)
Return the advance/decline for the given date. |
java.util.List |
getDates()
Return all the dates which we have quotes for. |
java.util.List |
getExchangeRates(Currency sourceCurrency,
Currency destinationCurrency)
Return all the stored exchange rates between the two currencies. |
TradingDate |
getFirstDate()
Return the earliest date we have any stock quotes for. |
TradingDate |
getLastDate()
Return the latest date we have any stock quotes for. |
Symbol |
getSymbol(java.lang.String partialCompanyName)
Returns the symbol associated with the given company. |
java.lang.String |
getSymbolName(Symbol symbol)
Returns the company name associated with the given symbol. |
boolean |
isMarketIndex(Symbol symbol)
Is the given symbol a market index? |
boolean |
loadQuoteRange(EODQuoteRange quoteRange)
Load the given quote range into the quote cache. |
void |
shutdown()
Shutdown the quote source. |
boolean |
symbolExists(Symbol symbol)
Returns whether we have any quotes for the given symbol. |
Method Detail |
---|
java.lang.String getSymbolName(Symbol symbol)
symbol
- the stock symbol
Symbol getSymbol(java.lang.String partialCompanyName)
partialCompanyName
- a partial company name
boolean symbolExists(Symbol symbol)
symbol
- the symbol we are searching for
TradingDate getLastDate()
TradingDate getFirstDate()
boolean loadQuoteRange(EODQuoteRange quoteRange)
quoteRange
- the range of quotes to load
TRUE
if the operation suceededEODQuoteCache
boolean containsDate(TradingDate date)
date
- the date
java.util.List getDates()
boolean isMarketIndex(Symbol symbol)
symbol
- to test
int getAdvanceDecline(TradingDate date) throws MissingQuoteException
date
- the date
throws
- MissingQuoteException if the date wasn't in the source
MissingQuoteException
java.util.List getExchangeRates(Currency sourceCurrency, Currency destinationCurrency)
sourceCurrency
- the currency to convert fromdestinationCurrency
- the currency to convert to
void shutdown()
|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |