Wednesday, 2 October 2019

New book: Leveraged Trading

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 see, the book makes an excellent books-stand for itself


* Official publication date is 29th October. Actually I finished the book in late August, and I've had print copies in my hand since mid September (and I know some other people have received their copies already), but for some reason I have never understood my books are always released at the end of October in odd numbered years (Systematic Trading 2015, Smart Portfolios 2017, Leveraged Trading 2019). Whether I stick to this schedule for book four is an open question.

You can order the book from the publishers, Harriman House, here (other, massive monopolistic online bookshops are available, but I get a better royalty if you buy direct from the publishers). There is plenty of information on my website, here.

This post is aimed at regular readers of my stuff who might be wondering if it's worth buying this third book (short answer: yes, of course! Even shorter and more honest answer: maybe!).


Where did the idea for this book come from?


Two sources of ideas really. The first was a constant stream of people telling me that they loved "Systematic Trading", but with two huge caveats. First caveat was the portfolio sizes in the book, which started at $100,000 and just kept on going up into seven and eight figures. The second caveat was that it was all just too hard and required far too much pre-existing technical knowledge. Classic amazon review "This won't not be the first book on systematic trading you buy, or even the tenth...". Thanks: I am not sure that even I own 9 other books about systematic trading!

Although I'd originally intended to write a book which was accessible to smaller retail traders my publisher and I decided that I'd be better off writing something more technical that was aimed at institutional traders. There is a bit of stuff about minimum capital in the latter part of the book but mostly I assume you have lots of money and lots of knowledge about the markets.

The second source of idea was my habit of watching "trading guru" youtube videos, or at least having them on in the background whilst I worked. I find these videos fascinating, but I also find it absolutely terrifying that these people are influencing tens or even hundreds of thousands of people. The more I watched these videos, the more I noticed when just walking around or surfing the internet the increasing levels of advertising from brokers peddling dangerously leveraged products. This was all pretty bad already, but when the Crypto currency hype got going in 2018 it reached another level. Over the last few years I've noticed more and more "ordinary" people asking me for advice which inevitable involves trading "four-ex" or Bitcoin.

I don't write books primarily for the money, I write them as a philanthropic gesture to help as many people as possible avoid the plethora of ways to get ripped off in the financial industry. It struck me that relatively inexperienced retail traders using leveraged products are a very large group of people who needed a large amount of help. Maybe I should write a book for them. So I did.


What is the main focus of the book and who is it for?


So the book is about safe leveraged trading. Regular readers will know that I frequently talk about the three main errors of systematic trading: overbetting (taking on too much risk), overtrading (trading too often), and overfitting. This book focuses mainly on dealing with the first two: getting the right level of leverage and the right frequency of trading. It does this by suggesting that novice traders use a system (quelle surprise!). The system is calibrated to avoid excessive risk or trading costs. I also explain how I designed the system to avoid the perils of overfitting.

But it's also a book for those who don't necessarily want to trade purely systematically. In my first book I introduced the idea of a "Semi-Automatic Trader"- someone who chooses which position to hold in some non systematic way, but sizes and closes positions systematically. I take this idea much further here, and explain in more detail how you can combine human intuition with the most useful parts of a trading system. Importantly, I also explain how you should calibrate your risk and trading frequency depending how well you have performed in live trading.

It's a book for relative beginners. As such it doesn't assume much knowledge and also goes into significant amounts of detail about specific leveraged products. I chose five products, because one is common in the US (margin trading), two are common in Europe but illegal for retail traders in the US (spread-bets and CFDs), and two are traded pretty much everywhere (futures and spot FX).

It's a book for traders without much money. A key theme throughout is answering the question "What is the best use of my scarce capital?". 


What specific advice is there for smaller traders?


Firstly I talk a lot about product choice. For reasons I explain in the book* there is generally an inverse relationship between the minimum capital required to trade something, and how much it costs to trade.

* If you must know: within product type and across instruments it's vol scaling. But also the more 'institutional' the product, the larger the capital required, the cheaper it is to trade. So futures are cheaper than CFDs for example.

So the optimum choice for a smaller trader is to find a relatively cheap product which they can afford to trade. That rules out most futures (too big) and also a lot of OTC products (too expensive).

If I assume that traders don't have much capital, and are relatively inexperienced, then it makes sense for their first trading system to be binary (no 'forecasts', which requires more capital to do properly), discrete (trades are opened and closed without any adjustment to position size), and close trades using a stop loss (which most people understand).

Then suppose you have slightly more than the bare minimum to trade: what next? Should you diversify by adding another instrument to your portfolio? Should you make your system more complex by adding new trading rules? Should you start trading a non binary system? All of these decisions are discussed, and viewed through the prism of a trader with limited capital.


Why the title, and the focus on leveraged trading?


A few reasons. As I've already said I think that the leveraged end of the OTC retail broker spectrum is one of the most dangerous parts of the trading world, even after the EU introduced restrictions on retail margin levels the availability of leverage is still far too generous. It's also a world to which naive punters are naturally attracted, due to the lottery like payoffs available ("invest £100 and win £10,000!") with massive leverage.

Secondly getting your leverage level right is probably one of the most important decisions any trader can make, and one most retail traders get spectacularly wrong. As an institutional trader your risk target is exogenous and usually fairly modest (even the 25% vol target I run at would be considered punchy in most shops). At a product level you're unlikely to have excessive leverage, unless it's something with really low vol (front contract EuroYen anyone?) or negative skew. But telling a retail trader that they should only use leverage of 1.5 rather than the 50 their broker will allow them is another story.

