GridView has all the necessary internal financial functions to calculate the interest. The question is would it be able to find the necessary information (Purchase date, Purchase Cost, Selling date, Selling Price) in a composite table. The "Purchase date" of the item is the issue. The composite table "*SR Trans w Items" would be the place to start.
The GridView formula would required the "Average Interest Rate" for any given period which I suspect could be setup in a "Named Items" file.
This method would not be "exact" but I believe would give a good approximation of the margin.