Systematic trading

Systematic Trading: I sit on my bum and pontificate whilst these bad boys do all the hard work


I DO NOT OFFER PAID FOR TRADING COURSES OR ANY OTHER SIMILAR PRODUCT. IF YOU GET AN EMAIL ALLEGEDLY FROM ME OFFERING TO SIGN YOU UP FOR ANY OF THESE IT IS FROM A FAKE ACCOUNT. PLEASE DELETE AND REPORT.

I spent 7 years working for AHL, a large systematic hedge fund (earlier in my career I also spent about 18 months trading exotic rate options for an investment bank, Barclays Capital). My first job was to develop and manage a systematic mult-asset global macro trading strategy. Subsequently I managed a multi billion dollar portfolio of fixed income strategies (futures, swaps, bonds and credit derivatives). See the 'about' page for more.

Since leaving the hedge fund industry I have written a live systematic trading system written in python and using the interactive brokers C++ API interfaced through swigiby, which I have traded my own money with since April 2014. The system trades nearly 40 futures markets with an average holding period of several weeks, and has a mainly trend following character.

I currently teach a Masters in Finance elective course on Systematic Trading Strategies at Queen Mary, University of London.

I post regular updates on my trading, answer questions and discuss different aspects of systematic trading, on this thread at elitetrader.

I have written three books on trading:

Systematic Trading, 2015


Leveraged Trading, 2019


Advanced Futures Trading Strategies, 2023





You can also get my open source python backtesting and futures trading system from github.

Here is my best attempt at grouping my numerous blog posts on systematic trading. Some posts may be repeated under different categories.

 

Careers advice

So you want to be a quant trader?


Inexperienced traders

 Seven deadly sins of trading

What is the right way to set stop losses

How much risk should we take?
How fast should we trade?


My own trading system

My trading system (as of December 2021)
Writing a simple execution algo
Why I don't like short end german bonds anymore 
Simulating my futures system  
A tale of two positions
Obligatory Brexit Post (Will I be okay?)
Obligatory Brexit ex-Post (Yes)
Building a garden trading office
Adding new instruments: Bitcoin micro futures


My own trading system: Performance

Trading performance: year one 
Trading performance: Year two
Trading performance: year three
Trading performance: year four
Trading performance: year five
Trading performance: year six
Trading performance: year nine (part one, part two)


Forecast strength and risk

Follow up: A better method for dealing with correlation uncertainty


Trading rules


Portfolio construction


Optimal Leverage and Kelly


Trading with a small(ish) account




Trading speed


Other

Why you shouldn't employ too many geniuses
Capital correction
Reflections on QuantCon 2017
Obligatory BitCoin post
Vol targeting and trend following
Is trend following dead?
ATR vs standard deviation
Absolute or relative momentum?
The State of Vol


Python code used in the book "Systematic Trading"

Python code for the trading rules in the book
Python code for optimisation (one period and bootstrapping), and producing different sample periods
Python code for optimising in the presence of costs with pysystemtrade


How to get interactive brokers native python API working

How to get python and interactive brokers API interacting via swigby 101

(Deprecated: I suggest using the native python API instead - see the above series of posts)

Start here
Getting historic, snapshotted prices
Getting real time streaming prices
Placing orders and receiving fills
Getting positions and accounting information



A guide to the nuts and bolts of implementing a systematic futures trading system 

Data capture
Futures rolling
Deciding positions 
Execution 
Accounting
Checks and balances



Pysystemtrade - my open source python backtesting engine

Original motivating post

Estimating forecast scalars

Instruments weights, correlations, and diversification multipliers

Optimising in the presence of costs

Developing a new trading rule - breakout

Capital correction

Docker and automated trading systems

Adding new instruments: Bitcoin micro futures


 

Other articles on systematic trading technology

My technology stack
Things I wish interactive brokers would do with their API software
Writing a simple execution algo
Using sqllite to store data
Using python to calculate your UK tax liability for trading profits
My open source python systemDocker and automated trading systems












