Hi All,

  I am simulating some options trading stratgeies which trade inverse leveraged ETFs, and these ETFs end up having a lot of splits or reverse splits.  So the historical adjusted price is always much different from the actual historical prices especially when you go back a few years.

  Anyways I am seeing some strange margin warnings (It won't send the order because it violates margin) when I got back a couple years in history, but no warning for the most recent year.  

  Can someone direct me to the part of the lean engine code that calculates the margin requirements for each order?  I want to check if that calculation is using the adjusted price of the underlying or not.

  Also is there a way to turn off margin restrictions in the backtester

Author