December 2018
Beginner to intermediate
684 pages
21h 9m
English
However, pyfolio also integrates with alphalens directly and permits the creation of pyfolio input data using create_pyfolio_input:
from alphalens.performance import create_pyfolio_inputqmin, qmax = factor_data.factor_quantile.min(), factor_data.factor_quantile.max()input_data = create_pyfolio_input(alphalens_data, period='1D', capital=100000, long_short=False, equal_weight=False, quantiles=[1, 5], benchmark_period='1D')returns, positions, benchmark = input_data
There are two options to specify how portfolio weights will be generated: