Leveraged Trading: A professional approach to trading FX, stocks on margin, CFDs, spread bets and futures for all traders

Home > Other > Leveraged Trading: A professional approach to trading FX, stocks on margin, CFDs, spread bets and futures for all traders > Page 25
Leveraged Trading: A professional approach to trading FX, stocks on margin, CFDs, spread bets and futures for all traders Page 25

by Robert Carver


  But what if the price keeps rising? In fact, the price of gold did rise further, on the back of a minor panic in the US stock market. My stop loss level was reached just a few hours after my initial short was put in. I then submitted a market order to clos e the trade.

  Why did I use a market order when I’d previously been using limit orders? With stop loss trades you must always use market orders, never limit orders . The extra spread cost of a market order is nothing compared to the risk you run if the market continues to 20

  move awa y from you. ¹75³

  Nevertheless, assuming they have found an instrument which behaves as expected, mean reversion traders should end up with cheaper than average trading costs. Trend following day traders are unlikely to beat the drag of extremely high trading costs, but day traders running mean reversion strategies can be profitable.

  20 20

  ¹75 70 Some exchanges give priority to larger orders rather than those submitted earlier. Other more complicated queueing rules can also apply.

  20

  ¹75¹ It might seem unlikely that an order won’t be filled as this would require the price to remain unchanged for an entire day.

  But when writing any trading plan we need to be ready for any possibility, however improbable. This situation does regularly happen in certain illiquid markets with very low volatility – as I write this footnote the price of Swiss interest rate futures has been stuck at exactly 100.74 since 8:32am this morning – and it’s now 3:05pm.

  20

  ¹75² See discussion on page 227 .

  20

  ¹75³ Of course you could also use a guaranteed stop loss, although that is even more expensive than a market order, as discussed in chapter five, on page 114 .

  Appendix C: Calculations

  This final appendix explains how to perform various kinds of key calculations used in the trading system. Spreadsheets that implement all the formulas in this book can be found on the website: systematicmoney.org/lever aged-trading Back-adj usting prices

  Historic prices

  In this part of the appendix I explain how you could create a history of back-adjusted prices using a spreadsheet.

  You begin with a series of end of day closing or settlement prices for different expiry dates. Let’s keep things simple and just use three dated contracts (A, B and C), within a highly unrealistic example in which we only have a few days of prices for each contract. Here is the history of pr ices so far: Now to decide when we would have switched from one expiry to the next. For the switch from A to B we don’t have any choice; there is only a single date when we have a price for both contracts (7

  January). For the switch from B to C we have two options. Let’s suppose we always pick the latest date ( 10 January).

  We now need to create a new column for the back-adjusted price.

  This is populated in reverse, starting with the last day with data and going backwards. We begin by copying across the prices for the final contract, C, until we get to the first expiry date (expiry dates are sho wn in bold):

  We now take the difference in closing price between the current contract C and the previous contract B on the roll date: 99.5 –

  99.0 = 0.5. This difference has to be added to all the B prices to make them consistent with C on th e roll date: The B adjusted prices are then copied across to become the final adjusted prices for the rel evant dates: We now create adjusted prices for A: on the expiry date of the 7

  January the difference between the back-adjusted price and the price of A is 100.7 – 99.9 = 0.8; this is added to the p rices for A:

  Finally, we copy across the adjusted prices for A to become the back-adj usted price:

  We’d continue this process until we had adjusted the oldest contract in our d ata history.

  Keeping the price series up to date

  A useful property of back-adjustment is that the current back-adjusted price is equal to the price of the dated product we’re currently trading. So ordinarily we can just add new rows as follows:

  This would continue until we were ready to roll on to a new contract (D). On the roll date (16 January) we get a price for bot h contracts:

  We take the difference in price between the new contract D and the existing contract C on the expiry date: 101.5 – 101.0 = 0.5.

  We now add this difference to the entire back-adjusted p rice series:

  We can now discard the original back-adjusted price series, and on subsequent days add additional prices for contract D to the new back-adjusted p rice series.

  Instrument risk calculation

  I recommend that you calculate standard deviation using the last 25 trading days of returns. To do this in a spreadsheet package assuming that column A contains daily prices (excluding weekends and market holidays), then we populate column C with percent age returns:

  C2 = (A2 – A1) / A1, C3 = (A3 – A 2) / A2, ...

  If you are using back-adjusted prices then the above calculation will give weird results for long series of prices. This is because back-adjusted prices can become very small and even go negative. For back-adjusted prices, we populate column A with the back-adjusted prices, and column B with the current price of the contract we’re actually trading. Then column C should read: C2 = (A2 – A1) / B1, C3 = (A3 – A 2) / B2, ...

  We then calculate the standard deviation from row 26 onwards: D26 = STDEV(C2:C26), D27 = STDE V(C3:C27), …

  This is a daily measure, so we annualise it by multiplying it by 16 (standard deviation scales with the square root of time, and there are about 256 trading days in a year): D26=D26 16, E 27=D27 16, …

  Moving average calculations

  Assuming column A contains daily prices (ideally prices which are back-adjusted), then the 16-day moving avera ge would be: B16 = AVERAGE(A1:A16), B17 = AVERAGE(A2:A17), B18 = AVERAGE(

  A3:A18), ...

  Then a 64-day moving average is calculated as follows: C64 = AVERAGE(A1:A64), C65 = AVERAGE(A2:A65), C66 = AVERA GE(A3:A66),…

  Finally, the 16,64 crossover is the difference between colu mns B

  and C:

  D64 = B64 – C64, D65 = B65 – C65, C66 = B6 6 – C66, ...

  It’s straightforward to adapt this for other crosso ver lengths.

  Breakout calculations

  Assuming column A contains daily prices, then for a 10-day rolling window the rolling maxi mum will be: B10 = MAX(A1:A10), B11 = MAX(A2:A11), B12 = MAX(A3:A12) The rolling mini mum will be:

  C10 = MIN(A1:A10), C11 = MIN(A2:A11), C12 = MIN(A3:A12) The rolling average is:

  D10 = AVERAGE(B10, C10)/2, D11 = AVERAGE(B11 ,C11)/2, ...

  Finally, the scal ed price is:

  E10 = (A10 – D10) /(B10 – C10)

  Performance ratio

  Assuming column A contains a list of trade returns, as a percentage of capital, e.g.: if the first three trades had returns of +3.1%, –1.2 % and +5.4%:

  A1 = 0.031, A2 = –0.012, A3 = 0.054, ...

  Then the average ret urn will be:

  B1 = AVERAGE(A:A)

  The standard deviat ion will be:

  C1 = STDEV(A:A)

  The performance ra tio will be:

  E1 = B1/C1

  It is also useful to know the numbe r of trades: D1 = COUNT(A:A)

  Acknowledgements

  I resigned from AHL in 2013 and left the financial industry without a particularly clear idea of what was going to happen next. I hoped that something would come up, a sentiment shared by my wife who was not overjoyed about the prospect of spending all day in a house with an aimless middle-aged man. Fortunately, something did come up. My crazy idea for a book about trading with systems was commissioned by Stephen Eckett at Harriman House. After many months of writing by myself, and a few more months of editing by Craig Pearce to turn it into a readable book, it was published.

  No longer did I have to answer the question “So what do you do?”, with “Well I used to be...”; now I could confidently state “I write books”, before adding “Well�
� I’ve written one book…”. My second book followed a couple of years later, so I could now answer with an unqualified “I write books”. Much to my wife’s relief, I have successfully avoided becom ing aimless.

  One of the best things about the last few years has been meeting some great people, who I might otherwise never have known. Three of these great people generously agreed to help me with this latest book.

  Tomasz Mylnowski is currently my teaching assistant at Queen Mary, University of London. As well as being very knowledgeable about both the theory and practice of finance, he has an excellent eye for detail. This complements my own skill set very well; I’m more of a ‘big picture’ guy (i.e., lazy, bored by the granular stuff, and prone to making silly mistakes). Tomasz found time to wade through both my lecture notes and the manuscript for this book, correcting numerous err ors in both.

  I originally met James Udall after he emailed me, asking if I thought it made sense to implement my trading system (a) with spread bets and (b) entirely on a spreadsheet. I was sceptical but agreed to help, and James proved me wrong by successfully managing both. Although I have traded plenty of futures contracts, I am a relative novice when it comes to spread betting and CFDs. Fortunately, James was happy to fill in the gaps in my knowledge from his own extensive experience.

  I was very lucky indeed to meet Riccardo Ronco, who was an early reader of my blog. Riccardo has been very generous in connecting me with his wide network of industry contacts (frequently I’ve tried to introduce him to someone at a trading conference, only to discover that he has known them for many years). He deserves special mention as he also helped with my second book and should have known better this time round. Like me, Riccardo has a young

  family. Unlike me, he works ridiculously long hours and I didn’t really expect that he would have time to read through my drafts.

  But he did, and his feedback was invaluable in pointing out where I had made my usual error of assuming that the reader already knew every thing I did.

  It seems fitting that both Stephen and Craig from Harriman have also had a role in this book. This time they exchanged roles; Craig was an excellent commissioning editor, patiently exchanging emails with me for weeks while I went through at least a dozen ideas before finally settling on the proposal for this book. Then Stephen stepped in as editor extraordinaire to read the completed draft, helpfully suggesting improvements to both content and structure, whilst also solving numerous assorted crimes agai nst grammar.

  I’d also like to thank the rest of the team at Harriman. Through speaking at conferences, I have now met several other authors of trading books. Having listened to them complaining about their publishers, I appreciate mine even more.

  Finally, I would like to thank my family. Living with a middle-aged writer probably isn’t quite as bad as living with an aimless middle-aged man, but it is not always easy. Without your love and support I wouldn’t be able to do this.

  Publishing details

  HARRIM AN HOUSE LTD

  18 Co llege Street

  Petersfield

  Hampshire

  GU31 4AD

  GREAT BRITAIN

  Tel: +44 (0 )1730 233870

  Email: enquiries@harrim an-house.com

  Website: www.harrim an-house.com

  First published in Great Bri tain in 2019

  Copyright © R obert Carver

  The right of Robert Carver to be identified as the Author has been asserted in accordance with the Copyright, Design and Paten ts Act 1988.

  Hardback ISBN: 978-0 -85719-721-4

  eBook ISBN: 978-0 -85719-722-1

  British Library Cataloguing in Publ ication Data A CIP catalogue record for this book can be obtained from the Brit ish Library.

  All rights reserved; no part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of the Publisher. This book may not be lent, resold, hired out or otherwise disposed of by way of trade in any form of binding or cover other than that in which it is published without the prior written consent of th e Publisher.

  Whilst every effort has been made to ensure that information in this book is accurate, no liability can be accepted for any loss incurred in any way whatsoever by any person relying solely on the information conta ined herein.

  No responsibility for loss occasioned to any person or corporate body acting or refraining to act as a result of reading material in this book can be accepted by the Publisher, by the Author, or by the employers of the Author.

 

 

 


‹ Prev