Tagged Questions

The tag has no wiki summary.

23 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) ...
29 views

stop loss and a take profit algorithm [closed]

how I can implement a stop loss and a take profit algorithm for pairs trading strategy ? thanks for your cooperation regards
14 views

transaction costs in pairs trading strategy [closed]

I would like to know what types of transaction costs should I consider for pairs trading strategy and what their percentages are. Thanks to all for the help regards
33 views

i don't understand how the final return is Calculated in this part of the code matlab. r4 is the total return vector 'series' Represents the prices of companies. Specifically I'd like to learn the ...
65 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 ...
56 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, ...
96 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 ...
59 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 ...
210 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 ...
276 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 ...
31 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 ...
242 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: ...
216 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 ...
69 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 ...
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 ...
375 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 ...
91 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 ...
491 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 ...
139 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: ...
184 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 ...
242 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 ...
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 ...
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 ...
543 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: ...
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 ...
289 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 ...
631 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 ...
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} - ...