Code covered by the BSD License  

Highlights from
Automated Trading with MATLAB - 2012

5.0

5.0 | 2 ratings Rate this file 175 Downloads (last 30 days) File Size: 7.47 MB File ID: #37932
image thumbnail

Automated Trading with MATLAB - 2012

by Stuart Kozola

 

31 Aug 2012 (Updated 04 Sep 2012)

Files from the Automated Trading webinar showing X_Trader and QuickFIX/J integration.

| Watch this File

File Information
Description

Files used in the webinar - Automated Trading with MATLAB broadcast on August 21, 2012. This webinar can be viewed at http://www.mathworks.com/wbnr68672.

Specific topics include:

* Data gathering options, including daily historic, intraday, and real-time data
* Model building and prototyping in MATLAB
* Backtesting and calibrating a model
* Interacting with existing libraries and software for trade execution (X_Trader, QuickFIX/J, messaging queues)

It is recommended that you watch the webinar to see the "live" system running.

Acknowledgements

Algorithmic Trading With Matlab 2010 inspired this file.

Required Products Database Toolbox
Datafeed Toolbox
Financial Toolbox
Global Optimization Toolbox
Parallel Computing Toolbox
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
29 Apr 2013 Mark

Thank you for this collection. On a cursory read of the code, if I am correct there is an issue with the logic employed in tradeSignal if I have understood it correctly. Specifically, the input 'ind' and logical 'AND'. As I understand it, 'ind' is normalized such that 0 = sell, 0.5 = "skip", 1 = buy. If you logically AND 0 & 1 (sell and buy) the result is a 0 (sell) however this is not the desired result. I'm posting this in the spirit of others trying to review this code and welcome any correction on my understanding.

07 Dec 2012 nicholas

amazing!

05 Dec 2012 Piment  
07 Nov 2012 Stuart Kozola

Hi Goryn,

Did you try inputStream = java.io.FileInputStream('C:\\MATLAB_CODES\\Automated_Trading\\banzai.cfg');

settings = SessionSettings(inputStream);

It is a JAVA path issue, not MATLAB. Try this and it should work.

26 Sep 2012 Goryn

Thank you for your answer, Stuart. But it is another error. Firstly, I've tried to run Demo7b_QuickFIXExample.m and it writes:

Java exception occurred:
quickfix.ConfigError: banzai.cfg (The system cannot find the file
specified)

at quickfix.SessionSettings.<init>(SessionSettings.java:110)

Error in Demo7b_QuickFIXExample (line 23)
settings = SessionSettings('banzai.cfg');

24 Sep 2012 Stuart Kozola

This error occurs when trying to reference a file path on Windows that is not a valid URL. See http://sourceforge.net/tracker/index.php?func=detail&aid=3506051&group_id=176742&atid=878458 for an example.

You can either:
1) Run the commands with banzai.cfg in the current working directory

OR

2) change the MATLAB file to accept inputStreams:
inputStream = java.io.FileInputStream('C:\\MATLAB_CODES\\Automated_Trading\\banzai.cfg');

settings = SessionSettings(inputStream);

10 Sep 2012 Goryn

I have an error when I trying to execute 'Demo7b_QuickFIXExample.m' script:
- firstly I've added path to 'classpath.txt'
- then after loading quickfix packages I try to execute 'settings = SessionSettings('banzai.cfg');' it writes me:
Java exception occurred:
quickfix.ConfigError: banzai.cfg (Cannot find) at quickfix.SessionSettings.<init>(SessionSettings.java:110)

If I try to execute a line of code with full path, like "settings = SessionSettings('c:\MATLAB_CODES\Automated_Trading\banzai.cfg');" it writes:

Java exception occurred:
java.lang.IllegalArgumentException: name

at sun.misc.URLClassPath$Loader.findResource(Unknown Source)

at sun.misc.URLClassPath.findResource(Unknown Source)

at java.net.URLClassLoader$2.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findResource(Unknown Source)

at java.lang.ClassLoader.getResource(Unknown Source)

at java.lang.ClassLoader.getResourceAsStream(Unknown Source)

at quickfix.SessionSettings.<init>(SessionSettings.java:105)

Updates
04 Sep 2012

Updated zip file contents.

Contact us