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
IOException
public Map<String,double[]> results() throws IOException
IOException
public void readASCII(Scanner in) throws IOException
ReadableASCII
readASCII
in interface ReadableASCII
in
- source to read from.IOException
- an error reading inputpublic String asciiHeader()
ReadableASCII
asciiHeader
in interface ReadableASCII
asciiHeader
in interface WriteableASCII
public void writeASCII(PrintWriter out) throws IOException
WriteableASCII
writeASCII
in interface WriteableASCII
out
- sink to write toIOException
- an error writing to outpublic long[] timeperiods() throws IOException
IOException
public DoubleTimeSeries seriesByName(String name) throws IOException
name
- IOException
public Map<String,DoubleTimeSeries> seriesMap() throws IOException
IOException
public Map<String,DoubleTimeSeries> seriesMapInerp(long[] times) throws IOException
times
- times to interpolate stocks toIOException
public Map<String,DoubleTimeSeries> seriesMapInerp(long delta) throws IOException
delta
- IOException
public String identifier()
identifier
in interface Cachable
public boolean loadedFromAPI()