Skip to content

Instantly share code, notes, and snippets.

@OpenGamma-Blog
Created February 13, 2013 10:34
Show Gist options
  • Save OpenGamma-Blog/4943711 to your computer and use it in GitHub Desktop.
Save OpenGamma-Blog/4943711 to your computer and use it in GitHub Desktop.
MATLAB and OpenGamma 1
function r = MatlabBlackScholes(isCall, Price, Strike, Rate, Time, Volatility, Yield)
[Call, Put] = blsprice(Price, Strike, Rate, Time, Volatility, Yield);
if isCall
r = Call;
else
r = Put;
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment