8 ms·
Show HN: Quantblocks - Backtest your trading strategies
We think backtesting is too difficult, this is our attempt to make it much easier and more fun - let us know what you think!
- crntaylor 14y agoThis is kind of neat. It would be even better if it let you work with the returns of each stock, rather than just with the price. In my experience most technical strategies work better, and are more stable, when they work with data in return space rather than price space.
- startuprob 14y agoThanks for the feedback, that's definitely something we've been looking at. This is our initial feature-set that we're using to collect usage-statistics. If you have any other feedback, please feel free to let us know.
- greendestiny 14y agoLooks cool, can I ask where you sourced the historical data from?
- startuprob 14y agoWe're using Xignite's API right now. It's super-simple to integrate with.
- mikecsh 14y agoWhy did you choose that over something like Yahoo! Finance or Google?
- afarquhar 14y agoyeah that caught us out - we found that even though the data is freely available from those sources, you're not allowed to include that data in a commercial app :-(
- mikecsh 14y agoOh really? That's interesting - does that apply even if it's not distributed with the commercial app? I'm sure I've used trading platforms before which use Yahoo...
- afarquhar 14y agoOur understanding of the Yahoo/google T&Cs was that we couldn't aim to profit from their data (http://finance.yahoo.com/badges/tos http://finance.yahoo.com/badges/tos). We may be being overcautious but we didn't want to risk getting into trouble ;-)
- Permit 14y agoI've had a lot of problems with Yahoo not having complete historical data, especially on thinly traded or OTC stocks. I wouldn't recommend using their data in a production application.
- greendestiny 14y agoThey look pretty awesome. I had some mobile app idea a while ago but commercial data rates are just too scary, good luck with this app!
- pja 14y agoHow far back does it go?
- startuprob 14y agoXignite allows us to show the full historical data of an instrument, but because we're taking a lean approach at testing how people use it, we're limiting them to a few years.
- emilioolivares 14y agoSuper interesting! Could you shed some light on to how much you are spending on the data? Is it in the hundreds, thousands or ten-thousands? Is it feasible for one person to bootstrap a website with Xignite?
- gns24 14y agoThat's useful to know. Is that daily data? Have you found it to be reliable? When I started testing moving-average based strategies, my blog post about it ended up being largely about data issues, from both Google and Yahoo finance: http://grahamstratton.org/straightornamental/entries/movingaverage http://grahamstratton.org/straightornamental/entries/movinga... An extreme example was an opening value off by a factor of 100 on one day.
- mikecsh 14y agoIn my experience, even historical or realtime data from Reuters/Bloomberg/CQG can have serious errors such as that - every trading system should be sanity checking its market data!!
- adg001 14y agoA cautionary note on backtesting (ie, assessing how trading strategies would have performed over a historical period in time). 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.
- afarquhar 14y agoyep you're totally right, but hopefully it's still useful!
- startuprob 14y agoAbsolutely true, backtesting is not a guarantee of anything. That being said, I can't remember who said that "No model is perfect but some models are useful."
- phreeza 14y ago"All models are wrong, but some are useful." George EP Box. I put that quote on the front page of my masters thesis.
- frinxor 14y agothis is great. love the design, and I can totally see a broker acquiring this so their clients will make more trades on their backtested-to-be-profitable strategies!
- theorique 14y agoPast performance may not be a guarantee of future performance, but it's all we've got to work with.
- phreeza 14y agoThere are more, statistically sounder methods that could be used to search the space of possible strategies, a la bootstrapping. These could be used to make more meaningful statements about the strategy, if the assumption is that previous statistics predict future statistics, which of course might also be false (black swans, etc.) 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...
- ukoki 14y agoThis is fantastic. Love the clean, straightforward interface. However I have a feeling that anyone knowledgeable enough to profit from this is probably already heavily invested in another system for doing these calculations and/or feel the rules system isn't flexible enough. One thing you could do is to implement sharing. ie, have a list of "top performing strategies measured from date of creation". Then let users subscribe to other users' "proven" strategies for a fee - you take half and the author takes half - this could be an alternative way to monetize the site as well attract the kind of people who make a living doing this - ie the kind of people you want talking about your product.
- startuprob 14y agoThanks for the great feedback. Do you think people would be too protective of their strategies to participate though?
- mikecsh 14y agoYou could keep the strategy hidden but allow users to follow the output signals. There are some sites which already do this or similar for both fundamental and technical strategies. Motley Fool comes to mind: http://caps.fool.com/ http://caps.fool.com/
- startuprob 14y agoThat's a very interesting idea. We've looked at Collective 2 and Currensee as they've done some similar things. Very interesting...
- mikecsh 14y agoStocktwits also has some similar vibes, there are a few others and I can't remember the specific one I was thinking of right now.. http://stocktwits.com/ http://stocktwits.com/
- 14y ago
- s_henry_paulson 14y agoI built something similar for my own personal use, so it's very interesting to see something similar polished for mass consumption. 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?
- startuprob 14y agoSo what if we said "3 Months of Unlimited Access to Every Daily Upgrade" ?? 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.
- mikecsh 14y agoIt might just be me, but I find it confusing that the upgrade statement says "a one-time payment of $39" and then the first checkbox says "3 months of access". Does this mean I pay $39 every quarter to continue access? In which case why is it a one-time payment?
- mdupenois 14y agoHacker news has throttled Rob's replying (too fast), he says: 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?
- mikecsh 14y agoThat seems much clearer to me now! :)
- mikecsh 14y agoCouple of observations: 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!
- mdupenois 14y ago1) Just pushed an update to fix that, thanks for pointing it out. 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"
- mikecsh 14y agoMy app is slightly different and uses a patch panel style of interface rather than linear blocks. Every time the system is changed, the layout is parsed into code and any invalid paths are coloured red to show 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.
- mswen 14y agoHow granular is the data that you backtest against? Daily, Hourly, Minute or tick data? I subscribed to another similar service for several years but one thing I always wished they would add was more granular data than daily.
- afarquhar 14y agoCurrently it's daily. One of the possible future extensions is into intra-day but it brings a whole load of extra technical problems. Honestly the problems look really fun, things like keeping the backtest running relatively fast, caching the large amounts of extra data and the added complexity of intra-day strategies. However at the moment we need more data on how people want to use it as that's a pretty big outlay on development time.
- annon 14y agoVolume data would be nice.
- azmenthe 14y agoSo judging from the the screenshots... Buy Apple? Yea that would of totally worked. Now for any other stocks, probably not. Also you can see it's less than the simple buy and hold. 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
- solutionyogi 14y agoRelax. The tool lets you create a strategy and back-test it. It is selling the fact that you can do this without coding, it is not trying to sell you 'Long - AAPL' strategy.
- tatsuke95 14y ago>"Seriously I don't know why people even try trading in their free time." Because I can easily get returns in excess of the negative real rates my bank pays me?
- espinchi 14y agoVery neat. 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?
- farnja 14y agoHey! This is very cool, very fast. One thing I would suggest is the ability to specify a list of securities rather than a single security. In my experience, if you're going to test a general heuristic for trading, you're going to want to test it across as broad of a spectrum as possible to determine if it really has some predictive abilities. Obviously, this requires a lot more computational power if you're applying your rules to everything in the Russell 3000 rather than just a single security. The results would then be the composite of all trades across the securities.
- arturadib 14y agoIt is really too bad folks keep pushing technical trading platforms to the public. The promise of quick money to be made in a sea of billions of dollars might seem innocuous, but it's (a) bad for the market and (b) bad for society. 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.
- smoorman1024 14y agoWhat about statistical arbitrage?
- bensw 14y agoThe liquidity argument is not a "cop-out." Due to algotrading, spreads have been tightened and cost of entry/exit have been lowered. While there are some problems with algorithmic trading, the alternative (going back to the specialist model) is downright insane. If you think algotraders are "ruining" the market and society, then, the specialists and traders were actively scamming everyone. 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.
- paddy_m 14y agoNice polished UI. Good to see some integration in the finance space. A couple of years ago I was working on something similar idea. 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.
- Dzidas 14y agoIf you really want quant stuff, then use R, Octave||Matlab or even Excel. MA, RSI test are available on Internet and works with all browser. By the way - it does work well with my Chrome and you should move a message about supported browsers on the first page or before I fill registration form, not after.
- sycren 14y agoLooking at the terms & conditions, any algorithms that the users create become the intellectual property of Quantblocks. Is this just a tool to help users or is it a tool for the company to source the best algorithms?
- kevinpet 14y agoUpvoted for importance, but I note that you are actually only granting them a perpetual worldwide fully paid-up irrevocable license to them.
- tixocloud 14y agoGreat job! Everything is really smooth. As a fellow developer who's interested in finance, I would love to discuss (if you don't mind) about your approach and effort.
- etrain 14y agoThe signup/confirm/login metaphor is really tired and annoying. Don't give me two screens of meaningless text, show me what your product does and let me interact with it before making me sign up. For example, open the strategy builder window up to anyone, but make me sign up before I can save my strategies. 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.
- dunster 14y agoIf you find Quantblocks interesting, you should also look at Quantopian. (www.quantopian.com) 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
- jnewell 14y agoGreat work Dan, it is totally what I would be looking for when backtesting and strategy development. Do you mind sharing what js framework you used on the client side?
- dunster 14y agoWe wrote a bunch, and used a bunch, so there is no straight answer. A short list: highcharts for charting, jquery and underscore for the glue, crossfilter for data filtering, bootstrap for components, codemirror for the IDE, handlebars for templates, markdown for markdown, prettifier for code highlighting, and the list goes on.
- YuriNiyazov 14y agoDo you guys have historical data for equity options?
- fawce 14y agoHi Yuri, not yet. We are looking at different possibilities for expanding the dataset, and the most popular right now is futures. Equity options do come up often, and are a close second for market data. 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.
- dollar 14y agoNever received a confirmation email. No delivery attempt in the mail server log.
- kevinpet 14y agoI'd really like to be able to model the effects of rebalancing to a static or tactical asset allocation, but it seems that the only strategies that matter to the technical camp is thresholds based on trailing n days moving average.
- steamfarmer 14y agoI like the idea of the site, but only having 5 stocks available to test against doesn't allow me to get comfortable enough with the platform to pony up for a paid account. Additionally, the choices you've made for inclusion could be more diverse. Where is SPY, SQQQ, GLD, etc?