stefan-jansen / zipline-reloaded

Zipline, a Pythonic Algorithmic Trading Library
https://zipline.ml4trading.io
Apache License 2.0
1.03k stars 199 forks source link

fix future warnings #229

Open gnzsnz opened 8 months ago

gnzsnz commented 8 months ago

@stefan-jansen , please review

this is to fix the FutureWarning on ledger.py:424

/home/gordon/.local/lib/python3.11/site-packages/zipline/finance/ledger.py:424: FutureWarning: Series.__setitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To set a value by position, use `ser.iloc[pos] = value`
  self.daily_returns_series[session_ix] = self.todays_returns

On branch future_warning Changes to be committed: modified: src/zipline/finance/ledger.py