Skip to content

Commit

Permalink
Fixed bug in YoY plot
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedamen committed Sep 23, 2021
1 parent 35d3e8c commit fd1b1ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ To appear
# Requirements

Major requirements
* Required: Python 3.7 (Python 2 is not supported)
* Required: Python 3.8 (Python 2 is not supported)
* Required: pandas, numpy etc.
* Recommended: blpapi - Bloomberg Python Open API
* Recommended: chartpy - for funky interactive plots ([https://github.com/cuemacro/chartpy](https://github.com/cuemacro/chartpy)) and
Expand Down Expand Up @@ -132,6 +132,8 @@ individual data providers)

# Coding log

* 23 Sep 2021
* Fixed bug in YoY calculation
* 29 Jul 2021
* Minor changes to `Market` for managing tickers
* 28 Jul 2021
Expand Down
2 changes: 1 addition & 1 deletion findatapy/timeseries/retstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def calculate_ret_stats(self, returns_df=None, ann_factor=None):
dd2here = index_df / max2here - 1

self._dd = dd2here.min()
self._yoy_rets = index_df.resample('A').mean().pct_change()
self._yoy_rets = index_df.resample('Y').last().pct_change()

return self

Expand Down

0 comments on commit fd1b1ff

Please sign in to comment.