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 DataFetcherprivate final BasicParser<? extends DatePrice> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DataSource.Coordinatedstatic DataSource.Coordinatedcoordinated(CalendarDateUnit resolution) booleangetCalendarDateSeries(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) inthashCode()static DataSourcenewAlphaVantage(String symbol, CalendarDateUnit resolution, String apiKey) Deprecated.static DataSourcenewAlphaVantage(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 DataSourcenewIEXTrading(String symbol) Deprecated.static DataSourcenewYahoo(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:
getHistoricalDatain interfaceFinanceData<DatePrice>
-
getHistoricalPrices
- Specified by:
getHistoricalPricesin 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:
getPriceSeriesin interfaceFinanceData<DatePrice>
-
getSymbol
- Specified by:
getSymbolin interfaceFinanceData<DatePrice>
-
hashCode
-
getLocalDateSeries
private BasicSeries<LocalDate, PrimitiveNumber> getLocalDateSeries(List<DatePrice> historicalPrices, CalendarDateUnit resolution)
-