I noticed the results of a strategy I ran using runDonor (now ExecuteDonorStrategy) didn't match the results when running the strategy normally. NetProfit was wrong, APR was wrong, etc. Looking further, I noticed that runDonor was picking a different number of shares than the normal method. I was using a simple
Percent of Equity: 100 Position Size, but runDonor was using 10% sizing. Looking at PortfolioEquityEx.cs, I notice some code to set PosSize on the TradingSystemExecutor, like this:
CODE:
Please log in to see this code.
In my case PctEquity never gets set. I assume it defaults to 10%. I have not spent a bunch of time with this code, but I don't understand why ExecuteDonorStrategy is cherry-picking properties from
ps and stuffing them into
exec.PosSize. Instead I wonder why those dozen or so lines can't be replaced with this:
CODE:
Please log in to see this code.
This solved my issue, though I didn't run any other tests besides the Percent of Equity: 100 PosSizer, so not confident I didn't break something else, but hard to imagine why only some properties were being set.
-Jared