Position sizing is an important topic but many investors don’t give it much thought.

In this article I will look at a method that uses the RSI indicator to size positions. This means we can buy more when the price is low and buy less when the price is high.

Simple RSI-2 Trading Strategy

Before we look at the impact of dynamic position sizing with RSI we first need a trading strategy that we can use to compare our results.

For this, we will use a basic end of day mean reversion strategy based on the RSI-2 indicator.

Very simply, we are going to go long SPY when the RSI-2 indicator is less than 25 and we are going to sell when the RSI-2 is more than 50.

The Relative Strength Index (RSI) is a momentum oscillator that calculates the speed and change of a security’s movements.

The following results and equity curve show how the strategy has performed between 1/2000 – 1/2017:

CAR: 7.12%
Net Profit: $55,466.51
Max Drawdown: -23.82%
CAR/MDD: 0.30
Win Rate: 68.09%
Risk Adjusted Return: 23.39%
# Trades: 445

Buy/Hold CAR: 4.51%
Buy/Hold MDD: -55%

positions sizing with RSI 2 on spy equity curve

As you can see, this simplistic system has done fairly well on SPY over the last 17 years and has beaten buy and hold.

However, the focus of this article is not the strategy performance but the impact of different position sizing.

RSI Position Sizing

To understand this, I will run the same test but this time the position size will be determined by the previous bar’s RSI-2 value. The formula we will use is as follows:

Percent of Equity = 50 – RSI(2)

In Amibroker, this can be written as follows:

pctPosSize = 50 - Ref(RSI(2),-1);

This formula means that our position size will change in response to how oversold the stock is. When RSI-2 is low we will buy more shares and when RSI-2 is high we will buy fewer shares.

As an example, if RSI-2 closes at a value of 10, we will use 40% of our equity (50 – 10) on the next trade. Likewise, if RSI-2 closes at 22, we will use 28%.

Using RSI 2 for position size example

Since our buy rule requires RSI-2 to be under 25, and because RSI is a bounded oscillator, the highest our position size can go is 50% and the lowest is 25%.

The following results and equity curve show the performance using this approach:

CAR: 2.69%
Net Profit: $14,292.24
Max Drawdown: -6.94%
CAR/MDD: 0.39
Win Rate: 68.09%
Risk Adjusted Return: 26.99%

positions sizing with RSI 2 on spy equity curve with RSI 2

As you can see, using RSI-2 for position sizing has reduced the annualised return and the overall net profit.

But did you notice that using RSI to set the position size has improved the risk-adjusted return?

Our drawdown has shrunk to -6.94% so we now have a risk adjusted return of 26.99% (as opposed to 23.29%) and a CAR/MDD of 0.39 (as opposed to 0.30).

In short, using RSI-2 for dynamic position sizing has given us a better return for each dollar invested. This means our money is working a little harder.

It also means that we have unused cash that we can use for another strategy.

Some Observations

I think this method works quite well in this example because using RSI for position sizing is in line with the strategy itself.

If you were to use this approach with a different strategy, such as a breakout system, then I’m not sure the results would be as good because the method doesn’t make sense.

Truthfully, I am not 100% sold on this method yet but I thought I’d share it as it could be powerful given the right conditions. It also opens up the opportunity to use other indicators in a similar way.

There are many different oscillators and indicators that could be experimented with. For example:

  • MACD
  • CCI
  • Stochastic %D
  • MFI
  • ROC


The purpose of this article was not to provide a complete trading strategy but to show a different approach to sizing positions.

We have shown that the RSI-2 is a flexible indicator that can also be used to size trades.

Using the RSI in this way means we buy more when the stock is more oversold and buy less when the stock is less oversold.

I have found that this technique can work better than using a percentage of equity, fixed amount or ATR sizing.

I think it’s worth trying this out in your own time and seeing what you can find.

Simulations and charts from Amibroker with data from Norgate.

All simulations assume transaction costs of $0.01 per share and all trades are placed on the next open after the trading signal with no stop losses included.


Tags: , ,

6 opinions

  1. Interesting post – and thanks for sharing! I tend to use fixed fractional position sizing (with some filters/adjustments based on market conditions). But this is a really interesting approach I’m going to give more thought to… 🙂

    • Thanks Jay, hope you find something interesting.

    • Sudharshan

    • October 1, 2017

    • 11:41 pm

    • Reply

    Good stuff. I find the articles to be very informative without any pretensions of being a guru making millions while trying to sell you a $97 trading system ( I have no issues in people selling stuff per session ).

    Lot of food for thought. Do you provide only amibroker code..are there any articles on the nuts and bolts of Amibroker.

  2. Thanks for your comment. You can filter by category to see all the Amibroker posts https://jbmarwood.com/category/amibroker-2/

    • Nick

    • October 4, 2017

    • 9:52 am

    • Reply

    Very cool. You can take it a step further with a multiplier, then optimize it and compare versions. Something like this:

    Multiplier = Optimize(“Multiplier”,1,.1,5,.1);
    pctPosSize = 100 – (Ref(RSI(2),-1)*Multiplier);

    BTW I´m enjoying your site a lot..

Leave a Reply

%d bloggers like this: