Class StrategyStats

java.lang.Object
com.wualabs.qtsurfer.engine.strategy.StrategyStats

public final class StrategyStats extends Object
Manages strategy stats and performance
  • Constructor Details

    • StrategyStats

      public StrategyStats(@NonNull @NonNull Strategy strategy)
  • Method Details

    • instrumentUpdate

      public StrategyStats instrumentUpdate()
    • countYield

      public StrategyStats countYield(@NonNull @NonNull BigDecimal yield)
    • getTotalProfitYields

      public long getTotalProfitYields()
    • getTotalLossYields

      public long getTotalLossYields()
    • getTotalYields

      public long getTotalYields()
    • getNetYield

      public double getNetYield()
    • getTotalProfitYield

      public double getTotalProfitYield()
    • getTotalLossYield

      public double getTotalLossYield()
    • getPnLRatio

      public float getPnLRatio()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getStrategy

      public Strategy getStrategy()
    • getInstrumentOps

      public OPSMeter getInstrumentOps()
    • getExecutionStats

      public ExecutionStats getExecutionStats()
      How this strategy's orders fared in the execution pipeline. Kept as its own object rather than more fields here: yields are what the strategy earned, these are what it cost to get there, and the two are read by different people. Reachable through the stats because that is already the one accessor an observer has on a Strategy.