Overall Statistics |
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 50.469% Drawdown 1.200% Expectancy 0 Net Profit 0% Sharpe Ratio 4.584 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.298 Beta -0.127 Annual Standard Deviation 0.061 Annual Variance 0.004 Information Ratio 1.66 Tracking Error 0.087 Treynor Ratio -2.219 Total Fees $1.00 |
namespace QuantConnect { /* * QuantConnect University: Generic Quandl Data Importer * * Using the underlying dynamic data class "Quandl" we take care of the data * importing and definition for you. Simply point QuantConnect to the Quandl Short Code. * * The Quandl object has properties which match the spreadsheet headers. * If you have multiple quandl streams look at data.Symbol to distinguish them. */ public class QCUQuandlImporter : QCAlgorithm { string dividendCode = "NASDAQOMX/OMXS30"; //Initialize the data and resolution you require for your strategy: public override void Initialize() { SetCash(25000); SetStartDate(2017, 1, 1); SetEndDate(DateTime.Now.Date.AddDays(-1)); //Add Generic Quandl Data: AddSecurity(SecurityType.Equity, "AAPL", Resolution.Minute); AddData<QuandlSEC>(dividendCode, Resolution.Daily); } public override void OnData(Slice data) { if (!Portfolio.Invested) Order("AAPL", 100); var quandls = data.Get<Quandl>(); foreach(var key in quandls.Keys) { Console.WriteLine(Time.ToString("o") + key + " " + quandls[key]); } } } // Custom quandl data type for setting customized value column name. // Value column is used for the primary trading calculations and charting. public class QuandlSEC : Quandl { public QuandlSEC() : base(valueColumnName: "Index Value") { } } }