Why does my binomial distribution not sum to one?
Show older comments
function [res]=Pbar_ho(phi,X0,sigma,X,r,t,o,x,l,N)
%o is number of jumps
%x is the conditioned diffusion correlation
alpha=X(1);
sigmapi=X(2);
mupi=X(3);
lambda=X(4);
nu=exp(mupi+sigmapi.^2/2)-1;
mui=log(X0)+(r-sigma.^2/2-lambda*nu+phi)*t+o.*mupi+sigma.*sqrt(alpha).*x;
sigmai=(1-alpha).*sigma.^2.*t+o.*sigmapi.^2;
p=normcdf(-mui./sigmai);
res=factorial(N)./(factorial(l).*factorial(N-l)).*(p.^l).*(1-p).^(N-l);
end
I am trying to model a conditional portfolio loss distribution for a portfolio with homogenous assets. Above we have conditioned on a browninan motion B_t=x and jump Y_t=o.
My question is, why does 'res' not sum to one for l=1:N? Is it not the binomial distribution?
Accepted Answer
More Answers (0)
Categories
Find more on Univariate Discrete Distributions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!