Matlab code related to finance

조회 수: 3 (최근 30일)
Zeynep Toprak
Zeynep Toprak 2021년 4월 3일
답변: Viranch Patel 2021년 7월 9일
Generate a matrix that includes the adjusted close prices of the assets.
At first, I download the data as follows
stocks = hist_stock_data('01012010','01012020','GOOGL','AAPL', 'AMZN', 'MSFT');
But After that, I see this error message:
Unrecognized function or variable 'hist_stock_data'.
I cannot continue to solve this question. How can I do that? Please share your ideas and some hints with me thank you
  댓글 수: 2
Steven Lord
Steven Lord 2021년 4월 3일
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
Zeynep Toprak
Zeynep Toprak 2021년 4월 3일
I underatand. I dont want you to do all parts in fact. Yes, I am beginner in Matlab. so, please just help me to call these data and create a matrix. Please help me to do the part (a). I can easily formulate the rest parts. Thanks a lot.

댓글을 달려면 로그인하십시오.

답변 (1개)

Viranch Patel
Viranch Patel 2021년 7월 9일
The function 'hist_stock_data' accepts only three arguments if you're referring to this function.
So you can write like this individually.
stocks_Google = hist_stock_data('01012010','01012020','GOOGL');
stocks_Amazon = hist_stock_data('01012010','01012020','AMZN');

카테고리

Help CenterFile Exchange에서 Financial Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by