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

treynor_ratio() missing 1 required positional argument: 'benchmark' in train_and_evaluate.ipynb Cell 10 #440

Open
Quentin168 opened this issue Apr 29, 2022 · 7 comments

Comments

@Quentin168
Copy link

Please make sure that this is a Bug or a Feature Request and provide all applicable information asked by the template.
If your issue is an implementation question, please ask your question on StackOverflow or on the TensorTrade Discord #help-desk channel instead of opening a GitHub issue.

System information

  • Have I written custom code (as opposed to using example directory):
  • OS Platform and Distribution Windows 10
  • TensorTrade version:
  • TensorFlow version: AttributeError: module 'tensorflow' has no attribute 'GIT_VERSION'
  • Python version: Python 3.9.7

You can obtain the TensorFlow version with:
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"

**### **d:\tensortrade-master\examples\train_and_evaluate.ipynb Cell 10'**** in <cell line: 1>()
----> 1 data = generate_features(data)
d:\tensortrade-master\examples\train_and_evaluate.ipynb Cell 9' in generate_all_default_quantstats_features(data)
54 for indicator_name in indicators_list:
55 try:
56 #print(indicator_name)
---> 57 indicator = qs.stats.dictindicator_name
58 if isinstance(indicator, pd.Series):
59 indicator = indicator.to_frame(name=indicator_name)

TypeError: treynor_ratio() missing 1 required positional argument: 'benchmark'

Describe the expected behavior
treynor_ratio() is special, missing 1 required positional argument: 'benchmark'

Code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.

Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

@segatrade
Copy link

Got the same bug

@sanoj2021
Copy link

Same here after following @selentium0 advise in issue #443

@lifehsiwu
Copy link

Got the same bug

@fsz168
Copy link

fsz168 commented Nov 24, 2022

The same problem, many bugs

@nexon33
Copy link

nexon33 commented Jan 20, 2023

same

@newzapster
Copy link

Same here. Any solution?

@newzapster
Copy link

Solved by adding treynor_ratio in the excluded_indicators like below:

def generate_all_default_quantstats_features(data):
excluded_indicators = [
'compare',
'greeks',
'information_ratio',
'treynor_ratio',
'omega',
'r2',
'r_squared',
'rolling_greeks',
'warn'
]

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

7 participants