Show HN: Quantblocks - Backtest your trading strategies
quantblocks.com
quantblocks.com
It's bad for the market because collectively, the buying and selling of shares based on anything other than company fundamentals (earnings, cash flow, projected growth, etc) distorts the price of the company. Unfortunately, because of our hunger to make money fast, there are too many of us (including large hedge-funds) playing this game, and the effects on price movement are very real. And when prices no longer reflect the company fundamentals, all sorts of bad things happen: Management is pressured to take extraordinary actions just to mitigate the market situation (stock splits/reverse-splits, stock buy-backs, accounting tricks, etc), employees freak out and quit, long-term investors get nervous, potentially fruitful M&As fail to happen, etc.
(The argument that technical/high-frequency trading improves the liquidity of the market is the biggest bullshit, cop-out answer ever: The only people that benefit from this type of instant liquidity are short-term, short-sighted traders ... such as the very people who advocate this type of trading, and not long-term investors!).
As for the societal cost, technical trading educates and perpetuates the myth that the stock market is a big gambling house, and not a means to become an owner of a company. To paraphrase Warren Buffett, every time you think about buying stock you should think of it the same way as if you were buying a mom-and-pop shop, like a pizza place. Is the price you're paying roughly equivalent to - or better than - how much you'd expect to make by pocketing the profits of the shop over the lifetime of the business?
I hate to leave completely negative feedback, so at least I'll give that this tool looks spiffy.
UPDATE: It seems like I'm getting a lot of responses from traders here. Already answered some, can't answer them all. Please sleep over these comments and think about what you could be doing with your time. Life's short.
The "good old days" of human traders where when you'd pay fifty bucks plus one percent to a broker who would almost certainly front-run your trades, and the best spreads were at least 1/8. Nowdays the worst that could happen is an HFT might, perfectly legally, place an order a split second faster and extract fractions of a penny as they narrow the spread for everyone. Please forgive me if I don't consider this a disaster for investors, hedgers, mutual funds, and other consumers of markets that they can quickly execute orders close to the market price.
I personally don't care that my trade happens in a second or a minute because I'm a long-term investor - someone who wants to become a company owner, as I explained above, and not yet another hacker who couldn't care less about the long-term health of the company I'm buying.
My point is that if folks care about liquidity on the order of seconds/sub-seconds, they are themselves falling into the short-term trading BS (and consequently continuously distorting company prices).
Please stop perpetuating this insanity. Here's a timely article by Mark Cuban fresh out of the oven to help clarify my point:
http://blogmaverick.com/2012/09/21/what-business-is-wall-str...
Here he talks about how he bought a stock, watched it climb then shorted it and celebrated its bankruptcy: http://blogmaverick.com/2008/09/08/talking-stocks-and-money/
But yes, speak to us from the moral high ground. Cuban simply rode what essentially amounted to a pump-n-dump. He wasn't doing the promotion, but he sure as hell wasn't in it for the long term growth of the underlying company.
Here's a fantastic quote from Mr. Cuban: "What about fundamentals? Fundamentals is a word invented by sellers to find buyers.
Price-earnings ratios, price-sales, the present value of future cash flows, pick one. Fundamentals are merely metrics created to help stockbrokers sell stocks, and to give buyers reassurance when buying stocks. Even how profits are calculated is manipulated to give confidence to buyers."
If you think big commissions and spreads are inconsequential, you are factually incorrect. If you think trading doesn't narrow spreads or lower costs, you are also incorrect. Finally, if you think trading qua trading distorts prices, there's almost no data that supports this and huge bodies of economic literature to the contrary. This isn't a matter of opinion.
Long-term investor or not, you want liquidity to ensure you are getting in and getting out at the price you want. That's the big difference between investing in a liquid stock versus, say, your house.
The reason you can get in and out as a long-term investor is because of the liquidity provided by traders.
The difference between a second and a minute could cost even the small investor many $thousands in the long term. I prefer milliseconds. If you're a buyer at $30 and a second is allowed, you're likely paying $30.30 or more due to front-running. Immediately after you buy it will be $30 again, so you lost 1+% in the delay.
I'm glad that you have at least done a little bit of research, unlike the majority of articles that came out after Knightmare, but algorithmic trading is a net positive for both the market and society.
Also, I have done more than "a bit of research" on the topic (I'm ashamed I was once so innocent as to make money with stat arbitrage, now I know better).
> but algorithmic trading is a net positive for both the market and society
Oh yeah? How exactly?
Oh please, if anything accounting tricks are more likely to be prevalent in a fundamentally traded market. When your company is traded solely upon earnings, you don't think you'd have more motivation to toy with those earnings numbers?
>As for the societal cost, technical trading educates and perpetuates the myth that the stock market is a big gambling house, and not a means to become an owner of a company. To paraphrase Warren Buffett, every time you think about buying stock you should think of it the same way as if you were buying a mom-and-pop shop, like a pizza place. Is the price you're paying roughly equivalent to - or better than - how much you'd expect to make by pocketing the profits of the shop over the lifetime of the business?
What is this? Some kind of argument from the moral high ground? The people who treat the stock market as a gambling opportunity will quickly be liquidated, and I can't imagine why one should feel sorry for them.
Whoa. Get off the high horse. I don't disagree with you, but the problem is not with "the folks who keep pushing stuff to the public".
It's no different than a lottery, a casino, or selling cigarettes -- or for that matter, sugared drinks or unhealthy french fries.
Many activities are self-harming and potentially society harming. Usually, as a "free" society, we find the self harm acceptable, and the society harm acceptable to a point (based on magnitude of effect to entire society), mostly because experimentation IS required.
I read your post as equivalent to "I hope people who make and sell cigarettes would stop, because it's not good for anyone other than themselves". Which I agree with, but it's a useless rant.
The only way to fight this is regulatory. However, thanks to regulatory capture, a significant revision will happen, if at all, only after the next huge crisis.
I work at Quantopian, and our goal is to make it possible for more people to explore algorithmic investing. I agree the social utility of from increasing liquidity from current levels is at best diminishing returns, but algorithms could bring the same drop in costs and increase in quality for money management that it brought to trading. That's a benefit to individuals, pension funds, charitable endowments, and anyone else that has to save and plan for the future. Financial professions couldn't have a worse rap these days, much of it deserved, but there are real social problems that require financial solutions. People need to save for retirement, plan for the kids' college tuition, and take on mortgages.
I think it is really good for society to have smart people work on investment management. Especially if they are automating, collaborating, and discussing their work openly - the opposite of today's Wall Street. I like that QuantBlock did something original, and I love that they are striving for really broad access.
We think the key to advancing algorithmic investment is to create more access so smart hackers can tinker with investment strategies. Those folks should be able to explore and test ideas/algos without spending a few years building a backtester, or a few years' of salary on data. That's why our backtester is free to use at quantopian.com, and why the source code will be released at PyData NYC (http://blog.quantopian.com/pydatanyc-here-we-come/).
I wrote more about where we want Quantopian to go, and where I think finance needs to go on our blog: http://blog.quantopian.com/quantopian-manifesto/
What companies like this do makes the RESEARCH for quant trading available to those who otherwise wouldn't have access. The organizations and people with the means to buy or build their own tools to do this were already doing it. Whether or not they are doing something that benefits the greater good is neither here nor there.
Saying those tools shouldn't be available to the general public is analogous to the old gun ownership argument. If guns are outlawed, only the outlaws will have guns. If only a limited few have the means to do quant research, it puts those who don't have access to those tools at a dangerous disadvantage.
Yes, there are risks to any sort of paradigm shift, but limiting the accessibility will hurt those who don't have access. If you (being someone who doesn't have the means) are unable to adapt to the changes, then you perish.
I totally agree on the wisdom of unsophisticated investors who think they can back test some "strategy" based on trends and support levels and so on and then actually go and make money. It's unlikely to work, they probably have no understanding of what their actual risks are (I'm talking probabilities, not just value at risk at any given time), and they are losing money on trading fees unless they can actually point to some competitive advantage they have over other traders.
We're geared a bit more towards programmers. Rather than use blocks, our members develop their algorithms in Python. We have an in-browser IDE with a lot of smart auto-completion.
A few of our nifty features: * free access to 10 years of by-minute historical data for all US stocks * the writer of the algorithm owns the algorithm * batteries included - all of your favorite Python math and science packages including Pandas and NumPy * a robust backtester that models slippage, commissions, risk metrics, and more
We also have a community of quants and programmers who like talking about this kind of stuff. People share code, give advice, ask questions, etc.
Full disclosure: I work for Quantopian!
Happy hacking,
Dan Dunn
However, we are actually more excited about adding non-market data, because we want to bring more talent to 'algorithmic investment'. We hope our community can create algorithms that make buy/sell decisions based on more than just liquidity - fundamentals, reported data, qualitative news and research content. In other words, automating more of fundamental analysis and investment.
On the product itself - security specific rules are fine but you're missing the point of backtesting and automated trading. The ability to spot patterns across any security (or perhaps in an industry) is the key here. I wish there were some way to specify this. I realize it's v1, but your rules are too simple for most traders.
Finally - you should call out that your market data is EOD. You should also offer VWAP (I know Xignite offers it) as a reasonable alternative for prices you "could have gotten" as a retail investor.
Also, the IP thing scares me, and I wouldn't use the service until you change it.
If an a posteriori probability distribution is a good fit for historical events, it doesn't mean in any way it is going to fit future data points. It may or may not.
Hence, use backtesting with care while trading.
Given the vast amount of parameters that constitute a strategy, naive optimizing of the outcome of the strategy in the past is bound to produce overfitting in the majority of cases...
Simply for the next t-time periods let the model give the user an estimate of the future prices/rates, together with an estimate of how accurate the model expects these predictions to be. This would allow the user to build confidence in the algorithm strategy she/he came up with, before employing it on the open market.
I put that quote on the front page of my masters thesis.
Love the data idea, in fact surplus of data is already a bit of an issue; we're running out of screen real-estate.
I was wondering if you could elaborate as to why they feel this way? I would love to know that the top X % of traders are willing to play with my money in a transparent manner.
Do you guys have plans to add support for Forex trading too?
And, even if one of the strong points is "no coding required". Do you foresee at some point to let advanced users write trading strategies in some type of programming language?
I subscribed to another similar service for several years but one thing I always wished they would add was more granular data than daily.
1) The leading x days from the moving averages on the default strategy are charted at 0 when they should be null and not visible on the chart.
2) If I mouse over the 20 day moving average block and change it to a sell block, then click run, my charts disappear into loading bars and I get a warning message up. However, there is no indication to an uninformed user what they've done wrong, why it's wrong, or how to fix it. This could use a bit of work.
This is very similar to an iPad app I've been developing - I like it a lot, you've done a good job!
2) Syntax checking has been a big discussion point for us, we would love to be able to limit people to only valid blocks but also didn't want to have a giant block of validation javascript to deal with the drag and drop on the blocks. As for error messages, you're totally right; they're massively lacking. Difficulty is that we keep changing the way we're storing rules as we learn more about what users want to do, given that we didn't want to have to build a proper syntax parser until we had a more stable concept of how they'd be structured.
Out of interest, what sort of error message would be useful? As in, how technical e.g. "I don't understand how to if moving_avg > buy" or "There is an error at 'if moving_avg > buy' returns: Nil expected: boolean"
a) where the problem originates b) which blocks are affected by the problem
Additionally there is a crude type system that prevents the wrong type of signal being passed to a block - e.g. a buy/sell datatype cannot be passed into a block which expects numerical time series data. I would say that you should prevent users from entering rules which make no sense as far as is possible..
I guess it depends how technical your users are. I'm attempting to stay away from terms such as nil or boolean, so I would go for something like your first example, but with more information, perhaps like:
"I don't know how to follow the rule "if moving_avg > buy" because xyz" which sounds friendly and non-technical but hopefully xyz will help them understand why it doesn't work and learn from their mistake.
The only thing I'm confused about is what you get in the Pro version..
"3 Months of Unlimited Access to Every Area of QuantBlocks"
How is the user supposed to know what "every area" is? How could anyone expect to know what they get with a subscription? Most importantly, how could they know if a particular symbol would be available in the pro version, what about futures, forex, etc?
We're doing daily agile upgrades so we're trying to communicate that they'll get access not only to ALL of the global equities data, but also all of the updates that we make in terms of ability to save strategies, indicators, etc.
Does this mean I pay $39 every quarter to continue access? In which case why is it a one-time payment?
Thanks for the great feedback. We've just pushed an update that tries to clarify by removing "One time payment" and removing the "every area of Quantblocks" language.
Thoughts?
One of the things we did was backtest a couple of strategies for hold with entry points of "Jim Cramer" recommended this stock on this day.
What are your backgrounds.
Ping me if you want to talk more.
Additionally, the choices you've made for inclusion could be more diverse. Where is SPY, SQQQ, GLD, etc?
Seriously I don't know why people even try trading in their free time.
Now, that being said, I'll take a bet against anyone who thinks they can find a profitable trading strategy using this product :D
Because I can easily get returns in excess of the negative real rates my bank pays me?