Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
6.722%
Drawdown
8.200%
Expectancy
0
Net Profit
0%
Sharpe Ratio
0.891
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.066
Beta
0.008
Annual Standard Deviation
0.075
Annual Variance
0.006
Information Ratio
-0.333
Tracking Error
0.142
Treynor Ratio
8.349
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) 
            {
            	Debug("This bar's OHLC prices: O=" + data["SPY"].Open + " H=" + data["SPY"].High + " L=" + data["SPY"].Low + " C=" + data["SPY"].Close);
                Debug("Purchasing SPY at this bar");
                Order("SPY",  100);
            }
        }
        
        public override void OnOrderEvent(OrderEvent orderevent)
        {
        	Debug("Order Executed! " + orderevent.ToString());
        }
    }
}