Overall Statistics |
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 8682.840% Drawdown 17.800% Expectancy 0 Net Profit 0% Sharpe Ratio 1.915 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 6.928 Beta -2.298 Annual Standard Deviation 3.485 Annual Variance 12.146 Information Ratio 1.882 Tracking Error 3.489 Treynor Ratio -2.904 Total Fees $27.50 |
using System.Threading.Tasks; namespace QuantConnect { public static class Inputs { public static List<string> underlyings = new List<string>{ "AMRS"}; public static int trade_size = 10000; } public class BasicTemplateAlgorithm : QCAlgorithm { public override void Initialize() { SetStartDate(2017, 5, 1); SetEndDate(DateTime.Now); SetCash(25000); Parallel.ForEach(Inputs.underlyings, u => { AddEquity(u, Resolution.Minute); Securities[u].SetDataNormalizationMode(DataNormalizationMode.Adjusted); }); //AddForex("EURUSD", Resolution.Minute); } public override void OnData(Slice data) { TradeBars bars = data.Bars; Splits splits = data.Splits; Dividends dividends = data.Dividends; //Get just this bar. // TradeBar bar1; // if (bars.ContainsKey(firstun)) bar1 = bars[firstun]; // if (splits.ContainsKey("WCN")) // { // Debug("Split info: " + splits["WCN"]); // } if (!Portfolio.HoldStock) { // place an order, positive is long, negative is short. Parallel.ForEach(Inputs.underlyings, u => { Order(u, Inputs.trade_size); Debug("Purchased " + u + " on " + Time.ToShortDateString()); }); } } } }