Show HN: I discovered a trading algorithm that returns ~24.85% annually
61–70 of 134 posts
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#62Earlier 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?
This particular attempt seemed to have succeeded. But how many were tried that didn't? If you torture the data long enough it will confess.
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#63Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#64There 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 commi…
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#65Average 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 as…
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#66This is mean reversion, right? Essentially fading market volatility. I recall an article on Bloomberg about a quant fund using VIX ETNs to implement something similar. Gradually adding short positions as volatility rises. Knowing it will dissipate once turmoil subsides. My recommendation: try entering a trading contest on Alpaca ;) https://alpaca.markets/data
It looks like it is mean reversion. This is my first time hearing that term. The way I discovered this algorithm was initially I wanted to buy the previous day's best performing sector ETF, with a hypothesis that the momentum would continue. But I learned that it actually ended up losing money. So I decided to inverse the algorithm. There are still a few optimizations I can test out, e.g. Buying the previous day's wo…
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#67This is a simple trading algorithm I discovered that operates on the Vanguard sector ETFs. This backdating algorithm provides on average a return of ~0.0878% for each trading day, or ~24.85% annualized return assuming 253 trading days per year. ## The Algorithm This algorithm is really simple. 1. On day `n`, determine which ETF gave the highest return 2. On day `n+1`, short sell the previous day's highest performing…
.067 sharpe ratio, .11 sortino, largest drawdown was ~41%
Not very good numbers. Fun stuff though!
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#68Here's the calculation used in main.js line 77 applied to a very extreme unrealistic example. I simulated 253 days of return percentages from a uniform distribution between -5.5% and 5.6%, and then the actual total return percent, calculated in R
set.seed(2020)
n
Edit:In reality the actual numbers are likely to be not nearly as different as this example. I chose uniformly distributed returns with a wide range to make the reason against this calculation very obvious. Here's an example return distribution where there's hardly any difference. Normal returns with average of 0.085% and standard deviation of .05 i.e. daily_gain
annualizedReturn
# 1] 0.2414539
prod(1 + daily_gain) - 1
# [1] 0.2414051
For good measure here's one in the middle where your returns are normally distributed with an average of 0.35% and a sd of .2%, but then you have on average 10 bad days a year where returns are 5 percentage points lower than that distribution i.e. daily_gain annualizedReturn
# [1] 0.2712024
prod(1 + daily_gain) - 1
# [1] 0.2490317Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#69You did not discover a trading algorithm that returns ~24.85% annually. You massaged an algorithm until it produced a 24.85% annual return training on historical data. Come back when you are ready to claim you have made ~24.85% per year with an algorithm you created 5-10 years ago. Deny it, Downvote it: Destiny still arrives.
Serious question: I fully understand the idea of historical algorithms being no true indicator of the future. With that said....... If an algorithm consistently performs over 20+ years of data (through multiple black swan events, multiple major events), then why is it not safe to assume it likely will continue going forward? Wouldn't 20 years of "evidence" be a huge amount, such that future events likely wouldn't dev…
Obviously, sitting down and creating that "strategy" would be silly, nobody would think that would work. But if you're using ML or just test a million random strategies, you could end up with something along those lines, a strategy that is optimised for the particular paths stock prices took up to know.