1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Need help with financial matlab

  1. Jul 12, 2009 #1
    i got this code of the internet, the reason i am unable to run is beacuse of this "pric" file, its like a "binprice" in matlab, but i think it is self made. this code is for a binomial model to solve TIAN pricing model

    %File: TIAN1.m
    % Objective: Binomial pricing of "in-the-money" american put
    %option using TIAN binomial model
    % Author: Group 4
    S0=40;
    K=45;
    T= 5/12;
    r= 0.08;
    sigma = 0.30;
    price=1:250;
    for n=25:250
    deltat=T/n;
    M=exp(r*deltat);
    V=exp(sigma^2*deltat);
    s=sqrt(V^2+2*V-3);
    u=M*V*(V+1+s)/2;
    d=M*V*(V+1-s)/2;
    p=(M-d)/(u-d);
    beta=1/M;
    V=pric(S0,K,u,d,p,beta,n); the error comes from this line as shown below
    price(n)=V(1,1);
    end;
    plot(25:250,price(25:250));
    xlabel('Iterations');
    ylabel('Option Value');
    title('Binomial Pricing');

    Error in ==> TIAN1 at 20
    V=pric(S0,K,u,d,p,beta,n);

    so if anyone knows this pric file or does know a way around it, will be much better.
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?



Similar Discussions: Need help with financial matlab
  1. Matlab help (Replies: 0)

Loading...