|
Venice 0.74beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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 | |
void |
cacheExpiry()
Force the quote source to reload and not use cached values. |
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.HashMap |
getAdvanceDecline(TradingDate startDate,
TradingDate endDate)
Return the advance/decline for the given date range. |
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 |
public java.lang.String getSymbolName(Symbol symbol)
symbol - the stock symbol
public Symbol getSymbol(java.lang.String partialCompanyName)
partialCompanyName - a partial company name
public boolean symbolExists(Symbol symbol)
symbol - the symbol we are searching for
public TradingDate getLastDate()
public TradingDate getFirstDate()
public boolean loadQuoteRange(EODQuoteRange quoteRange)
quoteRange - the range of quotes to load
TRUE if the operation suceededEODQuoteCachepublic boolean containsDate(TradingDate date)
date - the date
public java.util.List getDates()
public boolean isMarketIndex(Symbol symbol)
symbol - to test
public int getAdvanceDecline(TradingDate date)
throws MissingQuoteException
date - the date
throw - MissingQuoteException if the date isn't in the source
MissingQuoteException
public java.util.HashMap getAdvanceDecline(TradingDate startDate,
TradingDate endDate)
throws MissingQuoteException
startDate - the start of the inclusive date rangeendDate - the end of the inclusive date range
throw - MissingQuoteException if the date range isn't in the source
MissingQuoteException
public java.util.List getExchangeRates(Currency sourceCurrency,
Currency destinationCurrency)
sourceCurrency - the currency to convert fromdestinationCurrency - the currency to convert to
public void shutdown()
public void cacheExpiry()
|
Venice 0.74beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||