You 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.
Show HN: I discovered a trading algorithm that returns ~24.85% annually
71–80 of 134 posts
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#72You 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…
especially since market paradigms shift.
ie the last 20 years have been low interest rates, low inflation, with strong secular growth in tech and stagnation elsewhere, and globalization
this varies a lot from the 60s or 70s where there was massive inflation, high in interest, etc..
we may be entering a new paradigm with the changes in fiscal, monetary policy and globalism running its course
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#73Earlier quoted context omitted.
I decided not to add trading commissions because most brokers have removed them after Robinhood entered the market.
Short selling, though, incurs an additional borrowing cost. That's been going up for ETFs since 2020. "The price of short-selling U.S. exchange-traded funds has jumped dramatically since the beginning of March as investors seek to stem heavy losses in the wake of the coronavirus epidemic, according to data from S3 Partners."[1] This needs to be re-run with the borrowing costs added. The fact that EFT short selling co…
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#74Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#75There 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
#76 for (var i = 0; i
}I think this math is wrong. You cant just add the daily performances up to get the total return. unless im missing something.
Though seems like your "cash" variable is correctly calculated.
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#77What software do you use to implement algorithms like this? Do you have to write your own python/other scripts and interact with trading API's for whatever service you use, or are there nice pre-written open source trading algorithms that make building stuff like this easier.
I just downloaded historical data on Yahoo Finance and parsed the CSV files. There are definitely more efficient ways to do this.
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#78As others have said, "Average return is just one statistic". When trading, losses hit harder than wins. Go up 50% then down 50% and you're not even, you're down 25%. The degree of overestimation from this mean return -> "annualized return" calculation depends on what the returns distribution looks like. Here's the calculation used in main.js line 77 applied to a very extreme unrealistic example. I simulated 253 days…
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#79Earlier quoted context omitted.
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…
It's very simple, the best strategy for the last 20 years (with hindsight) would be to buy the shares that have performed best over this period, but it wouldn't work better than chance going forward. 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,…
The best strategy doesn't seem to me to be straightforward to calculate, even with perfect hindsight.
It might be to continually switch in the short-term most profitable asset, after taking into account the transaction costs and risks of influencing the market.
Re: Show HN: I discovered a trading algorithm that returns ~24.85% annually
#80And that’s the problem with any successful algorithm except buy and hold value investing. The latter being hard because it requires doing little, and nobody believes that which requires the least effort to be the best.