-
-
Notifications
You must be signed in to change notification settings - Fork 847
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
utils.make_index : TypeError: unsupported operand type(s) for +: 'float' and 'str' #349
Comments
I have the same error, it is not posible to run the tickers and weights of a portfolio |
I am also encountering this issue... nothing I have done is fixing it. |
Can you use a different way to generate the dictionary? IAC = dict(SPY = 1.3, AGG = -0.3) Also it would be useful if you can copy the output error code as a text and paste it in here. |
I tried generating the dict as above, but to no avail... Here is my error code as text: /Users/benjoergens/PycharmProjects/Assignment/.venv/lib/python3.12/site-packages/quantstats/utils.py:379: FutureWarning: 'M' is deprecated and will be removed in a future version, please use 'ME' instead. |
Same error Simplest code, latest 0.0.62 version %matplotlib inline extend pandas functionality with metrics, etc.qs.extend_pandas() conservative = {"IVV": 0.5,"URTH": 0.5} |
I did a quick fix in the code and it works now. Fork, uninstall library, git clone, pip install -e . , make changes, save, works. `def make_index(
|
Hi, I have the same problem, I added the "rebalance=None" parameter option and it worked. The problem is that it's set to rebalance= '1M' by default, and if you are using '1d' data I don't know why, but produce this error. Example code that works: |
Check out https://github.com/Lumiwealth/quantstats_lumi, which is being updated regularly. We are a fork of this library that is being maintained by Lumiwealth |
While trying to use make_index I am getting a TypeError: unsupported operand type(s) for +: 'float' and 'str' message. This is my code that caused the error:
I even tested with other ticker combinations and directly entering the ticker and weights in make_index and the error repeats in the same way. I also tested in previous versions and the error repeats again. Does anyone know if there is an error in the package or is it my code?
The text was updated successfully, but these errors were encountered: