Using Rules to Allocate Percentages of Equity to Conditions
Author: rmpwealth
Creation Date: 1/7/2014 3:39 PM
profile picture

rmpwealth

#1
I would like use Rules to backtest a strategy that incorporates the following four Conditions.

1. Invest 25% of Total Equity at Market when Price crosses above EMA20. Sell at Market when Price crosses below EMA20.

2. Invest 25% of Total Equity at Market when Price crosses above EMA50. Sell at Market when Price crosses below EMA50.

3. Invest 25% of Total Equity at Market when Slope of EMA20 turns positive. Sell at Market when Slope of EMA20 turns negative.

4. Invest 25% of Total Equity at Market when Slope of EMA50 turns positive. Sell at Market when Slope of EMA50 turns negative.

I can enter the Conditions; but am not sure how to allocate 25% of the Total Equity to each of the four Conditions. It seems like I should use Portfolio Simulation Mode: Percent of Equity = 25.00; but on a backtest from 01/02/07 to present, it yielded only three trades. I suspect that the four Conditions were being treated as "AND"s instead of as individual criteria that apply to specific percentages of equity. I inserted "OR"s between each condition, and the backtest resulted in an apparent reasonable number of trades; but I still am not sure I am creating the strategy correctly.

What are the proper Rules to construct this strategy?
profile picture

Eugene

#2
You're pushing the limits of Rule-based strategies with this tricky idea which seems impossible to get done in its entirety w/o converting to code and making certain modifications.

As a workaround, take a look at Combination Strategies. Think of each rule pair as a separate system. Build and save them separately, create a new Combo strategy, add the four strategies you saved previously, allocate 25% equity to each one (bump up Margin a bit if necessary), select desired position size for each one while keeping "Use default DataSet" checked. That should be pretty close to what you're looking for, with regard to some limitation: Is child strategy equity being constantly readjusted on a day-to-day basis with regard to the "Percent of Starting Equity" allocation?
profile picture

rmpwealth

#3
Thanks.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).