The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
4 views

What is the most elegant way to write a trading (or asset selection) algorithm in MATLAB, based on a simple criterion?

Assume a $T \times N$ matrix $X$ of values for an asset characteristic at time $t \in \{1,2,\dots,T \}$, where $T$ is the observation period in months and $N$ is the number of assets and a ...
0
votes
0answers
20 views

Interpretation of Cointegration results, pValues and t-Stat

This is a follow up to: Cointegration results interpretation validation? I ran another Engel Granger Test on a pair, The results I get: ...
0
votes
1answer
42 views

Cointegration results interpretation validation?

Here is how I am interpreting results of a Johansen Cointegration Test and Engel-Granger Test for A and B. The results:(Using matlab) ...
2
votes
1answer
67 views

formulating MVO with costs

I am trying to formulate this simple MVO utility function with a linear transaction cost penalty added using Quadprog in MATLAB tcost = 0.001; lambda = 4; mu = vector of expected returns (say 4x1) S ...
1
vote
2answers
57 views

How to combine Gaussian marginals with Gaussian copula to obtain multivariate normals?

in the book "Numerical Methods and Optimization in Finance" I red the following: "Combining the Gaussian copula with Gaussian marginal gives a fancy way of expressing multivariate normals. However, ...
1
vote
1answer
98 views

Cholesky Decomposition on Correlation Matrix for Correlated Asset Paths

I found a matlab example for modelling correlated asset paths: http://www.goddardconsulting.ca/matlab-monte-carlo-assetpaths-corr.html In this model the author uses the matlab code chol() in order to ...
1
vote
0answers
64 views

Autoregressive distributed lag models ADL(p,q) howto in preferably matlab (stata/R/python/C# etc)

Could anyone provide me the details of how to determine the lag order of the distributed lags for an ADL(p,q) model in Matlab or another statistical package (and very much preferably in combination ...
1
vote
2answers
212 views

How to calculate the volatility matrix with multiple stocks

calculating the volatility for a single stock is straightforward. However, I'm not sure whether my approach for calculating the volatility matrix for multiple stocks is correct: I assume a log-normal ...
2
votes
1answer
287 views

Johansen Cointegration Test

I just performed a Johansen Co-integration test on two stocks. The results I get are: ans = r0 r1 t1 true false I am using Matlab. Can ...
1
vote
0answers
32 views

Handling IQFeed events in Matlab

I need to get some specific market data for my studies, and it seems like the most convenient way for me to do this is to use IQFeed data feed and MATLAB. But unfortunately, since I'm not a seasoned ...
2
votes
2answers
243 views

SVCJ (SVJJ) Duffie et. al Model implementation in Matlab

I'm attempting to implement aforementioned SVCJ model by Duffie et al in MATLAB. so far without success. It's supposed to price vanilla (european) calls . parameters provided, the expected price is: ...
5
votes
1answer
219 views

PDF Calculation by Fourier Inversion of Characteristic Function for Affine Intensity Process in Matlab

I'm trying to use the Fourier inversion formula to plot the PDF of an Affine Stochastic Intensity Reduced Form Credit Model, given its characteristic function. The characteristic function of an ...
0
votes
0answers
70 views

Identifiability for Time Invariant State Space Models

Kevin Murphy's Kalman Filter toolbox (for Matlab) contains an example where it's the fact that the state space system in not identifiable causes problems. I include the example in it's entirety but ...
0
votes
0answers
28 views

Engle Granger test returns a 0 in matlab, while correlation factor is .80+. Am I doing something wrong?

Engle Granger test is giving me a ans = 0. The correlation factor is: 0.8+ Does this imply the No cointegration hypothesis is true? i.e. as per my understanding that there is cointegration? I am ...
4
votes
3answers
377 views

Sampling problem in portfolio optimization

In a summary I am trying to do the following Bond Subset 1 : Get list of USD Bonds --> Filter out Bonds which have YTM > y% DUR > 10 Y etc. .. This gives us Bonds which we are interested in. So ...
1
vote
1answer
92 views

What are the equation that gives hurst exponent of value >0.7 and <0.3?

I had been working on algorithm which uses the Hurst Exponent. Once i random walk simulation on matlab, x = cumsum(randm(1000,1)), I was able to get a hurst value close to 0.5. To analyze the use of ...
0
votes
2answers
503 views

Optimal lag length selection criterion in GARCH(p,q) model using MATLAB

As assessed by the title, I'm trying to estimate a GARCH(p,q) model to forecast stock market volatility and, in order to be able to do that, I've to identify the optimal number of lags, p and q, to ...
0
votes
0answers
140 views

Copula Value At Risk

Let's suppose I have two asset in my portfolio. I want to compute Copula Value At Risk. Can you help me? This is the code I wrote: ...
0
votes
1answer
186 views

How do I simulate stock prices for a 10 asset portfolio, over a period of 10 years in MATLAB? [closed]

If I have given vectors for return and volatility (i.e. I have two 1x10 vectors), and I assume at first that their correlation is 0 (meaning my covariance-variance matrix is just diagonal), how do I ...
0
votes
1answer
245 views

How can I calculate the Cumulant-Generating Function in Matlab?

Let $M(h)$ be the moment-generating function, then the cumulant generating function is given by $$K(h)=\text{ln}M(h)=\\ =\kappa_1h+\frac{1}{2!}h^2\kappa_2+\frac{1}{3!}h^3\kappa_3+\ldots$$ where ...
3
votes
0answers
158 views

How can I introduce exogenous variables in the equation of the conditional variance?

Is it possible to introduce dummy variables or explanatory variables in the GARCH variance equation (garchset and garchfit).This is done in the mean (ARMAX) equation through the input 'Regress' in ...
0
votes
1answer
64 views

how to extract moments of GB from moment generating function?

I'm searching for the moments of geometric brownian motion using the gmm optimization program. the aim is to make the process y(t) of returns follows a normal distribution Are there any packages in ...
0
votes
0answers
545 views

fetch from yahoo! finance database - varying number of ticks

To test a model with real-life data, I used the fetch-function in matlab to connect to the database of yahoo! finance. My code to try and get 7 different assets' returns is the following: ...
2
votes
1answer
476 views

Continuous returns for negative roll-adjusted futures data

I've generated roll adjusted notional futures data by adding a roll adjustment to the settlement price then multiplying by contract multiplier through time. For example, for crude oil CL, on 15 March ...
0
votes
2answers
290 views

Matlab; How to specify Coupon frequency for Interest Rate Swap

I'm trying to price an interest rate swap and would like to change the default coupon payment frequency from 1 a year to 2 or 4 a year. I'm using ...
0
votes
1answer
637 views

Matlab - Differences between rng and rand

I was trying to run some Monte-Carlo simulations and if I used: rng(seed, 'Twister'); For some reason I would get "Option Values Can not be Negative" errors in the blsimpv function, but if I just ...
2
votes
1answer
230 views

Implementing nonlinear optimization to find model free implied volatility using Matlab

I am trying to calculate model free implied volatility $\sigma_{MF}$ for a relative performance index using the following method: $\sigma_{MF}^2=2\sum_{i} [\frac{C(T,K_{i})}{K_{i}^2} - ...
2
votes
3answers
1k views

Is MATLAB-generated code good enough for use in live trading?

I know that MATLAB has mechanisms for generating code, but I've never used them. Have you? If you have - is it good enough (=fast enough, I guess) to be used in live trading systems? Anything one ...