diff --git a/pkg/types/trade_stat.go b/pkg/types/trade_stat.go index aee26dbd7..cf1c68cfa 100644 --- a/pkg/types/trade_stat.go +++ b/pkg/types/trade_stat.go @@ -15,13 +15,13 @@ const ( DailyToAnnualFactor = 252 // todo does this apply to crypto at all? ) -// HistVolAnn is the annualized historic volatility of daily returns. +// AnnualHistoricVolatility is the historic volatility of the equity curve as annualized std dev. func AnnualHistoricVolatility(data Series) float64 { var sd = Stdev(data, data.Length(), 1) return sd * math.Sqrt(DailyToAnnualFactor) } -// CAGR Compound Annual Growth Rate +// CAGR is the Compound Annual Growth Rate of the equity curve. func CAGR(initial, final float64, days int) float64 { var ( growthRate = (final - initial) / initial diff --git a/pkg/types/trade_stats.go b/pkg/types/trade_stats.go index e330fa85b..821bb2569 100644 --- a/pkg/types/trade_stats.go +++ b/pkg/types/trade_stats.go @@ -219,24 +219,6 @@ type TradeStats struct { consecutiveSide int consecutiveCounter int consecutiveAmount fixedpoint.Value - - // CAGR is the Compound Annual Growth Rate of the equity curve. - CAGR float64 - - // MaxDrawdown is the maximum percentage drawdown of the equity curve - MaxDrawdown float64 - - // MDDRecovery is the recovery time of the maximum drawdown of the equity curve. - MDDRecovery time.Duration - - // HistVolAnn is the historic volatility of the equity curve as annualized std dev. - HistVolAnn float64 - - // Sharpe is the Sharpe ratio of the equity curve. - Sharpe float64 - - // Calmar is the Calmar ratio of the equity curve. - Calmar float64 } func NewTradeStats(symbol string) *TradeStats {