Quant Mashup - Investment Idiocy Should I run my trading system at a fixed expected volatility target? [Investment Idiocy]This is a blog post which has been coming for a while. It relates to a lot of themes I've discussed before, and a recurring conversation I've had with a few people. As most regular readers will know, I run my trading strategy to hit a particular risk target. That risk target is expressed(...) Forecast linearity and forecasting mean reverting volatility [Investment Idiocy]This is a blog post about forecasting vol. This is important, since as sensible traders we make forecasts about risk adjusted returns (as in my previous post), which are joint forecasts of return and volatility. We also use forecasted vol to size positions. A better vol forecast should mean we end(...) Do non binary forecasts work? [Investment Idiocy]This is a post about forecasts in trading systems. A forecast is a calibrated expectation for future risk adjusted returns. In more layman like terms, it is a measure of how confident we are about a bullish (positive forecast) or bearish (negative forecast). Perhaps it is easiest to think about(...) When endogenous risk management isn't enough: a simple risk overlay [Investment Idiocy]"How does your risk management work?" ... is a question I'm frequently asked. In fact this is actually a difficult question, if you were to look at my open source python backtesting project pysystemtrade, you would struggle to point at a piece of code and say "Behold! Right(...) Trading and investing performance - year six [Investment Idiocy]Time for the annual review post, as my reviews follow the UK tax year which ended on the 5th April. And what a year it has been; well 10 months or so of fairly normal stuff, followed by several weeks of stomach churning market chaos. Previous updates can be found here, here, here, here and here.(...) How fast should we trade? [Investment Idiocy]This is the final post in a series aimed at answering three fundamental questions in trading: How should we control risk (first post) How much risk should we take? (previous post) How fast should we trade? (this post) Understanding these questions will allow you to avoid the two main mistakes made(...) How much risk should we take? [Investment Idiocy]This is the second of three posts aimed at answering three fundamental questions in trading: How should we control risk (previous post) How much risk should we take? (this post) How fast should we trade? (TBC) These questions are extremely important, IMHO much more important than the question of(...) What is the right way to set stop losses? [Investment Idiocy]Stop losses are the most common method used by traders to control risk. However, they're often used inappropriately. In this post I'll quickly bust some of the myths around them, and explain how to use them properly. This is the first of three posts aimed at answering three fundamental(...) Skew and Kurtosis as trading rules [Investment Idiocy]This is part X of my series of blog posts on skew and kurtosis, where 2 A post on skew: measuring, and it's impact on future returns A post on kurtosis: measuring, it's impact on future returns, and it's interaction with skew. A post on trend following and skew (which I actually wrote(...) New and Improved Sharpe Ratio adjustment in the handcrafting method [Investment Idiocy]In my recent posts on skew and kurtosis I've put together a large number of ideas for possible trading strategies. The next step will be to create and test these ideas out. However I already know from my initial analysis that many of these ideas will probably have poor performance. This leaves(...) Kurtosis and expected returns [Investment Idiocy]In my last post, I stated my intention to write a series of posts about skew. Slight change of plan, since one loyal reader suggested that I write about kurtosis. I thought that might be fun, since I haven't thought about kurtosis much, and the literature on kurtosis isn't as well(...) Skew and expected returns [Investment Idiocy]Some bloke* once said "The most overlooked characteristic of a strategy is the expected skew of it's returns, i.e. how symmetrical they are" * It was me. "Systematic Trading" page 40 Skew then is an important concept, and one which I find myself thinking about a lot. So(...) New book: Leveraged Trading [Investment Idiocy]This month* marks the release of my third book, with the snappy title "Leveraged Trading", and the slightly less snappy subtitle "A professional approach to trading FX, stocks on margin, CFDs, spread bets and futures for all traders". Photo courtesy of Harriman House. As you can(...) Building a garden "trading" office (off topic but fun) [Investment Idiocy](Both) regular followers of this blog will have been on tenterhooks for many months now, waiting for my next post. I have been busy! First of all, I've been finishing my third book. More detail on that later, in the next post. I've also had a fair bit of holiday time. But mainly over the(...) Trading and investing performance - year five [Investment Idiocy]Hard to believe, but it has been five and a half years since I had to go to an office to manage other peoples money, and exactly five years since I began systematically trading my own. Time then for another annual review. Perhaps it is confusing for overseas readers, but these reviews follow the UK(...) Risk targeting and dynamic asset allocation: absolute or relative momentum? [Investment Idiocy]Quite a few of my recent blog pieces have been picked up by the lovely folk at allocate smartly. So I thought I'd write an asset allocation piece, as the readers of my second book "Smart Portfolios" probably feel neglected with the lack of articles on investment rather than trading.(...) Skew and Trend Following [Investment Idiocy]In this post I discuss a well known stylised fact of the investment industry: "Trend following is a positively skewed strategy". Spoiler alert: yes it is (sort of), but it's much more complicated (and interesting!) than you might think. A quick primer on positive skew So what actually(...) Portfolio construction through handcrafting: Empirical tests [Investment Idiocy]This post is all about handcrafting; a method for doing portfolio construction which human beings can do without computing power, or at least with a spreadsheet. The method aims to achieve the following goals: Humans can trust it: intuitive and transparent method which produces robust weights Can be(...) Portfolio construction through handcrafting: implementation [Investment Idiocy]This post is all about handcrafting; a method for doing portfolio construction which human beings can do without computing power, or at least with a spreadsheet. The method aims to achieve the following goals: Humans can trust it: intuitive and transparent method which produces robust weights Can be(...) Portfolio construction through handcrafting: The method [Investment Idiocy]This post is all about handcrafting; a method for doing portfolio construction which human beings can do without computing power (although realistically you'd probably need a spreadsheet unless you're some kind of weird masochist). The method aims to achieve the following goals: Humans can(...) Portfolio construction through handcrafting: motivating [Investment Idiocy]I've talked around a type of portfolio construction called "Handcrafting" for some time now, in both of my first two books, and in the odd blog post. I thought it would be useful to explain how the technique works in a more thorough and complete series of blog posts, and also share(...) The relationship between ATR and standard deviation [Investment Idiocy]Let's begin this post with a gross generalisation: Professional traders tend to measure risk and target risk using standard deviation. Amateur traders tend to use a funky little number called the ATR: 'Average True Range'. Both try and achieve the same aim: summarise the typical(...) Is trend following dead? [Investment Idiocy]I get asked this question at least once a week. As those of you that have met me IRL ('in real life') will know I have limited patience and I'm easily bored. I'm definitely bored of answering this question. This post is the last time I'll answer it. There are broadly two(...) Is maths in portfolio construction bad? [Investment Idiocy]First an apology. It's been quite a few months since my last blog post. I've been in book writing mode and trying to minimise outside distractions. Though looking at my media page since my last blog post I've done two conferences, a webinar, a book review, a guest lecture, a TV panel(...) Vol Targeting and Trend Following [Investment Idiocy]I was moved to write this by a post on LinkedIn, which you can find here, and which is worth quoting (and thanks to Helder Palaro for pointing me at this): "Volatility tends to “cluster”. Recent high(low) volatility is followed by high(low) volatility in the near-term (ARCH). VT says lever(...) Kelly versus Classical portfolio theory, and the two kinds of uncertainty premium [Investment Idiocy]Since I was a young lad there has been an ongoing fight in Financial Academia 'n' Industry between two opposing camps: In the red corner are the Utilitarians. The people of classical finance, of efficient frontiers, of optimising for maximum return at some level of maximum risk. In the(...) Trading performance - year four [Investment Idiocy]Time flies, and it's time for another annual update on the performance of my own investment and trading. Previous updates can be found here, here and here. These updates follow the UK tax year; from 6th April to 5th April, as I have to do my taxes anyway it makes sense to analyse everything at(...) CTA allocations, QE, meta-prediction, and conditional return distributions [Investment Idiocy]As most of you know my last proper job (part time lecturing and occasional consulting gigs do not count) was managing the fixed income portfolio for AHL, a large systematic hedge fund. I had the pleasure of that job from late 2010 until mid 2013. It's fair to say that the main topic of(...) Smart Portfolios: A post about a book, NN Taleb, and two conferences [Investment Idiocy]September 18th is the official publishing date of my second book, "Smart Portfolios: A practical guide to building and maintaining intelligent investment portfolios (Harriman House, 2017)". This blog post will give you some more information about the book, and more importantly help you(...) My new book: Smart Portfolios [Investment Idiocy]... is now ready for pre-order. For more information see the website, here: https://www.systematicmoney.org/smart To pre-order you can go here: https://www.harriman-house.com/smart-portfolios Some more trading rules [Investment Idiocy]It is a common misconception that the most important thing to have when you're trading, or investing, systematically is good trading rules. In fact it is much, much, much more important to have a good position management framework (as discussed in my first book) and to trade a diversified set(...) People are worried about the VIX [Investment Idiocy]"Today the VIX traded below 10 briefly intraday. A pretty rare occurrence. Since 1993, there have been only 18 days where it traded below 10 intraday and only 9 days where it closed below 10." (source: some random dude on my linkedin feed) ... indeed 18 observations is a long.... long...(...) Some reflections on QuantCon 2017 [Investment Idiocy]As you'll know if you've been following any of my numerous social media accounts I spent the weekend in New York at QuantCon, a conference organised by Quantopian who provide a cloud platform for python systematic trading strategy backtesting. Quantopian had kindly invited me to come and(...) Getting position and accounting data out of IB native python API [Investment Idiocy]This is the final post. Not the final post of the blog; which may be good news or bad. But the final post in my short series on using the new native python API for interactive brokers. Having got some prices and submitted some orders we want to know whether we made any money or not; and what(...) Placing orders in the native python IB API [Investment Idiocy]This the fourth in a series of posts on using the native python API for interactive brokers. You should read the first, second, and third, before this one. It is an updated version of this older post, which used a third party API (swigibpy) which wraps around the C++ API. I've changed the code,(...) Streaming market data from native python IB API [Investment Idiocy]This the third in a series of posts on using the native python API for interactive brokers. You should read the first, and the second, before this one. It is an updated version of this older post, which used a third party API (swigibpy) which wraps around the C++ API. I've changed the code, but(...) Historic data from native IB python API [Investment Idiocy]This is the second in a series of posts on how to use the native python API for interactive brokers. This post is an update of the post I wrote here, which used the 3rd party API swigibpy. Okay so you have managed to run the time telling code in my last post. Now we will do something a bit more(...) Interactive brokers native python API [Investment Idiocy]Until quite recently interactive brokers didn't offer a python API for their automated trading software. Instead you had to put up with various 3rd party solutions, one of which swigibpy I use myself. Swigibpy wrapped around the C++ implementation. I wrote a series of posts on how to use it,(...) Can you eat geometric returns? [Investment Idiocy]This post is about a slightly obscure, but very important, issue. Should we use geometric or arithmetic means of returns to evaluate investments? This might seem boring, but answering this will help us with some other serious problems: Does diversification increase the expected value of your(...) Playing with Docker - some initial results (pysystemtrade) [Investment Idiocy]This post is about using Docker - a containerisation tool - to run automated trading strategies. I'll show you a simple example of how to use Docker with my python back testing library pysystemtrade to run a backtest in a container, and get the results out. However this post should hopefully be(...) Systematic risk management [Investment Idiocy]As the casual reader of this blog (or my book) will be aware, I like to delegate my trading to systems, since humans aren't very good at it (well, I'm not). This is quite a popular thing to do; many systematic investment funds are out there competing for your money; from simple passive(...) Capital correction (pysystemtrade) [Investment Idiocy]This post is about how should you adjust the trading capital you have at risk given the profitability (or not) of your trading account. I'm posting this for three reasons. Firstly it's a pretty important topic. I address, in some detail, how to set your risk target for a given amount of(...) A simple breakout trading rule (pysystemtrade) [Investment Idiocy]Breakout. Not the classic home arcade game, seen here in Atari 2600 version, but what happens when a market price breaks out of a trading range. The Atari 2600 version was built by Wozniak with help from Jobs exactly 40 years ago. Yes that Wozniak and Jobs. Source: wikipedia In this post I'll(...) Optimising weights with costs (pysystemtrade) [Investment Idiocy]In a previous post I showed you how to use my open source python backtesting package, pysystemtrade, to estimate forecast weights and instrument weights. At the time I hadn't included code to calculate costs. Now that has been remedied I thought I should also write some code to demonstrate the(...) Diversification and small account size [Investment Idiocy]I get occasional emails asking me to cover subjects in my blog (keep them coming! I will eventually get round to them). A pretty common one runs something like this: "I understand that diversification over instruments is the best way to improve returns- you trade almost 40 futures markets, and(...) Computers vs Humans - considering the median [Investment Idiocy]Or why you aren't, and will never be, John Paulson The systematic versus discretionary trading argument is alive and well; or if you prefer, computers versus humans*. In this post I pose the question - who is better the average systematic trader, or the average discretionary human? * Though(...) Correlations, Weights, Multipliers.... (pysystemtrade) [Investment Idiocy]This post serves three main purposes: Firstly, I'm going to explain the main features I've just added to my python back-testing package pysystemtrade; namely the ability to estimate parameters that were fixed before: forecast and instrument weights; plus forecast and instrument(...) pysystemtrader: Estimated forecast scalars [Investment Idiocy]I've just added the ability to estimate forecast scalars to pysystemtrade. So rather than a fixed scalar specified in the config you can let the code estimate a time series of what the scalar should be. If you don't understand what the heck a forecast scalar is, then you might want to read(...) pysystemtrade [Investment Idiocy]There are already many python packages where you can back test trading strategies. Some of them also include a framework for automatic execution and complete position management. I can't give an exhaustive list but I'll pick out: - Quantopian's zipline - BT - pythalesians -(...) Random data: Random wanderings in portfolio optimisation [Investment Idiocy]Everyone knows that the usual naive method of portfolio optimisation is, well, a bit rubbish. This isn't because the method is flawed, but it relies on the inputs being 100% accurate, or to put it another way we need to know precisely what the mean, volatility and correlation of future returns(...)