stefan-jansen / pyfolio-reloaded

Portfolio and risk analytics in Python
https://pyfolio.ml4trading.io/
Apache License 2.0
348 stars 109 forks source link

Getting started #2

Closed ghost closed 3 years ago

ghost commented 3 years ago

I still not sure how to get start here. I work the example in the documentation and get the below error:

mport yfinance as yf import pyfolio as pf

%matplotlib inline

fb = yf.Ticker('FB') history = fb.history('max') history.index = history.index.tz_localize('utc')

returns = history.Close.pct_change()

pf.create_returns_tear_sheet(returns, live_start_date='2020-1-1')

I get this error:

AttributeError: module 'empyrical' has no attribute 'utils'

UPDATE:

Rookie mistake. Needs to install empyrical -- > but still tear sheet does not show in the console, but other charts do