All the sample code and relevant data showed during the webinar Machine Learning for Algo Trading.
The video link is here: https://www.mathworks.com/videos/machine-learning-for-algorithmic-trading-1503691224414.html
MathWorks Quant Team (2021). Files from webinar Machine Learning for Algo Trading (https://www.mathworks.com/matlabcentral/fileexchange/63403-files-from-webinar-machine-learning-for-algo-trading), MATLAB Central File Exchange. Retrieved .
Inspired: Files for webinar titled "Classifying Trading Signals using Machine Learning and Deep Learning"
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
I am running R2020a and get an error:
Undefined function 'fxAlgoMakeSignals' for input arguments of type 'timetable'.
Error in Demo1_fxRegressionDemo (line 67)
[X , y] = fxAlgoMakeSignals(prices , nMinReturns , otherSignals , tradingFrequency , true);
Hi Robert,
I've tested the code in R219a. I can't replicate such error. I would like you to contact our tech support to get this problem solved.
https://www.mathworks.com/support/contact_us.html
Best,
Kawee
Following up on my initial inquiry:
If I manually change line 83 of Demo2_fxMachineLearningDemo.m to select the appropriate columns from prdictorTable it works. Not sure why the original code does not work.
Original: retPredictionML = cTree.predict(predictorTable(:,1:end-1));
Changed to: retPredictionML = cTree.predict(predictorTable(:,1:15));
Regards
Hello,
When following the video and running the code I run into the error below for Demo2_fxMachineLearningDemo.m
Error: File: Demo2_fxMachineLearningDemo.m Line: 83 Column: 33
The construct "predictorTable(...end...)" is ambiguous in this context, because "predictorTable" cannot be ascertained to be either the name of a variable or of a function.
To make it a variable, assign to it; to allow it to become a function at execution time, replace "end" with a call to LENGTH, SIZE, or NUMEL on the desired array.
Any ideas?
Thanks you
Thank you very much Kawee. I will.
Hi Giovanni,
Sorry for the delayed response. I've tested the code in both R2018b and R219a. I can't replicate such error. I would like you to contact our tech support to get this problem solved.
https://www.mathworks.com/support/contact_us.html
Best,
Kawee
Hello, anybody can help?
For some reason I get the error below. I run Matlab 2018b, I have the Statistics and Machine Learning toolbox. Up until line 86 of the Demo1_fxRegressionDemo everything works fine
Error using classreg.regr.FormulaProcessor (line 298)
Cannot determine the response variable.
Error in classreg.regr.LinearFormula (line 48)
f = f@classreg.regr.FormulaProcessor(varargin{:});
Error in classreg.regr.TermsRegression.createFormula (line 761)
formula =
classreg.regr.LinearFormula(modelDef,varNames,responseVar,intercept,link);
Error in LinearModel.createFormula (line 1388)
formula = classreg.regr.TermsRegression.createFormula(supplied,modelDef, ...
Error in LinearModel.fit (line 1224)
model.Formula = LinearModel.createFormula(supplied,modelDef,X, ...
Error in fitlm (line 121)
model = LinearModel.fit(X,varargin{:});
Error in Demo1_fxRegressionDemo (line 86)
modelTrain = fitlm([XInSample yInSample] , 'linear')
Thank you very much
Hello Kawee,
For some reason I get the error below. I run Matlab 2018b, I have the Statistics and Machine Learning toolbox. Can you please help? Thanks
Error using classreg.regr.FormulaProcessor (line 298)
Cannot determine the response variable.
Error in classreg.regr.LinearFormula (line 48)
f = f@classreg.regr.FormulaProcessor(varargin{:});
Error in classreg.regr.TermsRegression.createFormula (line 761)
formula =
classreg.regr.LinearFormula(modelDef,varNames,responseVar,intercept,link);
Error in LinearModel.createFormula (line 1388)
formula = classreg.regr.TermsRegression.createFormula(supplied,modelDef, ...
Error in LinearModel.fit (line 1224)
model.Formula = LinearModel.createFormula(supplied,modelDef,X, ...
Error in fitlm (line 121)
model = LinearModel.fit(X,varargin{:});
Error in Demo1_fxRegressionDemo (line 86)
modelTrain = fitlm([XInSample yInSample] , 'linear')
Hi, thank you so much for the very useful and clear presentation.
The data one can download are much fewer than those of the webinar, isn't it?
I want to be sure that I downloaded correctly them...
Thank you again.
Best, Marina
Aleks, can you send me more details of the error you encounter including, filename, line number, and MATLAB version?
knumpach[at]mathworks.com
Hello everyone, I get this error at the end of the code when compiled: "Unrecognized variable name 'time' " Can anyone help with this? Greta code, brilliant example!
thanks, a very good gift
Great Description
Hi Anton,
I've just tested the video. Everything works fine to me.
Best,
Kawee
Hi!
I only watched half of the video, but now it seems to be offline, can anyone confirm?
Thank you for the upload :) /Anton
Fantastic
The video is now online here: https://www.mathworks.com/videos/machine-learning-for-algorithmic-trading-1503691224414.html
Once the webinar is online, I will post it here too. For those who registered for the webinar, you should get the link to the video when it is posted too.
will you be posting the video? thx