Thirdly, and very cynically, I didn't want to make this a "system trading" book as this would limit the audience. Of course I want more people to read this from a philanthropic point of view, and the money is a nice bonus (note book is also priced 50% lower than my first two books). I think fewer people are likely to pick up a book with "Systems" in the title than something that name-checks the CFDs and spread-bets that they've been hearing about in the news.

Finally from a technical point of view it's much easier to explain position sizing using inverse vol weighting if you can use leverage. You don't need to worry about risk appetite and the book can be 50-100 pages shorter.


I've already read "Systematic Trading". Should I bother with this?


That is an excellent question, and one I address in the book:

"You will see from my website that I wrote another trading book a few years ago: “Systematic Trading” (ST). Perhaps you are browsing on-line or in your local book shop and trying to decide which of these two books you should buy. Maybe you already own ST, and are considering adding this book, “Leveraged Trading” (LT), to your collection.

To help you decide, the main differences between the two books are:​


  • As the title suggests, ST is mostly aimed at traders who are enthusiastic about systems trading. LT helps new traders learn how to trade by using a system, but then explains how to combine the system with their own human intuition; the method I’ve named “Semi-Automatic Trading”. 
  • The trading systems in ST require large amounts of money (at least £100,000; around $130,000). The Starter System in LT needs just £1,100 or $1,500. I spend a lot of time in LT discussing how smaller traders can make best of their scarce capital.
  • ST is written for relatively advanced traders with some prior knowledge of certain financial concepts. LT is suitable for novices.
  • ST is a generic book which doesn’t go into much detail about individual markets. LT explains how to trade specific leveraged products.
  • ST explains the various components of a complex trading system one by one; it isn’t until the book is finished that you can see the entire picture. In LT I introduce a simple system in its entirety which you can start using right away. I then go on to explain how, and why, you could make it more complicated.
  • ST explains how to design trading systems from scratch, which requires using software to simulate historical system performance (a process called back-testing). In LT I present a system I have already back-tested. I then explain how you can modify the system for different types of trading, and to cover different markets, without needing any further testing.


 Because I have designed the trading systems in this book with the same principles in mind there are some ideas that readers of ST will find familiar, although there is no duplicated content in this book. I would recommend that you read “Leveraged Trading” (LT) if:


  • You tried to read ST and didn’t get it.
  • You read and understood ST but are struggling to build a simple system from scratch.
  • You have not read ST and are an inexperienced trader who is unfamiliar with financial theory and back-testing software.
  • You are specifically interested in trading leveraged products: FX, CFD, margin accounts, spread-bets, and futures.
  • You do not have enough cash to trade the systems in ST.
  • You are interested in combining your own trading intuition with a trading system: semi-automatic trading."


​

I am the guy who complained there weren't enough formulas in "Systematic Trading"


Just for you there are so many formulas in Leveraged Trading I lost count.

In all seriousness because this book is more 'hand-holding' it does go into more explicit detail and includes formulas. So for example where in Systematic Trading I might have just said "Take a weighted average" here I include the actual formula for a weighted average.

But don't panic, there are no greek letters* in the book, just simple formula that an 11 year old could understand.

* Full disclosure: there might be a few capital Sigma to indicate a summation. But definitely no integrals.


I am the guy who complained there weren't enough numerical examples in "Systematic Trading"


Again, you will love this book! It's my bet that beginners prefer to see concrete tangible examples rather than pages of theory.


I notice there is the usual obsession with costs


Yes! I make no apology for it. Costs are the only thing you can control and forecast (almost) perfectly. If you get your leverage right but trade too often then you will still go bust just a bit more slowly. Also there is a lot of misunderstanding and misinformation about costs out there. In particular brokers in the OTC world will usually promote the low levels of execution costs on non dated derivatives ("zero commission! 0.5 point spread!") whilst quietly hiding the very high levels of holding costs (17 clicks into the website you may just find that you are paying LIBOR+3% in overnight funding charges).

And talking about costs allows me to talk about one of my favourite bugbears: day trading. The idea that you can be profitable day trading, whilst paying retail level commissions and crossing the trading spread, is an idea that deserves to be rebutted constantly (if only to try and match the constant stream of BS from brokers and trading gurus promoting the concept).

There's also a bonus section in this book on reducing your costs through optimal execution tactics. You can find it in the appendix (it was a complete chapter, but was too short).


You really have it in for brokers and trading gurus, don't you?


Yes! Partly this makes the book more entertaining, for the same reason it's more fun to read a novel with a decent villain in it. But yes, I really hate the whole retail trading culture which enriches the shareholders of spreadbetting firms and a bunch of charlatans at the expense of emptying the accounts of generally less wealthy people who don't know any better. This strikes me as worth a different circle of hell compared to the institutional buy and sell side who are effectively payed through a pro-rata tax on everyone's managed money (a tax which you can reduce if you are smart and only invest in passive funds, or avoid overtrading: c.f. Smart Portfolios).

Of course I don't hate all brokers - only the ones that are expensive or dodgy. And not everyone who has ever written a book about trading is automatically dodgy, or that would clearly include me. But you should be extremely skeptical of any trading gurus who claim outlandish returns, who don't tell you what their trading returns are, who aren't open about their methodology, and whose videos mostly consist of them prancing around a villa in Thailand whilst occasionally pretending to trade.

You can rent this villa for your youtube videos here


Presumably as this is a 'beginners' book there is nothing in here about statistical uncertainty?




You couldn't be more wrong! I had to bring in statistical uncertainty so that people would understand why costs are important when selecting instruments and trading rules, and pre-cost returns irrelevant (since they are not statistically different from each other). I needed the concept to explain why diversification is so important (it gives you a massively statistically significant improvement in returns), whilst adding more trading rules and making your system more complex are good to do but not so valuable (the improvements are more modest and at times skate on the verge of insignificance).

