Tag Archives: Functions

Intro to my Matlab functions for options and futures trading

Intro to my Matlab functions for options and futures trading

Remember this is my Phase 2 for this course series here

Python algo course series for your Indie Automated Trading Business

Based on

http://www.amazon.com/Futures-Options-Markets-Introduction-Edition/dp/0615703151

Join my FREE newsletter to learn more about when I start teaching these futures/options algos

UC Davis course playlist

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

How C++ call Matlab functions

 

How C++ call Matlab functions

Follow these instructions as example

Call MATLAB Functions from C/C++ Applications
  1. To see engdemo.c , open this file in MATLAB® Editor.
  2. To see the Windows version engwindemo.c , open this file.
  3. There is a C++ version of engdemo in the matlabroot \extern\examples\eng_mat folder. To see engdemo.cpp , open this file

http://www.mathworks.com/help/matlab/cc-mx-matrix-library.html

http://www.mathworks.com/help/matlab/matlab_external/calling-matlab-software-from-a-c-application.html

 

This was suggested by Alex at https://alexabosi.wordpress.com/

 

Well, I included the ‘fstream’ header file to print numbers to .txt so I could quickly check the outputs as I worked.
Something like:
float Best_Bid; // defined earlier
std::ofstream bid_output(“bid_output.txt”);
while (/*conditions*/)
{
  /*calculate best bid/ask*/ 
  bid_output << Best_Bid << std::endl;
}

Join my FREE newsletter to see how I accomplish this 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

How MATLAB now call Python functions

How MATLAB now call Python functions

Can you imagine this in the new Matlab 2014b? I just learned this. It call everything except R

http://www.mathworks.com/help/matlab/matlab_external/undefined-variable-py-or-function-py-command.html#buialof-66

http://www.mathworks.com/help/matlab/matlab_external/call-python-from-matlab.html

http://www.mathworks.com/help/matlab/matlab_external/call-user-defined-custom-module.html

Join my FREE newsletter to learn more about MATLAB programming tricks

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Poseidon USECO and AMER functions by Paul Cottrell

Poseidon USECO and AMER functions  by Paul Cottrell

Check out these videos for his latest software

Join my FREE newsletter to learn more about this software

 

 

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

CALLING MATLAB FUNCTIONS FROM OPENGAMMA TRADING PLATFORM VIA THE MATLAB PRODUCTION SERVER

CALLING MATLAB FUNCTIONS FROM OPENGAMMA TRADING PLATFORM VIA THE MATLAB PRODUCTION SERVER

This is an example on how to use Matlab Production Server with a trading platform like this OpenGamma

http://www.opengamma.com/blog/calling-matlab-functions-opengamma-matlab-production-server

Join my FREE newsletter to see how do something similar

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Demo of Garch Prediction of Forex Data with older Matlab functions

Demo of Garch Prediction of Forex Data with older Matlab functions

Tutorial:

http://radio.feld.cvut.cz/matlab/toolbox/garch/chap1_23.html

Useful links from video:

http://www.mathworks.com/help/econ/garchfit.html

http://www.mathworks.com/help/econ/garchpred.html

Asymptotic meaning:

http://answers.yahoo.com/question/index?qid=20081030122228AAb0SRo

Join my FREE newsletter to kearn more forecasting the markets with Matlab 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

FREE Meetup Lesser Known but Useful Facts about Some Excel Functions & Charts

FREE Meetup Webinar Lesser Known but Useful Facts about Some Excel Functions & Charts

Learn more on FREE quant webinars through my FREE newsletter

 

 

 

Learn more on the kind of announcements

Register here:

 

Lesser Known but Useful Facts about Some Excel Functions & Charts

Thursday, Jun 13, 2013, 8:00 PM

3 Wizards Went

Check out this Meetup →

Register Now: http://www.edupristine.com/webinars/lesser-known-but-useful-facts-about-some-excel-functions-charts-2/

Date: Thu, 13 Jun @ 8:00 PM EDT (http://timeanddate.com/s/2dhc)

This session will talk about:

Roundup Function
Bar Chart in 3D
Plotting data on X axis
A Pie of Pie Chart

 

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Matlab Simulink and Stateflow gotchas while running simulation with code generation with custom M functions

Matlab Simulink and Stateflow gotchas while running simulation with code generation with M functions

While in Simulink and Stateflow, if you use Matlab M functions it appears all local function variables need to be defined in the workspace. While running the simulation you can get errors like:

    Undefined function or variable ‘m’. The first assignment to a local variable determines its class.

Function ‘rsi’ (#89.382.383), line 17, column 2:

“m”

Launch diagnostic report.
While in SImulink and Stateflow, if you use Matlab M functions it appears all local function variables need to be defined in the workspace. This is needced 
for the Coder during the code generation process. I am sure there is a smarter way but I will dig into it in the near future. 
Hope this helps somewhat so far. 

Also, when using Stateflow transitions for Matlab M functions, you need to define the M function on the transition as explained here:
http://www.mathworks.com/help/stateflow/ug/example-of-a-matlab-function-in-a-stateflow-chart.html

I will post a full set of files with C++ code generated file. Want to know when that happens, join my FREE newsletter 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Learn how Matlab Simulink S Functions can ehance your connection to C or C++ functions

Learn how Matlab Simulink S Functions can ehance your connection to C or C++ functions

Interested in learning more? Join my FREE newsletter for this

Thanks to my Youtube subcriber for sending these over:

http://www.mathworks.com/help/simulink/create-cc-s-functions.html

http://www-rohan.sdsu.edu/doc/matlab/toolbox/simulink/sfg/sfun_c++2.html

http://blogs.abo.fi/alexeevpetr/2012/08/17/basic-invocation-of-cc-functions-in-simulin

 

Some more links:

http://blogs.mathworks.com/seth/2012/05/23/how-to-make-your-own-blocks-with-code-introduction-to-s-functions/

http://metalab.uniten.edu.my/~farrukh/MATLABWSHOP05/MY%20S-Function%20prest.ppt

The manual:
http://radio.feld.cvut.cz/matlab/pdf_doc/simulink/sfunctions.pdf

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

How do I reverse engineer those algorithms and functions in C++ that Matlab Coder toolbox does not support?

How do I reverse engineer those algorithms and functions in C++ that Matlab Coder toolbox does not support?

After my sticker shock on the prices of FPGA, I decided to crawl back to reality to re-investigate CUDA and all those algorithms from my Matlab strategies. How do i get them into C++ as Matlab don’t support them. Thankfully, there is maybe one library that enables me to do it. I just do got to reverse engineer thar process to complete the Matlab Coder conversion process from Matlab M to C++. I hope to have a video for my QuantLabs.net Premium Members.
JOIN now before my rates go up.

Or join my free newsletter to understand more things as I do them to build out this custom HFT platform. 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!