From: Diwakar Poudel on 7 Apr 2010 08:24 Hi, I am trying to write codes defining probability transition in a two dimensional model. I am using Markov process. I am lost on defining to both absorbing and reflecting boundaries in the matrix. following is my probability transition matrix. pxm=(h.*negdrift1(X,U)+0.5.*s1)./Q; pxp=(h.*posdrift1(X,U)+0.5.*s1)./Q; pym=(h.*negdrift2(Y,V)+0.5.*s2)./Q; pyp=(h.*posdrift2(Y,V)+0.5.*s2)./Q; and h step size, s1 s2 volatility (variances), Q = (abs(negdrift1(X,U)+posdrift1(Y,V))).*h+(abs(negdrift2(X,U)+posdrift2(Y,V))).*h+ s1+s2+1e-12; When I sum these probabilities, it is greater than 1 in some grids. I discover that this was due to the boundary problem (absorbing and reflecting boundaries). How to get rid of these boundary problems in such coding? I would be greatful for your reply. Many thanks.
From: Diwakar Poudel on 7 Apr 2010 08:57 I am trying to write codes defining probability transition in a two dimensional model. I am using Markov process. I am lost on defining to both absorbing and reflecting boundaries in the matrix. following is my probability transition matrix. pxm=(h.*negdrift1(X,U)+0.5.*s1)./Q; pxp=(h.*posdrift1(X,U)+0.5.*s1)./Q; pym=(h.*negdrift2(Y,V)+0.5.*s2)./Q; pyp=(h.*posdrift2(Y,V)+0.5.*s2)./Q; and h step size, s1 s2 volatility (variances), Q = (abs(negdrift1(X,U)+posdrift1(Y,V))).*h+(abs(negdrift2(X,U)+posdrift2(Y,V))).*h+ s1+s2+1e-12; When I sum these probabilities, it is greater than 1 in some grids. I discover that this was due to the boundary problem (absorbing and reflecting boundaries). How to get rid of these boundary problems in such coding? I would be greatful for your reply. Many thanks.
|
Pages: 1 Prev: Help with an error Next: I cannot run Matlab 7.1 properly |