Tag Info

Hot answers tagged

13

Of course it is fast enough. But what is fast enough? I know guys who trade off Excel sheets and they make millions, but those guys are clearly not active in high frequency space. So, it entirely depends on your trading frequency and average holding period. I also know of shops that run live trading systems by calling R functions, so, obviously Matlab ...


4

If I understand you right, you are talking specifically about Matlab's embedded code generation facility (see here: http://www.mathworks.ch/embedded-code-generation/). In my view, the answer to your question is clearly yes. This feature allows you to generate hardware specific code, e.g. for deployment on GPU's (video cards). It's used for aerospace ...


4

I found these nice lecture note by Karl Sigman on the web. On page three you see if $X\sim N(\mu,\sigma)$ then the moment generating function (mgf) of $X$ is given by $$M_X(s) = E(exp(sX)) = \exp( \mu s + \sigma^2 s^2 /2)$$ Thus for Brownian motion with drift $X_t$ you get $$ M_{X_t}(s) = E(exp(s X_t)) = \exp( \mu t s + \sigma^2 s^2 t /2). $$ Finally for ...


4

If I understand you correctly, then you have a filter defined for your portfolio that is defined by "1.". A) So you either filter out these bonds before you start anything that has to do with the optimization. This should be the way to go if you are interested in speeding up your program. B) If you want to do everything in the optimization, then you need ...


4

The corresponding process would be fractional brownian motion (see here) It is parametrized by the Hurst Exponent. On the referenced site you find a link to some matlab code for simulating realizations of fractional BM. If you want to see some fractional Gaussian Noise in action (Matlab) you can do so here. Further more you might want to look into ...


3

I would use a Metropolis Monte Carlo / simulated annealing approach to solve your problem. Start with an arbitrary fully invested portfolio which satisfies constraints (2), (3) and the cardinality constraint $N \le K$. Then choose one of the following trial moves: Select two bonds $i,j$ at random and perform a random weight shift $w_i \rightarrow w_i + ...


3

No, rng does not do the same as rand. rng sets the seed for the random number generator and rand generates random numbers. Also it can be seen in documentation that the rng function only accepts positive integers. Usually random number generator algorithms start with integers for the seed. For various examples: C random function takes the system clock as ...


2

work you way from GARCH(4,4) to GARCH(0,0) removing the intercept too. 5*5*2-1 = 49 estimations Make sure your coefficients are all statistically significant at least to 95% confidence. Make sure you have no autocorrelation in your error terms. pacf and acf should be clean. Likelihood ratio tests assess whether you lose explaining power from ...


1

A very simple approach could be the following: draw a random number for each day for each stock. If you refer to "average/mean" by return and to "standard deviation/variance" by volatility, you could use these for the distribution parameters of the random numbers per stock. If you dislike that values can go below zero, apply Euler's exponential function on ...


1

I am trying to make things clear with this answer. In the case of the normal distribution it holds that the moment generating function (mgf) is given by $$ M(h) = \exp(\mu h + \frac12 \sigma^2 h^2), $$ where $\mu$ is the mean and $\sigma^2$ is the variance. Thus the cumulant generating function $C(h)$ which is given by $C(h) = \ln (M(h))$ reduces to $$ C(h) ...


1

I don't know what is supported by MatLab (I use Java to do such stuff :-). But in case you do not find a solution from the swapbyzero function you mentioned I can suggest a workaround: Value a swap with the annual fix frequence. Given that it is a payer swap (pays the fixed leg), correct the value by: Substract the value of an annual fix coupon bond ...



Only top voted, non community-wiki answers of a minimum length are eligible