Numerical computing environment developed to allow matrix manipulations, plotting of functions and data and implementation of algorithms.

learn more… | top users | synonyms

1
vote
2answers
44 views

Asset allocation problem using Hidden Markov Model

I am recently getting more interested in Hidden Markov Models (HMM) and its application on financial assets to understand their behavior. But what captured my attention the most is the use of asset ...
0
votes
0answers
8 views

Matlab Neural Network data organization

I'm trying to train a NARX network using time series data. I've got 80 sets of data I'd like to train the network with. For clarification, one set of data comprises of 6 financial indicators of X ...
0
votes
1answer
10 views

Fit Simple VAR model in Matlab

I've been trying to fit the following model in Matlab: $\beta_{t}=a+Mt+A\beta_{t-1}+\epsilon_{t}$ Where a is a constant, M is a vector of trend parameters and A a cross-factor interaction matrix. I'...
1
vote
0answers
23 views

VAR FPCA analysis paper replication

I've been trying to replicate the following publication: toronto.edu/sjaimung/papers/VAR-FPCA.pdf but I havent been able to get the same results estimating the $\beta_{k}$ parameters. First, I got ...
0
votes
1answer
36 views

How to fit a skew normal/t copula to data

I want to use either the skew normal copula or the skew t copula with a time-varying correlation matrix. But so far I haven't found any way to implement this either in R or Matlab. Would anyone be ...
3
votes
1answer
57 views

Hull White Stochastic Volatility Model in Matlab

I'm trying to code the Hull White stochastic volatility model using matlab and somewhere my code seems to mess up. I've coded the SABR model as well and that's working fine. When I compare prices ...
1
vote
0answers
30 views

weighted probability densities in matlab

...
3
votes
1answer
70 views

Expected option return in MATLAB

The expected return of an option is given by its expected payoff under $P$ over its market price under $Q$. For the Black-Scholes model, expected call option return is given as (see here): $$ E(R)=\...
1
vote
1answer
77 views

Standard Stochastic Volatility Models VS Moving Average Stochastic Volatility Model

Hi... I am comparing the log-volatility of two SV models with an application to MATLAB. Since I am a rookie in this field, I do not know if I am wrong in interpreting the graph. In my opinion the only ...
1
vote
0answers
11 views

How to get daily OHLC (fints) from minutes OHLC (fints) in MatLab?

I have a minutes OHLC time series stored in fints object, how can I get a new fints object which contains daily OHLC? What is the easiest way to do it?
1
vote
1answer
22 views

compute volatility and greeks of american option on futures using matlab toolbox

I have learned some knowledges on option pricing by myself at a very beginer's level. I'm using matlab R2009b finacial derivative toolbox, I found option pricing functions for american options on ...
1
vote
0answers
27 views

student-t asset path

I am trying to simulate an asset path based on a t-distribution. I found a lot of ressources and the fact that it will be difficult to do a path. But now I changed my Geometric Brownian Motion ...
2
votes
2answers
49 views

Creating index from bloomberg data in matlab

I'v got 6 different equity index time series from which I want to create an index based on a particular percentage. This would be simple although due to different holidays the date don't always match. ...
1
vote
0answers
25 views

How to run swapbyzero matlab function in a loop [closed]

I made a for loop in Matlab in which I price a swap by using the swapbyzero function. The swapbyzero function requires a rates structure created by using the intenvset function from matlab. The ...
1
vote
1answer
106 views

How to estimate parameters for 2 correlated Ornstein-Uhlenbeck processes with maximum likelihood?

I would like to use maximum likelihood to estimate the parameters of two correlated Ornstein-Uhlenbeck processes from empirical data. Do you have any good references for this? If you have any hints as ...
2
votes
1answer
144 views

Simulate correlated Geometric Brownian Motion in the R programming language

In response to this question: How to simulate correlated Geometric brownian motion for n assets? One of the responses provides an implementation in MATLAB: http://www.goddardconsulting.ca/matlab-...
0
votes
1answer
61 views

L1 norm regularization of Markowitz portfolio in matlab

Markowitz portfolio with L1 norm regularization added L1 norm regularization based on the original model. The constraint equation is as follows: The following code is the original Markowitz Mean-...
5
votes
1answer
225 views