Of course there is nothing in here about the mechanics of fitting, or in and out of sample periods, and you will not see the formulas for parameter uncertainty which I punish my students with every year. But I firmly believe that no trader will survive unless they have a good intuitive understanding of how uncertainty affects financial markets generally and trading strategies specifically.


Who helped you write this book?


The team at my publishers, Harriman House, were their usual brilliant selves. Craig Pearce was the commissioning editor and Stephen Eckett did the editing. I understand why people self publish, but I'm far too lazy and realistically I won't be able to match the professionalism of these guys. It's extremely difficult to be self critical enough to do a decent job of writing a book outline that is coherent and will reach the right audience. It's even more difficult to find someone who is able to read your stuff and give you intelligent feedback on everything from structure to content to grammar and spelling (and believe me, almost nobody can edit their own stuff).

(Anyone who compares my unedited blog and my edited books can clearly see the value of a decent editor)

As with previous books I had three "beta readers" who had to read the shockingly awful earlier drafts before Stephen had turned them into a readable book. Riccardo Ronco also read "Smart Portfolios" and did an equally excellent job with this book. James Udall filled in my not inconsiderable gaps in understanding about CFDs and spread bets. Finally Tomasz Mlynowski, whose day job involves (amongst other things) reading my lecture notes and explaining them to baffled students, brought along his fine toothed eye for errors and mixed metaphors.

Finally, it's a cliche, but writing is a job with flexible hours from which it's difficult to switch off. So it's tough living with a writer. So the three young people, one slightly older person, and cat, that live with me deserve a lot of credit.

Okay, maybe not the cat, which has a nasty habit of sitting on my lap when I am trying to finish a paragraph.


So.... book four?


Yes, probably. This will either be "Smart Portfolios for dummies" in the same way that this book is kind of "Leveraged Trading for dummies", or a more cerebral book on uncertainty in financial markets (which I know already my publisher will be less keen on). Before then however I will be working on another project- a new trading strategy - details to follow in the next blog post.



Monday, 30 September 2019

Building a garden "trading" office

