Skip to content
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

error with pyfolio; AttributeError: 'Series' object has no attribute 'iteritems' #3

Open
jaoujal opened this issue Dec 3, 2023 · 0 comments

Comments

@jaoujal
Copy link

jaoujal commented Dec 3, 2023

hi, thank you for tis great work,

I got this error with pyfolio:


AttributeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_21596\3278245655.py in ?()
1 # get performance statistics for strategy
----> 2 pf.show_perf_stats(returns)

~\anaconda3\envs\FX\Lib\site-packages\pyfolio\plotting.py in ?(returns, factor_returns, positions, transactions, turnover_denom, live_start_date, bootstrap, header_rows)
644 APPROX_BDAYS_PER_MONTH)
645 perf_stats = pd.DataFrame(perf_stats_all, columns=['Backtest'])
646
647 for column in perf_stats.columns:
--> 648 for stat, value in perf_stats[column].iteritems():
649 if stat in STAT_FUNCS_PCT:
650 perf_stats.loc[stat, column] = str(np.round(value * 100,
651 1)) + '%'

~\anaconda3\envs\FX\Lib\site-packages\pandas\core\generic.py in ?(self, name)
6200 and name not in self._accessors
6201 and self._info_axis._can_hold_identifiers_and_holds_name(name)
6202 ):
6203 return self[name]
-> 6204 return object.getattribute(self, name)

AttributeError: 'Series' object has no attribute 'iteritems'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant