Library: | finance |
See also: | stockest stockestsim |
Quantlet: | stocksim | |
Description: | simulates random processes for a stock price by three different ways: 1. using a Wiener Process, 2. using a compounded Poisson Jump Process with a log normal distribution of jump height and 3. using a mixture of both. |
Usage: | stocksim() or stocksim(S,sigma,tau,rate,shocks,jumps,jumpvola) | |
Input: | ||
S | scalar, starting value of the underlying asset | |
sigma | scalar, volatility (0%-100%) | |
tau | scalar, days to expiration | |
rate | scalar, increasing rate of return | |
shocks | scalar, shocks per day | |
jumps | scalar, expected number of jumps | |
jumpvola | scalar, volatility for the height of the jump (0%-100%) |
library("finance") stocksim()
Invokes an interactive menu where you are asked to specify the stock features. A display with three random processes will be shown. The diffusion process is depicted as a black line, the jump process as a green one and the mixed process as a blue line.
library("finance") S = 200 sigma = 10.0 tau = 200 rate = 5.0 shocks = 2 jumps = 20 jumpvola = 0.5 stocksim(S,sigma,tau,rate,shocks,jumps,jumpvola)
A display showing the three random processes. The diffusion process is depicted as a black line, the jump process as a green one and the mixed process as a blue line.