I factored out pieces of code that I always found myself using so that it would all live in one spot (here).
This package has
- Static rolling functions
applyrolling
andmakekernel
using StaticKernels.jl. For small window sizes, this is probably the fastest existing way to do rolling means, sums, etc. - Variance ratios
varianceratio
- SIMD
skew
andkurt
functions that are faster and more forgiving thanStatsBase.skewness
andStatsBase.kurtosis
- Autocorrelation function
autocorrelate
becauseStatsBase.autocor
was too annoying when you only want the first one, and this is faster. Plus I allow for transformations likeautocorrelate(abs,x)
if you want the autocorrelation of absolutex
. you can replicateStatsBase.autocor
viaautocorrelate.(Ref(x),0:L)
whereL
are your desired lags. correlogram(x,y;leadlags::Int=10)
for cross-correlationsnantomissing!
for DataFrames- Conditional correlations
conditionalcor(f,x,y)
spawningdownsidecor
andupsidecor
(eventually will live in AsymmetricRisk.jl when I give it more love) loggrowth(x,n)
for computing log growth rates over different horizonssimiterator
andperioditerator
for labelling observations in simulations.yrqtrfun
andmonthtoquarter
Date-like helper functions