Help with writing a function of Log-return and Volatility of a stock
조회 수: 1 (최근 30일)
이전 댓글 표시
Need some help about Writing a Matlab function that computes the 20days-historical mean of log-return and volatility of a stock. Formulas as below.
Thanks in advance. Im really stuck..
댓글 수: 0
답변 (1개)
Asvin Kumar
2021년 3월 18일
I'm not sure what the terms in those expressions are. If you're new to MATLAB and would like to learn the basics, have a look at the free MATLAB Onramp course. That should get you up to speed on how to use some basic functions.
Roger has an answer on calculating log returns here. You could also look for any existing function from the Financial Toolbox that would satisy your use case.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Financial Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!