Using Price2Ret to calculate Return
5 次查看(过去 30 天)
显示 更早的评论
Suppose I have a data with the first column is Date and the second column is Price. I would like to calculate Returns using price2ret and put that information on the third column. Please advise.
3 个评论
dpb
2018-7-8
编辑:dpb
2018-7-8
Post your work...I don't have the requisite toolbox nor data to work from. Best would be a small self-contained example illustrating the problem you ran into instead of expecting volunteers to try recreate your (unknownst to us) problem scenario.
What happens with
t=readtable('sample4.xlsx');
[ret,ints]=price2ret(t.Price,t.Date);
??? Does it barf on datetime array?
回答(1 个)
Akshay Srivastava
2018-7-9
It will be better, if you could send the code you are working on to understand the exact need of your question and it would help in answering properly.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time Series Objects 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!