Overall Statistics
using System;
using System.Collections;
using System.Collections.Generic; 

namespace QuantConnect 
{
    using QuantConnect.Securities;
    using QuantConnect.Models; 

    //Sell in May Algorithm Example:
    public partial class QCUSellInMay : QCAlgorithm, IAlgorithm { 

        //Algorithm Variables
        int quantity = 400;
        private string symbol = "SPY";
        private decimal cash = 100000;
        
        //Initialize the Strategy
        public override void Initialize() {
            SetCash(cash);
            SetStartDate(1998, 01, 01);
            SetEndDate(2012, 12, 30); 
            AddSecurity(SecurityType.Equity, symbol, Resolution.Minute);
        }
        
        //Handle the data events:
        public void OnData(TradeBars data) {
            if (Time.ToString("MMM") == "May") {
                if (Portfolio.HoldStock) {
                    Order(symbol, -Portfolio[symbol].Quantity);
                    Debug("QCU Sell In May: Flat " + Time.ToString("Y"));
                }
            } else {
                if (!Portfolio.HoldStock && Time.ToString("MMM") == "Nov") {
                    Order(symbol, quantity);
                    Debug("QCU Sell In May: Long " + Time.ToString("Y"));
                }
            }      
        }
    }
}