Position Size Management – Performance based increases

Forums ProRealTime English forum ProOrder support Position Size Management – Performance based increases

Viewing 15 posts - 1 through 15 (of 30 total)
  • #35351
    Maz

    Hi all,

    I wanted to open a discussion(s) on position size management techniques. Any serious production system should have an awareness on risk. I sometimes see code attempts to dynamically adjust position size – but this is something I’d like to see more focus on here.

    Generally, the better a strategy is doing, the more risk it can be allocated; and as a strategy begins to under perform, risk should be reduced and re-allocated to other strategies. If you have a library of automated trading systems running then you’d want them working together so that overall, you are dynamically shifting risk to the best performers from the worst performers.

    I’d like to invite anyone to get involved here and share their ideas (code or english) on sensible position size management strategies for PRT (or indeed for any systems).

    I’ll kick this off by sharing a couple of snippets.

    1. Average Consecutive Winning Streak based risk increment
      With this risk increment system, we look at the system’s winning streaks – how many consecutive wins we get in a row. Throughout the system’s running lifespan, we continuously measure the average winning streak (average number of winning trades in a row when a streak occurs). If the current number of wins is greater than our average wining streak (AKA the system is seriously on a roll), we then increase our risk by 1 unit of measure whatever that may be. Here’s the code

      Note that of course you might want to monitor the consecutive losers – and if so, there would be a process for risk reduction on that basis.

    2. Daily, weekly or monthly performance review
      With this kind of a system you look at strategy profit every so often – weekly or monthly etc. If we did well, we increase risk. If we did badly, we reduce risk. Here’s a simple implementation:

     

    There are many more strategies for risk management. The above hardly scrapes the surface. Let’s get a discussion going and perhaps we can end up with a few good snippets. Attached are screen shots of the above snippets.

    All the best,

    M

    7 users thanked author for this post.
    #35362

    Great idea. The first snippet is good, but we should only allow the positionsize to increase if the average consecutive wins is calculated with at least enough trades to get a relevant average.

    About the second snippet, I’m not so enthusiastic, because I know that the performance of a strategy is very often monthly, but it is a human dimension, a division of time that passes that should not affect a decision to increase its risk or not. If we think about it well, the mathematical concept has little interest in an “ordinary” strategy, but obviously it will affect profitability exponentially a strategy that is already gaining with fixed position size.

    Position size management according to equity curve and statistical studies (standard deviation, ..) have already been discussed here, I’ll try to find these codes and post them here.

    I’m looking forward for further interesting development here! 😉

    #35378

    The first snppet really is great and an actual enhancement to the PRT backtest suite.

    Unfortunately PRT does not allow for partial close in real trading so I have not yet got around to scale in and out of trend following positions with a live system.

     

    #35384

    Hello,

    is an interesting topic. I tried at the beginning something very easy calculate the Strategyprofit/drowdown, but this was not satisfying, if he after each trade make this.

    I use now, belongs to market and strategy a system, which makes basically the same, but only every month, half year or once a year…

    It is maybe not the most profitable way, but it works well and increase the outcome statically.

     

     

    #35612

    @ Maz – Many thanks for your post, it is an excellent bit of useful code. I had wanted to employ this kind of management but was not proficient enough at the time to develop it.

    Another way of assessing these statistics is to also look at maximum streaks – ie if in the past the streaks usually end at 5-6 then it may be an idea to actually reduce your position sizing past this point as there may be a higher probability of the streak ending.  Therefore, in your example above, you would increase after 4 wins and reduce (or even go to zero) after 6 wins. Only backtesting your particular strategy would show if this proves to be more effective. This is perhaps more suited to strategies that are looking to pick the “meat” of the trade rather than squeeze out every last drop from the edges of the trend. For the latter situation of course you can still employ  the above as long as you have a competent stop loss system in operation.

    Also, if your strategy is one that has a reasonably high win rate, you may choose to look at the losing streaks. If they usually end at 2-3 then at your next trading signal you would increase your position by +1 as its more likely that your next trade will be a winner. Note that in this situation you would probably have to build in some sort of system cutoff (maybe at 5-6 losses) in order to avoid a scenario where the losing streak continues for a long time (thereby also creating new statistical maximums).

    The better way to employ this would be perhaps to run two separate codes for long and shorts so as to not introduce anomalies that are only unique to one or the other and risk “cross-contamination” of streaks. Or you can do this within one code as long as you separate the streak calculation of the shorts from the longs. Eg so if your next signal was a long, the code would look at the long streaks section to decide how to position size etc. Again, only backtesting your strategy would show if this is of any value to consider.

    All this of course (as Nicolas pointed out) relies on having a decent history and statistical data set (of streaks) so that you can rely on it effectively as your backtesting would need a reasonable number of trades and over a long time period.

    Great topic, I look forward to opinions from the rest of the forum. Thanks again.

    1 user thanked author for this post.
    avatar Maz
    #35613

    Another way of assessing these statistics is to also look at maximum streaks – ie if in the past the streaks usually end at 5-6 then it may be an idea to actually reduce your position sizing past this point as there may be a higher probability of the streak ending.

    Exactly! Statistical distribution of the winning streak: if it exceeds, let’s say, 1 standard deviation, the position size should be reduced.

    1 user thanked author for this post.
    #35835

    Here is another solution. Fixed fraction method from Ryan Jones.

    When the stategyprofit exceeds a specified fraction the positionsize is increased. This increase is always measured per contract. So in this example the postionsize increases to 2 contracts at 1000 strategyprofit. Then it takes 2000 in profit (3000 in total, fraction x 2+1000) to increase to 3 contracts and so on. Of course the positionsize is decreased in the same way when the strategy is losing.

    Compared with fixed ratio MM this method has the advantage to increase the positionsize faster in the beginning and slower when there is a lot of profit what is IMO superior.

     

     

    6 users thanked author for this post.
    #38756
    Seb

    Hello, great (often underrated) topic!

    Is there anyone who tried coding a percent risk model yet?

    for example a long position on a €1 mini contract: position size = (x% * equity)/(risk per contract) = (x% * equity)/(last tick – stop level)

    The number then should be rounded down somehow by the minimum amounts of contracts. I don’t know if it is possible to refer to the last tick in a candlestickchart to determine the risk.

    Would be very helpful I suppose

     

    #39103

    Thanks Maz for a great topic! Great points about sizing down after a longer winning streak – the equity curve is most likely mean reverting too.

    Personally I use excel to manage my position sizing so that it fits with the whole portfolio of systems I’m running and therefore I don’t use codes for sizing up or down on individual systems because that would change my overall risk (not saying that it’s a bad idea it’s just not how I do it). I use standard deviation and sharp ratio to determine which system is having the smoothest performance (I don’t like a bumpy ride). That means that I rather size up on systems with low volatility and steady performance and keeping it down on systems which may have a greater equity curve to start with but at the same time a more volatile equity curve. This  method comes obviously not without problems. The past volatility doesn’t guarantee a future steady equity curve but if I recalculate it on a monthly basis I can get somewhat close to it. I think it’s important to find a method you are comfortable with and understand what the future short comings may be (ei. if you have several systems on the same market and they all starting to size up – what’s your new risk?) and before using codes to size up think what would happen if the DAX or EURUSD would dip 500 points tomorrow without your stop being executed. Even if you made some past profit to support a larger position don’t forget that you can get crushed 🙂

    1 user thanked author for this post.
    avatar EB
    #40264
    Seb

    Hi Victor, would you mind sharing your e-mail? Would be nice to exchange trading experiences with a fellow Dutchman.

    #40344

    I’ve no problem sharing my mail but you have to ask Nicolas for my mail, think it’s part of this forum’s rule. And a little disclaimer before you get to pleased about finding a dutchman; I’m actually from Sweden. But I do live in the Netherlands.

     

    1 user thanked author for this post.
    avatar Seb
    #80429

    Hi All, not sure if you’re already aware but if you calculate your own equity curve, you can then run the MACD indicator on the equity directly to analyse performance, which works really well apart from overshoot. (rather annoyingly) Pro order (auto trading) doesn’t allow reducing position size during a trade , which I think is allowed on manual trading. @Nicholas do you know if/when this feature will be added to Pro order? Thanks!

    #80436

    About using the equity curve and indicators on it to  improve a strategy, I just wrote an article: How to improve a strategy with simulated trades – part 1

    Reducing position is possible with partial closure, but still not in live trading. It will be available in a few weeks from now, hopefully.

    #80441

    Thanks Nicolas, that’s very encouraging news! Another question: when I set cumulate orders = true, the strategyprofit functions stops working (at least for me). Is there a technical reason for this? I am working on a separate calculation to work around this but it would be useful to understand if there’s a reason for strategyprofit not working with cumulate orders true… thanks 🙂 BTW I am impressed at how to proorder system is improving! I hope it keeps getting better.

    #80461

    Yes, ProOrder keeps getting better because you people are helping to improve it 😉

    STRATEGYPROFIT is calculated with closed orders only, but with the ones that are still on market.

Viewing 15 posts - 1 through 15 (of 30 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login