Closed MichaelQuaMan closed 2 years ago
Possible duplicate of TensorTrade Rendering Example Code Fails
#325
Looks like portfolio.performance
used to be a Pandas
Dataframe, which has a built-in plot()
method, but at some point it was implemented as an OrderedDict
(probably for simplicity and performance).
It should be pretty simple to create a dataframe from and OrderedDict
, if I desire to use the Pandas
plot()
method.
import pandas as pd
df = pd.DataFrame(portfolio.performance)
df.loc["bitfinex:/USD-BTC"].plot()
At the bottom of:
https://www.tensortrade.org/en/latest/examples/renderers_and_plotly_chart.html?highlight=PlotlyTradingChart#
It states the
the final performance and net worth can be displayed using pandas via Matplotlib.
However, both lead to:
Guessing, the API changed
What's the correct way to render these charts?