Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
11.552%
Drawdown
12.500%
Expectancy
0
Net Profit
0%
Sharpe Ratio
0.955
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.114
Beta
0.009
Annual Standard Deviation
0.121
Annual Variance
0.015
Information Ratio
0.01
Tracking Error
0.17
Treynor Ratio
12.138
Total Fees
$1.00
namespace QuantConnect 
{   
    public class BasicTemplateAlgorithm : QCAlgorithm
    {
        public override void Initialize() 
        {
            SetStartDate(2013, 1, 1);         
            SetEndDate(DateTime.Now.Date.AddDays(-1));
            SetCash(25000);
            AddSecurity(SecurityType.Equity, "SPY", Resolution.Minute);
        }
        public void OnData(TradeBars data) 
        {   
            if (!Portfolio.HoldStock) 
            {
                int quantity = (int)Math.Floor(Portfolio.Cash / data["SPY"].Close);
                Order("SPY",  quantity);
                Debug("Purchased SPY on " + Time.ToShortDateString());
            }
        }
        public override void OnOrderEvent(OrderEvent orderevent)
        {
        	if(orderevent.Status==OrderStatus.Filled)
        		Log(orderevent.ToString());
        }
    }
}