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 openedrrr- risk to reward ratiorisk- risk in points/dollarsriskEquityPercentage- risk expressed as a percentage of account equityreward- reward in points/dollarsrewardEquityPercentage- reward expressed as a percentage of account equityduration- position duration (in seconds)drawdown- drawdown (non-realized risk)drawdownPercentage- drawdown expressed as a percentage of account equityreturnOnInvestment- realized return on account balancereturnOnPosition- 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 Summary
ConstructorsConstructorDescriptionPositionInsights(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 aPositionInsightsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedayOfWeekrecord component.doubledrawdown()Returns the value of thedrawdownrecord component.doubleReturns the value of thedrawdownPercentagerecord component.longduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thereturnOnInvestmentrecord component.doubleReturns the value of thereturnOnPositionrecord component.doublereward()Returns the value of therewardrecord component.doubleReturns the value of therewardEquityPercentagerecord component.doublerisk()Returns the value of theriskrecord component.doubleReturns the value of theriskEquityPercentagerecord component.doublerrr()Returns the value of therrrrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aPositionInsightsrecord class.- Parameters:
dayOfWeek- the value for thedayOfWeekrecord componentrrr- the value for therrrrecord componentrisk- the value for theriskrecord componentriskEquityPercentage- the value for theriskEquityPercentagerecord componentreward- the value for therewardrecord componentrewardEquityPercentage- the value for therewardEquityPercentagerecord componentduration- the value for thedurationrecord componentdrawdown- the value for thedrawdownrecord componentdrawdownPercentage- the value for thedrawdownPercentagerecord componentreturnOnInvestment- the value for thereturnOnInvestmentrecord componentreturnOnPosition- the value for thereturnOnPositionrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
dayOfWeek
-
rrr
-
risk
-
riskEquityPercentage
public double riskEquityPercentage()Returns the value of theriskEquityPercentagerecord component.- Returns:
- the value of the
riskEquityPercentagerecord component
-
reward
-
rewardEquityPercentage
public double rewardEquityPercentage()Returns the value of therewardEquityPercentagerecord component.- Returns:
- the value of the
rewardEquityPercentagerecord component
-
duration
-
drawdown
-
drawdownPercentage
public double drawdownPercentage()Returns the value of thedrawdownPercentagerecord component.- Returns:
- the value of the
drawdownPercentagerecord component
-
returnOnInvestment
public double returnOnInvestment()Returns the value of thereturnOnInvestmentrecord component.- Returns:
- the value of the
returnOnInvestmentrecord component
-
returnOnPosition
public double returnOnPosition()Returns the value of thereturnOnPositionrecord component.- Returns:
- the value of the
returnOnPositionrecord component
-