Help with writing a function of Log-return and Volatility of a stock

1 回表示 (過去 30 日間)
kubilay muameleci
kubilay muameleci 2020 年 11 月 3 日
回答済み: Asvin Kumar 2021 年 3 月 18 日
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..

回答 (1 件)

Asvin Kumar
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.

カテゴリ

Help Center および File ExchangeFinancial Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by