A Basic Probability Question
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I’m an italian student. Here’s my problem:
I created, using a for loop, a portfolio that has an expected future value from here to 30 years (T = 30). This portfolio is based on different combinations of expected future returns, so it follows 1000 paths (N = 1000). Now, once I created this matrix (1000x30), i would like to find, for example, the probability that the portfolio value will not fall below a predetermined threshold in each year. To be more clear, I mean:
- Pr (PortT > Port0), that is the probability that the portfolio value at time T is bigger than the initial value (with 30 <T<0).
or another example:
- The probability that the portfolio at time T+1 will not fall below 10% or 20% compared to previous year (with 30 <T<0).
In Matlab there isn’t a function called “probability” or “prb”, so I don’t know how to do that.
I know this may be a silly question but can you help me?
Thank you
0 件のコメント
採用された回答
Matt J
2013 年 1 月 8 日
編集済み: Matt J
2013 年 1 月 8 日
There's no "prb" function but there is a mean() function and every probability can be expressed as the mean of some binary random variable. This should give you the general idea,
probBiggerThanInitial = mean(bsxfun(@ge,yourmatrix,yourmatrix(:,1)),1)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Portfolio Optimization and Asset Allocation についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!