December 2018
Beginner to intermediate
684 pages
21h 9m
English
Pyfolio also includes timelines for various events that you can use to compare the performance of a portfolio to a benchmark during this period, for example, during the fall 2015 selloff following the Brexit vote:
interesting_times = extract_interesting_date_ranges(returns=returns)interesting_times['Fall2015'].to_frame('pf') \ .join(benchmark_rets) \ .add(1).cumprod().sub(1) \ .plot(lw=2, figsize=(14, 6), title='Post-Brexit Turmoil')
The resulting plot looks as follows:
