I'm stuck on this task in the boot camp. I've attempted to copy/paste the solution, but it doesn't work. Any ideas?

Task link: https://www.quantconnect.com/learning/task/169/Taking-Positions

Copy/paste solution that fails:

using System.Reflection;
namespace QuantConnect
{
    public partial class BootCampTask : QCAlgorithm
    {
        public override void Initialize()
        {
            SetStartDate(2018, 7, 1);  
            SetEndDate(2019, 3, 31);  
            SetCash(100000);  
			var symbols = new [] {QuantConnect.Symbol.Create("PEP", SecurityType.Equity, Market.USA), QuantConnect.Symbol.Create("KO", SecurityType.Equity, Market.USA)};
            SetUniverseSelection(new ManualUniverseSelectionModel(symbols));
			UniverseSettings.Resolution = Resolution.Hour;
			UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
            AddAlpha(new PairsTradingAlphaModel());
            SetPortfolioConstruction(new EqualWeightingPortfolioConstructionModel()); 
            SetExecution(new ImmediateExecutionModel());
        }
        
        //3. Use OnEndOfDay() to Log() your positions at the close of each trading day
        public override void OnEndOfDay(Symbol symbol)
        {
        	Log("Taking a position of " + Portfolio[symbol].Quantity.ToString() + " units of symbol " + symbol.ToString());
        }
        
    }
    
	public partial class PairsTradingAlphaModel : AlphaModel
    {
    	SimpleMovingAverage spreadMean;
    	StandardDeviation spreadStd;
    	public Security[] Pair;
    	
    	//1. Create a private period variable that is type TimeSpan
    	TimeSpan period;
    	
    	public PairsTradingAlphaModel()
        {
        	spreadMean = new SimpleMovingAverage(500);
            spreadStd = new StandardDeviation(500);
            Pair = new Security[2];
            //1. Set self.period to a 2 hour timedelta
            period = TimeSpan.FromHours(2);
        }
        
        public override IEnumerable<Insight> Update(QCAlgorithm algorithm, Slice data) 
        {
        	var spread = Pair[1].Price - Pair[0].Price;
	        spreadMean.Update(algorithm.Time, spread);
	        spreadStd.Update(algorithm.Time, spread);
	        
	        // I've tried changing these to spreadMean.Current.Value and spreadStd.Current.Value,
	        // but it still fails.
	        var upperthreshold = spreadMean + spreadStd;
			var lowerthreshold = spreadMean - spreadStd;
			
			//2. Emit an Insight.Group() if the spread is greater than the upperthreshold 
	        if (spread > upperthreshold)
	        {
            	return Insight.Group( 
                    Insight.Price(Pair[0].Symbol, period, InsightDirection.Up),
                    Insight.Price(Pair[1].Symbol, period, InsightDirection.Down)
                );
            }
            
            //2. Emit an Insight.Group() if the spread is less than the lowerthreshold
            if (spread < lowerthreshold)
            {
            	return Insight.Group( 
                	Insight.Price(Pair[0].Symbol, period, InsightDirection.Down), 
                    Insight.Price(Pair[1].Symbol, period, InsightDirection.Up) 
                );
            }
			return Enumerable.Empty<Insight>();
        }
        
        public override void OnSecuritiesChanged(QCAlgorithm algorithm, SecurityChanges changes)
        {	
            Pair = changes.AddedSecurities.ToArray();
        }
    }
}