Re-balance scaling

Hi All,

Can anybody think of a way to ask the SIM to transact through scaling rather than at one point in time? The current options include rebalancing on for example the open or the close. Now, let’s say that you want to scale into all positions (buy and sell) over for example the 5 closes following the signal… Could this be done?

Thanks in advance.

You can scale out of a position using Eval(…) as a sell rule. The result of the Eval function should be from 0 to 1, with 0 meaning none of the position sold, 1 meaning all of the position sold, anything in between represents the fraction of the position to be sold. There is no way to scale in when purchasing stocks. This has been a feature request for at least 8 years.


Steve is basically always right on programming matters.

You can kind of work around this limitation using the Book feature I think. So you might have 5 sims in a book. There would be the Monday sim, Tuesday sim…, Friday sim.

As has been posted before you can get the sim to buy on days other than Monday using Weekday = x in both the buy and sell rules. You then have to set the sim to daily rebalance. No guarantee that you can get sims other than Monday to do exactly what you want but maybe. You can then set the weights of the sims to buy-in like you want (perhaps).

Thanks for your replies - much appreciated.

Seems tough to get clean and accurate results by hacking something up here. I wonder if our friendly programmers at p123 would consider adding a scaling functionality. It seems like a feature that would be increadibly useful…