Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Quantstats utils.make_index() TypeError: unsupported operand type(s) for +: 'float' and 'str'

$
0
0

While trying to use Quantstats utils.make_index() I am getting a TypeError: unsupported operand type(s) for +: 'float' and 'str' message. This is my code that caused the error:

`import quantstats as qsqs.extend_pandas()

IAC = {"SPY": 1.3, "AGG": -.3}

portfolio = qs.utils.make_index(IAC)`

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?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>