Live data from Hacker News

Show HN: I discovered a trading algorithm that returns ~24.85% annually

github.com

51–60 of 134 posts

Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually

#51
Average return is just one statistic. You can earn an arbitrarily high daily average return by taking an ordinary strategy (e.g. buy and hold the S&P 500) and applying large amounts of leverage. Returns will be great until the strategy blows up.

What was the volatility of this strategy? When backtested on the historical data, what was the maximum drawdown? What happens when trading costs or slippage (buying at the ask, selling at the bid) are modeled additionally?

252 trading days times two trades per day (short sell at open, buy to close at close) is a lot of trades, and execution quality will be very important.

Does this strategy hold up with week-long holding times?

Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually

#52

Earlier quoted context omitted.

As I read it, the strategy never goes long -- it's always simply short one ETF. The bad cases look like "one sector consistently outperforms", or "leading sectors have bull runs of consecutive days before losing steam".

Sorry guys - it should have said: All the way to the moon.

The algorithm has a buddy:

The algorithm of just buying the worst performing etf of yesterday.

Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually

#53
post #49
post #34

Earlier quoted context omitted.

To do that would be to presume I doubt the validity of your claim (I DO believe what you said). I specifically asked how overfitting applies to a simple procedural technique, rather than a multi-dimensional method like a neural network. Trying myself, and losing money, doesn't explain how overfitting applies to procedural steps (as I said, my ML is rusty)

I find people start learning things very quickly when they start losing money.

What a bizarre answer to a specific question, but thanks for trying

Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually

#55
post #46
post #41

Earlier quoted context omitted.

There's no overfitting in the traditional/model sense here. This is a pretty rudimentary momentum strategy (long best performers). Implementing this on any kind of scale would be expensive to trade since it rebalance's daily. For momentum, Jegadeesh-Titman paper is much of the foundation for these types of strategies, if you're interested. But as others have pointed out, the "smart money" saturated this trade decades…

Interesting... what do you mean by this bit? > Implementing this on any kind of scale would be expensive to trade since it rebalance's daily.

Trading $100 vs $1000 vs $1M vs $1B worth of these ETFs.

Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually

#56
post #55
post #46

Earlier quoted context omitted.

Interesting... what do you mean by this bit? > Implementing this on any kind of scale would be expensive to trade since it rebalance's daily.

Trading $100 vs $1000 vs $1M vs $1B worth of these ETFs.

Oh, I see. I just looked at what rebalancing is. Thank you, that is very interesting

Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually

#57
There are so many misconceptions on this thread about what makes a good quant trading strategy.

First of all, if you're shorting US equities and making 25% annually, that would be awesome. Heck, even being flat would be great because a strategy that is long SP500 could also short your equities and be delta-neutral and likely have a much lower volatility for the same return.

Second, so many people are mentioning commissions, trading fees, taxes and so on. Commissions and trading fees are much less than 1 basis point per trade if you use reputable brokerages. That would, at most, amount to a 1-2% in fees per year. Market impact matters but opening and closing auctions are very liquid and represent respectively more than 1% and 5% of the daily volume, probably even more for these kind of ETFs. Shorting fees are also quite small, in the range of 0-2% for liquid ETFs. If you don't hold positions overnight which is your case, you also don't pay to short!

Finally, here's what really matters. Returns by themselves don't matter. If you want a very high return strategy, you can short a long VIX ETF like VXX but every once in a while, you will be down more than a 100% ; it will bankrupt you if your available capital is less than the value of your short. You also need to look at your Sharpe ratio and maximum drawdown. Anyone somewhat experienced could tell you if the strategy is valid by having a look at plot of returns. If it's not too volatile, it could be a good strat.

Edit: addressing shorting fees

Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually

#58
There's kind of a lot of missing pieces here:

* This is a simple strategy, which is fine, but also means you are not the only person who has noticed this. Why do you think this makes money? Is there some risk you are being compensated for, or is there some forced trading you're picking up the other side of, or something else?

* Which of the common equity factors (https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data...) is your strategy exposed to, and by how much?

* What are the basic return statistics of the strategy, like Sharpe and drawdown?

* How sensitive is the strategy to parameter variations? What if you sell the second best ETF instead of the best? What if you sell on day n+2 instead of n+1? What if you buy the worst ETF?

And about a dozen other things that you should look into before you actually try trading.

Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually

#59
post #21
post #14

Earlier quoted context omitted.

Overfitting, even on a 20 year dataset.

Interesting My ML knowledge is somewhat rusty... does overfitting occur more often on models with many input parameters (ie.. neural networks). His algorithm seems very simple, without really using ML at all, it's more of just a procedural 1-2-3 step thing, with no actual learning. Can you explain how overfitting works into his algorithm?

I think you're right and overfitting certainly wouldn't explain bad performance of this algorithm, you can't overfit with such a simple strategy. The market can change in response to discovering this strategy though.
Post reply on HN