Enum Class DayCount

java.lang.Object
java.lang.Enum<DayCount>
markets.alpaca.client.openapi.broker.model.DayCount
All Implemented Interfaces:
Serializable, Comparable<DayCount>, Constable

public enum DayCount extends Enum<DayCount> implements Serializable
The day count convention used to calculate accrued interest. - `A/360`: calculates the daily interest using a 360-day year and then multiplies that by the actual number of days in each time period. - `A/365`: calculates the daily interest using a 365-day year and then multiplies that by the actual number of days in each time period. - `30/360`: calculates the daily interest using a 360-day year and then multiplies that by 30 (standardized month). - `30/365`: calculates the daily interest using a 365-day year and then multiplies that by 30 (standardized month). - `A/A`: calculates the daily interest using the actual number of days in the year and then multiplies that by the actual number of days in each time period. - `30E/360`: number of days equals to the actual number of days (for February). If the start date or the end date of the period is the 31st of a month, that date is set to the 30th. The number of days in a year is 360. - `B/252`: calculates the daily interest using a 252-business-day year and then multiplies that by the actual number of days in each time period. - `A/364`: calculates the daily interest using a 364-day year and then multiplies that by the actual number of days in each time period.
  • Enum Constant Details

    • A_360

      public static final DayCount A_360
    • A_365

      public static final DayCount A_365
    • _30_360

      public static final DayCount _30_360
    • _30_365

      public static final DayCount _30_365
    • A_A

      public static final DayCount A_A
    • _30_E_360

      public static final DayCount _30_E_360
    • B_252

      public static final DayCount B_252
    • A_364

      public static final DayCount A_364
  • Method Details

    • values

      public static DayCount[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DayCount valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<DayCount>
    • fromValue

      public static DayCount fromValue(String value)
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Throws:
      IOException