fbpx

Is the best way to go from research paper from quant trading algo to C via Matlab and MuPAD ?

(Last Updated On: April 28, 2014)

 

Is the best way to go from research paper from quant trading algo to C via Matlab and MuPAD ?

This appears to be an interesting research development. I was playing with the following functions as displayed:

I just played with this in the Matlab command console:

>> syms x y t
>> z = (x^3 – tan(y))/(x^3 + tan(y));
w = z/(1 + t^2);
F = [w, (1 + t^2)*x/y; (1 + t^2)*x/y,3*z – 1];
>> matlabFunction(F,’file’,’testMatrix.m’,’vars’,[x y t])

ans =

@testMatrix

>> ccode(F)

ans =

F[0][0] = -(tan(y)-x*x*x)/((tan(y)+x*x*x)*(t*t+1.0));
F[0][1] = (x*(t*t+1.0))/y;
F[1][0] = (x*(t*t+1.0))/y;
F[1][1] = (tan(y)*-3.0+(x*x*x)*3.0)/(tan(y)+x*x*x)-1.0;

>> latex(F)

ans =

\left(\begin{array}{cc} -\frac{\tan\!\left(y\right) – x^3}{\left(x^3 + \tan\!\left(y\right)\right)\, \left(t^2 + 1\right)} & \frac{x\, \left(t^2 + 1\right)}{y}\\ \frac{x\, \left(t^2 + 1\right)}{y} & – \frac{3\, \left(\tan\!\left(y\right) – x^3\right)}{x^3 + \tan\!\left(y\right)} – 1 \end{array}\right)

>> pretty(F)

+- -+
| 3 2 |
| – x + tan(y) x (t + 1) |
| – ———————-, ———- |
| 3 2 y |
| (x + tan(y)) (t + 1) |
| |
| 2 3 |
| x (t + 1) 3 (- x + tan(y)) |
| ———-, – —————– – 1 |
| y 3 |
| x + tan(y) |
+- -+
>>

 

Join my FREE newsletter to learn more if this is the  best way to got from research paper to C with Matlab and MuPAD

 

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!

Subscribe For Latest Updates

Sign up to best of business news, informed analysis and opinions on what matters to you.
Invalid email address
We promise not to spam you. You can unsubscribe at any time.

NOTE!

Check NEW site on stock forex and ETF analysis and automation

Scroll to Top