random minor fix
AlessandroQI opened this issue · 4 comments
Hi,
i was testing pyfinance, i'm using 1.2.1
i wish this will be helpful:
returns.py
line 617
diff = self.excess_ret(benchmark).anlzd_ret()
instead
diff = self.excess_ret(benchmark).anlzd_return()
in utils.py i added the function convertfreq
def convertfreq(freq):
freq = freq.upper()
if freq=='M':
periods = 12
elif freq=='A':
periods = 1
elif freq== 'Q':
periods = 4
else:
raise ValueError('freq must be equal to M,A,Q')
return periods
Hi @AlessandroQI , you can find this function as utils.get_anlz_factor()
. I had renamed it and forgot to change the reference to it in the readme. That should be fixed in e4f997d which is present in version 1.2.3, get via pip install --upgrade pyfinance
hi @bsolomon1124
there is still a little problem:
line 617 file returns.py
diff = self.excess_ret(benchmark).anlzd_ret()
instead
diff = self.excess_ret(benchmark).anlzd_return()
Ah I see, I was unclear at your original message.
Fixed in 6f2970c - will update version shortly also.
Fix is included in version 1.2.4, pip install --upgrade pyfinance
. Thanks for bearing with me.