Overall Statistics
namespace QuantConnect
{
    /// <summary>
    /// Basic template algorithm simply initializes the date range and cash. This is a skeleton
    /// framework you can use for designing an algorithm.
    /// </summary>
    public class BasicTemplateAlgorithm : QCAlgorithm
    
    {
       string symbol = "SPY";
       
       int quantity= 0;
       
       
        public override void Initialize()
        {
            SetStartDate(2013, 5, 07);  //Set Start Date
            SetEndDate(DateTime.Now.AddDays(-1));//Set End Date
            SetCash(100000);             //Set Strategy Cash

           
            AddSecurity(SecurityType.Equity, symbol, Resolution.Minute);
            SetRunMode(RunMode.Series);
            

        }
		public override void OnData(Slice data)
		{
				if (Time.ToString("MMM") == "May"){
				if(Portfolio.HoldStock){
				Order(symbol, -Portfolio[symbol].Quantity);
			}
			
			} else if (Time.ToString("MMM") == "Oct"){
			if (!Portfolio.HoldStock){
				//Buy Maximum Shares
				quantity = (int)(Portfolio.Cash / data[symbol].Close);
				Order(symbol, quantity);
			}
		}
    }
}
}