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

passing functions and arguments to compute_es #2

Open
1danjordan opened this issue Sep 26, 2016 · 0 comments
Open

passing functions and arguments to compute_es #2

1danjordan opened this issue Sep 26, 2016 · 0 comments

Comments

@1danjordan
Copy link
Owner

Trying to work out an elegant interface for turning VaR functions into expected shortfall measures. At the moment it seems reasonable to use as_function to pass a VaR function with further arguments in ....

Would like something like

# Compute ES by averaging tail VaRs
compute_es(some_var_measure, arg1, arg2, conf = 0.9, n = 1000)

Then ES functions could inherit the same parameters as the corresponding VaR measure and be simplified to

some_es_measure <- function(inherited_var_args, conf, n) {
    compute_es(some_var_measure, inherited_var_args, conf, n)
}

Could be more suitable to use partial though?

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

1 participant