Stats
Use the stats helpers to calculate descriptive distribution properties before layering on performance metrics.
import quantalytics as qa
skew = qa.stats.skew(returns) # or qa.stats.skew(returns)
kurt = qa.stats.kurtosis(returns)
total = qa.stats.total_return(returns)
cagr = qa.stats.cagr(returns, periods_per_year=252)
cagr_pct = qa.stats.cagr_percent(returns, periods_per_year=252)
vol = qa.stats.volatility(returns)
best_day = qa.stats.best_period_return(returns, period="day")
worst_month = qa.stats.worst_period_return(returns, period="month")
win_rate = qa.stats.win_rate(returns, period="week")
skewnessandkurtosisoperate directly on raw returns (or any numeric iterable) and drop missing values.total_returncompounds the whole series to a single growth figure.cagr/cagr_percentannualize growth by the sampling frequency you specify (defaults to daily bars).volatilitynow returns annualized volatility by default (sqrt of the default 365 periods). Setannualize=Falseor adjustperiodsto work with arbitrary sampling frequencies.best_period_return/worst_period_returnsurface the highest/lowest compounded return for any period (day|week|month|quarter|year) and report the answer in percent terms for easy reporting.- win_ratetells you how often the strategy finished positive for the selected period; it now returns a decimal (0–1) rather than a percentage.
Combine these stats with qa.metrics.performance_summary to get a complete picture of the distribution and risk-adjusted results.