Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible problem with small alpha values (esr_backtest) #8

Open
EmanuelSommer opened this issue Feb 21, 2022 · 3 comments
Open

Possible problem with small alpha values (esr_backtest) #8

EmanuelSommer opened this issue Feb 21, 2022 · 3 comments

Comments

@EmanuelSommer
Copy link

Hi,

first of all thanks for the great package. Unfortunately I get an error that leaves me clueless for the code below with the test data that you can find here.

The code snippet:
esback::esr_backtest(test$r,test$q,test$e, alpha = 0.01, version = 1)
The error is:
Error in x %*% (bu - bl) : non-conformable arguments

Maybe you can help with this or at least clearify why there might be limitations.

Thanks a lot in advance!

@BayerSe
Copy link
Owner

BayerSe commented Feb 21, 2022

Hi Emanuel,

thanks for reaching out and providing an example with your report.

The reason for this behavior is that the number of observations is too small for this type of model. If you check out our paper, you'll see that the smallest number of observations we consider in our simulations is 250 with a value of alpha of 5%.

With n=100 and alpha=1% you're out of luck here, sorry.

@BayerSe BayerSe closed this as completed Feb 21, 2022
@EmanuelSommer
Copy link
Author

EmanuelSommer commented Feb 21, 2022

Thanks for the quick reply!

Just to clarify the alpha refers to the probability level τ in the paper, right? So you actually used as the smallest specification n=250 and alpha=0.025 in the MC simulation on page 37 of your paper? Please correct me if I am wrong.

Just as a sidenote I also got the same error for sample sizes close to 300 and the alpha level of 1%. Input checks that trigger more informative error messages would be great in this context.

@BayerSe
Copy link
Owner

BayerSe commented Feb 22, 2022

Sure, I'm glad someone is actually using the package ... ;-). And yes, I meant $\tau = 0.025$. Sorry for the confusion.

Thanks for the hint with the error messages. I think I should indeed add more checks on the input data. Thanks for bringing this up.

@BayerSe BayerSe reopened this Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants