HN Gopher Feed (2017-10-30) - page 1 of 10 ___________________________________________________________________
Algo trading digital assets
92 points by mthwsjc_
http://johnmathews.eu/algo-trading.html___________________________________________________________________
meesterdude - 53 minutes ago
I'm building a trading bot (ruby) that uses a collection of signals
to trade. I have been working on the backtesting to do validation
of different strategies across different pairs and intervals. The
highest i've gotten it so far is 120X from start of LTC/BTC, but
thats also on a fairly aggressive setting (and obviously
idealistic);SMA can work, but it can also bite you. I think using
only 1 technical indicator is asking for trouble when determining
entry. Use at least 2, but no more than 5 or 6.As a software
developer, its a cool field to tinker in. But theres lots of
ignorance, hype, and crap.For anyone who wants to build a simple
bot, checkout gekko https://gekko.wizb.it
tlb - 4 hours ago
Although simulations will predict good profits, you will probably
lose your money doing this due to counterparty risk. Counterparty
risk is the risk that, between the time you click the 'sell' button
and the time you actually get the money deposited in your bank
account a few days later, the exchange goes insolvent.When a given
coin trades at different prices on two exchanges (which is what
these arbitrage algorithms look for), it will try to buy that
currency on the cheap one and sell on the expensive one.The main
reason coins have different prices (more than a few cents) on
different exchanges is that people are worried about the exchange
being insolvent.For instance, during MtGox's slide into doom,
Bitcoin was cheap there. So this algorithm would have been busily
buying Bitcoin with USD on MtGox, then transferring the Bitcoin to
another exchange to sell, so it could pump the USD back into MtGox.
Since withdrawals from MtGox were throttled, you would have built
up a large balance there. When they shut down, you would have lost
bigly.People do make money doing arbitrage between exchanges, but
you need a sophisticated model that considers counterparty risk,
which isn't something you can read from a price sheet.
gormo2 - 3 hours ago
Nice comment. How does that relate to the SMA visualizations
discussed in the article?
wc- - 3 hours ago
This comment is almost like a copy-paste every time some kind of
crypto trading article is submitted. I might have missed
something in the article / code but this isn't an arb strat? It
is just using some moving averages to try to follow a perceived
trend in different trading pairs on a single
exchange.Counterparty risk definitely still exists, but it is
getting better very quickly with the growth of regulated US-based
exchanges like gdax, gemini, and ledger x. In the altcoin world,
Bittrex is in the process of fulfilling state-by-state
requirements for regulatory approval. The crypto world is very
different today from when MtGox dominated and getting even
better.
nosuchthing - 3 hours ago
You forgot the most infuential (and unscrupulous) crypto
exchange in the cyptocoin ecosystem: Bitfinex.
https://medium.com/@bitfinexed/latest
wc- - 3 hours ago
Yes, very familiar with finex and the bitfinexed guy's
warnings / rants / whatever you want to call them.If
counterparty risk is a top concern (and it probably should
be) then don't trade on unlicensed exchanges... That rule is
great to follow and I haven't even gotten into any usdt
tether issues...
dharma1 - 2 hours ago
couldn't you trade on decentralised exchanges where
counterparty risk isn't a thing? at least if you're only
trading between crypto pairs
wc- - 2 hours ago
Yes, decentralized exchanges (dex) are coming and I'm
very hopeful.However, the ones I have looked at / tested
so far just aren't ready for primetime. Slow transaction
times, lackluster user experience, no liquidity.But those
are all problems that are to be expected for what are
basically beta-status projects (at best) and I am excited
to see where things go from here.
tlb - 3 hours ago
You can still run an arbitration strategy even with one
exchange, and the risk within that single exchange can be
different between different coins. For example, if an
exchange's Bitcoin balance is stolen but not their Litecoin,
there might be a period during which you can withdraw in
Litecoin but not Bitcoin. If the rumor mill works, that would
be preceded by a change in the relative prices during which
this algorithm would suggest buying Bitcoin.
csomar - 3 hours ago
I don't think you have read the article, traded digital assets or
understand the current landscape of crypto.
JumpCrisscross - 29 minutes ago
As a former high-frequency (HF) equity derivatives trader, I'm
skeptical of HF cryptocurrency trading. There's a reason few
modern markets have HF trading, an activity which could be
described as vacuuming up nickels in front of bulldozers. HF
needs a stable, predictable environment to make the nickels worth
collecting.Risk management in HF is less about predicting what
might go down than avoiding trading when liquidity dries up. This
is why when markets get weird HF algos pull out: an unexpected
one-minute trading stall can wipe out a quarter's profits.In
crypto, where the market is still learning lessons from the
1930s, the nickels are quarters but the bulldozers are tanks.
[deleted]
nmca - 3 hours ago
I am unable to see the charts.
Drdrdrq - 2 hours ago
Had the same problem, they showed up later. I guess HN effect is
to blame.
supermdguy - 42 minutes ago
I'm seeing:This embedded plot has reached the maximum allowable
views given the owner's current subscription. Please visit the
subscriptions page to learn more about upgrading.
wc- - 4 hours ago
This is a decent first-steps guide into analyzing historical
trading data. With resources like Quandl, QuantConnect, etc
continuing to improve, hopefully we will see more and more people
diving into the data.That being said, the "todos" at the end of
this article kind of understate just how much work is left to be
done before a strategy like this could be put into production.
Ignoring the actual viability of a simple moving average cross
signal, you could have the best strategy out there but would never
stand a chance without significant time and effort committed to the
execution and risk management sides of automated trading.If
building trading systems in the crypto world is something that
interests you feel free to reach out to me, company / contact info
is in my HN profile.
nxsynonym - 4 hours ago
Here's a question I've had for a while regarding trading systems
in the cryptocurrency world --What's the end goal? Would a
perfect trading system fully automate the trading process to
maximize returns, or is the goal to develop the best tool to
assist a trader?I'm curious what you, as someone in the field of
developing these systems, see as the "ideal product".As a follow
up question, what would happen to a market that is 100% traded
automatically (assuming thats possible and the end-goal) - would
become stagnant?Forgive my ignorance if any of this is obvious,
my econ/trading knowledge is next to 0.
gricardo99 - 3 hours ago
I'm not exactly sure what you're asking. What's the goal of
building a trading system?As someone who's worked on trading
systems in a professional setting I'll give some thoughts.First
and foremost the goal is to make money. I guess some people
build these systems for fun/hobby or for the
challenge/educational value. But huge amounts of money are
spent on trading systems, with the goal that they increase
profitability. Sometimes that means maximizing returns,
sometimes that means assisting traders. This is a very large
market, with very diverse types of end-users. I believe crypto
is similar, but a microcosm of the broader trading environment
(with some of its own cyrpto-specific idiosyncrasies). You
have some "HFT" traders, "institutional", HODLERs, etc... Each
has different objectives and skill sets. A trading system has
a different value proposition for each trader's needs and
objectives.In terms of a 100% automated market, that's an
interesting question. The biggest world markets are very
highly automated, such as the equities market. Google "hft
percentage of volume" and you'll find various sources claiming
up to 70% of the equities volume is HFT. Since HFT trades
complete in micro-seconds, this is fully automated trading.
The Flash crash was partially blamed on a high-level of
automation, were a trader was trying to game the response to
large orders[1]. I think a 100% automated market would
collapse. Even the 70% automated market of equities has shown
some scary positive feedback loops that need human
intervention.1 -
https://www.bloomberg.com/view/articles/2015-04-21/guy-tradi...
bduerst - 1 hours ago
>I think a 100% automated market would collapse. Even the 70%
automated market of equities has shown some scary positive
feedback loops that need human intervention.Which is because
the automation isn't capable of fully gaming itself yet.In
game theory, you don't have to be the smartest person in the
room, you just have to know what everyone else is going to
do. In a ~100% automated market, whoever can identify the
patterns emergent from the automated rules will be able to
beat the automation.
dpweb - 1 hours ago
HFT strategies are of course secret but aren't they really
taking advantage of:1. Faster speed to market. Basically,
front running 2. Extremely low transaction costs. Not
available to the retail trader or even electronic mkt makers.
3. Extremely low time in each trade - when you dispense with
bell curve predicting - risk becomes only the time you are
not flat.These are NOT prediction of future price. HFT don't
make money 'predicting' the market - they are too
sophisticated as traders to believe that's reliably possible.
It is to some extent, but its very hard and theirs is a
better play.
dsacco - 33 minutes ago
> Faster speed to market. Basically, front runningNo, this
is not basically front running. Front running has a very
specific meaning. High frequency trading is not front
running.
notyourgrandma - 1 hours ago
What do you think of db's recent decision to open-source
their trading platform? https://www.db.com/newsroom_news/2017
/deutsche-bank-makes-it...
wc- - 4 hours ago
Just like in traditional markets there are all kinds of
applications. Some devs might be building tools to assist
human traders, some might be working on market making /
liquidity providing, some might be working on execution algos
for the various funds that have popped up. My ideal product is
very different from someone else's, it just depends on what
your business model is.For the follow up question, I would
suggest looking at the rise of automated trading in traditional
markets. It is an overwhelmingly large % of trades and market
activity these days, and I would call the largest financial
markets in the world anything but stagnant.The more players and
liquidity in a market, the more efficient the price discovery
can be, which I think would be a very good thing for the long
term viability of crypto markets.I guess to summarize, the
crypto markets are not much different from traditional markets
and getting more similar every day.
brndnmtthws - 4 hours ago
Time in the market beats timing the market.
[deleted]
AbenezerMamo - 4 hours ago
This is cool. If you want to go further, checkout a small tool I
made that automates technical analysis for crypto markets with
major price signals: https://github.com/AbenezerMamo/crypto-signal
georgeglue1 - 4 hours ago
Can someone summarize the returns and risk-level of his strategy?
dfox - 3 hours ago
For this kind of simple SMA/EMA crossing strategies there is
essentially only one tunable knob (minimum return on one trade
pair) that controls both return and risk and main output of this
kind of analysis is finding out setting of that knob which you
are comfortable with.
joshvm - 3 hours ago
Trying to trade purely off technical analysis is a disaster
waiting to happen. Have a look at the technical analysis of
ETH/USD, for instance, they have absolutely no clue what's going
on:https://www.ethnews.com/analysis/10-30-2017-ethereum-
forecas...As to the linked article, the idea of SMA crossovers is
nothing special: https://www.babypips.com/learn/forex/moving-
average-crossove...Take a look at their example. Say you sold at
the peak, great. Then the currency drops and you buy at the
bottom, great. But then the SMA crosses again and you sell -
oops, look where the graph is going. You can't predict this stuff
with technical indicators.
AznHisoka - 3 hours ago
My opinion is that technical indicators can work well... when
it's clearly a bull market (but then, so can every other
strategy). They absolutely suck and can't predict when it's
clearly going to crash. Which make technical indicators pretty
much useless because you can easily lose all your gains when
that happens.
albertgoeswoof - 35 minutes ago
That ethnews article is bizarre
meesterdude - 1 hours ago
> Trying to trade purely off technical analysis is a disaster
waiting to happen.Watching purely a leading indicator can get
you in trouble with false positives; while a lagging one means
missing some of the trend. Yes, you can take it too far, use
too many indicators, or look for trends in ranging markets and
other mistakes.
dogruck - 4 hours ago
Summary: some code to calculate moving averages of crypto currency
prices.
itodd - 4 hours ago
I'm unable to see the charts: Refused to display
'https://plot.ly/~mthwsjc/69.embed' in a frame because it set 'X
-Frame-Options' to 'sameorigin'.
sne11ius - 3 hours ago
Me too :/
hxegon - 3 hours ago
me three
dblboy - 3 hours ago
me fourth. See devTools console. Usual chrome on mac
mthwsjc_ - 3 hours ago
how were you trying to view the page? mobile? which browser were
you using?
sne11ius - 2 hours ago
Chrome@Android, Firefox@Android, Chrome@Windows - all fail for
me.Just look at the dev console.