Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.ml.data.market.loader
Class LoadedMarketData

    java.lang.Object
      org.encog.ml.data.market.loader.LoadedMarketData

All Implemented Interfaces:
  Comparable<LoadedMarketData>

    public class LoadedMarketData

extends Object
implements 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.

Author:
  jheaton

Field Summary
`int` | `INDEX_DOUBLE_CLOSE`
`int` | `INDEX_DOUBLE_HIGH`
`int` | `INDEX_DOUBLE_LOW`
`int` | `INDEX_DOUBLE_OPEN`

Constructor Summary
`LoadedMarketData(Date when, TickerSymbol ticker)` Construct one sample of market data.

Method Summary
`int` | `compareTo(LoadedMarketData other)`
`double` | `getData(MarketDataType type)` Get one type of market data from this date.
`TickerSymbol` | `getTicker()`
`Date` | `getWhen()`
`void` | `setData(MarketDataType type, double data)` Set financial data for this date.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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(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:
    `compareTo` in interface `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 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All Rights Reserved.