AI4Finance-Foundation / AI4Finance-Foundation/FinRL-Meta

FinRL_China_A_Share_Market.ipynb中运行plotter.plot()报错

Offen
#281 0 Kommentare 1 Reaktion 2 zugewiesene Personen Beansprucht von @zhumingpassional Auf GitHub ansehen
bug
Vorherrschende Sprache
Python
Sterne
1.9k
Forks
751
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

AttributeError Traceback (most recent call last)
Input In [23], in ()
1 get_ipython().run_line_magic('matplotlib', 'inline')
----> 2 plotter.plot()

File ~/autodl-tmp/FinRL-Meta/meta/data_processors/tushare.py:220, in ReturnPlotter.plot(self, baseline_ticket)
216 days_per_tick = (
217 60 # you should scale this variable accroding to the total trading days
218 )
219 time = list(range(len(ours)))
--> 220 datetimes = self.df_account_value.time.tolist()
221 ticks = [tick for t, tick in zip(time, datetimes) if t % days_per_tick == 0]
222 plt.title("Cumulative Returns")

File ~/miniconda3/lib/python3.8/site-packages/pandas/core/generic.py:5902, in NDFrame.__getattr__(self, name)
5895 if (
5896 name not in self._internal_names_set
5897 and name not in self._metadata
5898 and name not in self._accessors
5899 and self._info_axis._can_hold_identifiers_and_holds_name(name)
5900 ):
5901 return self[name]
-> 5902 return object.__getattribute__(self, name)

AttributeError: 'DataFrame' object has no attribute 'time'

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.