Problems Using Financial Toolbox "maxdrawdown" Function

9 visualizaciones (últimos 30 días)
Michael Muhle
Michael Muhle el 29 de Feb. de 2020
Comentada: Michael Muhle el 3 de Mzo. de 2020
If I use the Financial Toolbox maxdrawdown.m function with a 1 input/ 1 output case it runs without a problem. I use the FundMarketCash data set embeded in the Financial Toolbox. Here is the case that works.
load FundMarketCash
MaxDD = maxdrawdown(TestData)
MaxDD =
-0.1658 -0.3381 0
Now if I try to increase the number of inputs and outputs I get the following error
[MaxDD, MaxDDIndex] = maxdrawdown(TestData, 'arithmetic');
Error using maxdrawdown
Too many input arguments.
I thought perhaps I needed to change the input TestData to returns rather than the tick values. But stilll got an error message.
TestData2 = tick2ret(TestData);
[MaxDD, MaxDDIndex] = maxdrawdown(TestData2, 'arithmetic');
Error using maxdrawdown
Too many input arguments.
Finally I tried just not using the arithemetic format but with two output variables. Again got an error message but this time too many output variables.
[MaxDD, MaxDDIndex] = maxdrawdown(TestData);
Error using maxdrawdown
Too many output arguments.
  2 comentarios
Urmila Rajpurohith
Urmila Rajpurohith el 3 de Mzo. de 2020
The above issue is not reproducible in 2019b.can I know which version of MATLAB you are using?
Michael Muhle
Michael Muhle el 3 de Mzo. de 2020
Hi Umila,
I was just getting ready to comment on this. One of the Matlab Central files I had downloaded before also had a file called maxdrawdown. Once I renamed the duplicate file everything worked fine. First time using Matlab Answers and really like it.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by