Simulating stock price paths in matlab using monte carlo

1 回表示 (過去 30 日間)
A Basu
A Basu 2017 年 11 月 27 日
I am trying to simulate stock price paths and I am using the following code where my initial stock price S0 = 5.However I need to have price paths which extend up to 60 or 70. The following code only provides me price paths upto S = 10. Is there a method to generate price paths starting from 5 to a limit (60 or 70)?
S = ones(M, N+1); #S0 = 5
R = exp((r - sigma^2/2)*dt+sigma*sqrt(dt)*randn(N,M));
SS = cumprod([S0*ones(1,M); R]);
S = SS';

回答 (0 件)

カテゴリ

Help Center および File ExchangeFinancial Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by