ffn icon indicating copy to clipboard operation
ffn copied to clipboard

How to set risk-free rate ( rf ) when calling df_prices.calc_stats() ?

Open ahotrod opened this issue 5 years ago • 2 comments

The output of

df_prices.calc_stats()

reports a rf = 0. I'd like to have

df_prices.calc_stats()

include a rf in the calculations. I don't see how to set rf. I've also tried:

ffn.GroupStats(*[df_prices[x] for x in df_prices.columns]).set_riskfree_rate(rf = 1.5)

without success.

ahotrod avatar Apr 11 '19 03:04 ahotrod

I also just had the same problem and figured it out.

perf = pd.DataFrame(df).calc_stats()
perf.set_riskfree_rate(0.011)
perf.display()

jaNGOB avatar Mar 28 '20 09:03 jaNGOB