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

Different columns expected by some functions #8

Open
Thie1e opened this issue Jun 27, 2022 · 2 comments
Open

Different columns expected by some functions #8

Thie1e opened this issue Jun 27, 2022 · 2 comments

Comments

@Thie1e
Copy link

Thie1e commented Jun 27, 2022

Hi Kris,

thanks for the handy package. I tried it with Russell 1000 data and wanted to use some downstream functions on the results of the backtest.

When I run something like bt <- fixed_commission_backtest() and then append_nav_to_bt_results(bt) or calc_port_return(bt) I get errors. I found out that I can run these functions without errors if I transform all column names to lower case colnames(bt) <- tolower(colnames(bt)) and save the "value" column as "exposure" bt$exposure <- bt$value.

So I think there's something wrong with the variable names that are expected by append_nav_to_bt_results and calc_port_return. Can you check that? I can try to post a reproducible example if you cannot reproduce the error.

@robotmasterkris
Copy link
Contributor

robotmasterkris commented Jul 5, 2022 via email

@robotmasterkris
Copy link
Contributor

Note to self: this appears to be a result of inconsistency in output of backtest results dataframes.

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