anchor.diff:  
     let internal applyMovingStatsTransform moment winSz minObs (proj: Sums -> float) series =
       checkWinSz winSz minObs
  -    let filtProj s = if (int s.nobs) >= minObs then Some(proj s) else None
  -    let calcDense = movingWindowFn winSz (initSumsDense moment) (updateSumsDense moment) proj nan
  -    let calcSparse = movingWindowFn winSz (initSumsSparse moment) (updateSumsSparse moment) filtProj None
  -    applySeriesProj calcDense calcSparse series
  +    let filtProj s = if (int s.nobs) >= minObs then proj s else nan
  +    let calcSparse = movingWindowFn winSz (initSumsSparse moment) (updateSumsSparse moment) filtProj
  +    applySeriesProj calcSparse series
   
     let internal variance s =
       let v = (s.nobs * s.sump2 - s.sum * s.sum) / (s.nobs * s.nobs - s.nobs) 
  
positive.code: 
    let internal applyExpandingStatsTransform minObs (proj: Moments -> float) series =
      if minObs < 1 then invalidArg "minObs" "minObs must be at least 1"
      let proj' s = if (int s.nobs) >= minObs then proj s else nan
      let filtProj s = if (int s.nobs) >= minObs then Some(proj s) else None
      let initState = {nobs = 0.0; sum = 0.0; M1 = 0.0; M2 = 0.0; M3 = 0.0; M4 = 0.0 }
      let calcDense = expandingWindowFn minObs initState updateMoments proj' 
      let calcSparse = expandingWindowFn minObs initState updateMomentsSparse filtProj
      applySeriesProj calcDense calcSparse series
  
    // expanding window functions
  
  
negative.code:            yield !state |> ftransf
           else 
             r := (!r - 1)
             yield nan }
  
    type Sums = { nobs: float; sum: float; sump2: float; sump3: float; sump4: float }
  
  