Pretty simple, if you call this.Portfolio.GetBuyingPower(..) at all in your algo, it causes back-tests to run 3-4x slower than they do by just using this.Portfolio.Cash. That's a massive perf impact, and I think this call should be analyzed for performance issues.

Using 2017 Jan 2 -> 2017 Jan 12 (10 days), notice the log difference between calling the two every 1 minute during the trade day. Here's when GetBuyingPower is called:

Algorithm Id:(cdd8c084998ff3bd80250d5befa71bad) completed in 38.29 seconds at 16k data points per second. Processing total of 595,013 data points.

And when it isn't:

Algorithm Id:(d72eef41ff55b9f2a6e21cfd01e56795) completed in 10.86 seconds at 55k data points per second. Processing total of 595,013 data points.

That's a massive difference. I've attached the back-test that uses GetBuyingPower to this to illustrate the issue.

Author