Overall Statistics |
Total Trades 2 Average Win 0% Average Loss -35.71% Compounding Annual Return -75.943% Drawdown 79.600% Expectancy -1 Net Profit -73.989% Sharpe Ratio -1.326 Loss Rate 100% Win Rate 0% Profit-Loss Ratio 0 Alpha -1.777 Beta 35.8 Annual Standard Deviation 0.807 Annual Variance 0.651 Information Ratio -1.35 Tracking Error 0.807 Treynor Ratio -0.03 Total Fees $2.00 |
using QuantConnect.Indicators; namespace QuantConnect { public class BasicTemplateAlgorithm : QCAlgorithm { string _ticker = "dgaz"; private Symbol _symbol; private Identity _price; public override void Initialize() { SetStartDate(2018, 01, 01); SetEndDate(2018, 12, 11); _symbol = AddEquity(_ticker, Resolution.Daily).Symbol; //_symbol = AddCfd(_ticker, Resolution.Hour, Market.Oanda).Symbol; _price = Identity(_symbol.Value); PlotIndicator($"{_symbol.Value} Price", _price); } public override void OnData(Slice data) { if (!Portfolio.Invested) { SetHoldings(_symbol, 1); Log($"Purchased Security {_symbol}"); } } } }