Hi,
From recent postings, I understand that QuantConnect integrates the Accord.NET framework along with the Accord Machine Learning library. I'm trying to implement a simple SVM. Everything seems to build fine; however, when I go to launch the backtest, I keep getting the Error: "Could not Load the Assembly Accord.MachineLearning".
Is the Machine Learning library from Accord really supported?
Jared Broad
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Gene Wildhart
Jared Broad
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Gene Wildhart
using QuantConnect.Data.Consolidators; using QuantConnect.Indicators; using QuantConnect.Data.Market; using Accord.MachineLearning.VectorMachines; using Accord.MachineLearning.VectorMachines.Learning; using Accord.Statistics.Kernels; namespace QuantConnect.Algorithm { /* * QuantConnect University: FOREX - Using Currency Data * * QuantConnect allows you to use currency data for your backtest with a * simple line of code. See the SecurityType.Forex below. */ public class TestStrategy : QCAlgorithm { AverageTrueRange _atr; decimal _price; string _symbol = "EURUSD"; public override void Initialize() { SetStartDate(2015, 1, 4); SetEndDate(DateTime.Now.Date.AddDays(-1)); SetCash(10000); AddSecurity(SecurityType.Forex, _symbol, Resolution.Minute); _atr = ATR(_symbol, 14, MovingAverageType.Simple, Resolution.Daily); // Create Kernel Support Vector Machine with a Polynomial Kernel of 2nd degree var machine = new KernelSupportVectorMachine(new Polynomial(2), inputs: 2); // Create the sequential minimal optimization teacher // ***** WILL NOT WORK IN QUANTCONNECT -- var learn = new SequentialMinimalOptimizationRegression(machine, inputs, outputs); // Construct Hour & Day Consolidators var dayConsolidator = new TradeBarConsolidator(TimeSpan.FromDays(1)); var hourConsolidator = new TradeBarConsolidator(TimeSpan.FromHours (1)); dayConsolidator.DataConsolidated += OnDataDay; hourConsolidator.DataConsolidated += OnDataHour; SubscriptionManager.AddConsolidator(_symbol,dayConsolidator); SubscriptionManager.AddConsolidator(_symbol,hourConsolidator); } public void OnData(TradeBars data) { if (!Portfolio.HoldStock) { Order("EURUSD", 1000); Debug("Purchased EURUSD on " + Time.ToShortDateString()); } } private void OnDataDay(object sender,TradeBar consolidated) { _price = consolidated.Close; if (!_atr.IsReady) return; } private void OnDataHour(object sender,TradeBar consolidated) { _price = consolidated.Close; //Log (_hourwindow[0].Close.ToString()); //Log (_hourwindow [8].Close.ToString()); } // Fire plotting events once per day: public override void OnEndOfDay() { Plot("ATR", _atr); Plot("ATR", _price); } } }
Jared Broad
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Gene Wildhart
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!