What would have happened if you had employed a Trading System to build a portfolio during the past year?
Using As-Reported historical data, a Simulation lets you try out
strategies beforehand. The results are displayed as porfolios, which can then be analyzed
using the Porfolio Analysis Tools. Using the results of the
Simulation to adjust the System is referred to as Data Mining.
A Simulation uses the selected Ranking System at every rebalancing period in the past (weekly or monthly), to
compute the Ranks of the Stocks in the Universe. These Ranks are then used in conjuction with
Buy Rules and Sell Rules
to execute trades.
To see a diagram depicting the Portfolio Rebalancing Process click here.
To run a Simulation, you must provide the following parameters:
1. Portfolio Parameters
Simulation Name
Starting Capital
Universe
Benchmark
Commission Each Trade
Slippage (% of trade amount)
Allocation of Cash
2. Ranking System
A Ranking System must be selected in order to run a Simulation. The Ranking System must have
been created before running a Simulation.
Buy Rules add more finer control to the Ranking System. Since the Ranking System
does not eliminate any Stock from being selected, a Buy Rule can be used to force certain
conditions in a similar fashion as the Screener. A typical Buy Rule would be to not buy a stock
if the last price is less than $5. It's very possible for a $5 dollar stock to have a high Rank,
therefore this rule would eliminate it from consideration. This price rule would look like this:
Close(0) > 5
Where Close(0) means the closing price 0 days ago, or the latest price.
Another example of a very useful Buy Rule is 'IndWeight'. It calculates the resulting Industry Weight
in the portfolio if the stock is purchased. This rule can be used to limit the exposure to a
single industry. For example, to limit the exposure to 10%, the following rule can be used:
IndWeight < 10
Implicit-And: Since multiple Buy Rules can be specified, all must evaluate to true (or non-zero)
in order for a stock to be considered.
Note: Buy Rules are optional. If no Buy Rules are specified, the top ranked stocks will be bought untill there is
no cash available.
Sell Rules are needed to sell a position. If no Sell Rules are given, the original positions
will be held throughout the Simulation. A typical Sell Rule is to sell when the Rank drops
below a certain percentile, like 60. This rule could be entered as:
Rank < 60
Implicit-Or: Since multiple Sell Rules can be specified, any Rule that evaluates to true (or 1)
will sell the entire position.
Partial Sells
To sell a partial amount, the Rule should evaluate to a number less than 1 and greater than 0.
For example to sell 1/3 of a position if the return is > 300%, the following rule could be entered:
Eval( RetPct > 300 , 0.333 , 0 )
Eval(condition , A , B): returns A if the condition is true, B otherwise.
RetPct: returns the return of the position in percentages.
If multiple Sell Rules trigger, the one that sells the most would be used to calculate the
amount of the position sold.
Forced Sells
In some cases positions are sold due to reasons unrelated to the normal Sell Rules. These are referred to as having "No Price".
5. Simulation Parameters
Start Date: When to start the Simulation.
End Date: When to end the Simulation.
Frequency: How often the positions are rebalanced.