public class YahooFinanceData extends Object implements CachableASCII
| Constructor and Description |
|---|
YahooFinanceData() |
YahooFinanceData(String product,
org.joda.time.DateTime start,
org.joda.time.DateTime end)
Query the yahoo finance api for the product from the start date (inclusive) till the end date (inclusive)
|
YahooFinanceData(String product,
String start,
String end,
String format) |
| Modifier and Type | Method and Description |
|---|---|
String |
asciiHeader()
Header for ascii input.
|
boolean |
equals(Object obj) |
String |
identifier() |
Set<String> |
labels() |
boolean |
loadedFromAPI() |
void |
readASCII(Scanner in)
Read internal state from in.
|
Map<String,double[]> |
results() |
String |
resultsString() |
DoubleTimeSeries |
seriesByName(String name) |
Map<String,DoubleTimeSeries> |
seriesMap() |
Map<String,DoubleTimeSeries> |
seriesMapInerp(long delta)
Interpolated finance results from the beggining time till the end in perscribed delta
|
Map<String,DoubleTimeSeries> |
seriesMapInerp(long[] times) |
long[] |
timeperiods() |
String |
toString() |
void |
writeASCII(PrintWriter out)
Write the content of this as ascii to out.
|
public YahooFinanceData()
public YahooFinanceData(String product, org.joda.time.DateTime start, org.joda.time.DateTime end)
product - a stock ticker name e.g. AAPLstart - the start dateend - the end datepublic YahooFinanceData(String product, String start, String end, String format)
product - start - end - format - yoda formatpublic String resultsString() throws IOException
IOExceptionpublic Map<String,double[]> results() throws IOException
IOExceptionpublic void readASCII(Scanner in) throws IOException
ReadableASCIIreadASCII in interface ReadableASCIIin - source to read from.IOException - an error reading inputpublic String asciiHeader()
ReadableASCIIasciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIpublic void writeASCII(PrintWriter out) throws IOException
WriteableASCIIwriteASCII in interface WriteableASCIIout - sink to write toIOException - an error writing to outpublic long[] timeperiods() throws IOException
IOExceptionpublic DoubleTimeSeries seriesByName(String name) throws IOException
name - IOExceptionpublic Map<String,DoubleTimeSeries> seriesMap() throws IOException
IOExceptionpublic Map<String,DoubleTimeSeries> seriesMapInerp(long[] times) throws IOException
times - times to interpolate stocks toIOExceptionpublic Map<String,DoubleTimeSeries> seriesMapInerp(long delta) throws IOException
delta - IOExceptionpublic String identifier()
identifier in interface Cachablepublic boolean loadedFromAPI()