What Is the pric Function in MATLAB for TIAN Pricing Model?

  • Thread starter madi281
  • Start date
  • Tags
    Matlab
In summary, the "pric" file is necessary for the TIAN1.m code to run, but it seems to be unavailable.
  • #1
madi281
1
0
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.
 
Physics news on Phys.org
  • #2
Unfortunately, it appears that the "pric" file is not available. Without this file, it will be impossible to run the TIAN1.m code. You may need to contact the author of the code or search online for more information on the "pric" file.
 
  • #3


I would suggest reaching out to the author or the source of the code, as they would have the most knowledge about the "pric" file and its purpose in the code. Alternatively, you could try finding a different code or algorithm for solving the TIAN pricing model that does not require the "pric" file. It is important to fully understand the code and its components before using it for financial analysis or decision making.
 

1. How can I use MATLAB for financial analysis?

Matlab has a variety of built-in functions and tools specifically designed for financial analysis. These include functions for calculating financial metrics such as mean, median, standard deviation, and correlation. Additionally, it has tools for creating charts and graphs to visualize financial data.

2. Can I perform complex financial calculations using MATLAB?

Yes, MATLAB has powerful computational capabilities that allow you to perform advanced financial calculations, such as option pricing and risk analysis. It also has a wide range of financial modeling and simulation tools.

3. Can I import financial data into MATLAB?

Yes, you can import financial data from various sources, including Excel spreadsheets, databases, and online sources, into MATLAB for analysis. You can also export your results back to these sources for further analysis or reporting.

4. Is MATLAB suitable for both personal and business financial analysis?

Yes, MATLAB can be used for both personal and business financial analysis. It is a versatile tool that can handle both small and large datasets, making it suitable for individuals, small businesses, and large corporations.

5. Are there any resources available to help with financial analysis using MATLAB?

Yes, MATLAB offers comprehensive documentation and tutorials for using its financial analysis tools. There are also online communities and forums where users can ask questions and share knowledge and tips about using MATLAB for financial analysis.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
10
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
11
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Advanced Physics Homework Help
Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
15
Views
2K
  • Computing and Technology
Replies
19
Views
3K
Back
Top