Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
39.061%
Drawdown
44.600%
Expectancy
0
Net Profit
183.371%
Sharpe Ratio
1.11
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.439
Beta
-2.32
Annual Standard Deviation
0.354
Annual Variance
0.125
Information Ratio
1.054
Tracking Error
0.354
Treynor Ratio
-0.169
Total Fees
$27.31
using QuantConnect.Indicators; 

namespace QuantConnect
{
    public class BasicTemplateAlgorithm : QCAlgorithm
    {
    	string _ticker = "CGNX"; 
        private Symbol _symbol;
        private Identity _price; 

        public override void Initialize()
        {
            SetStartDate(2015, 2, 01);  //Set Start Date
            SetEndDate(2018, 4, 1);    //Set End Date
            SetCash(100000);             //Set Strategy Cash

            // _symbol = AddCfd(_ticker, Resolution.Minute, Market.Oanda).Symbol;
            _symbol = AddEquity(_ticker, Resolution.Daily).Symbol;
            _price = Identity(_symbol.Value);
            PlotIndicator($"{_symbol.Value} Price", _price);
        }

        public override void OnData(Slice data)
        {
            if (!Portfolio.Invested)
            {
                SetHoldings(_symbol, 1);
                Log($"Purchased Security {_symbol}");
            }
        }
    }
}