Using GPU on blkimpv for a large matrix
1 view (last 30 days)
Show older comments
Hello guys, I would like to ask a question on arrayfun and GPU.
Suppose i have a large matrix 100 by 100, option prices. I want find the option implied volatility using the matlab built in function blkimpv. It took me ages to finish.
I decieded to use gpu for evaluation as follows.
function ret = test(f_T1, K_T1_T2, lb_T1_T2, expiry_T1_T2, x)
ret = blkimpv(f_T1, K_T1_T2, lb_T1_T2, expiry_T1_T2, x, 1, 1e-6,{'put'});
end
G = gpuArray(Price); ans = arrayfun(@test,f_T1*ones(100,100), K_T1_T2*ones(100,100), lb_T1_T2*ones(100,100), expiry_T1_T2*ones(100,100), G);
However, it fails, saying that blkimpv is not supported by gpuarray. Is there any way to compute the volatility in a quick way? I tried parfor, to evaluate vols row by row. It still took a long time. Thanks.
0 Comments
Answers (0)
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!