The tag has no wiki summary.

learn more… | top users | synonyms

5
votes
1answer
141 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 ...
4
votes
3answers
331 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 ...
3
votes
0answers
149 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 ...
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 ...
2
votes
2answers
188 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: ...
2
votes
1answer
213 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
1answer
407 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 ...
1
vote
1answer
72 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 ...
1
vote
1answer
38 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
17 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
1answer
53 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
16 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 ...
0
votes
1answer
60 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
1answer
489 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 ...
0
votes
2answers
323 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
1answer
142 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
206 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 ...
0
votes
2answers
248 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
75 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 ...
0
votes
0answers
49 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
23 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 ...
0
votes
0answers
111 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
0answers
456 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: ...
-1
votes
0answers
46 views

Calculating Modified Duration on Excel and Matlab - differences?

I'm currently trying to duplicate the excel formula in a matlab code. However, it seems that I have significant differences when it comes to 29th february and 29/30th August. I also have very small ...