Record Class PositionInsights

java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.core.nonentities.position.PositionInsights
Record Components:
dayOfWeek - day of week the position was opened
rrr - risk to reward ratio
risk - risk in points/dollars
riskEquityPercentage - risk expressed as a percentage of account equity
reward - reward in points/dollars
rewardEquityPercentage - reward expressed as a percentage of account equity
duration - position duration (in seconds)
drawdown - drawdown (non-realized risk)
drawdownPercentage - drawdown expressed as a percentage of account equity
returnOnInvestment - realized return on account balance
returnOnPosition - realized return on position value

public record PositionInsights(String dayOfWeek, double rrr, double risk, double riskEquityPercentage, double reward, double rewardEquityPercentage, long duration, double drawdown, double drawdownPercentage, double returnOnInvestment, double returnOnPosition) extends Record
Class representation of various Position statistical measures regarding its performance.
Version:
2.0.3
Author:
Stephen Prizio
  • Constructor Details

    • PositionInsights

      public PositionInsights(String dayOfWeek, double rrr, double risk, double riskEquityPercentage, double reward, double rewardEquityPercentage, long duration, double drawdown, double drawdownPercentage, double returnOnInvestment, double returnOnPosition)
      Creates an instance of a PositionInsights record class.
      Parameters:
      dayOfWeek - the value for the dayOfWeek record component
      rrr - the value for the rrr record component
      risk - the value for the risk record component
      riskEquityPercentage - the value for the riskEquityPercentage record component
      reward - the value for the reward record component
      rewardEquityPercentage - the value for the rewardEquityPercentage record component
      duration - the value for the duration record component
      drawdown - the value for the drawdown record component
      drawdownPercentage - the value for the drawdownPercentage record component
      returnOnInvestment - the value for the returnOnInvestment record component
      returnOnPosition - the value for the returnOnPosition record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • dayOfWeek

      public String dayOfWeek()
      Returns the value of the dayOfWeek record component.
      Returns:
      the value of the dayOfWeek record component
    • rrr

      public double rrr()
      Returns the value of the rrr record component.
      Returns:
      the value of the rrr record component
    • risk

      public double risk()
      Returns the value of the risk record component.
      Returns:
      the value of the risk record component
    • riskEquityPercentage

      public double riskEquityPercentage()
      Returns the value of the riskEquityPercentage record component.
      Returns:
      the value of the riskEquityPercentage record component
    • reward

      public double reward()
      Returns the value of the reward record component.
      Returns:
      the value of the reward record component
    • rewardEquityPercentage

      public double rewardEquityPercentage()
      Returns the value of the rewardEquityPercentage record component.
      Returns:
      the value of the rewardEquityPercentage record component
    • duration

      public long duration()
      Returns the value of the duration record component.
      Returns:
      the value of the duration record component
    • drawdown

      public double drawdown()
      Returns the value of the drawdown record component.
      Returns:
      the value of the drawdown record component
    • drawdownPercentage

      public double drawdownPercentage()
      Returns the value of the drawdownPercentage record component.
      Returns:
      the value of the drawdownPercentage record component
    • returnOnInvestment

      public double returnOnInvestment()
      Returns the value of the returnOnInvestment record component.
      Returns:
      the value of the returnOnInvestment record component
    • returnOnPosition

      public double returnOnPosition()
      Returns the value of the returnOnPosition record component.
      Returns:
      the value of the returnOnPosition record component