Overall Statistics
namespace QuantConnect.Algorithm.CSharp
{
    public class Markowitz : QCAlgorithm
    {

        public override void Initialize()
        {
            SetStartDate(2006, 1, 1);  //Set Start Date
            SetEndDate(2019, 08, 10);
            SetCash(100000);             //Set Strategy Cash
            
			UniverseSettings.Resolution = Resolution.Daily;
			var symbols = new[] { QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA),
									QuantConnect.Symbol.Create("TLT", SecurityType.Equity, Market.USA),
									QuantConnect.Symbol.Create("GLD", SecurityType.Equity, Market.USA) };
			SetUniverseSelection( new ManualUniverseSelectionModel(symbols) );
			
			AddAlpha(new ConstantAlphaModel(InsightType.Price, InsightDirection.Up, TimeSpan.FromDays(365*20), 1, null, null));
			
			
			SetPortfolioConstruction(new MeanVarianceOptimizationPortfolioConstructionModel(
										TimeSpan.FromDays(30),
							            PortfolioBias.Long,
							            1,
							            63,
							            Resolution.Daily,
							            0.02,
							            null));
			
			/*				            
			SetPortfolioConstruction(new EqualWeightingPortfolioConstructionModel(
										TimeSpan.FromDays(30),
							            PortfolioBias.Long));
			*/
			
			SetExecution(new ImmediateExecutionModel());
			
			AddRiskManagement(new NullRiskManagementModel());

        }

        /// OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
        /// Slice object keyed by symbol containing the stock data
        public override void OnData(Slice data)
        {
            // if (!Portfolio.Invested)
            // {
            //    SetHoldings(_spy, 1);
            //    Debug("Purchased Stock");
            //}
        }

    }
}