Class DataSource
java.lang.Object
org.ojalgo.data.domain.finance.series.DataSource
- All Implemented Interfaces:
FinanceData<DatePrice>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UnaryOperator
<LocalDate> Move the date forward, if necessary, to a Friday.static final UnaryOperator
<LocalDate> Move the date forward, if necessary, to the last day of the month.static final UnaryOperator
<LocalDate> Move the date forward, if necessary, to the last day of the year.private final DataFetcher
private final BasicParser
<? extends DatePrice> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DataSource.Coordinated
static DataSource.Coordinated
coordinated
(CalendarDateUnit resolution) boolean
getCalendarDateSeries
(LocalTime time, ZoneId zoneId) getCalendarDateSeries
(CalendarDateUnit resolution) getCalendarDateSeries
(CalendarDateUnit resolution, LocalTime time, ZoneId zoneId) private BasicSeries
<LocalDate, PrimitiveNumber> getLocalDateSeries
(List<DatePrice> historicalPrices, CalendarDateUnit resolution) getLocalDateSeries
(DenseArray.Factory<Double> denseArrayFactory) getLocalDateSeries
(CalendarDateUnit resolution) getLocalDateSeries
(CalendarDateUnit resolution, DenseArray.Factory<Double> denseArrayFactory) int
hashCode()
static DataSource
newAlphaVantage
(String symbol, CalendarDateUnit resolution, String apiKey) Deprecated.static DataSource
newAlphaVantage
(String symbol, CalendarDateUnit resolution, String apiKey, boolean fullOutputSize) Deprecated.static <T extends DatePrice>
DataSourcenewFileReader
(File file, BasicParser<T> parser) static <T extends DatePrice>
DataSourcenewFileReader
(File file, BasicParser<T> parser, CalendarDateUnit resolution) static DataSource
newIEXTrading
(String symbol) Deprecated.static DataSource
newYahoo
(YahooSession session, String symbol, CalendarDateUnit resolution) Deprecated.
-
Field Details
-
FRIDAY_OF_WEEK
Move the date forward, if necessary, to a Friday. -
LAST_DAY_OF_MONTH
Move the date forward, if necessary, to the last day of the month. -
LAST_DAY_OF_YEAR
Move the date forward, if necessary, to the last day of the year. -
myFetcher
-
myParser
-
-
Constructor Details
-
DataSource
DataSource(DataFetcher fetcher, BasicParser<? extends DatePrice> parser)
-
-
Method Details
-
coordinated
-
coordinated
-
newAlphaVantage
@Deprecated public static DataSource newAlphaVantage(String symbol, CalendarDateUnit resolution, String apiKey) Deprecated.All data downloaders/fetchers are deprecated. They will be removed in a future release, and most likely they're already broken. -
newAlphaVantage
@Deprecated public static DataSource newAlphaVantage(String symbol, CalendarDateUnit resolution, String apiKey, boolean fullOutputSize) Deprecated.All data downloaders/fetchers are deprecated. They will be removed in a future release, and most likely they're already broken. -
newFileReader
-
newFileReader
public static <T extends DatePrice> DataSource newFileReader(File file, BasicParser<T> parser, CalendarDateUnit resolution) -
newIEXTrading
Deprecated.All data downloaders/fetchers are deprecated. They will be removed in a future release, and most likely they're already broken. -
newYahoo
@Deprecated public static DataSource newYahoo(YahooSession session, String symbol, CalendarDateUnit resolution) Deprecated.All data downloaders/fetchers are deprecated. They will be removed in a future release, and most likely they're already broken. -
equals
-
getCalendarDateSeries
-
getCalendarDateSeries
-
getCalendarDateSeries
public CalendarDateSeries<Double> getCalendarDateSeries(CalendarDateUnit resolution, LocalTime time, ZoneId zoneId) -
getCalendarDateSeries
-
getHistoricalData
- Specified by:
getHistoricalData
in interfaceFinanceData<DatePrice>
-
getHistoricalPrices
- Specified by:
getHistoricalPrices
in interfaceFinanceData<DatePrice>
-
getLocalDateSeries
-
getLocalDateSeries
-
getLocalDateSeries
public BasicSeries<LocalDate,PrimitiveNumber> getLocalDateSeries(CalendarDateUnit resolution, DenseArray.Factory<Double> denseArrayFactory) -
getLocalDateSeries
public BasicSeries<LocalDate,PrimitiveNumber> getLocalDateSeries(DenseArray.Factory<Double> denseArrayFactory) -
getPriceSeries
- Specified by:
getPriceSeries
in interfaceFinanceData<DatePrice>
-
getSymbol
- Specified by:
getSymbol
in interfaceFinanceData<DatePrice>
-
hashCode
public int hashCode() -
getLocalDateSeries
private BasicSeries<LocalDate,PrimitiveNumber> getLocalDateSeries(List<DatePrice> historicalPrices, CalendarDateUnit resolution)
-