function Paths = pricepaths ( CurrentPrice , ExpRate , TimeToMaturity ,StdDeviation , NumOfSteps , NumOfPaths)
% PricePaths simulating paths of asset price which follows the geometric
% Brownian motion
%
% PARAMETERS:
% Paths is NumOfPaths price paths simulated with NumOfSteps steps;
% CurrentPrice is the current price of the asset;
% ExpRate is the expected rate of return on the asset price;
% TimeToMaturity is the time to maturity;
% StdDeviation is the standard deviation of return on the asset price;

DeltaT = TimeToMaturity/NumOfSteps;
Drift = (ExpRate-StdDeviation^2/2)*DeltaT;
Volatility = StdDeviation*sqrt(DeltaT)*randn(NumOfSteps,NumOfPaths);
Increments = Drift+Volatility;
LogPaths = cumsum([log(CurrentPrice)*ones(NumOfPaths,1),Increments],2);
Paths = exp(LogPaths);
end