78 comments:

  1. hi Rob, are your systems available for purchase , subscription? Thanks, Robin

    ReplyDelete
    Replies
    1. No, never. There's enough material in my book and on this website to reproduce the trading system I use, for free.

      Delete
  2. Hi Rob,
    How does your framework handle the inevitable loss of power or internet connection?
    E.g, maybe your framework detects a condition that requires an order to be placed but the power goes out or your internet connection goes down.

    Given the description of the hardware you use to run your system it sounds like the code is NOT hosted in some datacenter but rather executes in an environment (such as your home) where such a situation can (and does) occur.

    Thanks

    ReplyDelete
    Replies
    1. Hi Robert, Great question. Yes I run my stuff 'at home'.

      There are a number of possible scenarios. In scenario one, I lose my internet connection, but then get it back.

      Some services, eg get account value and get price will fail gracefully (treat what they get the same as a NaN).

      Orders that haven't been submitted will be delayed. Given how slowly I trade, I can live with this.

      More seriously if an order is submitted and I miss a fill then I'll get a break between what I think my position is, and what the broker records say. Right now I lock the position to avoid duplicate trades until I've manually fixed the problem (see http://qoppac.blogspot.co.uk/2015/07/systems-building-execution.html)

      NOTE - there is room for improvement here. I plan to rewrite this process to periodically check all fills received for the day and update the database; then automatically clear any position locks.

      In an extreme situation if a process fails then the cron job will restart it the next day. The only thing that won't restart is the IB API gateway.

      In scenario two I lose power. The system has to be manually restarted. In the short term this is very similar to a loss of internet.

      In an extreme situation (on holiday) I might lose power for a couple of weeks before being able to restart. When I restart the system will backfill all the daily prices and the required trade will then happen. Given the speed I trade at, I've tested the expected effect of this and I can live with it.

      Delete
  3. FC wrote this comment, which I accidentally deleted:

    "Hello! I am super excited about your stuff and that you are UK based. Do you have an opinion about these:
    https://labs.ig.com/
    http://docs.labs.cityindex.com/
    Is the tax advantage worth the development trouble, credit risk and worse bid-ask spread? "

    ReplyDelete
    Replies
    1. I don't have a problem with spread bets, but it's certainly true that if a future was available on the same terms (same tick size) I'd trade the future.

      Usually that isn't the case. For example you can trade FTSE 100 at £1 a point but the future is £10. So spread bets can be especially useful if you have a smaller account, but the wider spread means you'll need to trade more slowly.

      Fortunately my account is large enough that I can just stick to futures.

      I discuss this problem in my book.

      Delete
    2. Excellent - I've already ordered your book. Awaiting delivery from publisher.

      Delete
  4. Hi Rob,I read really great reviews about your book and was adviced by a friend to take a look into it, however, I'm a novice to trading and investing, can you advice me what to read and learn before I start reading your book?

    ReplyDelete
    Replies
    1. Thats a difficult question as it depends on what level you're at and which direction you want to go in. If you want to trade futures then reading Jack Schwagers books would be a good start.

      Delete
  5. Hi Rob,
    Great book. I wanted to let you know that we specialize in executing systematic trading strategies for clients in the futures and commodities markets. We support several different platforms including TradeStation, TradingBlox, Mechanica, and provide access to nearly every CFTC approved product around the globe. If you know anyone that needs help with putting their strategies into the market, we can help with execution and reconciliation and do an excellent job (for over 20 years now).

    Please contact me if you would like to learn more about the services we provide.

    Thank you.
    Shane Wisdom
    www.wisdomtrading.com

    ReplyDelete
  6. Hi Rob,
    first of all, thanks for writing the book, I found it really detailed and helpful.

    I've noticed a minor bug, in a summary just below Table 37, last item "Trailing stop loss when short" has a bug in math: $30 + (4 * $1.5) = $46

    Thanks!
    Goran

    ReplyDelete
  7. Hi Rob,
    In your book you mention how hard it is to overcome the costs in spread betting. For most EU citizens winnings on spread betting is tax free. Is that part of that calculation? Cheers

    ReplyDelete
    Replies
    1. No I didn't include tax in the calculation. But spread betting is around 10 times more expensive than say trading futures. Tax would need to be insanely high on futures to make spread betting more competitive.

      Delete
    2. Ok, yes that is pretty sick. When is the new book coming?

      Delete
  8. Hi Rob,
    Have you done any covered call writing? It seems like a good fit for a systematic trading system. Cheers

    ReplyDelete
    Replies
    1. I haven't, but yes short volatility strategies like this are a good thing.

      Delete
    2. Ok thanks.

      Delete
  9. Hi Rob,
    I came across your website while looking for someone who uses python for trading. Thankfully I found you. I would like to thank you for the informations you share with us.
    I am totally interested in your book. However, I have a question about the content. Do you explain a strategy that you use to trade futures or strategies that can be employed? Because I never trade futures and I would like to start to trade by learning step by step from guidelines of your book if that is the case. What should I expect from your book?
    Thanks in advance.

    ReplyDelete
    Replies
    1. Hi. Yes I explain some basic strategies to trade futures (also ETF's and spread bets). But they assume some familiarity with futures already. Read something like https://www.amazon.com/Trading-Commodities-Financial-Futures-Step-/dp/0134087186/ (first four chapters)

      Also there isn't any python in the book.

      Delete
  10. Hi Rob,

    after reading your book, your blog (here) and your journal (Elitetrader) I decided to give it a try to program a system based on the framework you propose in your book. My question is about the update rate you use during live trading? Your book emphasizes to not trade too much due to the involved costs. On the other hand, from your journal I get the impression that your system runs continuously as time stamps are all around the clock. How often do you refresh/recalculate instrument parameters such as volatility, and account parameters such as volatility target? I was thinking myself to calculate account parameters once per day, preferably on a moment when all instruments are not trading (account value relatively stable). And recalculate instrument parameters once per hour (only when they are trading). Should I sample instrument parameters more often?

    ReplyDelete
    Replies
    1. It depends on your holding period. Currently I probably update too much (hourly), given a holding period of a couple of weeks or more. I could easily update everything daily, and indeed in the next iteration of my code that is what I plan to do.

      Delete
    2. Thank you. As my trading rules will be slow do I expect similar holding periods. A daily update rate will probably be fast enough. However, with several exchanges in multiple time zones involved does that lead to the question: "what is end of day?" Maybe I'll decide to take action at the end of the trading day of each involved exchange.

      Delete
  11. Hi Rob, I think I noticed an error in your new Carry calculation worksheet (https://docs.google.com/spreadsheets/d/1ipugeBCk_W-K4_9wnQmU6RfVvZoIRzFfKrw3ly-h8QA/edit?usp=sharing). Cell G22 has: "=IF(AND(C22<>0,F22<>0,C22-F22),C22-F22,G21)". I think you should delete the third element in the "And" function.

    ReplyDelete
    Replies
    1. Fixed. Thanks a lot

      Interesting how Excel casts into logical type.

      Delete
    2. Glad to help, thanks for all your advice in response to all my posts. I have been paper-trading your "Chapter 15" system for a few days now. Could you please confirm the following with regard to your carry strategy: On November 4th, the closing price of Dec 2016 Eurodollar was 99.075, and the closing price of Jan 2017 Eurodollar was 99.070. Therefore the trading signal would be long. So, I should be long the Jan 2017 contract, correct? What if the spread was significantly higher on the Jan 2017 contract. Would it be okay to go long the Dec 2016 contract? Would there be any reason to look at the Jan vs Feb 2017 contract, or should we always be looking at the closest two contracts in determining the forecast? Thanks.

      Delete
    3. Which contract you should trade I discuss more here: http://qoppac.blogspot.co.uk/2015/05/systems-building-futures-rolling.html . How to measure carry I discuss more in the appendices of my book.

      Delete
  12. Hi Rob, in your book you mention that is preferable to measure carry on equity futures by using the spot price. Yet, in your python system, for EUROSTX, you use the further contract (which is not held) versus the nearer contract (which, of necessity, must be held). A second question, if I may: you mention in your book that you target 37.5% annual volatility in your own futures system, but fundseeder reports your annual volatility at about 8%. Do you know why? Thanks.

    ReplyDelete
    Replies
    1. a) It's preferable to use spot, but I don't personally do it because of the hassle of getting sychronised data.

      b) I can't remember exactly what I said in my book but I target 25%. But the fundseeder figures is lower because I have set a higher notional account value. More here https://www.elitetrader.com/et/threads/fundseeder-my-experience.298394/

      Delete
  13. Hi Rob,
    I've just started live trading your chapter 15 system using you terriffic pysystemtrade code. So far, so good. In the meantime, I was interested in a recent article that described a very profitable yet simple system: If sp500 price is above 200 sma, invest it at 3x leverage; otherwise, invest in Tbills. They got a 27% CAGR, but with a max drawdown of 92%, over a very long backtest. That got me thinking about adding a stoploss feature. So, I have been backtesting a similar system with 4x leverage, but a 4% stoploss that is reset daily. I must be doing something wrong on my backtest, as I am seeing around 50% CAGR with only about a 50% max drawdown. This was backtested on the emini back to its start in 1997. I then bumped up the leverage to 10X, with a 1% stoploss, and I am seeing some crazy returns, with not unreasonable drawdowns. I am assuming a trading cost of $17 per contract. Any idea where a novice like me is going wrong? Thanks.

    ReplyDelete
    Replies
    1. A few things:

      a) it's not unknown to find relatively simple things that deliver a high SR on a single market. You don't know if the original authors found that by luck (this was the first thing they tested) or by testing lots of variations first. In eithier case it's dangerous to assume this SR is reproducible
      b) your backtest now contains futher 'implicit' fitting (trying different stoploss variations) which probably means your sharpe ratio is overstated due to overfitting
      c) as a long only system your returns are overstated because past equity returns and t-bill returns are likely to much lower in future (mainly due to lower inflation)
      d) because the realisable SR is probably a lot less than you think, running it with high leverage is extremely dangerous
      e) these kinds of systems (stocks or T-bills) are toxic with leverage because they have low average risk, but high peak risk. A market shock when you are 100% in equities and 10 times leverage will kill you before you can get out of your position.
      f) With a 1% stoploss you're going to be trading almost every day with a very short holding period. You need intraday data and you need to test the effect of delaying your fills for an hour... up to a day or even several days (think October 87 or September 2001). You also need to make sure your trading costs are spot on. What % of your account are you paying in costs annually?

      A pure test of this would be to run it on lots of markets, testing different SMA variations, testing different stoplosses, and allocating amongst these variations out of sample using price history that has realistic, and being conservative with fill times. You'd get a much lower SR.

      The basic idea of your system probably isn't crazy, but running it at 10x leverage IS crazy. Have another read of my book because there are many mistakes you're potentially making which I talk about at length in the book.

      Delete
    2. Thanks for your comprehensive reply, Rob. I guess my main mistake was in assuming that my stoplosses would get filled fairly quickly with an acceptable amount of slippage. I didn't realize that they could be delayed several hours or days.

      Let's go back to the less outrageous system which is 4x leveraged. Let's assume another October 1987. Would my 4% stoploss be filled at close to 4%, or is that a naive assumption?

      Delete
    3. It's safest to assume you'd have been filled at the low for the day - down around 22%.

      Delete
  14. Robert, thank you for the invaluable information you collected and spent the time to share.
    While looking at your method to retrieve account and positions info from IB, one of your two "Getting positions and accounting information" links showed as broken.
    The goal was to check how your code returns from a failure/crash (Python, system...) and attempt to restore the position prior to the crash. E.g. does the code saves in a database position and account after each trade for future disaster recovery and reporting?

    Thanks,
    Lionel

    ReplyDelete
    Replies
    1. Can you tell me which page the link is on, and the address it is trying to link to.

      To answer your question though, yes the current state is stored in databases.

      Delete
  15. Robert,
    In trading I see that intraday price volatility is more than expected by standard deviation of daily returns. I think it's because only day close prices are used. What if I get daily volatility in different way, based on returns, which are maximum price move from previous close? I.e. I use High, Low of current day and Close of previous day and I compare abs(High/Close - 1) vs abs(Low/Close - 1) to get bigger, but store its value with sign, not abs. Then EMA smoothing as usual. I've tested the method and for my instruments it shows volatility about 30% more than original method. It enables to avoid big capital moves intraday, but, I cannot understand, it decreases profits or doesn't decrease, because capital used to get positions becomes smaller...

    What do you think?

    Sincerely, Julia

    ReplyDelete
    Replies
    1. You shouldn't expect this to increase or decrease your profits but it is true to say that adding more information (eg intra-day price movements) should give you a better forecast of volatility; so if you measure expected versus realised vol it will probably come out slightly better

      Having said that you aren't comparing apples with apples; your measure will indeed be biased compared to a daily standard deviation of returns, so you should adjust your risk target to compensate for this

      Delete
  16. Hi Rob,

    Working through the books as multiple members in my circle recommended. Would you have thoughts on a way to incorporate MAR or CALMAR instead of Sharpe? From what I’ve seen, you get penalized for upside volatility from sharpe (that is sudden portfolio size increases will hurt your sharpe). Would love to hear your ideas if you have any.

    Thanks!

    ReplyDelete
    Replies
    1. Depends what you mean by 'incorporate'. I can think of two places where I use Sharpe Ratios in calibrating trading systems. (i) As a performance measure when deciding what the forecast or instrument weights should be and (ii) in deciding how much leverage to use. For (ii) the Sharpe ratio is only a weak input since we're normally running with much less leverage than the Sharpe would suggest under full Kelly criteria. For (i) in principal you could use other performance measures.

      I don't personally like MAR because maximum drawdown isn't a very robust statistic (drawn off just one observation) and also it's interpretation isn't very intuitive (it depends on the amount of time the strategy has been trading). CALMAR makes even less sense, since apparently it only uses the last 3 years of history.

      Delete
  17. Hi Rob,
    Pysystemtrade calculates instrument correlations based on the past N days of returns. Might it make more sense to base the correlations on the most recent high volatility day (eg., early Feb 2018), since it's at those points in time that diversification really matters? Also, it's at those times when every instrument seems to have a correlation of close to either +1 or -1 to each other. Thanks.

    ReplyDelete
    Replies
    1. You could do that but it wouldn't be correlation, it would be https://en.wikipedia.org/wiki/Tail_dependence you are measuring.

      Personally I prefer to measure correlation, and then I impose a risk overlay which measures risk assuming all correlations go to 1,-1 (I'll be blogging about it soon)

      Delete
  18. Hi Rob,
    In playing with pysystemtrade, I wanted to see what happened if I removed the possibility of any short positions. I have heard that long positions usually are more effective than short positions when it comes to trend following. So, I basically added a line to your forecasting file that brought the forecast to 0 if it was negative. The result was a huge bump in sharp from .82 to .95. Do you think this is a reasonable tweak to be made to the system?

    ReplyDelete
    Replies
    1. Well it completely changes what you're doing - it won't be as diversifying to a long only portfolio. Plus that isn't a statistically significant Sharpe increase.

      Delete
  19. Hi Rob,
    Thanks for your help on my last two questions. I was looking at the carry forecast recently between LIVECOW and SOYBEAN, and I noticed that the price pattern between the two was the same, with the nearer contract being consistently greater than the further contract. This would indicate that the further contract (which I am holding) would go up in price over time. But the capped carry forecast from pysystemtrade for SOYBEAN is +20 and for LIVECOW it is -20. Do you know what could cause this? Thanks, again.

    ReplyDelete
  20. Hi Rob, I have technical question:

    Would it be possible to develop an Algo code in C, that it could connect to IB-Api? I'm aware IB-Api comes in several languages but C, the nearest is C++ which is not C.

    I'd appreciate your opinion in this tricky matter.

    Thanks!

    ReplyDelete
    Replies
    1. Sorry for the delay in responding.

      In theory yes, but I'm not a C or C++ programmer. Try asking here https://groups.io/g/twsapi/topics

      Delete
  21. I was looking for some trading tips then i have visited your blog and found very useful tips. Please suggest some stock tips in future.

    ReplyDelete
  22. Hi, Where can I purchase this one? Is this could be help about trading? I will try this guide with FxLeaders soon!

    ReplyDelete
  23. Hi Rob, would it be possible for you to post the ewmac formula here, as a working example with a few days data. I have copied your formula from Appendix B, but would like to check I have it correctly. I will be using in excel and Aspen Graphics. Looking at real numbers would be a great help. Regards

    ReplyDelete
    Replies
    1. From here

      https://www.systematicmoney.org/systematic-trading-resources

      Spreadsheet: EWMAC calculation example

      https://docs.google.com/spreadsheets/d/1UC6iLz5ySWDztYKhRxeTMeeGFDhIdfltXRM25P3ecWo/edit?usp=sharing

      Delete
  24. Hi Rob,
    I need your advice on setting up risk controls. I trade fx spot (20 times leverage for HK accounts) and just one symbol GBPJPY; fx futures and future options (CME provided leverage) for trading EUR to make most of Span margin system. Trading and risk managing manually. Returns r too good to be true 10% a month (9 pc drawdown). since fundseeder has captured it so I have to believe it.
    I want to make an auto trader for Interactive Brokers for GBPJPY with lots, risk and margin management rules. How do I go about it. Manually, I estimate duration of trend and post limit orders hoping to catch climax of exhaustion. No impulsive trading. I start always with 1 standard lot and then average it if climax estimated by me does not materialises. Maximum lots used by me to average have been 5. But when retracement happens returns are quick n substantial. For auto trader I want to design lot management and stopout level and link it with drawdown or equity level. What kind of filters should I use to control drawdown and equity.
    Thank you.


    ReplyDelete
  25. Hi Rob,
    I need your advice on setting up lot and risk controls. I trade fx spot (20 times leverage for HK accounts) and just one symbol GBPJPY; fx futures and future options (CME provided leverage) for trading EUR to make most of Span margin system. Trading and risk managing manually. Returns are too good to be true 10% a month (9 pc drawdown). since fundseeder has captured it so I have to believe it.
    I want to make an auto trader for Interactive Brokers for GBPJPY with lots, risk and margin management rules. How do I go about it. Manually, I estimate duration of trend and post limit orders hoping to catch climax of trend exhaustion taking into account the probability of daily pullbacks and daily average pips as a measuring scale . No impulsive trading. I start always with 1 standard lot and then average it if climax estimated by me does not materialises. Maximum lots used by me to average have been 5. But when retracement happens returns are quick n substantial. For an fx spot auto trader I want to design lot management and stopout level and link it with drawdown or equity level. What kind of filters should I use to control drawdown and equity.
    Thank you.

    ReplyDelete
    Replies
    1. Apologies for the slow response to your comment. 99% of the comments I get are spam, so inevitably when deleting them a few real comments get overlooked.

      That's an absolutely huge question you've asked (in fact really it's lots of questions), and all I can do is point you to the advice elsewhere in this blog and in my books "Leveraged Trading" and "Systematic Trading".

      Delete
  26. Hi Rob,

    A bit embarrassed to ask this question.

    I have been using Amibroker for designing systematic trading strategies since afl is quite easy to learn (as I belong from a commerce/management background).

    Question is ...
    Would your book still be helpful as you have been designing all your strategis on Python (no experience whatsoever on Python)?

    Secondly - How difficult would it be for a commerce guy to get hold of python?

    ReplyDelete
    Replies
    1. You can implement the strategies in the book on a spreadsheet. I have an ex-colleague who implemented them in Amibroker.

      By 'commerce' I guess you mean non programmer, and by 'get hold of' I assume you mean learn. It's hard for me to say as I have been programming for a very long time, but python is easier to learn than say C++ or Java.

      Delete
  27. Hi Rob,
    In the MA crossover rule from the starter system, should we do the calculation on :
    - BID prices
    - ASK prices
    - the average of BID/ASK for each given day of the serie

    I was planning to start with AUDUSD as a spot CFD. Thanks to your books, I have reviewed the costing section from my broker (IG) T&Cs and they will apply funding charge based on tom-next rate + an admin charge they say would be small but is not disclosed in details. Would you have any way on elaborating on this tom-next concept and how to calculate it ?

    They also explain this would not happen on the corresponding CFD based on the future AUDUSD as this is included in a wider spread. So I might look at this option with a 2000Eur equity.

    Looking forward to read you.


    Kind Regards,

    Sébastien
    PS: thank you for your books - I was dreaming of an ichimoku automated scalping system (without calculating the risks) and I am now convinced the starter system is the one to follow (with a bit of JAVA)

    ReplyDelete
    Replies
    1. It doesn't matter so much, but average of bid/ask is probably best.

      The 'tom-next' rate will be based on the difference in interest rates between AUD and USD two days forward, as that is when the trade settles. Problem is a 'small' admin charge has a habit of adding up over a year. I'd personally trade the CFD based on a future ('undated' in my terminology) if you have the capital.

      Delete
  28. Hi Robert,

    How to understand TURNOVER usage? I am reading book "Systematic Trading". On page 306, for stauch systems trader, there would be tradings almost every day, the TURNOVER for the system should be around 260, but on page 298, for different EWMAC rule, the TURNOVER is very small.

    It is confusing me that in real trading, the TURNOVER is around 260, why do we can use specific TURNOVER for different EWMACs.

    Thanks.

    ReplyDelete
    Replies
    1. You need to read carefully again what the definition of turnover is. It is irrelevant whether you trade every day or not. Imagine you have an average position of 256 lots. Every day you buy or sell 1 lot. But your turnover would be once a year.

      Delete
  29. Hello Rob,

    Thank you for your books. I have two questions regarding your system:
    1. What time during the day you recommend to run the program to rebalance the positions if you trade forex (EUR/USD) using your rules? Should it be early in the morning at, say, 8.30 am, London time? And,
    2. When closing positions, shall older positions be closed first or newer positions first meaning shall it be FIFO or LIFO?
    If you wrote about these issues previously somewhere, would you point at them as I wasn't able to find them.

    Thanks in advance,
    Much appreciated,
    Munkh

    ReplyDelete
    Replies
    1. 1. When the markets are liquid

      2. This question makes no sense to a futures trader

      Delete
  30. wow rob, i just notice you have a new setup! great one!

    ReplyDelete
  31. Hello Rob. Quick question on Systematic Trading.

    You quite often refer to the expected risk of the portfolio (blog, ET), and for me its a bit confusing.
    Is it as simple as the total of "I" (Instrument Value Volatility) in numerous tables throughout ST?

    If not, are you able to refer me to a blog post / writing that talks about how you calculate Expected Risk of Portfolio?

    Thanks

    ReplyDelete
    Replies
    1. Just the standard formula with covariance matrix and weights.

      Delete
  32. Hey Rob,

    Thanks so much for all your work to publish your methods. A quick question. I just installed pysystemtrade and began backtesting. You frequently say on TTU that the addition of carry to more classic trend following rules increases the sharpe at the expense of positive skew. I tested a simple combination of 6 iterations of breakouts and 6 ewmacs that you use in rob_system, and over ~70 instruments and since 1975, get a skew of only 0.036. Adding carry to the mix actually substantially increases the skew to ~0.2. What am I missing?

    Thanks again
    Chris

    ReplyDelete
    Replies
    1. are you using daily returns? or monthly?

      Delete
    2. Ah, daily. There was a well-timed discussion on this in part 2 of the holiday special of TTU. Thanks!

      Chris

      Delete
  33. Hi Robert, I have finished portfolio design with cash weights ( and forecasting) per Smart Portfolios. I am currently following the methodology for Asset Allocating Investor from Systematic Trading to fine tune my trading strategy for these ETFs. In [Chapter eleven example tables.xlsx] I think it is safe to add another row titled [Trade (with position inertia)] that would check if current position is between +/- 10% of Rounded target position using the formula =IF(AND(B21*1.1>=B22, B21*0.9<=B22),"No", "Yes") ( to be entered in cell B23) Cheers ~Rohit

    ReplyDelete
    Replies
    1. Do what you like but I'm not changing the spreadsheet - there is already an example of implementing position inertia here https://docs.google.com/spreadsheets/d/1Q3PZ_bD_zKw2bGmshZFxHnR0hhEX4YNhjoYWhyeHWG4/edit?usp=sharing

      Delete
  34. Hi Rob,

    Another question from Systematic Trading (Appendix D) where you show computation of EMA of volatility. The text uses returns (A2 - A1) / A1 and so on. But the spreadsheet in the resources is using just the differences in prices, (A2 - A1). Was it intended that way?

    Thank you
    Ashu

    ReplyDelete
    Replies
    1. LInk to the spreadsheet please?

      Delete
    2. sure and thank you ...

      https://docs.google.com/spreadsheets/d/1B-4AsflWQIdKu3CDimQw4aMNAlhVeF01LvNAenRexLs/edit#gid=1193466770

      Delete
    3. Because that's a different vol, vol of price changes not % changes, which is what is used for normalising EWMA. Reread the chapter on forecasting, chapter 7

      Delete
  35. Hey Rob,

    In the Systematic Trading book, at the end of page 197 and beginning or 198 - you suggest that one should "compare your estimate of cash risk of the existing position (the ICV) to the value you had yesterday" ... By CASH RISK - do you mean the underlying 'cash instrument' (like a stock or a bond or ETF)?

    Thanks
    -a

    ReplyDelete
    Replies
    1. "the cash risk of an existing position (the instrument currency volatility defined on page
      158).... " No, as it says I mean the ICV which is defined on page 158

      Delete
  36. ohh shoot ... thank you for pointing that out.

    ReplyDelete

Comments are moderated. So there will be a delay before they are published. Don't bother with spam, it wastes your time and mine.