Class SymbolAnalysis

java.lang.Object
com.bluebell.greenhouse.anther.models.analysis.SymbolAnalysis

public class SymbolAnalysis extends Object
Class representation of metadata about a Symbol.
Version:
1.0.5
Author:
Stephen Prizio
  • Constructor Details

  • Method Details

    • getCountOfPeriods

      public int getCountOfPeriods()
      Returns the number of periods in the analysis period.
      Returns:
      integer
    • getAbsoluteHigh

      public double getAbsoluteHigh()
      Returns the absolute high of the analysis period.
      Returns:
      double
    • getAbsoluteLow

      public double getAbsoluteLow()
      Returns the absolute low of the analysis period.
      Returns:
      double
    • getAverageChange

      public double getAverageChange()
      Returns the average change in highs & lows of the analysis period.
      Returns:
      double
    • getAverageBullWickSize

      public double getAverageBullWickSize()
      Returns the average wick size for a bullish period.
      Returns:
      double
    • getAverageBearWickSize

      public double getAverageBearWickSize()
      Returns the average wick size for a bearish period.
      Returns:
      double
    • getBullDays

      public int getBullDays()
      Returns the count of bullish periods.
      Returns:
      integer
    • getAverageBullGain

      public double getAverageBullGain()
      Returns the average gain for bullish periods.
      Returns:
      double
    • getBearDays

      public int getBearDays()
      Returns the count of bearish periods.
      Returns:
      integer
    • getAverageBearGain

      public double getAverageBearGain()
      Returns the average gain for bearish periods.
      Returns:
      double
    • getDojiDays

      public int getDojiDays()
      Returns the count of doji periods.
      Returns:
      integer
    • getBullProbability

      public int getBullProbability()
      Returns the probability of a bullish period.
      Returns:
      percentage
    • getBearProbability

      public int getBearProbability()
      Returns the probability of a bearish period.
      Returns:
      percentage
    • getDojiProbability

      public int getDojiProbability()
      Returns the probability of a doji period.
      Returns:
      percentage
    • toString

      public String toString()
      Defines a custom toString().
      Overrides:
      toString in class Object
      Returns:
      String
    • calculate

      public static org.javatuples.Triplet<Double,Double,Double> calculate(SortedSet<MarketPrice> prices)
      Calculates the highs and lows and average changes.
      Parameters:
      prices - market prices
      Returns:
      Triplet
    • calculateWicks

      public static org.javatuples.Pair<Double,Double> calculateWicks(SortedSet<MarketPrice> prices)
      Calculates the average bull and bear wick sizes (distance of the high/low from the open.
      Parameters:
      prices - market prices
      Returns:
      Pair
    • calculateDirectionalInformation

      public static org.javatuples.Quintet<Integer,Double,Integer,Double,Integer> calculateDirectionalInformation(SortedSet<MarketPrice> prices)
      Calculates directional information related to the bars.
      Parameters:
      prices - market prices
      Returns:
      Quintet