I'm completely new to Mathematica and can't seem to find an answer elsewhere so hopefully I can get some help here. I'm trying to plot a recurrence relation, where a random variate is generated at each iteration of the recurrence. From looking at the output, it appears as though the RandomVariate evaluates to a constant at each iteration. I have this inside a 'manipulate' block:
ListLinePlot[
RecurrenceTable[{S[i] ==
S[i - 1]*
Exp[(r - (vol^2/2.0))*T/N +
vol*RandomVariate[NormalDistribution[μ, σ]]*
Sqrt[T/N]], S[1] == S0}, S, {i, 2, N}]]}]
Any help with what I'm trying to accomplish would be appreciated.
Edit: here's the full version
Manipulate[
Column[{
Plot[{PDF[ NormalDistribution[μ, σ], x],
PDF[ JohnsonDistribution["SU", γ, δ, μ, σ], x]}, {x, -6, 6}, Filling -> Axis],
ListLinePlot[
RecurrenceTable[{S[i] ==
S[i - 1]*
Exp[(r - (vol^2/2.0))*T/N +
vol*RandomVariate[NormalDistribution[μ, σ]]*
Sqrt[T/N]], S[1] == S0}, S, {i, 2, N}]]}],
Style["Distribution Parameters", 12, Bold],
{{μ, 0}, -5, 5},
{{σ, 1}, 0.1, 5},
{{γ, 1}, 1, 10},
{{δ, 1}, 1, 10} ,
Delimiter,
Style["Option Parameters", 12 , Bold],
{{N, 10}, 10, 1000},
{{T, 1/12}, 1/12, 1},
{{vol, 0.2}, 0, 1.0},
{{r, 0}, 0, 0.3},
{{q, 0}, 0, 0.3},
{{S0, 100}, 0, 1000},
ControlPlacement -> Left]