File Exchange

image thumbnail

Files from webinar Machine Learning for Algo Trading

version 1.0.1.0 (19.4 MB) by MathWorks Quant Team
Demo files from (upcoming) webinar on Machine Learning for Algo Trading

39 Downloads

Updated 01 Feb 2018

View Version History

View License

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

Cite As

MathWorks Quant Team (2020). 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 .

Comments and Ratings (27)

John Payne

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);

Stefano

MathWorks Quant Team

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

Robert Donaldson

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

Robert Donaldson

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

Giovanni Barbarossa

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

Giovanni Barbarossa

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

Giovanni Barbarossa

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')

Marina Dolfin

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

Rolando Guerra Gómez

Aleks, can you send me more details of the error you encounter including, filename, line number, and MATLAB version?
knumpach[at]mathworks.com

Aleks Iliev

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!

Stéphane Reynaud

thanks, a very good gift

Kevin Chng

Great Description

Sergei

MathWorks Quant Team

Hi Anton,

I've just tested the video. Everything works fine to me.

Best,
Kawee

Anton Söderberg

Hi!
I only watched half of the video, but now it seems to be offline, can anyone confirm?
Thank you for the upload :) /Anton

smsinks

Fantastic

CArlos PA

MathWorks Quant Team

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.

tom spencer

will you be posting the video? thx

Robert Henson

Alvin PAstore

LinX

Yijie Gao

MATLAB Release Compatibility
Created with R2017a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!