Overall Statistics
using QuantConnect.Data.Custom.Fred;

namespace QuantConnect.Algorithm.CSharp
{
    public class ParticleHorizontalAntennaArray : QCAlgorithm
    {
		private Symbol _vix;
		private Symbol _aapl;
		
        public override void Initialize()
        {
            SetStartDate(2019, 4, 23);
            SetCash(100000);
            
            _aapl = AddEquity("AAPL", Resolution.Daily).Symbol;
        	_vix = AddData<Fred>(Fred.CBOE.VIX).Symbol;
        }

        /// 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 && data.ContainsKey(_vix))
            {
            	SetHoldings(_aapl, 0.5);
            }
        }
    }
}