I had been trying to code up short strangles strategy. I was trying it for Google for the year 2017 with the code that I had modified and adapted from one of the posts in the discussion forum.

It seems that the back testing engine is going to simulate options exercise at random. In general, it is a good thing. However, I am not able to understand the results . It looks to me that it is being done at the price of the underlying Google stock instead of the options.

For example, this is one of the rows that I see

2017-05-15T04:00:00Z    GOOG  170519C00862500    871.2121212    -12    Option Exercise    Filled    -10454.54545    Simulated option assignment before expiration     -1045454.545
it seems that it is actually 12 shares of the Google stock at $ 871.

How do I reconcile this with the results?