Overall Statistics |
Total Trades 269 Average Win 0.94% Average Loss -0.22% Compounding Annual Return -6.702% Drawdown 41.400% Expectancy -0.335 Net Profit -30.542% Sharpe Ratio -0.409 Probabilistic Sharpe Ratio 0.051% Loss Rate 87% Win Rate 13% Profit-Loss Ratio 4.22 Alpha -0.097 Beta 0.543 Annual Standard Deviation 0.141 Annual Variance 0.02 Information Ratio -0.995 Tracking Error 0.131 Treynor Ratio -0.106 Total Fees $318.13 |
using QuantConnect.Indicators; using System; using System.Collections.Generic; using QuantConnect.Algorithm.Framework; using QuantConnect.Algorithm.Framework.Alphas; using QuantConnect.Algorithm.Framework.Execution; using QuantConnect.Algorithm.Framework.Portfolio; using QuantConnect.Algorithm.Framework.Risk; using QuantConnect.Algorithm.Framework.Selection; namespace QuantConnect.Algorithm.CSharp { public class SimpleSystem : QCAlgorithm { public override void Initialize() { UniverseSettings.Resolution = Resolution.Hour; SetStartDate(2015, 1, 1); SetEndDate(2020, 4, 1); SetCash(100000); SetWarmup(TimeSpan.FromDays(65)); var tickers = new string[] { "SPY" }; var symbols = new List<Symbol>(); foreach (var ticker in tickers) { symbols.Add(QuantConnect.Symbol.Create(ticker, SecurityType.Equity, Market.USA)); } SetAlpha(new RsiAlphaModel()); SetUniverseSelection(new ManualUniverseSelectionModel(symbols)); SetPortfolioConstruction(new EqualWeightingPortfolioConstructionModel(Resolution.Daily)); SetExecution(new ImmediateExecutionModel()); //SetRiskManagement(MaximumDrawdownPercentPerSecurity(0.01)); } } }