Overall Statistics
Total Trades
5250
Average Win
0.51%
Average Loss
-0.57%
Compounding Annual Return
5.093%
Drawdown
23.800%
Expectancy
0.040
Net Profit
67.946%
Sharpe Ratio
0.461
Loss Rate
45%
Win Rate
55%
Profit-Loss Ratio
0.91
Alpha
0.121
Beta
-3.187
Annual Standard Deviation
0.125
Annual Variance
0.016
Information Ratio
0.301
Tracking Error
0.125
Treynor Ratio
-0.018
Total Fees
$24843.22
using System.Collections.Generic;
using QuantConnect.Data;
using QuantConnect.Interfaces;

namespace QuantConnect.Algorithm.CSharp
{ 
    public class BasicTemplateAlgorithm : QCAlgorithm
    {
		int _timeOffset = 1;
		string _ticker = "SPY";
		
        public override void Initialize()
        {
            SetStartDate(2009, 1, 1); 
            SetCash(100000); 
            AddEquity(_ticker, Resolution.Minute);
            
            Schedule.On(DateRules.EveryDay(_ticker), TimeRules.AfterMarketOpen(_ticker, _timeOffset), () => {
            	SetHoldings(_ticker, 1);
            });
            
            Schedule.On(DateRules.EveryDay(_ticker), TimeRules.BeforeMarketClose(_ticker, _timeOffset), () => {
            	SetHoldings(_ticker, 0);
            });
        }
        
        public override void OnData(Slice data)
        {
            
        }
    }
}