Publications by Ilya Kipnis
A First Attempt At Applying Ensemble Filters
This post will outline a first failed attempt at applying the ensemble filter methodology to try and come up with a weighting process on SPY that should theoretically be a gradual process to shift from conviction between a bull market, a bear market, and anywhere in between. This is a follow-up post to this blog post. So, my thinking went like t...
3319 sym R (2689 sym/1 pcs) 6 img
On The Relationship Between the SMA and Momentum
Happy new year. This post will be a quick one covering the relationship between the simple moving average and time series momentum. The implication is that one can potentially derive better time series momentum indicators than the classical one applied in so many papers. Okay, so the main idea for this post is quite simple: I’m sure we’re all...
3168 sym R (945 sym/4 pcs) 6 img
Are R^2s Useful In Finance? Hypothesis-Driven Development In Reverse
This post will shed light on the values of R^2s behind two rather simplistic strategies — the simple 10 month SMA, and its relative, the 10 month momentum (which is simply a difference of SMAs, as Alpha Architect showed in their book DIY Financial Advisor. Not too long ago, a friend of mine named Josh asked me a question regarding R^2s in finan...
4027 sym R (1639 sym/4 pcs) 8 img
Create Amazing Looking Backtests With This One Wrong–I Mean Weird–Trick! (And Some Troubling Logical Invest Results)
This post will outline an easy-to-make mistake in writing vectorized backtests–namely in using a signal obtained at the end of a period to enter (or exit) a position in that same period. The difference in results one obtains is massive. Today, I saw two separate posts from Alpha Architect and Mike Harris both referencing a paper by Valeriy Zak...
3179 sym R (1053 sym/4 pcs) 10 img
How To Compute Turnover With Return.Portfolio in R
This post will demonstrate how to take into account turnover when dealing with returns-based data using PerformanceAnalytics and the Return.Portfolio function in R. It will demonstrate this on a basic strategy on the nine sector SPDRs. So, first off, this is in response to a question posed by one Robert Wages on the R-SIG-Finance mailing list. Wh...
4544 sym R (1640 sym/5 pcs) 10 img
A Return.Portfolio Wrapper to Automate Harry Long Seeking Alpha Backtests
This post will cover a function to simplify creating Harry Long type rebalancing strategies from SeekingAlpha for interested readers. As Harry Long has stated, most, if not all of his strategies are more for demonstrative purposes rather than actual recommended investments. So, since Harry Long has been posting some more articles on Seeknig Alpha...
3328 sym R (2263 sym/6 pcs) 6 img
An Introoduction to Portfolio Component Conditional Value At Risk
This post will introduce component conditional value at risk mechanics found in PerformanceAnalytics from a paper written by Brian Peterson, Kris Boudt, and Peter Carl. This is a mechanism that is an easy-to-call mechanism for computing component expected shortfall in asset returns as they apply to a portfolio. While the exact mechanics are fairl...
4580 sym R (4111 sym/4 pcs) 4 img
The Problem With Depmix For Online Regime Prediction
This post will be about attempting to use the Depmix package for online state prediction. While the depmix package performs admirably when it comes to describing the states of the past, when used for one-step-ahead prediction, under the assumption that tomorrow’s state will be identical to today’s, the hidden markov model process found within...
5398 sym R (2585 sym/7 pcs) 12 img
Ehlers’s Autocorrelation Periodogram
This post will introduce John Ehlers’s Autocorrelation Periodogram mechanism–a mechanism designed to dynamically find a lookback period. That is, the most common parameter optimized in backtests is the lookback period. Before beginning this post, I must give credit where it’s due, to one Mr. Fabrizio Maccallini, the head of structured deriv...
3924 sym R (4052 sym/7 pcs) 10 img
Nuts and Bolts of Quantstrat, Part V
This post will be about pre-processing custom indicators in quantstrat–that is, how to add values to your market data that do not arise from the market data itself. The first four parts of my nuts and bolts of quantstrat were well received. They are even available as a datacamp course. For those that want to catch up to today’s post, I highly...
2410 sym R (2191 sym/4 pcs) 6 img