Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Basic Algorithmic Trading Question and Concern

Hi All -

I've long been interested in deriving some sort of algorithmic trading strategy and have kept my eyes open for information as it pops up on the web. I'm sure many of you are familiar with ETF replay, which is a website with a backtester that provides (at first glace) convincing support for their trading metric (a function of 3-month return, 20-day return, and 20-day volatility). The backtesters rotates between the ETFs: GLD, SPY, and SHY and conveniently bypasses the 2008 crash. If I play with the backtestering period, however, I see the algorithm is on par or under-performing the SPY benchmark, especially when I start the backtest after 2008.

Where I am now - and what is frustrating me - is that 1) there is a limited amount of historical data on ETFs and that is limiting my ability to backtest; 2) I don't know whether I should be looking at overall return vs. benchmark or some other measure to compare different trading strategies, maybe some sort of sharpe ratio?; 3) I'm wondering if it makes sense that there should be some sort of correlation between the algorithmic trading parameter and future performance. In other words, the backtester on ETF replay demonstrates outperformance of the SPY in some cases but if I generate a .csv of the value of their "trading metric" and plot it against, for example, 63 day performance there is a minimally positive slope and no meaningful correlation.

I just wish I had a more systematic way to pursue this! Has anyone run into similar issues?

1 response

@Daniel, I couldn't agree more. I offer a few of my (possibly naive) thoughts...

Intuitively, for longer term investors, I think we should be looking for answers to questions like:
a) Is it all possible, with the incredible depth of info available, to categorize the market 'condition' (for lack of a better term) with reasonable accuracy- eg. Extremely Bearish, Very Bearish, Mildly Bearish, Neutral, etc. (or some better categorization)?
b) Can we construct a stock universe for each of these categories, which 'performs' well over an 'investment horizon'
c) How should we measure the 'strength' of each stock, by category? What metric(s) should we use?
d) How do we optimize our strategy (defined by: market categories, stock universes by category, metrics by category, investment horizon) - eg. portfolio weightings, metric parameters, lookback periods, etc.
e) Is the constructed strategy reasonably insensitive to choice of start and end dates, given the investment horizon? (eg. measure the performance of the strategy using rolling stats with period equal to the investment horizon)

Am I being too simplistic and/or naive? Is this practical? Can this be achieved purely programatically?

DaveG