Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [] = r0304408_opgave12(strike,days,price,sigma)
- [Call, Put] = blsprice(price, strike, 0, days, sigma);
- for i = 1:8,
- maxi(i) = 0;
- for j = 1:50,
- calculated(j,i) = r0304408_europeanOptionValue(strike,price,sigma,days,0,10^i);
- if maxi(i) < abs(Call - calculated(j,i)),
- maxi(i) = abs(Call-calculated(j,i));
- end
- end
- end
- loglog(maxi);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement