You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello ,
I have dataframe and suppose i am having action column with 0 values except one having 1 value (signal for long) , now i use this to calcuate portfolio returns (pv_returns) and ,
there is code in "quantstat.reports.metrics" :
when i calculate pv_returns based on the actions i have , it has only 1 value 0.0015 and others are 0.0000 , then quanstat considers 0.0015 as 0.00 , which leads to a problem as tearsheet showing no returns but value i have passed has value (0.0015), so can you suggest me any solution to overcome this.
The text was updated successfully, but these errors were encountered:
Hello ,
I have dataframe and suppose i am having action column with 0 values except one having 1 value (signal for long) , now i use this to calcuate portfolio returns (pv_returns) and ,
there is code in "quantstat.reports.metrics" :
if compounded: metrics["Cumulative Return %"] = (_stats.comp(df) * pct).map("{:,.2f}".format) else: metrics["Total Return %"] = (df.sum() * pct).map("{:,.2f}".format)
when i calculate pv_returns based on the actions i have , it has only 1 value 0.0015 and others are 0.0000 , then quanstat considers 0.0015 as 0.00 , which leads to a problem as tearsheet showing no returns but value i have passed has value (0.0015), so can you suggest me any solution to overcome this.
The text was updated successfully, but these errors were encountered: