180 likes | 274 Views
MATLAB 2011A SECRETS by Bryan Downing. Powerpoint Templates. First Page :. Online business which focuses on building trading models for the finance industry. Revenue model is subscription based with additional potential auxiliary revenue.
E N D
MATLAB 2011A SECRETS by Bryan Downing Powerpoint Templates
First Page : Online business which focuses on building trading models for the finance industry. Revenue model is subscription based with additional potential auxiliary revenue. Financial models are used to generate dozens of daily reports of high performing equities and other market securities to help traders, researchers, and analysts to optimize their trading decisions. QUANTLABS.NET
Chosen Technologies: MATLAB MATLAB is the investment community’s #1 commerical statistical tool for financial research, prototyping, etc.. Has excellent resources including online demos, documentation, and community support. Enables you to quickly get experienced as compared to R or other similar tools. Free MATLAB open source clones include Octave or SciLab but not extensible. QUANTLABS.NET
Chosen Technologies: C++ C++ is the primary development programming language used for implementing re-coded models and strategies. It is commonly used to develop trading platforms as well. C++ is fastest possible programming language as it gets applications closest to the target operating system. For example, there is no garbage collector as in Java. C++ is very portable. QUANTLABS.NET
Highlights : Disclaimer: Not teaching Matlab, C++, or C#. MATLAB Coder Toolbox demo of HelloWorld.m script to C++ Import MATLAB HelloWorld Converted project into Visual Studio C++ Express and use it in a C# client application. Quick high light of use in Visual C++. Discussion of a popular Open Source Trading platform in C# List components of a C++ primitive trading platform. MATLAB import of Yahoo Finance data Export MATLAB data into MYSQL database. QUANTLABS.NET
Helpful URLS : YouTube Channel Videotutorialsatwww.Youtube.com/quantlabs Online code samples and 600+ research white papers: www.quantlabs.net/labs Daily blog updates: www.quantlabs.net/blog PRIVATE Email 1000+ opt-in list. Registeratwww.quantlabs.net Tech quant LinkedIn group: http://www.linkedin.com/groups/Quant-Matlab-C-C-Java-3427378?goback=%2Egna_3427378 Toronto basedMeetup group: www.Meetup.com/quant-finance QUANTLABS.NET
MATLAB Coder Toolbox : Could use MATLAB Builder JA toolbox for a Java or .NET assembler bridge. This does does not generate native code (e.g. Java) but enables you to access through a compiled MEX file. MATLAB Coder Toolbox works as of MATLAB 2011A. Most expensive toolbox available at $6K. Coder converts Matlab M File scripts (e.g.Model or Algorithm) into native C or C++. Removes need of extra coding to manually convert MATLAB M file to C/C++. Saves times in optimizing C or C++ source files. QUANTLABS.NET
DLL Creation and Use : DEMO Demo Matlab Coder Toolbox to generate C++ fromHelloWorld.m Coder GUI to open C:\matlab_m_scripts\coder_test Untitled1.prj Build conversion results in C:\matlab_m_scripts\coder_test\codegen\lib\hello_world QUANTLABS.NET
DLL Creation and Use : Create Visual Studio 2010 C++ DLL solution. Copy converted C++ code into project. Manipulate source code for compatibility with Visual C++. Build DLL or Static Library (LIB) for re-use Create C# client application to access DLL. There is a 3 part video series at QuantLabs Youtube channel. QUANTLABS.NET
DLL Creation and Use : DEMO C:\Users\ratman\Documents\Visual Studio 2010\Projects HelloWorldMatlab C++ sln HelloWorldMgdDLLC++ sln HelloWorldClientCS C# sln QUANTLABS.NET
DLL Resuse in Visual C++: Following instructions at: Walkthrough: Creating and Using a Dynamic Link Library (C++) at http://msdn.microsoft.com/en-us/library/ms235636.aspx static __declspec(dllexport) modifier exports in DLL to beused by other C++ client applications. Integrateconverted code intoaboveexample Visual Studio solution. QUANTLABS.NET
DLL Creation and Use : DEMO Matlab converted code from: C:\Users\ratman\Documents\Visual Studio 2010\Projects\ShrinkageDynamicLibrary\Shrinkage - c++ C:\Users\ratman\Documents\Visual Studio 2010\Projects\ShrinkageDynamicLibrary ShrinkageDynamic Library C++ sln QUANTLABS.NET
Potential Trading Broker: LMAX is established in 2010 out of London UK. Legitimate with British Financial Services Authority regulation and Goldman Sachs ownership of 12.5% Supports API trading through FIX with .NET, and Java support. No minumum deposit or access fees to market multi second tick data. Trade CFD and Forex. Canadians can use LMAX. QUANTLABS.NET
Trading Platforms: Suggested Open source tradingplatformis TRADELINK. http://code.google.com/p/tradelink/ Developed in C# and completely free with source code. Used by establishedhedgefunds and propshops. Over 18000 downloads. Connects to multiple brokers but doesinclude Interactive Brokers. Has decent documentation and community support. There are frequent updates after bugs are reported. Various components for tick capture, easilyconverted DLL implementation, & othersupportingvarious applications. Variousaffordable support athttp://www.pracplay.com/buy QUANTLABS.NET
Proposed C++ PRIMITIVE Trading Platform Components: Will bebuilt in C++ for speed, portability, and potential HFT scalingcapabilities. Capable to plug in to LMAX as trading broker for CFDs and Forex API execuction. Multiple listeners to LMAX tick data of chosencurrency pairs. Use OTL 4 library to connect to MYSQL table for historicaltick data. Use TA-Lib library for forexstrategydevelopment Use QuantLib library for mature quant finance modellingneeds Import custom Matlab Coder DLLs as shown. QUANTLABS.NET
Proposed C++ PRIMITIVE Trading Platform Components: OTL 4 DEMO Need to Install MYSQL Connector DSN! http://www.geeksengine.com/article/mysql-odbc.html otl4 C++ sln QUANTLABS.NET
MATLAB Yahoo Finance Data Capture with MYSQL: • Need Data Capture Toolbox for example MATLAB interaction: • y = yahoo; • FastFood = fetch(y, {'ko', 'pep', 'mcd'},'Last') • FastFood = Last: • [3x1 double] • FastFood.Lastans = 42.96 45.71 23.70 • Alternative for Yahoo data capture athttp://luminouslogic.com/how-to-download-historical-stock-data-into-matlab.htm • Getdetailed Yahoo download data info http://www.gummy-stuff.org/Yahoo-data.htm • Demowith MYSQL at:http://www.youtube.com/watch?v=5QNyOe79l-s QUANTLABS.NET
MATLAB Yahoo Finance Data Capture: DEMO C:\matlab_m_scripts\db\mysqltest.m QUANTLABS.NET