I'm trying to find the optimal portfolio of options and stock which minimizes the standard deviation of the portfolio returns but also taking into consideration the bid and ask prices of the assets. I am given a snapshot of the stock and related options (all with same maturity but different strikes) with their bid and ask prices.

I am making the assumption that the stock price follows a geometric brownian motion and that infinite amounts of each asset can be sold/bought at their bid/ask price.

My approach, if there was only a mid price would be to simulate returns for each asset, calculate the average returns and the covariance matrix then pass this into a quadprog function in MATLAB to minimize the variance of the portfolio with no upper or lower bounds on the quantity of each asset (i.e. short selling is allowed).

However, with the bid/ask spread, the return on selling an asset is slightly different to the return of buying that same asset and so passing the returns and covariances the same way as above would not be accurate.

Can anyone suggest a plausible method to account for this bid/ask spread? I thought about treating the buy and the sell of an asset as two separate assets, calculating their respective returns and altering the constraints to accommodate the buying and selling direction but it gets very messy and my results don't look correct. Is there an easier way to do this?

Thanks, Michael.