reuptake
Rookie
Posts: 24
Received Likes: 2
|
Post by reuptake on Apr 3, 2016 16:58:16 GMT
As you probably know, if backtester encounters trade that couldn't be made, because of insufficient funds, all further trades of lower PositionScore at the same bar will be skipped.
To me it's counterintuitive, and I don't buy the official explanation that "it is undesirable to have better candidates replaced by worse candidates when you run out of funds." For selecting what to buy and what not to buy we have Buy signal, not PositionScore. If I want to exclude trades with low PositionScore, I'd write a simple filter. I find it weird, that at one bar, stock with PositionScore = 99 is totally OK to buy, and on another it was skipped, just because there was no funds for another stock with PositionScore = 100. It's like saying "If I the offer me Porsche and VW I won't buy VW, because I can't afford Porsche. But if they don't offer me Porsche I'd buy VW!"
That said, this behavior is hardcoded in AB backtester and probably won't be changed despite quite a few requests (not to change it, but simply to give a choice).
The question is: is there a way to change it by writing some custom backtester code?
|
|
|
Post by bobpit on Apr 4, 2016 9:21:48 GMT
Why don't you just increase the initial capital?
|
|
reuptake
Rookie
Posts: 24
Received Likes: 2
|
Post by reuptake on Apr 4, 2016 18:41:48 GMT
It's a solution (combined with SetOption("AllowPositionShrinking", true); but not the perfect one. Changing the capital affects commissions and so on.
|
|