org.encog.ml.data.market.loader
Class LoadedMarketData
- java.lang.Object
-
- org.encog.ml.data.market.loader.LoadedMarketData
-
- All Implemented Interfaces:
- java.lang.Comparable<LoadedMarketData>
public class LoadedMarketData extends java.lang.Object implements java.lang.Comparable<LoadedMarketData>
This class contains market data that was loaded for a specific ticker symbol and a specific date. This data is usually loaded from external sources.
-
-
Field Summary
Fields Modifier and Type Field and Description intINDEX_DOUBLE_CLOSEintINDEX_DOUBLE_HIGHintINDEX_DOUBLE_LOWintINDEX_DOUBLE_OPEN
-
Constructor Summary
Constructors Constructor and Description LoadedMarketData(java.util.Date when, TickerSymbol ticker)Construct one sample of market data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intcompareTo(LoadedMarketData other)doublegetData(MarketDataType type)Get one type of market data from this date.TickerSymbolgetTicker()java.util.DategetWhen()voidsetData(MarketDataType type, double data)Set financial data for this date.
-
-
-
Field Detail
-
INDEX_DOUBLE_HIGH
public final int INDEX_DOUBLE_HIGH
- See Also:
- Constant Field Values
-
INDEX_DOUBLE_LOW
public final int INDEX_DOUBLE_LOW
- See Also:
- Constant Field Values
-
INDEX_DOUBLE_OPEN
public final int INDEX_DOUBLE_OPEN
- See Also:
- Constant Field Values
-
INDEX_DOUBLE_CLOSE
public final int INDEX_DOUBLE_CLOSE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LoadedMarketData
public LoadedMarketData(java.util.Date when, TickerSymbol ticker)Construct one sample of market data.- Parameters:
when- When was this sample taken.ticker- What is the ticker symbol for this data.
-
-
Method Detail
-
compareTo
public int compareTo(LoadedMarketData other)
- Specified by:
compareToin interfacejava.lang.Comparable<LoadedMarketData>
-
getData
public double getData(MarketDataType type)
Get one type of market data from this date.- Parameters:
type- The type of data needed.- Returns:
- The market data for the specified date and of the specified type.
-
getTicker
public TickerSymbol getTicker()
- Returns:
- The ticker symbol this sample is assocated with.
-
getWhen
public java.util.Date getWhen()
- Returns:
- When this sample was taken.
-
setData
public void setData(MarketDataType type, double data)
Set financial data for this date.- Parameters:
type- The type of data being set.data- The value of the data being set.
-
-
DMelt 3.0 © DataMelt by jWork.ORG