(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 summer I've been building my own garden office.





Now a post about constructing a garden office might seem rather off topic in a quant trading/investing blog. But, (i) there has been a fair bit of interest in my occasional twitter posts in this vein, and (ii) the subject of where you work from as a self employed trader strikes me as quite relevant. Plenty of youtube trading gurus post endlessly about fitting out their trading offices (albeit these are mainly of the multiple monitor type, not the boring black box in the corner of the room variety).  Finally it strikes me that there is a big venn diagram nerd overlap consisting of people who are interested in making stuff in both virtual form (code) and physical form (with screwdrivers).

Of course if you find this post terribly uninteresting, feel free to come back in a few weeks when I'll be posting about my new book.


The brief


For the last 6 years or so I've worked mostly out of a small study in our house. For various reasons which I won't go into here this has become more difficult recently. In the past I've toyed with renting desk space in a local shared office space (nothing fancy like 'WeWork', I live in a dull commuter town), but I can't really justify the cost. Also shared office spaces are either full of annoying young fintechy/crypto/startup people or earnestly dull blokes in suits who work in teaching recruitment.

So I need somewhere to work. Bear in mind that work for me usually involves staring into space and occasionally writing or typing something. So space isn't necessary but a nice view is. I don't need 40 monitors. I won't be moving my trading infrastructure in, which consists of a few headless servers. All I need is a desk, a bookcase, some power, internet and phone.

When I floated this idea the younger members of the family got very excited. The idea of a 'chill out' room at the bottom of the garden was very appealing. I toyed with building a two room structure, with a small office for me seperated from the kids area, but it's unlikely I'd be able to work with them next door so the brief was for a single room with enough space for both office and "playroom".


External constraints


The site I'd chosen for the cabin was done towards the bottom of our garden; roughly 120 feet from the house. This was far enough away that the cabin was pretty invisible from the house as it's screened by trees and I was planning to paint it dark green. The site was hemmed in by a fence, fruit trees and some play equipment. The other issue is that our garden slopes downwards here and when there is rainfall it can get pretty soggy.

Pretty soggy


There are various laws about planning permission for garden buildings in the UK. The key ones for me were:


  • The building is to be placed less than 2.0m from the boundary of the property with a maximum overall height of no more than 2.5m from existing ground level (really I needed to get closer than 2m to the boundary or I wouldn't have enough space to play with).
  • The building is not to be used as self-contained living accommodation or have an antenna (so chill out zone rather than spare bedroom. And no HFT style microwave antenna).
  • Outbuildings should not be closer to a road or public highway than the original house itself (behind the house so no problem).


Also:

  • If larger than 15 square metres it's likely to have to meet building regulations 


Here is the site before work started.

Notice the kids slide and fence, plus a pear tree that is smack in the middle of the site (it's days are numbered!)




Choosing the cabin


After a lot of googling I decided to buy a 'log cabin'. I considered the cheaper option of a glammed up shed, and also the more expensive options (basically small buildings with fancy bifold doors). Also a factor was the fact that my DIY skills are somewhat limited, and constructing something completely from scratch was probably beyond me; log cabins are relatively simple to assemble- you literally hammer together interlocking "logs". At least the internet said they were simple to assemble, and to be fair I managed the construction relatively easily.

More googling suggested that a good company to go for was Tuin; amongst other things the sheer volume of honest information on their blog was a big plus for me. I decided to opt for the Lory cabin for a variety of reasons:


  • A good sized well proportioned space which comes in just under the 15 metre squared limit
  • I liked the contemporary look of the building 
  • Also liked the overhang which meant I could have a veranda to sit on in the rain (it rains a lot in England)
  • 45mm seemed a good compromise for wall thickness
  • Large windows so nice and light (all the trees around the cabin meant it could be a bit dark in winter)
  • 2.24 metres high, giving me 26cm of clearance below the 2.5m limit. This allowed me to raise the building off the ground to reduce issues with flooding, and allow for the slope and tree roots.
The overhang meant I could also add a small deck to create the veranda. The base of the cabin plus deck will then be raised off the ground to avoid flooding issues (in reality the site slopes down towards the front of the cabin, so the cabin is almost flush with the ground at the back).




Building the base


A big shout out to this series of youtube videos which I found very helpful, especially when designing and building the base, flooring and roofing.

From the ground up the base of the building is basically:

  • Hardcore backfilled into a hold in the ground, supporting:
  • Concrete slabs (I got most of these from ebay), on top of which was:
  • Damp proof membrane, on top of which was:
  • Adjustable pads, bought from Tuin. These supported:
  • 2x4 tanalised timber beams. Around the perimeter of the cabin these were doubled up. On top of these were:
  • Composite foundation beams. These then supported the actual log cabin.




I designed the base so that there was a maximum 1 metre span between supporting pads around the perimeter of the cabin (all the weight of a cabin sits on the perimeter). The perimeter was double thickness 2x4, so 4x4 timber. There is also a supported double thickness beam running down the middle of the cabin, so the maximum joist span was less than 2 metres. The decking area at the front (bottom of the diagram) is basically a 'mini-me' version of the main frame. This is probably over-engineered but it made the construction of the frame neater and more symmetric.



At this point I did make a mistake because I forgot that the floorboards will run across the joists not along them (the joists are the left to right timbers inside the perimeter of the cabin; because the entrance door is at the bottom of this drawing the floorboards would normally run left to right. Basically the left to right timbers should really be running down so they are at 90 degrees to the left to right floorboards). However as you shall see later this was easily rectified.

First step was to lay out a square perimeter on the ground and then mark out the area of the cabin, plus where the pads would be. There was a fair bit of a slope which made things tricky. I chopped down the pear tree, but I didn't have to dig the root out as this would sit below the raised floor of the cabin (it's still there!).

Then I removed a layer of grass and a couple of inches of topsoil. I then dug out the holes for the slabs. At this stage I found that one of the pads was going to be in the thick of some tree roots (for a plum tree, not the removed pear tree), so I moved it across, as well as it's 'mirror image' pad on the other side, plus the two intermediates keeping everything symmetric:



Fortunately the over-engineered frame meant I could do this without any risk.

Holes have just been dug. Slabs shown aren't in final position yet, these are just to check hole size.


Next I put in the hardcore, compressed it, added some sharp sand to make it easier to level the slabs, and then put the slabs in. The slabs have to be level, but the adjustable pads meant I didn't have to perfectly level them with each other (as long as the level difference was never greater than the adjustable range on the pads: in practice this meant there was a fair bit of difference in the level of the slabs across the plan). I cemented around the slabs to stop them shifting.

Slabs for cabin footprint are in place, three decking slabs still have to added

I then laid a DPM (damp proof membrane) over the slabs before positioning the pads. The DPM prevents moisture wicking up the pads into the timber frame and thence to the cabin itself.

At this point I ended up making a disposable wood frame the same size of the final frame to line up the pads in their final positions (I couldn't use the real frame as that would be too heavy and I could only assemble it in situ, once the pads are in place). In retrospect I wish I'd done that earlier, as it would have helped get the slabs in a more precise position without a lot of faffing around. Now I could level up all the pads (top tip: start with the highest point, which should have a pad with the minimum height, and then level everything else relative to that).

Wooden frame sitting on pads, with DPM underneath the cabin footprint.


I could now start constructing the real timber base frame in situ on top of the pads. I did this in sections; firstly the left hand side of the main building footprint, then the right hand side, and finally the decking. Everything was held together with a combination of big assed nails and decking screws (screws to get everything in place, then nails to actually support the horizontal loads), plus bolts on the doubled up sections. I didn't bother using joist hangars, since I could attach the joists to the inner parts of the frame before adding the outer ring of timber.

Top tip: a project like this is a lot easier if you have the right tools. I bought an impact driver and a mitre saw to make building the base easier (decided a nail gun was going a bit far). Also new tools are ... cool.
Top tip #2: get loads of screwdriver bits of the appropriate size/type you are using (in my case T25 for deck screws, plus various sizes of PZ). You are guaranteed to drop and lose at least one bit every 5 minutes.
Top tip#3: if like me you are rubbish at hammering in nails, try pre-drilling a pilot hole.

Most of the frame in place here. A few noggins have been inserted; these go between the joists to stop them twisting.

Finally I treated the frame with a couple of layers of creocoat.
Finished and treated frame. The loose untreated timber is not part of the frame, but is being used to double check the cabin footprint

The three front pads which support the edge of the deck do not have any DPM between them and the slab, as the DPM only needs to be under the cabin footprint. Instead I used a section of DPC between the slab and the pads.


Last thing was to add a damp proof course (DPC) on top of the timber where the cabin footprint sat to provide further protection against moisture. I also inserted four plastic conduits for cabling requirements:

  1. Solar power
  2. Mains power (future possibility)
  3. Phone cable
  4. CAT6


Plastic conduits. DPC is just visible in the top left of the picture.



Constructing the cabin


The cabin arrives in one massive package which was left in my front garden. I then needed to move this piece by piece to the site. Apart from the windows and doors which required two strong people, everything else was light enough to move single-handed.


Look at my massive package
Unpacked and neatly stacked
It was also relatively easy to identify all the various parts, but I had a few mystery bits of wood which I was able to name when it came to use them.

The actual construction of the cabin was relatively quick. First of all you have to put down the foundation beams and make sure they are square and level. My base was level, but a few mm out from square; however since the 4" wide outer timber was considerably wider than the foundation beam this gave me a bit of tolerance in positioning the beams.

Then it's just a matter of locking the timber logs together with the help of a big mallet. I got from ground to roof level in a single day (single-handed remember - I just needed help moving the window and doors into place). The roof joists took a bit longer to hammer into place as they were really tight. The really fiddly bit, for which I wish I had help, was putting in the fascia boards that go round the perimeter of the roof. I also wish I had read the Tuin blog more carefully, or I would have found out earlier that it is easier to pre-assemble the fascia boards before installing them.

Fully built cabin. 


One change I did make to the design of the building was that there was a small gap between the edge of the roof boards and the fascia, 'for drainage'. I thought this looked a bit pants especially if like me you struggled to line up the roof boards precisely, plus I was planning to put guttering on the roof anyway, so I concealed these holes with a bit of timber.






Painting


You can order the cabin pre-painted or pre-treated, or you can paint it yourself. If you use the recommended 3 coats of Tuin carefree protectant then there isn't much saving cost-wise from painting it yourself. I decided to paint it myself mainly because the pre-treatment adds 2-3 months to the lead time for the cabin, and I wanted to complete the project by the end of September. I ordered far too much of the protectant, but at least I will have plenty for future maintenance purposes. I bought the dark green for the exterior, and a clear protectant for the interior.


Two coats into the painting one more coat to go

Note: They recommend that you remove the windows and door frames before painting, otherwise when the log timbers expand in cold/wet weather there will be unpainted timber revealed. If you then paint this you don't get colour matching. This did in fact happen:

Photo taken in January, a few months after construction was completed

However as you see there is only a tiny amount of movement, less than half an inch. I just touched this up with a little bit of paint and it's invisible.  This is a testament to the quality of the protectant I used.


Roofing


The roofboards of the cabin are nice to look at but are (a) not weatherproof and (b) not insulated. Since heat rises roof insulation is a good thing to have. I used a celotex type PIR insulation board which I placed in a timber frame covered in OSB sheets. I decided not to insulate the entire roof, only over the cabin itself, and not the side or front overhangs. This also created a natural dish gutter around the perimeter of the cabin roof. To make things weather proof I decided to use the easy roof product from Tuin.



Initially I found the easyroof anything but easy. It comes in 1 metre wide rolls which you unroll and then stick to the roof in overlapping sections. I kept getting it stuck to itself until I eventually worked out a systematic way to unroll it gradually whilst sticking it down. Fortunately it's easy to correct any bodged mistakes by just putting more easyroof on top.

Dished roof creating "guttering" down side of roof. You can see how I've used multiple layers of easy roof to deal with the akward corners. The aluminium trims are also visible.


(Another shout out to this series of youtube videos which helped me with the roof insulation)

For the edge of the roof I ordered and fitted some of these metal trims, however in retrospect they were a bit of a faff and not really neccessary; I think it would have been neater and easier to create timber upstands.


Plumbing


The cabin roof slopes backwards at a pretty decent pitch so you end up with all the water at the back of the roof. You can just leave a gap in the roof, but it's obviously much better to add some guttering so that's what I did. On the Tuin blog they talk about cutting into the roof joists so that the guttering sits nicely, but my DIY skills turned out to be insufficient for the job. Fortunately because of the insulation the guttering could sit on top of the joists and still marry up to the roof level.

Yes, I know I need to clear the leaves


The guttering is connected to two downpipes. One runs diagonally across the back of the cabin, and the other straight down also feeding a water butt:







The overflow pipe then runs down the side of the cabin.

Subsequent to the original build, I found it difficult to create a slope on the guttering towards the original downpipe, and still get decent drainage off the roof.  There was a lot of water pooling in one corner of the roof, and I actually had a little bit of leaking through the roof.  To solve this I added the second downpipe discussed above and also caulked the roof planks inside where there were some small gaps. Since then it's been dry as a bone.

I also had some issues with drainage around the building (although given the tendenency of the garden to flood, it was hard to know if these were worse than before). Hence the small trench that surrounds the back and side of the building.


Flooring


I bought the floor pack from Tuin, which came with joists and skirting. Normally you wouldn't need the joists with a timber base which already has it's own joists. But remember from earlier that I'd screwed up the orientation of the joists. So I decided to lay more joists on top of the original base, at 90 degrees. This meant I could lay the floorboards correctly; running from left to right as you enter the cabin through the front door. I did lose 50mm in interior height, but this was no big deal.

The full spec of the floor, from pad level upwards:
  • Adjustable pads, bought from Tuin. 
  • 2x4 tanalised timber beams forming the base perimeter and joists (left to right if you're facing the cabin). 
  • Inside the cabin these were infilled with celotex type PIR insulation, held in place with little plastic wedges.
  • Cabin perimeter: Composite foundation beams. These then supported the actual log cabin.
  • Over the joists inside the cabin: Insulation tape
  • Inside the cabin: DPM (this is in addition the DPM underneath the base)
  • Inside the cabin: Floor joists, going at right angles to the base joists (top to bottom if you're facing the cabin), secured with decking screws to the base.
  • Stuffed between floor joists: lambs wool insulation of the type that the sort of people who order organic meat box deliveries end up with loads of
  • Inside the cabin: Flooring (at right angles to the floor joists)
  • Attached to the cabin walls, inside the cabin: skirting



I decided to score the PIR rather than sawing it which generates a lot of toxic dust, but this meant it often wasn't accurately sized. Some expanding foam dealt with the gaps. The second DPM is probably overkill, but I had masses of the stuff so I thought I might as well use it. Notice from the highly accurate schematic drawing that the flooring is not joined to the cabin and has a small expansion gap, and the skirting is joined to the cabin wall but not the floor. I doubled up the skirting provided by Tuin as it meant I could have a wider expansion gap and not have to be so accurate with my floorboards.

With higher floor height the skirting is higher than the window frames, so I had to go round the frames




To cover the gap between the metal door sill and the last floorboard I used a horizontal piece of skirting

I left a gap in the insulation and DPM for my cable conduits, and then put expanding foam around them. I could also have drilled holes in the floorboards for the conduits, but decided to cut some floorboards short instead and leave a gap in the floor. I planned to put my solar panel stuff here inside a cabinet, so the floor wouldn't be exposed anyway.

Gap in flooring for conduits. Notice lambs wool insulation stuffed in void between floarboards and joists


The floor was finished off with 3 coats of varnish.

Update: To improve insulation I subsequently added some carpet (made up of random offcoats that I cut to size and just stapled down) and some rugs.



Solar panel system


Because it was ~120 feet to the cabin from the house laying a power cable would have been an expensive and time consuming business. So I decided to install a solar panel system, which I got from select solar, and which was actually cheaper than the cost of the cable would have been (plus free electricity and save the planet guvnor). Although the number of trees means that the solar panels will rarely be at 100% efficiency I only need to run a laptop (which can also run down it's own battery if needed) plus maybe a light or two.

The panel goes on the roof (duh). Originally the panel was sloped and rotated with the sun (fancy), but the extra height it created breached planning. It's now virtually flat on the roof (~5 degree slope), and is fixed so it doesn't change angle, but I've not had any noticeable drop in solar yield (at such a flat angle the direction becomes less important).

Inside there is a charge controller, battery (which weighs a ton) and inverter into which you can just plug in a standard UK plug. Wiring it all up is pretty straightforward, and the charge controller can be monitored via bluetooth on your phone which is rather cool.

From left to right, charge controller, battery, inverter

Inverter sticks out of cabinet so you can insert a standard 3 pin plug.


I left a spare conduit in case I decide to add mains power later; and indeed a plan B option if I need more power temporarily is to run a caravan style cable from the house's external power sockets down to the cabin.


Furniture


For the 'office' side of the cabin I wanted to keep things minimal: book shelving, a desk, and a chair. I could have just bought shelves and a desk, but I had so much spare wood left over I decided to use some of it. The shelves are made of leftover floor and roof boards, and also include a cabinet which houses the solar panel system as well as hiding the conduits and wiring.

I have a lot of books, some of which I wrote myself



I wanted to have a corner desk that would allow me to sit where the two corner windows meet, but I also wanted to move this out of the way when not being used so it didn't block the view. After much deliberation I decided to build a gate leg desk on castors.

Desk in situ

Desk folded away and ready to roll

The legs of the desk are made from a spare log, and the desk top is a hardwood plywood / OSB sandwich which I decided to leave unpainted since the ply is quite a nice colour.





"The office"
My sons small sized snooker table (folded away) gives the room a fintech vibe, but sadly I couldn't fit our table tennis table inside the cabin. Perhaps I should make a bar out of some more spare wood...


On the non office side there is a sofa, and beanbag. I also have a whiteboard and flipchart, since I'm a big fan of thinking whilst doodling.


Dartboard for more fintech vibe. Coffee table made from cable drum that the CAT5 cable came on. Gas heater in the corner.

Update: I've put my exercise bike in here, complete with custom made laptop stand.




Internet and phone


I ran an armoured CAT6 and separate phone cable down to the cabin. For now I decided not to bother burying them, so they just run along the fence mostly hidden by vegetation.


At the cabin end I installed a two port RJ45 outlet. This was neater and easier than having a port for the phone and another for the CAT6. I sourced some RJ45 to phone lead cables so I could just plug my phone into the RJ45 socket.

Getting the cables into the house was tricky and I had to get some help to lift some patio slabs, before running the cable down and then into the wall. Again I used a two port outlet, and connected the CAT6 to my router, and the phone cable into the phone socket using another CAT6->RJ45 cable.


I is internet P is phone. Obviously.


Cables about as neat as possible


Finishing touches


Air vent, also supplied by Tuin

Heres the decking - standard deck boards - after one coat of creocoat. The step is made out of spare 4x2 timbers, with some concrete to hold it in place. The decking creaks slightly, as it's laid along the joists (see discussion earlier). At some point I might add some noggins under the deck to improve this.
To ensure there are no drainage issues water is designed to flow under the building (between the ground level and DPM layer, and between the slabs). I've layed some perforated drainage pipes to keep these channels open. 





I attached this wooden 'tray' to to the back and underside of the desk which hides all the cabling and keeps things tidy. As you can see I'm now using a monitor stand with seperate keyboard and mouse; the USB hub is blu-tacked to the desk making it easy to plug in. 


Under the desk: I stuck in a few hooks to keep my headsets tidy 


Here is a video of the build, complete with cheesy music.

Done



And here is what it's all about... the view from my new desk





Appendix: kit list

There is a fascination on youtube with the kit that people have on their desks for some reason - could be that the influencers are getting the stuff for free. Anyway, here's mine if anyone cares (roughly left to right and bottom to top in the above picture):

- (On the floor): one of several mobile power banks (for lamp / phone / whatever), and a beefier EGOWAY USB C Portable Charger, 27000mAh 100W PD Power Bank External Battery (can run the laptop for several hours if no sunshine for solar)
- Constantly changing set of programming reference books
- Angelpoise 75 mini lamp. USB cable and can run off standard power pack
- Stack of index cards which I use to write bug reports on
- Rubiks cube. Present from my son, don't ask where it came from. About 90 seconds, if you're asking.
- External keyboard. No numeric keypad, nothing fancy, cost about twenty quid
- Lidasen Laptop stand. Basic but does the job
- Laptop. Thinkpad T480 i7 16GB 512GB. Running linux mint. Note, I don't actually use this for trading.
- Webcam: Logitech C920 HD 1080p. Because my laptop webcam isn't that great. 
- Anker 4 port USB data hub. This is enough for mouse, keyboard, USB headphones and webcam. If I need to use my Blue Yeti I plug it into the laptops second USB socket
- External mouse. Logitech M90, cost about £8
- Jam jar of pens, rulers and pencils. 
- Walkie Talkie. The idea was that I would use this to communicate with the main house, but we tend to send texts or use small children as unpaid couriers. So purely decorative.
- Painted stone, courtesy of my eldest child, and a big wodge of bluetack to stick index cards to bookcase with
- Desk phone. Rarely plugged in.
- Blue Yeti mike. Used for podcasts / webcasts. 
- (underneath) Sennheiser PC 8.2 USB headset with mike. My default headset for listening to stuff and quick zoom calls. 
- RJ45 headset for desk phone
- 3.5mm headset, for monitoring Blue yeti.

(If any of the above manufacturers want to give me free stuff or money, be my guest)








Wednesday, 17 April 2019

Trading and investing performance - year five

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 tax year which runs from 6th April to 5th April, rather than any logical period like a calendar year (or even 1st to April to 31st March would make more sense, frankly).

Previous updates can be found here, here, here and here.


Overview of my world


My investments fall into the following categories:


  • In my investment accounts:
    • 1 UK stocks
    • 2 Various ETFs, covering stocks, bonds, gold and property
    • 3 Usually some uninvested cash
  • In my trading account:
    • 4 Various ETFs, covering stocks and bonds
    • 5 A futures contract hedge against those long only ETFs in 2.1, so that the net Beta is around zero
    • 6 Futures contracts traded by my fully automated trading system
    • 7 Cash needed for futures margin, and to cover potential trading losses (there is also some cash in my investment accounts, but it's pretty much a rounding error)

Excluded from this analysis is:

  • Net property equity in my PPR (primary private residence, i.e. the bricks and mortar I am currently writing this in)
  • My 'cash float', roughly 6 months of household expenditure that is kept separately from my investment and trading accounts. This is used to smooth out lumpy income arriving from multiple sources and means I can sleep easily at night.

For the purposes of benchmarking it makes most sense to lump my investments in the following way:



  • A: UK single stocks
    • Benchmarked against ISF, a cheap FTSE 100 ETF (FTSE 350 is probably a better benchmark but these ETFs tend to be more expensive).
  • B: Long only investments: All ETFs (in both investment and trading accounts) and UK stocks
    • Benchmarked against a cheap 60:40 fund. This is the type of top down asset allocation portfolio I deal with in my second book.
  • C: Equity neutral: The ETFs in my trading account, plus the equity hedge. 
    • Benchmark is zero.
  • D: Futures trading: Return from the futures contracts traded by my fully automated system. This is the type of portfolio I deal with in chapter 15 of my first book. The denominator of performance here is the notional capital at risk in my account (usually close to, but not exactly the same as the account value).
    • Benchmarks are a similar fund run by my ex employers, or the SG CTA index, adjusted for volatility.
  • E: Trading account value: This is essentially everything in my trading account, and consists of equity neutral + futures trading. 
    • No relevant benchmark.
  • F: Everything: Long only investments, plus futures hedge, plus futures trading. I include the value of any cash included in my trading or investment accounts, since if I wasn't trading I could invest this. 
    • For the benchmark here again I use a cheap 60:40 fund.

If you prefer maths, then the relationship to the first set of categories is:

A = 1
B = 1 + 2 + 4
C = 4 + 5
D = 6 + 7
E = 4 + 5 + 6 + 7 = C + D
F = 1 + 2 + 3 + 4 + 5 + 6 + 7 = B + 3 + 5 + D


Performance contribution


The figures shown are the contribution of each category to my total investment performance (on an XIRR basis):

A, or 1) UK equities -0.45%
2) ETFs +4.35%
B) Long only investments +3.9%
C) Equity hedge -0.2%
D) Systematic futures trading +1.0%
E) Trading account: +0.8%
F) Total 4.4% (won't add up exactly because of XIRR effects)


UK Equities


This is effectively a 'trading' portfolio, using a mechanical system described here. Since I published that post I have added a new twist in that I enforce sector diversification.

Mostly it's held inside SIPP and ISAs, to avoid paying CGT. There are also a couple of legacy stocks with larger positions, which are held outside tax shelters. I have been gradually reducing their position tactically over time.

Start of the year:

ICP 18.8% (legacy)
STOB 17.1% (legacy)
BKG 10.4%
VSVS 9.5%
RMG 8.9%
LGEN 7.6%
GOG 7.5%
HSBA 7.4%
IBST 6.9%
BP 6.0%


I sold some STOB to crystallise a CGT loss, and all the other trades were mechanical:

Bought and sold Babcock, for a 26% loss.
Sold RMG for a 31% loss
Sold IBST for a 20% loss
Bought CEY
Bought PTEC

So now the portfolio looks like this:

ICP 20.98%
VSVS 10.79%
BKG 10.59%
CEY 8.91%
STOB 8.76%
GOOG 8.69%
PTEC 8.66%
LGEN 8.47%
HSBA 7.21%
BP 6.94%


Although the yield was 4.4% the total return was negative; an XIRR of -2.3% to be precise. This compares badly with the FTSE 100 tracker I use as my benchmark coming in at 7.6%. Looking back over the years since I started doing being this anal about my performance, this is the first year I've underperformed. Apart from the losers I sold Stobart also underperformed (though it's still up 100% from my original purchase price), and both CEY and PTEC have lost money since I bought them. On the upside BP and GOOG (which is Go-ahead, not Google in case you didn't know) both earned around 20% over the year.

I have been a net seller of UK equities for many years now, but my allocation is now about right. I reinvested the dividends earned from all UK stocks back into the UK, but they are still a smaller proportion of my portfolio due to the relatively poor performance. I'll return to questions of portfolio allocation later.


ETFs and funds


All my non UK and non equity exposure is in ETFs, with a smattering of investment trusts. As usual trading was done for tax optimisation, to generate funds for SIPP and ISA Investment, and to get the right risk exposure (discussed later). I don't look at the performance of my ETF portfolio seperately, only in conjuction with UK shares.


Long only


Performance here was better, but still not fantastic. Dividends on the whole piece were identical to the UK share, with a yield on starting value of 4.4%. The aggregate XIRR was 4% exactly, hence a small capital loss was made. This under performed a benchmark Vanguard 60:40 fund, which came in at 7.2%.


Systematic futures trading and equity hedge


The systematic futures trading system I run is effectively what you can in find in "Systematic Trading", and code-wise is an older version of the implementation in pysystemtrade.

For my trading account as a whole the breakdown looks like this (all numbers are as a % of the notional maximum capital at risk, which happens to be a bit less than the trading account value):

Hedging futures: -1.1%
Hedged stocks, total return: +2.0%
Net equity neutral: +1.0%

Futures trading-
MTM: 5.7%
Interest: 0.08%
Fees: -0.04%
Commissions: -0.6%
FX gain/loss: +0.02%
Net futures trading: +5.2%

Grand total: +6.1%

Some more statistics (futures trades only):

Profit factor: 1.0
Win/loss ratio: 1.31
Profit factor: 1.0
Hit rate: 43.2%
Avg holding period, winners: 39 days
Avg holding period, losers: 29 days

So is this good or bad? Let's look at benchmarks.

 'Bench1' is this AHL fund, using monthly returns from April to March in each year, and a new benchmark 'Bench2' is the SG CTA index, with matching daily returns. Both have returns scaled up to match my volatility. Remember the benchmark should only be compared against futures trading, not the equity neutral component of the portfolio.

Year:    14/15   15/16   16/17   17/18  18/19

Total:   57.2%   39.6%    0.3%    0.4%   6.1%
Hedge:   -1.1%   16.3%   14.4%    4.1%   1.0%  
Futures: 58.2%   23.2%  -14.0%   -3.7%   5.2%

Bench1: 106.9%  -10.6%   -6.2%   16.4%  10.3%
Bench2:          -6.7%* -21.9%   -3.8%   0.7%

* From 13th April 2015

A very good performance from 'Bench1' here, but against the entire industry (bench2) my performance is more respectable.

You will be used to seeing pretty pictures and more detailed analysis here. Unfortunately I couldn't run my normal annual performance attribution in the increasingly creaky old legacy code that my system runs on (after all it's five years old now). I am gradually building up to replacing this with pysystemtrade, however this is a slow process (interrupted by the new book I am finishing off, plus various random side projects like writing this blog post).


