small stylistic change
This commit is contained in:
parent
0725cbc21f
commit
cb20d79549
2
ch14.jl
2
ch14.jl
@ -78,7 +78,7 @@ function asian_value(T, X0, K, r, s, m, max_time)
|
|||||||
result = Float64[]
|
result = Float64[]
|
||||||
start_time = time()
|
start_time = time()
|
||||||
while time() - start_time < max_time
|
while time() - start_time < max_time
|
||||||
append!(result, ThreadsX.map(_ -> payoff_asian_sample(T, X0, K, r, s, m), 1:10_000))
|
append!(result, ThreadsX.map(i -> payoff_asian_sample(T, X0, K, r, s, m), 1:10_000))
|
||||||
end
|
end
|
||||||
n = length(result)
|
n = length(result)
|
||||||
mv = mean(result)
|
mv = mean(result)
|
||||||
|
@ -21,7 +21,7 @@ function asian_value(T, X0, K, r, s, m, max_time)
|
|||||||
start_time = time()
|
start_time = time()
|
||||||
while time() - start_time < max_time
|
while time() - start_time < max_time
|
||||||
append!(result,
|
append!(result,
|
||||||
ThreadsX.map(_ -> payoff_asian_sample(T, X0, K, r, s, m),
|
ThreadsX.map(i -> payoff_asian_sample(T, X0, K, r, s, m),
|
||||||
1:10_000))
|
1:10_000))
|
||||||
end
|
end
|
||||||
n = length(result)
|
n = length(result)
|
||||||
|
Loading…
Reference in New Issue
Block a user