Overall Statistics |
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 20.036% Drawdown 3.600% Expectancy 0 Net Profit 20.317% Sharpe Ratio 2.539 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.015 Beta 8.517 Annual Standard Deviation 0.072 Annual Variance 0.005 Information Ratio 2.267 Tracking Error 0.072 Treynor Ratio 0.022 Total Fees $2.37 |
namespace QuantConnect.Algorithm.CSharp { public class BasicTemplateAlgorithm : QCAlgorithm { private Symbol _spy = QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA); public override void Initialize() { SetStartDate(2016, 10, 07); //Set Start Date SetEndDate(2017, 10, 11); //Set End Date SetCash(100000); //Set Strategy Cash AddEquity("SPY", Resolution.Minute); } public override void OnData(Slice data) { if (!Portfolio.Invested) { SetHoldings(_spy, 1); Debug("Purchased Stock"); } } } }