Record Class BitcoinPrice

java.lang.Object
java.lang.Record
smile.datasets.BitcoinPrice
Record Components:
data - data frame.

public record BitcoinPrice(DataFrame data) extends Record
Bitcoin Price history on a daily basis from April-28th, 2013 to Feb-20th, 2018.
   Date,          Open,    High,    Low,     Close,   Volume,         Market Cap
   "Feb 20, 2018",11231.80,11958.50,11231.80,11403.70,"9,926,540,000","189,536,000,000"
   "Feb 19, 2018",10552.60,11273.80,10513.20,11225.30,"7,652,090,000","178,055,000,000"
   "Feb 18, 2018",11123.40,11349.80,10326.00,10551.80,"8,744,010,000","187,663,000,000"
   ...
 

References

  1. Cryptocurrency Historical Prices
  2. Bitcoin Price Prediction: An ARIMA Approach
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
    Constructor.
    Creates an instance of a BitcoinPrice record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the data record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double[]
    Returns the log of closing price series, which are commonly believed to be unit-root non-stationary.
    double[]
    Returns the closing price series, which are commonly believed to be non-stationary.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BitcoinPrice

      public BitcoinPrice() throws IOException
      Constructor.
      Throws:
      IOException - when fails to read the file.
    • BitcoinPrice

      public BitcoinPrice(Path path) throws IOException
      Constructor.
      Parameters:
      path - the data path.
      Throws:
      IOException - when fails to read the file.
    • BitcoinPrice

      public BitcoinPrice(DataFrame data)
      Creates an instance of a BitcoinPrice record class.
      Parameters:
      data - the value for the data record component
  • Method Details

    • price

      public double[] price()
      Returns the closing price series, which are commonly believed to be non-stationary.
      Returns:
      the closing price series.
    • logPrice

      public double[] logPrice()
      Returns the log of closing price series, which are commonly believed to be unit-root non-stationary.
      Returns:
      the log of closing price series.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • data

      public DataFrame data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component