Overall Statistics
namespace QuantConnect 
{
    public partial class CoveredCallAlgorithm : QCAlgorithm
    {
    	Symbol _optionSymbol;
		// Manual add symbols required in your initialize method:
		public override void Initialize() {
		     SetStartDate(2014, 3, 1);
            SetEndDate(2014, 5, 1);

		    var option = AddOption("GOOG", Resolution.Minute);
		    _optionSymbol = option.Symbol;
		    // set our strike/expiry filter for this option chain
		    option.SetFilter(-2, +2, TimeSpan.Zero, TimeSpan.FromDays(10));
		}
		
		// v3.0 Technique: Access data via grouped time slice method handlers:
		public override void OnData(Slice slice) 
		{
		    OptionChain chain;
		    if (!Portfolio.HoldStock && slice.OptionChains.TryGetValue(_optionSymbol, out chain))
		    {
		        // find the second call strike under market price expiring today
		        var contract = (
		            from optionContract in chain.OrderByDescending(x => x.Strike)
		            select optionContract
		            ).Skip(2).FirstOrDefault();
		
		        if (contract != null)
		        {
		            var quantity = CalculateOrderQuantity(contract.Symbol, -1m);
		            MarketOrder(contract.Symbol, quantity);
		            MarketOnCloseOrder(contract.Symbol, -quantity);
		        }
		        else
		        {
		        	Log("no contract");
		        }
		    }
		    else
		    {
		    	Log("no chain available");
		    }
		}
    }
}