Total investment return


My total return on all my investments, including cash held for futures margin, came in at an XIRR of 4.4%. Once again Vanguard 60:40 seems an appropriate benchmark (since if I wasn't trading futures I could throw all my cash into that fund), at 7.2%. All in all then a slightly disappointing year, although unlike the last two years my futures trading added to rather than detracted from my performance.


Risk


My investment portfolio asset allocation at the end of the year in cash terms stood at 22.7% in bonds, 65.1% in equities, 9.5% in cash and 2.7% in other (Gold and commercial property).

This is more cash than I normally have. About 2.6% (of the 9.5%) was transferred to ISAs and will be invested shortly. I am toying with the idea of starting another little portfolio which will invest in investment trusts using some simple filters around discount and yield. I also have a little more than usual in my current account, and in my trading account. In practical terms this just means I have more of a cushion against the rather lumpy arrival of income in the form of dividends and royalties.

My allocation in my preferred risk weighted terms looks like this:

|Asset    |Strategic|Start of year|Current|
-------------------------------------------
|Bonds    |   22%   |   13.1%     | 12.0% |
|Equity   |   50%   |   59.4%     | 60.7% |
|Futures  |   25%   |   24.5%     | 24.7% |
|Other    |    3%   |    2.9%     |  2.5% |


As usual the lower allocation to bonds reflects a mechanical trading rule that uses the last 12 months of relative risk adjusted performance; bonds are down around -0.5% and equities up 5.5%. See the relevant chapters of "Smart Portfolios" for more detail.

Regional exposures, should you care (each row adds up to 100%):

|      | Asia | EM   | Euro |  UK   |  US  |
------------------------------------------------
|Bonds | 0%   | 22%  | 19% |  18%  |  41% |
|Equity| 26%  | 27%  | 17% |  27%  |   3% |


The 0% weight in Asia reflects a lack of decent bond ETFs, whilst the 3% in US equities is because they are frightfully expensive (again there are mechanical rules lurking behind these numbers, this time based on relative valuation metrics: dividend yield and PE ratios).


Thoughts and plans


There are enough numbers in these posts that there will always be good news (relative futures trading, equity hedge) and bad news (everything else). Naturally none of it is statistically significant. So there are no conclusions to draw in the shape of "Oh my gawd, this is awful, I need to change everything right now".

But gradual improvement in a sensible way is fine. I haven't yet got round to implementing any serious changes to my futures trading (waiting for my code migration to finish first), but in the mean time I've started a very small portfolio which buys investment trusts trading at a large discount and with large yield, with some minimum liquidity requirements. So far this constitutes PGIT and VSL.