VaR/drawdown primitives over a return or portfolio-value series.
VaR/drawdown primitives over a return or portfolio-value series.
(maxdrawdown xs)Single pass tracking running peak and running min-drawdown - ~10x faster than (apply min (map - xs (reductions max xs))), which walks xs three times through lazy seqs instead of once.
Single pass tracking running peak and running min-drawdown - ~10x faster than (apply min (map - xs (reductions max xs))), which walks xs three times through lazy seqs instead of once.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |