Position sizing is a technique that consists of adjusting the size or the number of shares/contracts of a position before or after initiating a buy or a short trading order.
Position sizing is very important and if applied correctly, it can dramatically improve your strategy performance and help you avoid ruin.
The default QuantShare position sizing method is based on a fixed percentage of the current portfolio equity.
Here is an example of how this works:
Your portfolio equity is $10,000 and the maximum number of positions allowed in the portfolio is five.
This means that each position will get around 20% of the portfolio capital. In this case, the simulator or portfolio will enter approximately $2000 worth of shares for each trade.
In the rest of this article, we will show you different position sizing strategies and we will give you, for each one, a link to a money management script that you can add to your trading systems.
Note that money management scripts are executed when you backtest a trading system or when you get new signals from a portfolio.
Fixed Dollar Amount
This basic money management technique consists of entering a fixed dollar amount for each new trade. The first thing that you should notice when applying this technique is that the number of positions in your portfolio will increase as your portfolio equity increases and it will decrease when the portfolio equity decreases.
If the portfolio equity is equal to $10,000 and you want to invest only $1000 per trade then the simulator will take approximately 10 positions. When your portfolio equity increases to $50,000, your portfolio will have about 50 positions.
Position Sizing: Fixed Dollar Amount
Fixed Risk per Trade
The money management script behind this position sizing technique uses three variables to control the amount to invest per trade.
The different variables are:
Stop loss: The maximum stop loss allowed for each trade.
Risk per trade: How many percentage of the trading capital you want to risk for each single position
Maximum Risk: The percentage of the capital that you will invest
Fixed Risk per Trade - Position Sizing
Volatility based Position Sizing
The historical volatility of each new asset to buy/short is analyzed and then the number of shares to enter is updated according to the asset's volatility. The higher the volatility the higher the risk and therefore the script will reduce the number of shares to buy.
In this script, the volatility is measured using the 10-day standard deviation.
Historical trading volatility-based system to adjust trade sizes
The Kelly criterion is a very popular position sizing technique developed by John Kelly, a scientist who worked at Bell Labs.
It is based on two measures, which are the winner probability and the win/loss ratio.
The Kelly criterion script will calculate a ratio based on the above measures for the N-previous trades and then it will tell you the maximum percentage that you should invest in any single stock or asset.
Investing in stocks using the Kelly criterion money management strategy
Averaging Down is an effective strategy if applied to the right trading system. In a long strategy, averaging down is the process of buying more shares of a position (scale-in) when the price of the underlying asset is dropping. This allows you to buy the asset at a cheaper price and thus to lower your average cost.
As always, the backtesting process is your friend. Take your trading systems, apply the averaging down script to each one and see if this helps improve the performance.
Averaging Down Money Management Strategy
Optimizing Position Sizing Variables
Money management algorithms behind the different position sizing techniques allow you to specify the value of some variables. As an example, you can specify the fixed amount to invest for each new trade when using the "Fixed Dollar Amount" position sizing technique.
Here is how to optimize a variable using the "Kelly Criterion" script:
- Create a new trading system then add the Kelly Criterion money management script to it
- In the simulator manager (Analysis -> Simulator), select your trading system
- In the right panel, under the "Kelly Criterion" tab, you will see the different money management variables that you can update
- "Max Positions" for example allows you to define the maximum number of positions that your portfolio can hold at any moment
- Click on the "+" icon under "Max position" to display the optimize settings
- Type the "from", "to" and "increment by" numbers then click on "Save Money Management Inputs"
- Click on "Optimize"
Optimizing variables of a money management script is a very powerful feature that you will not find anywhere else.