107 points · by rodrigobrito · 5y ago · 55 comments
The perils of trading bots are explained in it. The author himself runs one for a long time. [2]
In particular, the greatest risks are overtrading (so you get eaten up by fees), and overexposure (so you get eaten up by volatility).
[1] - https://www.systematicmoney.org/systematic-trading
[2] - https://qoppac.blogspot.com/2021/04/trading-and-investing-pe...
Anyone looking for a trading strategy, automated or not, needs to consistently beat such numbers to do anything other than lose money versus just buying and holding.
Given prior (lack of) success in every other market this kind of thing has been attempted, makes this a hugely tall-order. The most successful quant firms all average well under 100% returns, even with years of experience, armies of experts, and loads of investment in assets and infrastructure.
Buying and holding crypto already outdoes them (massively). Why take on greater risk and spend time to try and get yet more out of such a market?
Put 5% of that 2 million into a spread of the top 10 crypto by market cap.
After a few years, and despite some of those coins going to zero, you'll likely have done way better than just the 50% you'd have got from me.
If you don't though and it all goes to zero, you only lost 5%, as opposed to the entire 2 million to a random person you met on the internet.
You're welcome.
Cryptocurrency is NOT a market you want to be in.
Except the market manipulation, that'd be hard for me to see. It's also a kind of extraordinary claim, so please provide some extraordinary proofs that there actually is manipulation.
Cryptocurrency is a market that everyone should be in, it is after all created for and by everyone. Be careful of putting in money you really need though, and see it as gambling more than anything.
I guess that depends on your priors. Given the nature of the market, its opacity, its lack of regulation, the sheer proliferation of the number of cryptocurrencies, the growing interest by large entities like hedge funds with a history of active manipulation, I'd personally consider it the extraordinary claim that there isn't manipulation occurring. Like, if I were to set out to design a fertile ground for manipulations, it would pretty much look like the cryptocurrency space.
This should not be a concern, just don't HFT your trades. Play longer time-frames (like a few months between a buy and sell); and don't use leverage.
> exchanges just taking your money and running
There are many established/regulated exchanges which have guarantees as good as the traditional exchanges.
> prices crashing without you being able to sell your assets
Maybe that's when you should buy?
> Cryptocurrency is NOT a market you want to be in.
I have been in this market for 6 years, and I was able to generate double digit yields every year (even on bear markets, actually these were the most profitable).
- Frontrunning and market manipulations are as many opportunities: the game for small players is to detect occurrences and free ride them. In clear markets there's no opportunity left in fast trading for anyone without access to institutional fee structures.
- Exchanges doing a runner: diversification and gross (not net) leverage can mitigate that.
- Price crashing: be short-only or market neutral (long=short) if need be.
They have a marketplace where people can share strategies, etc.
The marketplace always shows these massive returns, like "30% over the last week on BTC/USDT". Nowhere do they make it clear that this includes the natural evolution of the market (lol). Worse, if a bot / strategy works for many different pairs, it cherry-picks the one that happened to have good returns that week.
So far as I can tell, there are no strategies on the entire platform that outperform a bull market and in a bear market the strategies were always way too slow to pick up on things crashing.
It turned into a gigantic pyramid-scheme style scam, where the fanciest imagery / language for your BS strategy was what determined how many people ended up using it. Of course you get a cut of the user's fees paid for trading.
Honestly, the whole crypto-trading world seems incredibly dishonest.
If kryll actually had a working product, they would advertise gains above the natural evolution of the market and gains in bear markets.
They would also only charge fees on strategy profits. They do neither.
Another issue I ran into quickly, is the incredibly opaque fee model of many exchanges.
Take Binance: They will tell you the fees you paid for the last 3 months only, there is no place anywhere in the app or the website where they just tell you your cumulative spend on fees. And the 3 month fee CSV you can download has the fees in the cryptos traded, using their value AT THE TIME OF TRADING. So if you want to figure out the fees you paid, you have to build a thing that back-traces what a given crypto was worth at the time and calculate it from that.
With bot-trading, I can tell you that that gets real complicated real quick.
It's such a shame that so much of the crypto world relies on people being uninformed. I myself am a huge crypto fan and have done well just by holding. Trading hasn't worked out for me yet. I remain skeptical it ever will.
You can extend that take to almost all of DeFi yield farming as well. APYs almost always rely either on a greater fool buying the useless governance tokens (which almost always trend down in price), or on late-comers paying entrance/exit taxes to early entrants. That's without even going into the tokens whose central mechanics are merely about disguising Ponzi schemes (Fei, Safemoon, Hex, to name only the billion dollar+ ones).
I'm also a die-hard crypto fan, but having to constantly look out for Ponzis around every corner is tiring.
How much of it is based on social dynamics/having access to the right social networks vs. monitoring transactions vs. monitoring mempool/transaction pool?
> FINAL PORTFOLIO = 19015.904019955597 USDT
> GROSS PROFIT = 9015.904020 USDT (90.16%)
> MARKET CHANGE = 396.71%
does this mean the bot went up 90% when the market went up 396%?
The strategy is a simple two moving averages strategy. It will capture less of the return in a very strong market but maybe protect you on the downside.
The results don’t look particular good though.
I'm not sure this is calculated properly since marketChange is `sum(last-first)/first` (ratio) then avgMarketChange is `ratio/num_samples*100`. That's... average percent change between each sample? Doesn't sound right. (unless I misunderstand what's referenced in candles)
Pretty mangled code. Weird to have to iterate over `avgPrice` to get pairs. This is calculating the average market change across all pairs for which `avgPrice` is tracked in this PaperWallet, whatever that means.
type PaperWallet struct {
sync.Mutex
ctx context.Context
baseCoin string
counter int64
takerFee float64
makerFee float64
initialValue float64
feeder Feeder
orders []model.Order
assets map[string]*assetInfo
avgPrice map[string]float64
lastCandle map[string]model.Candle
fistCandle map[string]model.Candle
}
[...]
func (p *PaperWallet) Summary() {
var (
[...]
marketChange float64
)
[...]
for pair, price := range p.avgPrice {
[...]
marketChange += (p.lastCandle[pair].Close - p.fistCandle[pair].Close) / p.fistCandle[pair].Close
[...]
}
avgMarketChange := marketChange / float64(len(p.avgPrice))
[...]
}
[0] https://www.google.com/search?q=fist+candle&tbm=ischNow, which one of us is the imposter?
Wait!
Tweet => Sentiment Analysis => if + { buy } else { sell }
As far as I can tell, Musktweets are the fundamentals driving the cryptocurrency market.
I would love to play around with this, but the docs are a little light at the moment (unless I missed them). Would definitely recommend pushing docs and content on how to build custom strats, extend the main framework with custom reporting or new exchanges.
It does Binance but it's unclear to me what product types (I'm assuming spot markets).
Things I recommend exploring: (high latency) arbitrage between derivs and spot (for example cash and carry arbitrage). Or super simple funding arb on coinmargined perps (short 1x into synthetic usd). Pure directional is hard, and besides that there is a ton of alpha in more market neutral stuff.
----
A long while back I created a framework with a lot of overlapping functionality called Gekko (not trying to shill, I haven't maintained it for years). It took what I learned from that experience and build a prop trading firm called Folkvang. Crypto has a sea of opportunities ready to seize and in a bull market like we've seen in the last few months there is plenty of fish for everyone (yes there is a free lunch, even for those without a decade of quant/HFT experience from wall street).
----
play, build and have fun - can easily grow into a career
I used Gekko for a long time, it is a great project.!
It is a trading engine - in itself quite interesting, but limited in its usefulness by the lack of strategies.
UPDATE: it has one sample strategy implemented, an EMA crosser (9/21) at https://github.com/rodrigo-brito/ninjabot/blob/main/example/...
This said, I would be very much interested in an introduction to different (simple) trading strategies with examples - does anyone know some introductory text to those?
Just curious.
Eg chat is for humans but a chat bot will use the chat's interface for automating some tasks. Or bots in a multiplayer game take place of other players etc.
Bot ~ robot ~ humanoid? I guess?
Any chance to get it to run on ARM64? I got an RPI4 sitting around which I would like to use for papertrading.
We're doomed.