Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 22nd, 2012  |  syntax: None  |  size: 0.22 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. x=load('octave.csv');
  2. T=5;
  3. d=1;
  4. function out =  F(V, sigmaV, E, sigmaE, d1, d2, D, r, T)
  5.   out(1) = V*normcdf(d1) - D*exp(-r*T)*normcdf(d2) - E;
  6.   out(2) = normcdf(d2)*sigmaV*V - sigmaE*E
  7. end
  8. E = x(:,1);
  9. D = x(:,2);