finlab-python / finlab_crypto

Documentation
https://finlab-python.github.io/finlab_crypto/index.html
GNU General Public License v3.0
266 stars 95 forks source link

Unable to draw candlestick chart #28

Closed eithwa closed 6 months ago

eithwa commented 6 months ago

Hello,

I am currently using Python 3.8.4 to run the tutorial with the finlab_crypto version 0.2.27. I have encountered an issue where candlestick charts are not being displayed during the test. image Additionally, when running the optimization process, I encountered a TypeError: "pivot() takes 1 positional argument but 3 were given." image As a newcomer to Python, I would appreciate guidance on whether I need to install any additional dependencies or provide additional information to help identify the cause of these issues.

Thank you for your assistance.

eithwa commented 6 months ago

For the candle chart part, I found that they were generated in an html file. For the heat map part, I modified some of the code to make it work.

df = (getattr(portfolio, performance)()
      .reset_index().groupby([name1, name2]).mean()
      .pivot_table(values=performance, index=name1, columns=name2)
  )

image