Portfolio Optimization using Parametric Portfolio Policy Method in MATLAB

I want to contruct an optimized stock portfolio with the restriction of a zero-investment strategy. The portfolio weight in each stock needs to be modeled as a function of state variables (factors ...
0
votes
0answers
20 views

FFT spread option price

Hurd and Zhou (2010) proposed a FFT-based method to calculate the spread option price. $\Phi$ is the characteristic function of $\log$-return and But I did not implement it successfully. Who has ...
3
votes
1answer
63 views

Numerical Optimizer Matlab Calibration LMM

I am trying to mimimize the following function in order to calibrate the Libor Market Model $$\sum_{i=1}^{n} \left(\sigma_i^{market}-\sigma_i^{Reb}\left(a,b,c,d,\beta\right)/\sqrt{T_i}\right)^2,$$ ...
1
vote
1answer
32 views

What is the difference between group and inequality constraints in Matlab?

Sorry if this seems stupid. I was wondering what the difference between a group and inequality constraint is in Matlab. As far as I can tell they are the same: From Matlab (http://uk.mathworks.com/...
7
votes
3answers
137 views

Return Attribution: Possible remedies for multicollinearity

Let's say I have the following regression setup, which I am using for portfolio return attribution: $R = 1*\beta(1) + A*\beta(2) + B*\beta(3) + C*\beta(4) + \epsilon $ where A is dummy matrix of ...
0
votes
0answers
48 views

Correlate the G2++ with a GBM model

In Matlab one can use the LinearGaussian2F function together with the simTermStructs function to create a simulated zero curve based on the G2++ model. Next to simulating the interest rates I need to ...
0
votes
1answer
180 views

Matlab code for equally weighted portfolio

I have daily returns of 10 stocks. I need to construct an equally weighted portfolio that goes long in the 3 highest returns and short in the 3 lowest returns. The portfolio needs to be re-balanced ...
3
votes
1answer
176 views

Cubic spline interpolation function within Matlab

I want to use the Cubic spline interpolation technique so I can interpolate yield curve points. Now I wonder if I can use the standard matlab function interpl1 (and then using the 'spline' method) or ...
3
votes
1answer
141 views

How to implement dummy variables into GARCH(1,1) model from structural breaks (ICSS)

Hello everybody, I was already searching a lot of forums and read a huge amount of different papers. But I guess I am to stupid or I am at a loss. Hopefully some of you are able to help me out. Here ...
1
vote
1answer
153 views

One-step ahead forecast of a AR(1) process (GARCH context)

I am using a Matlab toolbox for obtaining one-step ahead forecasts of the conditional mean from the ARMA(1,0)-GARCH(1,1) process and I have encountered a piece of code that contains, in my opinion, a ...
11
votes
3answers
459 views

Is there a website that lists replication code of financial papers?

There are lot of questions on this website related to the replication of the empirical part of financial papers. I noticed that some (honest) authors provide on their personal website some ...
1
vote
0answers
154 views

Skewed Generalized Error Distribution's (SGED) pdf

I want to use the SGED distribution of Theodossiou for GARCH estimation, however, I am struggling to understand which is the correct pdf function of the distribution. Let me just say that the ...
0
votes
0answers
209 views

Forecasting conditional mean in ARMA-GARCH model (R/Matlab)

I am trying to forecast the conditional mean from a ARMA(1,0)-GARCH(1,1) model. The mean equation in my model is: $x_t = \mu + \delta x_{t-1} + h_t \epsilon_t$ where x is the variable (a return ...
0
votes
0answers
97 views

Skewed Generalized Error Distribution in GARCH modelling

I am trying to estimate GARCH models with the use of Theodossiou's (2000) Skewed Generalized Error Distribution. I am modifying matlab's ARMAX-GARCH-K toolbox to calculate this model. I am calculating ...
3
votes
1answer
149 views

Log-likelihood of skew-t distribution

I am trying to estimate GARCH models with the use of Hansen's (1994) skew-t distribution. I am using matlab's ARMAX-GARCH-K toolbox, where the log-likelihood is calculated as: ...
0
votes
0answers
34 views

Inverse Laplace transform

I'm trying to compute the inverse Laplace transform of the function gam below ...
0
votes
1answer
40 views

Imposing MLE restrictions by logistic mapping

I am doing some Maximum Likelihood Estimation with a density that has time-varying parameters. I am using the fmincon function in Matlab, but I do not know how to ...
0
votes
1answer
119 views

Clayton-Gumbel (BB1) and Joe-Clayton (BB7) time-varying copulas

I'm trying to estimate parameters for Mixed Dynamic Copulas (Clayton-Gumbel and Joe-Clayton) Is there any code in MATLAB? Thanks for any help.
1
vote
0answers
72 views

Monte Carlo simulation of Multifractional Brownian Motion in MATLAB

Code under is taken from http://en.literateprograms.org/Monte_Carlo_simulation_(Matlab) ...
6
votes
1answer
245 views

Density forecast of a GARCH model

I am currently working on developing a series of density forecasts and I am encountering some problems. I am working on weekly S&P 500 returns and the returns process is described as $r_{t} = \...
0
votes
0answers
144 views

Maximum Likelihood Estimation Heston Model using Matlab

My question is based on the MLE of the Heston model discussed in this paper URL: http://www.princeton.edu/~yacine/stochvol.pdf with Matlab code: http://www.princeton.edu/~yacine/closedformmle.htm ...
1
vote
1answer
587 views

Geometric Brownian Motion - Why Sqrt(dt)? [closed]

I was going to simulate a geometric brownian motion in matlab, when I recognized that I didnt fully understand the underlying Wiener process. Following the instuctions here I am starting from the ...
2
votes
0answers
140 views

Simulation of Heston process

I am currently working on implementing Heston model in matlab for option pricing (in this case I am trying to price a European call) and I wanted to compare the results I obtain from using the exact ...
4
votes
1answer
156 views

Matlab Portfolio Optimization with bid ask spread

I'm trying to find the optimal portfolio of options and stock which minimizes the standard deviation of the portfolio returns but also taking into consideration the bid and ask prices of the assets. ...
1
vote
2answers
316 views

Aggregate interactive brokers data in matlab

I am using matlab and interactive brokers API. I am getting real time data using tickerID = ib.realtime({ct},'233',@(varargin)ibEventRealTimeData(varargin{:})); where ib is the interface to ...
1
vote
0answers
78 views

Initial values for Heston Model calibration

I'm doing a Heston model in Matlab using simple Monte Carlo simulations (5.000 paths and 2 steps per day, simulating 360 days). When I try to calibrate the Heston parameters using fminsearch it takes ...
1
vote
0answers
90 views

How to decide if the ARCH coefficient is necessary in the GJR-GARCH model?

I did some analysis for CAC 40, the French market benchmark, for the period 2005-2014, and I tried to fit the data with a GJR(1,1) model in MATLAB. Then some warning showed Lower bound ...
0
votes
1answer
101 views

Do I need simulink to model the risks of an option portfolio

I wish to buy Matlab Home and learn to model the risks of a derivatives portfolio and then stress test it. So I am guessing I will need : Stochastic calculus Linear algebra Stats/Probability Some ML ...
-4
votes
1answer
46 views

Matlab loop statement is driving me mad [closed]

Can someone please help me out with this loop over here? Matlab simple refuses to consider the for o=k:k-20 statement inside the if statement. :pullingmyhair: ...
2
votes
1answer
163 views

How to identify the orders p and q for ARIMA model using least squares method?

I would like to identify the orders p and q for ARIMA model using least squares method in Matlab. I have got also two data files (one with noise and one without) Previously I identified p and q for ...
1
vote
1answer
318 views

matlab interpretation of johansen cointegration test

I need some help understanding the results of Johansen Cointegration test run on MATLAB. I am quite new to econometrics and do not fully comprehend what MATLAB has come up with. I would be really in ...
3
votes
2answers
349 views

How to simulate a CIR process using GPU and Matlab

I am trying to simulate a CIR process using Matlab and my GPU for effeciency. At the moment i run into some implementation problems due to the recursive nature of the discretization. The sheme I ...
3
votes
1answer
1k views

constrained portfolio optimization by fmincon

I am working through this paper, http://www.nber.org/papers/w8922.pdf I want to implement the portfolio weight constraints see page 6-7. Here is the brief overview of my problem: Let ...