        (windowed-apply ols-coefficient long-block)
        (windowed-apply average window)
        (reduce min)))
+
+
 
 ;; WHIZBANG
 

    (subvec base-vec 0 x)))

(defn whizbang
  [t-series start-period end-period & cofactors]
  (map (partial lengthening-ts start-period end-period) (apply vector t-series cofactors))
  #_(map long-trend
       (map (partial lengthening-ts start-period end-period)
            (apply vector t-series cofactors))))





                        (range 1 (inc num-months)))))

(defn singular?
  "Check to see if the supplied matrix `X` is singular. note that `X` has to
  be square, n x n, where n > 1."
  [X]
  (<= (i/det X) 0))

