Class ExponentialMovingAverageService

java.lang.Object
com.bluebell.greenhouse.radicle.services.technical.ExponentialMovingAverageService

@Service @Transactional(readOnly=true) public class ExponentialMovingAverageService extends Object
Service-layer wrapper for exponential moving average calculations and lookups.
Version:
2.0.1
Author:
Stephen Prizio
  • Constructor Details

    • ExponentialMovingAverageService

      public ExponentialMovingAverageService()
  • Method Details

    • buildLookup

      public Map<LocalDateTime, Double> buildLookup(List<MarketPrice> marketPrices, int period)
      Builds a lookup of EMA values keyed by market-price date for the given period.
      Parameters:
      marketPrices - List of MarketPrice
      period - EMA period
      Returns:
      Map of date to ema value