Class SymbolAnalysisStatisticsService
java.lang.Object
com.bluebell.greenhouse.radicle.services.symbol.analysis.SymbolAnalysisStatisticsService
Computes overview statistics for symbol analysis.
- Version:
- 2.0.4
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildOverview(List<MarketPrice> marketPrices, MarketTimeInterval timeInterval, ExpansionState priceExpansion, ExpansionState volumeExpansion) Builds an overview payload for the given market prices.extractLogReturns(List<MarketPrice> marketPrices) Extracts log returns from the given market prices.extractSimpleReturns(List<MarketPrice> marketPrices) Extracts simple percentage returns from the given market prices.doubleComputes the arithmetic mean.doublemeanAbsolute(List<Double> values) Computes the mean absolute value.doubleComputes the median.intresolveBarsPerYear(MarketTimeInterval timeInterval) Returns the average number of bars per year for the given interval.doublestandardDeviation(List<Double> values) Computes the population standard deviation.
-
Constructor Details
-
SymbolAnalysisStatisticsService
public SymbolAnalysisStatisticsService()
-
-
Method Details
-
buildOverview
public SymbolAnalysisOverview buildOverview(List<MarketPrice> marketPrices, MarketTimeInterval timeInterval, ExpansionState priceExpansion, ExpansionState volumeExpansion) Builds an overview payload for the given market prices.- Parameters:
marketPrices-ListofMarketPricetimeInterval-MarketTimeIntervalpriceExpansion- price expansion statevolumeExpansion- volume expansion state- Returns:
SymbolAnalysisOverview
-
extractSimpleReturns
Extracts simple percentage returns from the given market prices.- Parameters:
marketPrices-ListofMarketPrice- Returns:
Listof returns in percentage terms
-
extractLogReturns
Extracts log returns from the given market prices.- Parameters:
marketPrices-ListofMarketPrice- Returns:
Listof log returns
-
resolveBarsPerYear
Returns the average number of bars per year for the given interval.- Parameters:
timeInterval-MarketTimeInterval- Returns:
- annualization factor
-
mean
-
meanAbsolute
-
median
-
standardDeviation
-