Position Size Simulator

Post on: 16 Март, 2015 No Comment

Position Size Simulator

In Van Tharp’s Definitive Guide to Position Sizing . Dr. Van Tharp asserts that position sizing is the most important aspect of a trading system. He goes on to say that the optimal position size will vary from trader to trader according to their personal objectives and definition of ruin .

To illustrate, Dr. Tharp offers six definitions of what might be considered optimal. He then subjects a number of theoretical trading systems to a position size simulator in an attempt to find the position sizes that optimize each of the six definitions.

This web page has been constructed to allow traders to experiment with the same theoretical systems, using an equivalent simulator. During the testing of the tool, it was discovered that there are a number of typographical/calculation errors printed in the book, some of which are summarized at the bottom of this page. Email correspondence with the Van Tharp Institute has confirmed that they are aware of the errors. Otherwise, the trader should see generated results that are comparable with what was published in the book.

Note that naturally occurring variance between runs of the same experiment are to be expected, despite using the same parameters. The greater the number of simulations run in an experiment, the more reproducible it will be.

You need a Java enabled browser to use this simulator.

Usage

The simulator will simulate trade results using a percent risk position size for each of 0.2% through 30%, incrementing by 0.2%. Sizing by percent risk refers to limiting the total initial risk of a position to a fixed percentage of equity. For example, assuming a 5$ per share initial risk sized using 1% of a $100,000 initial equity, position size would be 100,000 multiplied by 0.01 divided by 5 giving 1,000/5, or 200 shares.

When running, a busy bar will appear next to the Run button and the input areas will be temporarily disabled. Upon completion, the busy bar will disappear, the input areas will become re-enabled and the results will be output in a tabular format similar to the presentation of the book. Changing any of the input values after a completed experiment will cause the output table to clear its values in anticipation of the next run.

The time required to complete an experiment will depend upon the power of the user’s computer. An aging, single core, 1.4Ghz laptop with 1GB of memory can perform 10,000 simulations of 100 trades in under 10 seconds. The simulator will leverage up to 8 cores, making multi core machines significantly faster.

System

A number of systems have been defined in the book. This simulator presents those defined in Chapter 3 and Chapter 11.

R Multiples

For each system, the R Multiple distribution is presented. Strictly speaking, systems SQN1-SQN7 are closed systems. As such, the R Multiples are exact counts, as opposed to probabilities. For the remainder of the systems, the table represents the probability of any given trade resulting in the listed R Multiple. R is defined as the initial risk of the trade. For example, a stop loss $5 below the purchase price of a stock would represent a $5 initial risk. An R Multiple is defined as the final result of the trade expressed as a multiple of the initial risk (i.e. as a multiple of R). For example, if that same trade closed with a $7.50 gain, then the R Multiple would be $7.50/$5.00 giving +1.5R. Similarly, had the trade closed at a $1 loss, the R Multiple would be -$1.00/$5.00 giving -0.2R.

Basic Information

For each system, summary statistics are provided. Again, for systems SQN1-SQN7, the statistics (e.g. Standard Deviation) should be calculated assuming a total population, as opposed to a sample. However, for simplicity of the simulator, all systems are treated as a sample of trades from a larger population. The difference is negligible for the number of trades being considered. Included in the basic information is a System Quality Number (SQN). This value represents an empirical measure of the quality of the system, where larger values are better than smaller values, and values below 1.7 represent an unreliable system. For most systems, both the standard deviation and the resulting SQN have been miscalculated in the book.

Initial Equity

Initial equity is assumed to be the account balance prior to taking the first trade. In each of the systems evaluated in Chapter 11, the initial equity is stated as being $100,000. The simulator allows a minimum of $10,000 to a maximum of $1,000,000 at $10,000 increments.

Objective

Objective represents the trader’s desired gain by the end of the given number of trades. The objective is expressed as a percentage of initial equity (e.g. an Objective of 300% indicates a desire to have a final equity of at least $100,000 + ((300/100) x $100,000) giving $400,000). In each of the systems evaluated in Chapter 11, the objective is stated as being 300%. However, in some cases the actual objective used appears to have been 100%. The simulator allows a minimum of 10% to a maximum of 1,000% at 10% increments.

Ruin

Ruin represents the loss at which the trader would stop trading the system. Ruin is expressed as a percentage of initial equity (e.g. a Ruin of 50% indicates a tolerance of up to a (50/100) x $100,000 = $50,000 loss). If at any point ruin is reached before the given number of trades, that series of trades is terminated and the next simulation of trades is started. In each of the systems evaluated in Chapter 11, ruin was stated as being 50%. The simulator allows a minimum of 1% to a maximum of 100% at 1% increments.

Trades

Trades is the number of trades to simulate for each simulation. The gain from each trade is calculated as the percent risk (i.e. the position size) multiplied by the running equity multiplied by a randomly chosen R Multiple. That gain is then added to the running equity for use in the next trade’s calculation of gain. In each of the systems evaluated in Chapter 11, trades was stated as being 100. The simulator allows a minimum of 10 trades to a maximum of 1,000 trades at 10 trade increments.

Simulations

Simulations is the number iterations to perform the given number of trades at each of the percent risk increments. In each of the systems evaluated in Chapter 11, simulations was defined as 5,000. That is to say that 100 trades were simulated 5,000 times at each risk level ranging from 0.2% through 30%. The simulator allows a minimum of 1,000 simulations to a maximum of 250,000 simulations at 1,000 simulation increments. A minimum of 10,000 simulations is recommended in order to have repeatable results. More is always better.


Categories
Futures  
Tags
Here your chance to leave a comment!