BLOG

Explore our step-by-step research in systematic trading, machine learning, coding and more

Posted on Sep 10, 2018 by Kris Longmore
2 comments.
744 Views

This is Part 2 in our Practical Statistics for Algo Traders blog series—don't forget to check out Part 1 if you haven't already.   Even if you've never heard of it, the Law of Large Numbers is something that you understand intuitively, and probably employ in one form or another on an almost daily basis. But human nature is such that we sometimes apply it poorly, often to great detriment. Interestingly, psychologists found strong evidence that, despite the intuitiveness and simplicity of the law, humans make systematic errors in its application. It turns out that we all tend to make the same mistakes - even trained statisticians who not only should know better, but do! In 1971, two Israeli psychologists, Amos Tversky and Daniel Kahneman,[footnote]Readers of the Robot Wealth blog will know that I'm a big fan of the work of Tversky and Kahneman. In fact, I'd go as far to call it the most important body of work related to understanding errors made by the human mind - something that is of obvious interest to traders. Check out Kahneman's "Thinking...

Posted on Jul 23, 2018 by Kris Longmore
1 Comment.
2,559 Views

How do you feel when you see the word "statistics"?  Maybe you sense that it's something you should be really good at, but aren't.  Maybe the word gives you a sense of dread, since you've started exploring its murky depths, but thrown your hands up in despair and given up - perhaps more than once. If you read lots of intelligent-sounding quant blogs, you might even feel like your lack of statistical sophistication is what's standing between you and algo trading success. Well, you're not alone. The reality is that classical statistics is difficult, time-consuming and downright confusing. Fundamentally, we use statistics to answer a question - but when we use classical methods to answer it, half the time we forget what question we were seeking an answer to in the first place. But guess what? There's another way to get our questions answered without resorting to classical statistics. And it's one that will generally appeal to the practical, hands-on problem solvers that tend to be attracted to algo trading in the long run. Specifically, algo traders can leverage their...

Posted on Jul 10, 2018 by Kris Longmore
1 Comment.
525 Views

One of the ongoing research projects inside the Robot Wealth community involves an FX strategy with some multi-week hold periods. Such a strategy can be significantly impacted by the swap, or the cost of financing the position. These costs change over time, and we decided that for the sake of more accurate simulations, we would incorporate these changes into our backtests. This post shows you how to simulate variable FX swaps in both Python and the Zorro trading automation software platform. What is Swap? The swap (also called the roll) is the cost of financing an FX position. It is typically derived from the central bank interest rate differential of the two currencies in the exchange rate being traded, plus some additional fee for your broker. Most brokers apply it on a daily basis, and typically apply three times the regular amount on a Wednesday to account for the weekend. Swap can be both credited to and debited from a trader's account, depending on the actual position taken. Why is it Important? Swap can have a big impact on strategies...

Posted on Jun 11, 2018 by Kris Longmore
1 Comment.
895 Views

Cryptocompare is a platform providing data and insights on pretty much everything in the crypto-sphere, from market data for cryptocurrencies to comparisons of the various crytpo-exchanges, to recommendations for where to spend your crypto assets. The user-experience is quite pleasant, as you can see from the screenshot of their real-time coin comparison table: As nice as the user-interface is, what I really like about Cryptocompare is its API, which provides programmatic access to a wealth of crypto-related data. It is possible to drill down and extract information from individual exchanges, and even to take aggregated price feeds from all the exchanges that Cryptocompare is plugged into - and there are quite a few! Interacting with the Cryptocompare API When it comes to interacting with Cryptocompare's API, there are already some nice Python libraries that take care of most of the heavy lifting for us. For this post, I decided to use a library called [crayon-5ba6a36bc831c145771612-i/] . Check it out on Git Hub here. You can install the current stable release by doing[crayon-5ba6a36bc8326860017570-i/] , but I installed the latest development version direct from...

Posted on Jun 04, 2018 by Kris Longmore
3 comments.
1,192 Views

At Robot Wealth we get more questions than even the most sleep-deprived trader can handle. So whilst we develop the algo equivalent of Siri and brag about how we managed to get 6 hours downtime last night, we thought we'd start a new format of blog posts — answering your most burning questions. Lately our Class to Quant members have been looking to implement rotation-style ETF and equities strategies in Zorro, but just like your old high-school essays, starting is the biggest barrier. These types of strategies typically scan a universe of instruments and select one or more to hold until the subsequent rebalancing period. Zorro is my go-to choice for researching and even executing such strategies: its speed makes scanning even large universes of stocks quick and painless, and its scripting environment facilitates fast prototyping and iteration of the algorithm itself - once you've wrestled it for a while (get our free Zorro for Beginners video course here). I'm going to walk you through a general design paradigm for constructing strategies like this with Zorro, and demonstrate the entire process with a...

Posted on Feb 06, 2018 by Kris Longmore
5 comments.
2,463 Views

This is the fourth in a multi-part series in which we explore and compare various deep learning tools and techniques for market forecasting using Keras and TensorFlow. In Part 1, we introduced Keras and discussed some of the major obstacles to using deep learning techniques in trading systems, including a warning about attempting to extract meaningful signals from historical market data. If you haven’t read that article, it is highly recommended that you do so before proceeding, as the context it provides is important. Part 2 provides a walk-through of setting up Keras and Tensorflow for R using either the default CPU-based configuration, or the more complex and involved (but well worth it) GPU-based configuration under the Windows environment. Part 3 is an introduction to the model building, training and evaluation process in Keras. We train a simple feed forward network to predict the direction of a foreign exchange market over a time horizon of one hour and assess its performance. [thrive_leads id='4510'] . In the last post, we trained a densely connected feed forward neural network to forecast the direction of the EUR/USD exchange rate over...

1 2 3 6